init
This commit is contained in:
BIN
nv/html/nv-nopdf/scripts/._codecs
Normal file
BIN
nv/html/nv-nopdf/scripts/._codecs
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/._cornerstone
Normal file
BIN
nv/html/nv-nopdf/scripts/._cornerstone
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/._dialog-polyfill.js
Normal file
BIN
nv/html/nv-nopdf/scripts/._dialog-polyfill.js
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/._dicom
Normal file
BIN
nv/html/nv-nopdf/scripts/._dicom
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/._flatpickr.min.js
vendored
Normal file
BIN
nv/html/nv-nopdf/scripts/._flatpickr.min.js
vendored
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/._hammer.js
Normal file
BIN
nv/html/nv-nopdf/scripts/._hammer.js
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/._initWebWorker.js
Normal file
BIN
nv/html/nv-nopdf/scripts/._initWebWorker.js
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/._main.js
Normal file
BIN
nv/html/nv-nopdf/scripts/._main.js
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/._main.js.backup
Normal file
BIN
nv/html/nv-nopdf/scripts/._main.js.backup
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/._viewer.js
Normal file
BIN
nv/html/nv-nopdf/scripts/._viewer.js
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/codecs/._charLS-FixedMemory-browser.js
Normal file
BIN
nv/html/nv-nopdf/scripts/codecs/._charLS-FixedMemory-browser.js
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/codecs/._jpeg.js
Normal file
BIN
nv/html/nv-nopdf/scripts/codecs/._jpeg.js
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/codecs/._jpegLossless.js
Normal file
BIN
nv/html/nv-nopdf/scripts/codecs/._jpegLossless.js
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/codecs/._openJPEG-FixedMemory.js
Normal file
BIN
nv/html/nv-nopdf/scripts/codecs/._openJPEG-FixedMemory.js
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/codecs/._pako.min.js
vendored
Normal file
BIN
nv/html/nv-nopdf/scripts/codecs/._pako.min.js
vendored
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
1019
nv/html/nv-nopdf/scripts/codecs/jpeg.js
Normal file
1019
nv/html/nv-nopdf/scripts/codecs/jpeg.js
Normal file
File diff suppressed because it is too large
Load Diff
1756
nv/html/nv-nopdf/scripts/codecs/jpegLossless.js
Normal file
1756
nv/html/nv-nopdf/scripts/codecs/jpegLossless.js
Normal file
File diff suppressed because it is too large
Load Diff
26
nv/html/nv-nopdf/scripts/codecs/openJPEG-FixedMemory.js
Normal file
26
nv/html/nv-nopdf/scripts/codecs/openJPEG-FixedMemory.js
Normal file
File diff suppressed because one or more lines are too long
3
nv/html/nv-nopdf/scripts/codecs/pako.min.js
vendored
Normal file
3
nv/html/nv-nopdf/scripts/codecs/pako.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
BIN
nv/html/nv-nopdf/scripts/cornerstone/._cornerstone.js
Normal file
BIN
nv/html/nv-nopdf/scripts/cornerstone/._cornerstone.js
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/cornerstone/._cornerstone.js.map
Normal file
BIN
nv/html/nv-nopdf/scripts/cornerstone/._cornerstone.js.map
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/cornerstone/._cornerstone.min.js
vendored
Normal file
BIN
nv/html/nv-nopdf/scripts/cornerstone/._cornerstone.min.js
vendored
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/cornerstone/._cornerstone.min.js.map
Normal file
BIN
nv/html/nv-nopdf/scripts/cornerstone/._cornerstone.min.js.map
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/cornerstone/._cornerstoneMath.min.js
vendored
Normal file
BIN
nv/html/nv-nopdf/scripts/cornerstone/._cornerstoneMath.min.js
vendored
Normal file
Binary file not shown.
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/cornerstone/._cornerstoneTools.min.js
vendored
Normal file
BIN
nv/html/nv-nopdf/scripts/cornerstone/._cornerstoneTools.min.js
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/cornerstone/._min
Normal file
BIN
nv/html/nv-nopdf/scripts/cornerstone/._min
Normal file
Binary file not shown.
8323
nv/html/nv-nopdf/scripts/cornerstone/cornerstone.js
Normal file
8323
nv/html/nv-nopdf/scripts/cornerstone/cornerstone.js
Normal file
File diff suppressed because one or more lines are too long
1
nv/html/nv-nopdf/scripts/cornerstone/cornerstone.js.map
Normal file
1
nv/html/nv-nopdf/scripts/cornerstone/cornerstone.js.map
Normal file
File diff suppressed because one or more lines are too long
3
nv/html/nv-nopdf/scripts/cornerstone/cornerstone.min.js
vendored
Normal file
3
nv/html/nv-nopdf/scripts/cornerstone/cornerstone.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
3
nv/html/nv-nopdf/scripts/cornerstone/cornerstoneMath.min.js
vendored
Normal file
3
nv/html/nv-nopdf/scripts/cornerstone/cornerstoneMath.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
3
nv/html/nv-nopdf/scripts/cornerstone/cornerstoneTools.min.js
vendored
Normal file
3
nv/html/nv-nopdf/scripts/cornerstone/cornerstoneTools.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4867
nv/html/nv-nopdf/scripts/cornerstone/cornerstoneWADOImageLoader.js
Normal file
4867
nv/html/nv-nopdf/scripts/cornerstone/cornerstoneWADOImageLoader.js
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
4865
nv/html/nv-nopdf/scripts/cornerstone/cornerstoneWADOImageLoader.js~
Normal file
4865
nv/html/nv-nopdf/scripts/cornerstone/cornerstoneWADOImageLoader.js~
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
BIN
nv/html/nv-nopdf/scripts/cornerstone/min/._cornerstoneWADOImageLoader.min.js
vendored
Normal file
BIN
nv/html/nv-nopdf/scripts/cornerstone/min/._cornerstoneWADOImageLoader.min.js
vendored
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/cornerstone/min/._cornerstoneWADOImageLoaderCodecs.min.js
vendored
Normal file
BIN
nv/html/nv-nopdf/scripts/cornerstone/min/._cornerstoneWADOImageLoaderCodecs.min.js
vendored
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/cornerstone/min/._cornerstoneWADOImageLoaderWebWorker.min.js
vendored
Normal file
BIN
nv/html/nv-nopdf/scripts/cornerstone/min/._cornerstoneWADOImageLoaderWebWorker.min.js
vendored
Normal file
Binary file not shown.
3
nv/html/nv-nopdf/scripts/cornerstone/min/cornerstoneWADOImageLoader.min.js
vendored
Normal file
3
nv/html/nv-nopdf/scripts/cornerstone/min/cornerstoneWADOImageLoader.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
nv/html/nv-nopdf/scripts/cornerstone/min/cornerstoneWADOImageLoaderCodecs.min.js
vendored
Normal file
4
nv/html/nv-nopdf/scripts/cornerstone/min/cornerstoneWADOImageLoaderCodecs.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
nv/html/nv-nopdf/scripts/cornerstone/min/cornerstoneWADOImageLoaderWebWorker.min.js
vendored
Normal file
3
nv/html/nv-nopdf/scripts/cornerstone/min/cornerstoneWADOImageLoaderWebWorker.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
742
nv/html/nv-nopdf/scripts/dialog-polyfill.js
Normal file
742
nv/html/nv-nopdf/scripts/dialog-polyfill.js
Normal file
@@ -0,0 +1,742 @@
|
||||
(function() {
|
||||
|
||||
// nb. This is for IE10 and lower _only_.
|
||||
var supportCustomEvent = window.CustomEvent;
|
||||
if (!supportCustomEvent || typeof supportCustomEvent === 'object') {
|
||||
supportCustomEvent = function CustomEvent(event, x) {
|
||||
x = x || {};
|
||||
var ev = document.createEvent('CustomEvent');
|
||||
ev.initCustomEvent(event, !!x.bubbles, !!x.cancelable, x.detail || null);
|
||||
return ev;
|
||||
};
|
||||
supportCustomEvent.prototype = window.Event.prototype;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Element} el to check for stacking context
|
||||
* @return {boolean} whether this el or its parents creates a stacking context
|
||||
*/
|
||||
function createsStackingContext(el) {
|
||||
while (el && el !== document.body) {
|
||||
var s = window.getComputedStyle(el);
|
||||
var invalid = function(k, ok) {
|
||||
return !(s[k] === undefined || s[k] === ok);
|
||||
}
|
||||
if (s.opacity < 1 ||
|
||||
invalid('zIndex', 'auto') ||
|
||||
invalid('transform', 'none') ||
|
||||
invalid('mixBlendMode', 'normal') ||
|
||||
invalid('filter', 'none') ||
|
||||
invalid('perspective', 'none') ||
|
||||
s['isolation'] === 'isolate' ||
|
||||
s.position === 'fixed' ||
|
||||
s.webkitOverflowScrolling === 'touch') {
|
||||
return true;
|
||||
}
|
||||
el = el.parentElement;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the nearest <dialog> from the passed element.
|
||||
*
|
||||
* @param {Element} el to search from
|
||||
* @return {HTMLDialogElement} dialog found
|
||||
*/
|
||||
function findNearestDialog(el) {
|
||||
while (el) {
|
||||
if (el.localName === 'dialog') {
|
||||
return /** @type {HTMLDialogElement} */ (el);
|
||||
}
|
||||
el = el.parentElement;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Blur the specified element, as long as it's not the HTML body element.
|
||||
* This works around an IE9/10 bug - blurring the body causes Windows to
|
||||
* blur the whole application.
|
||||
*
|
||||
* @param {Element} el to blur
|
||||
*/
|
||||
function safeBlur(el) {
|
||||
if (el && el.blur && el !== document.body) {
|
||||
el.blur();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {!NodeList} nodeList to search
|
||||
* @param {Node} node to find
|
||||
* @return {boolean} whether node is inside nodeList
|
||||
*/
|
||||
function inNodeList(nodeList, node) {
|
||||
for (var i = 0; i < nodeList.length; ++i) {
|
||||
if (nodeList[i] === node) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {HTMLFormElement} el to check
|
||||
* @return {boolean} whether this form has method="dialog"
|
||||
*/
|
||||
function isFormMethodDialog(el) {
|
||||
if (!el || !el.hasAttribute('method')) {
|
||||
return false;
|
||||
}
|
||||
return el.getAttribute('method').toLowerCase() === 'dialog';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {!HTMLDialogElement} dialog to upgrade
|
||||
* @constructor
|
||||
*/
|
||||
function dialogPolyfillInfo(dialog) {
|
||||
this.dialog_ = dialog;
|
||||
this.replacedStyleTop_ = false;
|
||||
this.openAsModal_ = false;
|
||||
|
||||
// Set a11y role. Browsers that support dialog implicitly know this already.
|
||||
if (!dialog.hasAttribute('role')) {
|
||||
dialog.setAttribute('role', 'dialog');
|
||||
}
|
||||
|
||||
dialog.show = this.show.bind(this);
|
||||
dialog.showModal = this.showModal.bind(this);
|
||||
dialog.close = this.close.bind(this);
|
||||
|
||||
if (!('returnValue' in dialog)) {
|
||||
dialog.returnValue = '';
|
||||
}
|
||||
|
||||
if ('MutationObserver' in window) {
|
||||
var mo = new MutationObserver(this.maybeHideModal.bind(this));
|
||||
mo.observe(dialog, {attributes: true, attributeFilter: ['open']});
|
||||
} else {
|
||||
// IE10 and below support. Note that DOMNodeRemoved etc fire _before_ removal. They also
|
||||
// seem to fire even if the element was removed as part of a parent removal. Use the removed
|
||||
// events to force downgrade (useful if removed/immediately added).
|
||||
var removed = false;
|
||||
var cb = function() {
|
||||
removed ? this.downgradeModal() : this.maybeHideModal();
|
||||
removed = false;
|
||||
}.bind(this);
|
||||
var timeout;
|
||||
var delayModel = function(ev) {
|
||||
if (ev.target !== dialog) { return; } // not for a child element
|
||||
var cand = 'DOMNodeRemoved';
|
||||
removed |= (ev.type.substr(0, cand.length) === cand);
|
||||
window.clearTimeout(timeout);
|
||||
timeout = window.setTimeout(cb, 0);
|
||||
};
|
||||
['DOMAttrModified', 'DOMNodeRemoved', 'DOMNodeRemovedFromDocument'].forEach(function(name) {
|
||||
dialog.addEventListener(name, delayModel);
|
||||
});
|
||||
}
|
||||
// Note that the DOM is observed inside DialogManager while any dialog
|
||||
// is being displayed as a modal, to catch modal removal from the DOM.
|
||||
|
||||
Object.defineProperty(dialog, 'open', {
|
||||
set: this.setOpen.bind(this),
|
||||
get: dialog.hasAttribute.bind(dialog, 'open')
|
||||
});
|
||||
|
||||
this.backdrop_ = document.createElement('div');
|
||||
this.backdrop_.className = 'backdrop';
|
||||
this.backdrop_.addEventListener('click', this.backdropClick_.bind(this));
|
||||
}
|
||||
|
||||
dialogPolyfillInfo.prototype = {
|
||||
|
||||
get dialog() {
|
||||
return this.dialog_;
|
||||
},
|
||||
|
||||
/**
|
||||
* Maybe remove this dialog from the modal top layer. This is called when
|
||||
* a modal dialog may no longer be tenable, e.g., when the dialog is no
|
||||
* longer open or is no longer part of the DOM.
|
||||
*/
|
||||
maybeHideModal: function() {
|
||||
if (this.dialog_.hasAttribute('open') && document.body.contains(this.dialog_)) { return; }
|
||||
this.downgradeModal();
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove this dialog from the modal top layer, leaving it as a non-modal.
|
||||
*/
|
||||
downgradeModal: function() {
|
||||
if (!this.openAsModal_) { return; }
|
||||
this.openAsModal_ = false;
|
||||
this.dialog_.style.zIndex = '';
|
||||
|
||||
// This won't match the native <dialog> exactly because if the user set top on a centered
|
||||
// polyfill dialog, that top gets thrown away when the dialog is closed. Not sure it's
|
||||
// possible to polyfill this perfectly.
|
||||
if (this.replacedStyleTop_) {
|
||||
this.dialog_.style.top = '';
|
||||
this.replacedStyleTop_ = false;
|
||||
}
|
||||
|
||||
// Clear the backdrop and remove from the manager.
|
||||
this.backdrop_.parentNode && this.backdrop_.parentNode.removeChild(this.backdrop_);
|
||||
dialogPolyfill.dm.removeDialog(this);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {boolean} value whether to open or close this dialog
|
||||
*/
|
||||
setOpen: function(value) {
|
||||
if (value) {
|
||||
this.dialog_.hasAttribute('open') || this.dialog_.setAttribute('open', '');
|
||||
} else {
|
||||
this.dialog_.removeAttribute('open');
|
||||
this.maybeHideModal(); // nb. redundant with MutationObserver
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Handles clicks on the fake .backdrop element, redirecting them as if
|
||||
* they were on the dialog itself.
|
||||
*
|
||||
* @param {!Event} e to redirect
|
||||
*/
|
||||
backdropClick_: function(e) {
|
||||
if (!this.dialog_.hasAttribute('tabindex')) {
|
||||
// Clicking on the backdrop should move the implicit cursor, even if dialog cannot be
|
||||
// focused. Create a fake thing to focus on. If the backdrop was _before_ the dialog, this
|
||||
// would not be needed - clicks would move the implicit cursor there.
|
||||
var fake = document.createElement('div');
|
||||
this.dialog_.insertBefore(fake, this.dialog_.firstChild);
|
||||
fake.tabIndex = -1;
|
||||
fake.focus();
|
||||
this.dialog_.removeChild(fake);
|
||||
} else {
|
||||
this.dialog_.focus();
|
||||
}
|
||||
|
||||
var redirectedEvent = document.createEvent('MouseEvents');
|
||||
redirectedEvent.initMouseEvent(e.type, e.bubbles, e.cancelable, window,
|
||||
e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey,
|
||||
e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
|
||||
this.dialog_.dispatchEvent(redirectedEvent);
|
||||
e.stopPropagation();
|
||||
},
|
||||
|
||||
/**
|
||||
* Focuses on the first focusable element within the dialog. This will always blur the current
|
||||
* focus, even if nothing within the dialog is found.
|
||||
*/
|
||||
focus_: function() {
|
||||
// Find element with `autofocus` attribute, or fall back to the first form/tabindex control.
|
||||
var target = this.dialog_.querySelector('[autofocus]:not([disabled])');
|
||||
if (!target && this.dialog_.tabIndex >= 0) {
|
||||
target = this.dialog_;
|
||||
}
|
||||
if (!target) {
|
||||
// Note that this is 'any focusable area'. This list is probably not exhaustive, but the
|
||||
// alternative involves stepping through and trying to focus everything.
|
||||
var opts = ['button', 'input', 'keygen', 'select', 'textarea'];
|
||||
var query = opts.map(function(el) {
|
||||
return el + ':not([disabled])';
|
||||
});
|
||||
// TODO(samthor): tabindex values that are not numeric are not focusable.
|
||||
query.push('[tabindex]:not([disabled]):not([tabindex=""])'); // tabindex != "", not disabled
|
||||
target = this.dialog_.querySelector(query.join(', '));
|
||||
}
|
||||
safeBlur(document.activeElement);
|
||||
target && target.focus();
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the zIndex for the backdrop and dialog.
|
||||
*
|
||||
* @param {number} dialogZ
|
||||
* @param {number} backdropZ
|
||||
*/
|
||||
updateZIndex: function(dialogZ, backdropZ) {
|
||||
if (dialogZ < backdropZ) {
|
||||
throw new Error('dialogZ should never be < backdropZ');
|
||||
}
|
||||
this.dialog_.style.zIndex = dialogZ;
|
||||
this.backdrop_.style.zIndex = backdropZ;
|
||||
},
|
||||
|
||||
/**
|
||||
* Shows the dialog. If the dialog is already open, this does nothing.
|
||||
*/
|
||||
show: function() {
|
||||
if (!this.dialog_.open) {
|
||||
this.setOpen(true);
|
||||
this.focus_();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Show this dialog modally.
|
||||
*/
|
||||
showModal: function() {
|
||||
if (this.dialog_.hasAttribute('open')) {
|
||||
throw new Error('Failed to execute \'showModal\' on dialog: The element is already open, and therefore cannot be opened modally.');
|
||||
}
|
||||
if (!document.body.contains(this.dialog_)) {
|
||||
throw new Error('Failed to execute \'showModal\' on dialog: The element is not in a Document.');
|
||||
}
|
||||
if (!dialogPolyfill.dm.pushDialog(this)) {
|
||||
throw new Error('Failed to execute \'showModal\' on dialog: There are too many open modal dialogs.');
|
||||
}
|
||||
|
||||
if (createsStackingContext(this.dialog_.parentElement)) {
|
||||
console.warn('A dialog is being shown inside a stacking context. ' +
|
||||
'This may cause it to be unusable. For more information, see this link: ' +
|
||||
'https://github.com/GoogleChrome/dialog-polyfill/#stacking-context');
|
||||
}
|
||||
|
||||
this.setOpen(true);
|
||||
this.openAsModal_ = true;
|
||||
|
||||
// Optionally center vertically, relative to the current viewport.
|
||||
if (dialogPolyfill.needsCentering(this.dialog_)) {
|
||||
dialogPolyfill.reposition(this.dialog_);
|
||||
this.replacedStyleTop_ = true;
|
||||
} else {
|
||||
this.replacedStyleTop_ = false;
|
||||
}
|
||||
|
||||
// Insert backdrop.
|
||||
this.dialog_.parentNode.insertBefore(this.backdrop_, this.dialog_.nextSibling);
|
||||
|
||||
// Focus on whatever inside the dialog.
|
||||
this.focus_();
|
||||
},
|
||||
|
||||
/**
|
||||
* Closes this HTMLDialogElement. This is optional vs clearing the open
|
||||
* attribute, however this fires a 'close' event.
|
||||
*
|
||||
* @param {string=} opt_returnValue to use as the returnValue
|
||||
*/
|
||||
close: function(opt_returnValue) {
|
||||
if (!this.dialog_.hasAttribute('open')) {
|
||||
throw new Error('Failed to execute \'close\' on dialog: The element does not have an \'open\' attribute, and therefore cannot be closed.');
|
||||
}
|
||||
this.setOpen(false);
|
||||
|
||||
// Leave returnValue untouched in case it was set directly on the element
|
||||
if (opt_returnValue !== undefined) {
|
||||
this.dialog_.returnValue = opt_returnValue;
|
||||
}
|
||||
|
||||
// Triggering "close" event for any attached listeners on the <dialog>.
|
||||
var closeEvent = new supportCustomEvent('close', {
|
||||
bubbles: false,
|
||||
cancelable: false
|
||||
});
|
||||
this.dialog_.dispatchEvent(closeEvent);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
var dialogPolyfill = {};
|
||||
|
||||
dialogPolyfill.reposition = function(element) {
|
||||
var scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
|
||||
var topValue = scrollTop + (window.innerHeight - element.offsetHeight) / 2;
|
||||
element.style.top = Math.max(scrollTop, topValue) + 'px';
|
||||
};
|
||||
|
||||
dialogPolyfill.isInlinePositionSetByStylesheet = function(element) {
|
||||
for (var i = 0; i < document.styleSheets.length; ++i) {
|
||||
var styleSheet = document.styleSheets[i];
|
||||
var cssRules = null;
|
||||
// Some browsers throw on cssRules.
|
||||
try {
|
||||
cssRules = styleSheet.cssRules;
|
||||
} catch (e) {}
|
||||
if (!cssRules) { continue; }
|
||||
for (var j = 0; j < cssRules.length; ++j) {
|
||||
var rule = cssRules[j];
|
||||
var selectedNodes = null;
|
||||
// Ignore errors on invalid selector texts.
|
||||
try {
|
||||
selectedNodes = document.querySelectorAll(rule.selectorText);
|
||||
} catch(e) {}
|
||||
if (!selectedNodes || !inNodeList(selectedNodes, element)) {
|
||||
continue;
|
||||
}
|
||||
var cssTop = rule.style.getPropertyValue('top');
|
||||
var cssBottom = rule.style.getPropertyValue('bottom');
|
||||
if ((cssTop && cssTop !== 'auto') || (cssBottom && cssBottom !== 'auto')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
dialogPolyfill.needsCentering = function(dialog) {
|
||||
var computedStyle = window.getComputedStyle(dialog);
|
||||
if (computedStyle.position !== 'absolute') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We must determine whether the top/bottom specified value is non-auto. In
|
||||
// WebKit/Blink, checking computedStyle.top == 'auto' is sufficient, but
|
||||
// Firefox returns the used value. So we do this crazy thing instead: check
|
||||
// the inline style and then go through CSS rules.
|
||||
if ((dialog.style.top !== 'auto' && dialog.style.top !== '') ||
|
||||
(dialog.style.bottom !== 'auto' && dialog.style.bottom !== '')) {
|
||||
return false;
|
||||
}
|
||||
return !dialogPolyfill.isInlinePositionSetByStylesheet(dialog);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {!Element} element to force upgrade
|
||||
*/
|
||||
dialogPolyfill.forceRegisterDialog = function(element) {
|
||||
if (window.HTMLDialogElement || element.showModal) {
|
||||
console.warn('This browser already supports <dialog>, the polyfill ' +
|
||||
'may not work correctly', element);
|
||||
}
|
||||
if (element.localName !== 'dialog') {
|
||||
throw new Error('Failed to register dialog: The element is not a dialog.');
|
||||
}
|
||||
new dialogPolyfillInfo(/** @type {!HTMLDialogElement} */ (element));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {!Element} element to upgrade, if necessary
|
||||
*/
|
||||
dialogPolyfill.registerDialog = function(element) {
|
||||
if (!element.showModal) {
|
||||
dialogPolyfill.forceRegisterDialog(element);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
dialogPolyfill.DialogManager = function() {
|
||||
/** @type {!Array<!dialogPolyfillInfo>} */
|
||||
this.pendingDialogStack = [];
|
||||
|
||||
var checkDOM = this.checkDOM_.bind(this);
|
||||
|
||||
// The overlay is used to simulate how a modal dialog blocks the document.
|
||||
// The blocking dialog is positioned on top of the overlay, and the rest of
|
||||
// the dialogs on the pending dialog stack are positioned below it. In the
|
||||
// actual implementation, the modal dialog stacking is controlled by the
|
||||
// top layer, where z-index has no effect.
|
||||
this.overlay = document.createElement('div');
|
||||
this.overlay.className = '_dialog_overlay';
|
||||
this.overlay.addEventListener('click', function(e) {
|
||||
this.forwardTab_ = undefined;
|
||||
e.stopPropagation();
|
||||
checkDOM([]); // sanity-check DOM
|
||||
}.bind(this));
|
||||
|
||||
this.handleKey_ = this.handleKey_.bind(this);
|
||||
this.handleFocus_ = this.handleFocus_.bind(this);
|
||||
|
||||
this.zIndexLow_ = 100000;
|
||||
this.zIndexHigh_ = 100000 + 150;
|
||||
|
||||
this.forwardTab_ = undefined;
|
||||
|
||||
if ('MutationObserver' in window) {
|
||||
this.mo_ = new MutationObserver(function(records) {
|
||||
var removed = [];
|
||||
records.forEach(function(rec) {
|
||||
for (var i = 0, c; c = rec.removedNodes[i]; ++i) {
|
||||
if (!(c instanceof Element)) {
|
||||
continue;
|
||||
} else if (c.localName === 'dialog') {
|
||||
removed.push(c);
|
||||
}
|
||||
removed = removed.concat(c.querySelectorAll('dialog'));
|
||||
}
|
||||
});
|
||||
removed.length && checkDOM(removed);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Called on the first modal dialog being shown. Adds the overlay and related
|
||||
* handlers.
|
||||
*/
|
||||
dialogPolyfill.DialogManager.prototype.blockDocument = function() {
|
||||
document.documentElement.addEventListener('focus', this.handleFocus_, true);
|
||||
document.addEventListener('keydown', this.handleKey_);
|
||||
this.mo_ && this.mo_.observe(document, {childList: true, subtree: true});
|
||||
};
|
||||
|
||||
/**
|
||||
* Called on the first modal dialog being removed, i.e., when no more modal
|
||||
* dialogs are visible.
|
||||
*/
|
||||
dialogPolyfill.DialogManager.prototype.unblockDocument = function() {
|
||||
document.documentElement.removeEventListener('focus', this.handleFocus_, true);
|
||||
document.removeEventListener('keydown', this.handleKey_);
|
||||
this.mo_ && this.mo_.disconnect();
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the stacking of all known dialogs.
|
||||
*/
|
||||
dialogPolyfill.DialogManager.prototype.updateStacking = function() {
|
||||
var zIndex = this.zIndexHigh_;
|
||||
|
||||
for (var i = 0, dpi; dpi = this.pendingDialogStack[i]; ++i) {
|
||||
dpi.updateZIndex(--zIndex, --zIndex);
|
||||
if (i === 0) {
|
||||
this.overlay.style.zIndex = --zIndex;
|
||||
}
|
||||
}
|
||||
|
||||
// Make the overlay a sibling of the dialog itself.
|
||||
var last = this.pendingDialogStack[0];
|
||||
if (last) {
|
||||
var p = last.dialog.parentNode || document.body;
|
||||
p.appendChild(this.overlay);
|
||||
} else if (this.overlay.parentNode) {
|
||||
this.overlay.parentNode.removeChild(this.overlay);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {Element} candidate to check if contained or is the top-most modal dialog
|
||||
* @return {boolean} whether candidate is contained in top dialog
|
||||
*/
|
||||
dialogPolyfill.DialogManager.prototype.containedByTopDialog_ = function(candidate) {
|
||||
while (candidate = findNearestDialog(candidate)) {
|
||||
for (var i = 0, dpi; dpi = this.pendingDialogStack[i]; ++i) {
|
||||
if (dpi.dialog === candidate) {
|
||||
return i === 0; // only valid if top-most
|
||||
}
|
||||
}
|
||||
candidate = candidate.parentElement;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
dialogPolyfill.DialogManager.prototype.handleFocus_ = function(event) {
|
||||
if (this.containedByTopDialog_(event.target)) { return; }
|
||||
|
||||
if (document.activeElement === document.documentElement) { return; }
|
||||
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
safeBlur(/** @type {Element} */ (event.target));
|
||||
|
||||
if (this.forwardTab_ === undefined) { return; } // move focus only from a tab key
|
||||
|
||||
var dpi = this.pendingDialogStack[0];
|
||||
var dialog = dpi.dialog;
|
||||
var position = dialog.compareDocumentPosition(event.target);
|
||||
if (position & Node.DOCUMENT_POSITION_PRECEDING) {
|
||||
if (this.forwardTab_) {
|
||||
// forward
|
||||
dpi.focus_();
|
||||
} else if (event.target !== document.documentElement) {
|
||||
// backwards if we're not already focused on <html>
|
||||
document.documentElement.focus();
|
||||
}
|
||||
} else {
|
||||
// TODO: Focus after the dialog, is ignored.
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
dialogPolyfill.DialogManager.prototype.handleKey_ = function(event) {
|
||||
this.forwardTab_ = undefined;
|
||||
if (event.keyCode === 27) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
var cancelEvent = new supportCustomEvent('cancel', {
|
||||
bubbles: false,
|
||||
cancelable: true
|
||||
});
|
||||
var dpi = this.pendingDialogStack[0];
|
||||
if (dpi && dpi.dialog.dispatchEvent(cancelEvent)) {
|
||||
dpi.dialog.close();
|
||||
}
|
||||
} else if (event.keyCode === 9) {
|
||||
this.forwardTab_ = !event.shiftKey;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Finds and downgrades any known modal dialogs that are no longer displayed. Dialogs that are
|
||||
* removed and immediately readded don't stay modal, they become normal.
|
||||
*
|
||||
* @param {!Array<!HTMLDialogElement>} removed that have definitely been removed
|
||||
*/
|
||||
dialogPolyfill.DialogManager.prototype.checkDOM_ = function(removed) {
|
||||
// This operates on a clone because it may cause it to change. Each change also calls
|
||||
// updateStacking, which only actually needs to happen once. But who removes many modal dialogs
|
||||
// at a time?!
|
||||
var clone = this.pendingDialogStack.slice();
|
||||
clone.forEach(function(dpi) {
|
||||
if (removed.indexOf(dpi.dialog) !== -1) {
|
||||
dpi.downgradeModal();
|
||||
} else {
|
||||
dpi.maybeHideModal();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {!dialogPolyfillInfo} dpi
|
||||
* @return {boolean} whether the dialog was allowed
|
||||
*/
|
||||
dialogPolyfill.DialogManager.prototype.pushDialog = function(dpi) {
|
||||
var allowed = (this.zIndexHigh_ - this.zIndexLow_) / 2 - 1;
|
||||
if (this.pendingDialogStack.length >= allowed) {
|
||||
return false;
|
||||
}
|
||||
if (this.pendingDialogStack.unshift(dpi) === 1) {
|
||||
this.blockDocument();
|
||||
}
|
||||
this.updateStacking();
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {!dialogPolyfillInfo} dpi
|
||||
*/
|
||||
dialogPolyfill.DialogManager.prototype.removeDialog = function(dpi) {
|
||||
var index = this.pendingDialogStack.indexOf(dpi);
|
||||
if (index === -1) { return; }
|
||||
|
||||
this.pendingDialogStack.splice(index, 1);
|
||||
if (this.pendingDialogStack.length === 0) {
|
||||
this.unblockDocument();
|
||||
}
|
||||
this.updateStacking();
|
||||
};
|
||||
|
||||
dialogPolyfill.dm = new dialogPolyfill.DialogManager();
|
||||
dialogPolyfill.formSubmitter = null;
|
||||
dialogPolyfill.useValue = null;
|
||||
|
||||
/**
|
||||
* Installs global handlers, such as click listers and native method overrides. These are needed
|
||||
* even if a no dialog is registered, as they deal with <form method="dialog">.
|
||||
*/
|
||||
if (window.HTMLDialogElement === undefined) {
|
||||
|
||||
/**
|
||||
* If HTMLFormElement translates method="DIALOG" into 'get', then replace the descriptor with
|
||||
* one that returns the correct value.
|
||||
*/
|
||||
var testForm = document.createElement('form');
|
||||
testForm.setAttribute('method', 'dialog');
|
||||
if (testForm.method !== 'dialog') {
|
||||
var methodDescriptor = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, 'method');
|
||||
if (methodDescriptor) {
|
||||
// nb. Some older iOS and older PhantomJS fail to return the descriptor. Don't do anything
|
||||
// and don't bother to update the element.
|
||||
var realGet = methodDescriptor.get;
|
||||
methodDescriptor.get = function() {
|
||||
if (isFormMethodDialog(this)) {
|
||||
return 'dialog';
|
||||
}
|
||||
return realGet.call(this);
|
||||
};
|
||||
var realSet = methodDescriptor.set;
|
||||
methodDescriptor.set = function(v) {
|
||||
if (typeof v === 'string' && v.toLowerCase() === 'dialog') {
|
||||
return this.setAttribute('method', v);
|
||||
}
|
||||
return realSet.call(this, v);
|
||||
};
|
||||
Object.defineProperty(HTMLFormElement.prototype, 'method', methodDescriptor);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Global 'click' handler, to capture the <input type="submit"> or <button> element which has
|
||||
* submitted a <form method="dialog">. Needed as Safari and others don't report this inside
|
||||
* document.activeElement.
|
||||
*/
|
||||
document.addEventListener('click', function(ev) {
|
||||
dialogPolyfill.formSubmitter = null;
|
||||
dialogPolyfill.useValue = null;
|
||||
if (ev.defaultPrevented) { return; } // e.g. a submit which prevents default submission
|
||||
|
||||
var target = /** @type {Element} */ (ev.target);
|
||||
if (!target || !isFormMethodDialog(target.form)) { return; }
|
||||
|
||||
var valid = (target.type === 'submit' && ['button', 'input'].indexOf(target.localName) > -1);
|
||||
if (!valid) {
|
||||
if (!(target.localName === 'input' && target.type === 'image')) { return; }
|
||||
// this is a <input type="image">, which can submit forms
|
||||
dialogPolyfill.useValue = ev.offsetX + ',' + ev.offsetY;
|
||||
}
|
||||
|
||||
var dialog = findNearestDialog(target);
|
||||
if (!dialog) { return; }
|
||||
|
||||
dialogPolyfill.formSubmitter = target;
|
||||
}, false);
|
||||
|
||||
/**
|
||||
* Replace the native HTMLFormElement.submit() method, as it won't fire the
|
||||
* submit event and give us a chance to respond.
|
||||
*/
|
||||
var nativeFormSubmit = HTMLFormElement.prototype.submit;
|
||||
var replacementFormSubmit = function () {
|
||||
if (!isFormMethodDialog(this)) {
|
||||
return nativeFormSubmit.call(this);
|
||||
}
|
||||
var dialog = findNearestDialog(this);
|
||||
dialog && dialog.close();
|
||||
};
|
||||
HTMLFormElement.prototype.submit = replacementFormSubmit;
|
||||
|
||||
/**
|
||||
* Global form 'dialog' method handler. Closes a dialog correctly on submit
|
||||
* and possibly sets its return value.
|
||||
*/
|
||||
document.addEventListener('submit', function(ev) {
|
||||
var form = /** @type {HTMLFormElement} */ (ev.target);
|
||||
if (!isFormMethodDialog(form)) { return; }
|
||||
ev.preventDefault();
|
||||
|
||||
var dialog = findNearestDialog(form);
|
||||
if (!dialog) { return; }
|
||||
|
||||
// Forms can only be submitted via .submit() or a click (?), but anyway: sanity-check that
|
||||
// the submitter is correct before using its value as .returnValue.
|
||||
var s = dialogPolyfill.formSubmitter;
|
||||
if (s && s.form === form) {
|
||||
dialog.close(dialogPolyfill.useValue || s.value);
|
||||
} else {
|
||||
dialog.close();
|
||||
}
|
||||
dialogPolyfill.formSubmitter = null;
|
||||
}, true);
|
||||
}
|
||||
|
||||
dialogPolyfill['forceRegisterDialog'] = dialogPolyfill.forceRegisterDialog;
|
||||
dialogPolyfill['registerDialog'] = dialogPolyfill.registerDialog;
|
||||
|
||||
if (typeof define === 'function' && 'amd' in define) {
|
||||
// AMD support
|
||||
define(function() { return dialogPolyfill; });
|
||||
} else if (typeof module === 'object' && typeof module['exports'] === 'object') {
|
||||
// CommonJS support
|
||||
module['exports'] = dialogPolyfill;
|
||||
} else {
|
||||
// all others
|
||||
window['dialogPolyfill'] = dialogPolyfill;
|
||||
}
|
||||
})();
|
||||
BIN
nv/html/nv-nopdf/scripts/dicom/._dicomParser.min.js
vendored
Normal file
BIN
nv/html/nv-nopdf/scripts/dicom/._dicomParser.min.js
vendored
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/dicom/._dicomParser.min.js.map
Normal file
BIN
nv/html/nv-nopdf/scripts/dicom/._dicomParser.min.js.map
Normal file
Binary file not shown.
BIN
nv/html/nv-nopdf/scripts/dicom/._uids.js
Normal file
BIN
nv/html/nv-nopdf/scripts/dicom/._uids.js
Normal file
Binary file not shown.
15
nv/html/nv-nopdf/scripts/dicom/dicomParser.min.js
vendored
Normal file
15
nv/html/nv-nopdf/scripts/dicom/dicomParser.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
nv/html/nv-nopdf/scripts/dicom/dicomParser.min.js.map
Normal file
1
nv/html/nv-nopdf/scripts/dicom/dicomParser.min.js.map
Normal file
File diff suppressed because one or more lines are too long
380
nv/html/nv-nopdf/scripts/dicom/uids.js
Normal file
380
nv/html/nv-nopdf/scripts/dicom/uids.js
Normal file
@@ -0,0 +1,380 @@
|
||||
// The table below was generated by running the following javascript in the console window while
|
||||
// viewing the HTML version of the standard here:
|
||||
// DICOM Standard here: http://dicom.nema.org/medical/dicom/current/output/html/part06.html
|
||||
// see the blog post about it here: http://chafey.blogspot.com/2015/08/parsing-dicom-standard-with-javascript.html
|
||||
|
||||
/*
|
||||
(function () {
|
||||
var elements = document.querySelectorAll('#table_A-1 ~ div tbody tr');
|
||||
var result = "";for(var i=0; i < elements.length; i++) {
|
||||
result += "'" + elements[i].childNodes[1].childNodes[1].innerText.replace(/[^\x20-\x7E]+/g, '') + "':'" +
|
||||
elements[i].childNodes[3].childNodes[1].innerText.replace(/[^\x20-\x7E]+/g, '') + "',\n";
|
||||
}
|
||||
return result;
|
||||
})();
|
||||
*/
|
||||
|
||||
var uids = {
|
||||
'1.2.840.10008.1.1':'Verification SOP Class',
|
||||
'1.2.840.10008.1.2':'Implicit VR Little Endian: Default Transfer Syntax for DICOM',
|
||||
'1.2.840.10008.1.2.1':'Explicit VR Little Endian',
|
||||
'1.2.840.10008.1.2.1.99':'Deflated Explicit VR Little Endian',
|
||||
'1.2.840.10008.1.2.2':'Explicit VR Big Endian (Retired)',
|
||||
'1.2.840.10008.1.2.4.50':'JPEG Baseline (Process 1): Default Transfer Syntax for Lossy JPEG 8 Bit Image Compression',
|
||||
'1.2.840.10008.1.2.4.51':'JPEG Extended (Process 2 & 4): Default Transfer Syntax for Lossy JPEG 12 Bit Image Compression (Process 4 only)',
|
||||
'1.2.840.10008.1.2.4.52':'JPEG Extended (Process 3 & 5) (Retired)',
|
||||
'1.2.840.10008.1.2.4.53':'JPEG Spectral Selection, Non-Hierarchical (Process 6 & 8) (Retired)',
|
||||
'1.2.840.10008.1.2.4.54':'JPEG Spectral Selection, Non-Hierarchical (Process 7 & 9) (Retired)',
|
||||
'1.2.840.10008.1.2.4.55':'JPEG Full Progression, Non-Hierarchical (Process 10 & 12) (Retired)',
|
||||
'1.2.840.10008.1.2.4.56':'JPEG Full Progression, Non-Hierarchical (Process 11 & 13) (Retired)',
|
||||
'1.2.840.10008.1.2.4.57':'JPEG Lossless, Non-Hierarchical (Process 14)',
|
||||
'1.2.840.10008.1.2.4.58':'JPEG Lossless, Non-Hierarchical (Process 15) (Retired)',
|
||||
'1.2.840.10008.1.2.4.59':'JPEG Extended, Hierarchical (Process 16 & 18) (Retired)',
|
||||
'1.2.840.10008.1.2.4.60':'JPEG Extended, Hierarchical (Process 17 & 19) (Retired)',
|
||||
'1.2.840.10008.1.2.4.61':'JPEG Spectral Selection, Hierarchical (Process 20 & 22) (Retired)',
|
||||
'1.2.840.10008.1.2.4.62':'JPEG Spectral Selection, Hierarchical (Process 21 & 23) (Retired)',
|
||||
'1.2.840.10008.1.2.4.63':'JPEG Full Progression, Hierarchical (Process 24 & 26) (Retired)',
|
||||
'1.2.840.10008.1.2.4.64':'JPEG Full Progression, Hierarchical (Process 25 & 27) (Retired)',
|
||||
'1.2.840.10008.1.2.4.65':'JPEG Lossless, Hierarchical (Process 28) (Retired)',
|
||||
'1.2.840.10008.1.2.4.66':'JPEG Lossless, Hierarchical (Process 29) (Retired)',
|
||||
'1.2.840.10008.1.2.4.70':'JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1]): Default Transfer Syntax for Lossless JPEG Image Compression',
|
||||
'1.2.840.10008.1.2.4.80':'JPEG-LS Lossless Image Compression',
|
||||
'1.2.840.10008.1.2.4.81':'JPEG-LS Lossy (Near-Lossless) Image Compression',
|
||||
'1.2.840.10008.1.2.4.90':'JPEG 2000 Image Compression (Lossless Only)',
|
||||
'1.2.840.10008.1.2.4.91':'JPEG 2000 Image Compression',
|
||||
'1.2.840.10008.1.2.4.92':'JPEG 2000 Part 2 Multi-component Image Compression (Lossless Only)',
|
||||
'1.2.840.10008.1.2.4.93':'JPEG 2000 Part 2 Multi-component Image Compression',
|
||||
'1.2.840.10008.1.2.4.94':'JPIP Referenced',
|
||||
'1.2.840.10008.1.2.4.95':'JPIP Referenced Deflate',
|
||||
'1.2.840.10008.1.2.4.100':'MPEG2 Main Profile @ Main Level',
|
||||
'1.2.840.10008.1.2.4.101':'MPEG2 Main Profile @ High Level',
|
||||
'1.2.840.10008.1.2.4.102':'MPEG-4 AVC/H.264 High Profile / Level 4.1',
|
||||
'1.2.840.10008.1.2.4.103':'MPEG-4 AVC/H.264 BD-compatible High Profile / Level 4.1',
|
||||
'1.2.840.10008.1.2.4.104':'MPEG-4 AVC/H.264 High Profile / Level 4.2 For 2D Video',
|
||||
'1.2.840.10008.1.2.4.105':'MPEG-4 AVC/H.264 High Profile / Level 4.2 For 3D Video',
|
||||
'1.2.840.10008.1.2.4.106':'MPEG-4 AVC/H.264 Stereo High Profile / Level 4.2',
|
||||
'1.2.840.10008.1.2.5':'RLE Lossless',
|
||||
'1.2.840.10008.1.2.6.1':'RFC 2557 MIME encapsulation',
|
||||
'1.2.840.10008.1.2.6.2':'XML Encoding',
|
||||
'1.2.840.10008.1.3.10':'Media Storage Directory Storage',
|
||||
'1.2.840.10008.1.4.1.1':'Talairach Brain Atlas Frame of Reference',
|
||||
'1.2.840.10008.1.4.1.2':'SPM2 T1 Frame of Reference',
|
||||
'1.2.840.10008.1.4.1.3':'SPM2 T2 Frame of Reference',
|
||||
'1.2.840.10008.1.4.1.4':'SPM2 PD Frame of Reference',
|
||||
'1.2.840.10008.1.4.1.5':'SPM2 EPI Frame of Reference',
|
||||
'1.2.840.10008.1.4.1.6':'SPM2 FIL T1 Frame of Reference',
|
||||
'1.2.840.10008.1.4.1.7':'SPM2 PET Frame of Reference',
|
||||
'1.2.840.10008.1.4.1.8':'SPM2 TRANSM Frame of Reference',
|
||||
'1.2.840.10008.1.4.1.9':'SPM2 SPECT Frame of Reference',
|
||||
'1.2.840.10008.1.4.1.10':'SPM2 GRAY Frame of Reference',
|
||||
'1.2.840.10008.1.4.1.11':'SPM2 WHITE Frame of Reference',
|
||||
'1.2.840.10008.1.4.1.12':'SPM2 CSF Frame of Reference',
|
||||
'1.2.840.10008.1.4.1.13':'SPM2 BRAINMASK Frame of Reference',
|
||||
'1.2.840.10008.1.4.1.14':'SPM2 AVG305T1 Frame of Reference',
|
||||
'1.2.840.10008.1.4.1.15':'SPM2 AVG152T1 Frame of Reference',
|
||||
'1.2.840.10008.1.4.1.16':'SPM2 AVG152T2 Frame of Reference',
|
||||
'1.2.840.10008.1.4.1.17':'SPM2 AVG152PD Frame of Reference',
|
||||
'1.2.840.10008.1.4.1.18':'SPM2 SINGLESUBJT1 Frame of Reference',
|
||||
'1.2.840.10008.1.4.2.1':'ICBM 452 T1 Frame of Reference',
|
||||
'1.2.840.10008.1.4.2.2':'ICBM Single Subject MRI Frame of Reference',
|
||||
'1.2.840.10008.1.5.1':'Hot Iron Color Palette SOP Instance',
|
||||
'1.2.840.10008.1.5.2':'PET Color Palette SOP Instance',
|
||||
'1.2.840.10008.1.5.3':'Hot Metal Blue Color Palette SOP Instance',
|
||||
'1.2.840.10008.1.5.4':'PET 20 Step Color Palette SOP Instance',
|
||||
'1.2.840.10008.1.9':'Basic Study Content Notification SOP Class (Retired)',
|
||||
'1.2.840.10008.1.20.1':'Storage Commitment Push Model SOP Class',
|
||||
'1.2.840.10008.1.20.1.1':'Storage Commitment Push Model SOP Instance',
|
||||
'1.2.840.10008.1.20.2':'Storage Commitment Pull Model SOP Class (Retired)',
|
||||
'1.2.840.10008.1.20.2.1':'Storage Commitment Pull Model SOP Instance (Retired)',
|
||||
'1.2.840.10008.1.40':'Procedural Event Logging SOP Class',
|
||||
'1.2.840.10008.1.40.1':'Procedural Event Logging SOP Instance',
|
||||
'1.2.840.10008.1.42':'Substance Administration Logging SOP Class',
|
||||
'1.2.840.10008.1.42.1':'Substance Administration Logging SOP Instance',
|
||||
'1.2.840.10008.2.6.1':'DICOM UID Registry',
|
||||
'1.2.840.10008.2.16.4':'DICOM Controlled Terminology',
|
||||
'1.2.840.10008.3.1.1.1':'DICOM Application Context Name',
|
||||
'1.2.840.10008.3.1.2.1.1':'Detached Patient Management SOP Class (Retired)',
|
||||
'1.2.840.10008.3.1.2.1.4':'Detached Patient Management Meta SOP Class (Retired)',
|
||||
'1.2.840.10008.3.1.2.2.1':'Detached Visit Management SOP Class (Retired)',
|
||||
'1.2.840.10008.3.1.2.3.1':'Detached Study Management SOP Class (Retired)',
|
||||
'1.2.840.10008.3.1.2.3.2':'Study Component Management SOP Class (Retired)',
|
||||
'1.2.840.10008.3.1.2.3.3':'Modality Performed Procedure Step SOP Class',
|
||||
'1.2.840.10008.3.1.2.3.4':'Modality Performed Procedure Step Retrieve SOP Class',
|
||||
'1.2.840.10008.3.1.2.3.5':'Modality Performed Procedure Step Notification SOP Class',
|
||||
'1.2.840.10008.3.1.2.5.1':'Detached Results Management SOP Class (Retired)',
|
||||
'1.2.840.10008.3.1.2.5.4':'Detached Results Management Meta SOP Class (Retired)',
|
||||
'1.2.840.10008.3.1.2.5.5':'Detached Study Management Meta SOP Class (Retired)',
|
||||
'1.2.840.10008.3.1.2.6.1':'Detached Interpretation Management SOP Class (Retired)',
|
||||
'1.2.840.10008.4.2':'Storage Service Class',
|
||||
'1.2.840.10008.5.1.1.1':'Basic Film Session SOP Class',
|
||||
'1.2.840.10008.5.1.1.2':'Basic Film Box SOP Class',
|
||||
'1.2.840.10008.5.1.1.4':'Basic Grayscale Image Box SOP Class',
|
||||
'1.2.840.10008.5.1.1.4.1':'Basic Color Image Box SOP Class',
|
||||
'1.2.840.10008.5.1.1.4.2':'Referenced Image Box SOP Class (Retired)',
|
||||
'1.2.840.10008.5.1.1.9':'Basic Grayscale Print Management Meta SOP Class',
|
||||
'1.2.840.10008.5.1.1.9.1':'Referenced Grayscale Print Management Meta SOP Class (Retired)',
|
||||
'1.2.840.10008.5.1.1.14':'Print Job SOP Class',
|
||||
'1.2.840.10008.5.1.1.15':'Basic Annotation Box SOP Class',
|
||||
'1.2.840.10008.5.1.1.16':'Printer SOP Class',
|
||||
'1.2.840.10008.5.1.1.16.376':'Printer Configuration Retrieval SOP Class',
|
||||
'1.2.840.10008.5.1.1.17':'Printer SOP Instance',
|
||||
'1.2.840.10008.5.1.1.17.376':'Printer Configuration Retrieval SOP Instance',
|
||||
'1.2.840.10008.5.1.1.18':'Basic Color Print Management Meta SOP Class',
|
||||
'1.2.840.10008.5.1.1.18.1':'Referenced Color Print Management Meta SOP Class (Retired)',
|
||||
'1.2.840.10008.5.1.1.22':'VOI LUT Box SOP Class',
|
||||
'1.2.840.10008.5.1.1.23':'Presentation LUT SOP Class',
|
||||
'1.2.840.10008.5.1.1.24':'Image Overlay Box SOP Class (Retired)',
|
||||
'1.2.840.10008.5.1.1.24.1':'Basic Print Image Overlay Box SOP Class (Retired)',
|
||||
'1.2.840.10008.5.1.1.25':'Print Queue SOP Instance (Retired)',
|
||||
'1.2.840.10008.5.1.1.26':'Print Queue Management SOP Class (Retired)',
|
||||
'1.2.840.10008.5.1.1.27':'Stored Print Storage SOP Class (Retired)',
|
||||
'1.2.840.10008.5.1.1.29':'Hardcopy Grayscale Image Storage SOP Class (Retired)',
|
||||
'1.2.840.10008.5.1.1.30':'Hardcopy Color Image Storage SOP Class (Retired)',
|
||||
'1.2.840.10008.5.1.1.31':'Pull Print Request SOP Class (Retired)',
|
||||
'1.2.840.10008.5.1.1.32':'Pull Stored Print Management Meta SOP Class (Retired)',
|
||||
'1.2.840.10008.5.1.1.33':'Media Creation Management SOP Class UID',
|
||||
'1.2.840.10008.5.1.1.40':'Display System SOP Class',
|
||||
'1.2.840.10008.5.1.1.40.1':'Display System SOP Instance',
|
||||
'1.2.840.10008.5.1.4.1.1.1':'Computed Radiography Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.1.1':'Digital X-Ray Image Storage - For Presentation',
|
||||
'1.2.840.10008.5.1.4.1.1.1.1.1':'Digital X-Ray Image Storage - For Processing',
|
||||
'1.2.840.10008.5.1.4.1.1.1.2':'Digital Mammography X-Ray Image Storage - For Presentation',
|
||||
'1.2.840.10008.5.1.4.1.1.1.2.1':'Digital Mammography X-Ray Image Storage - For Processing',
|
||||
'1.2.840.10008.5.1.4.1.1.1.3':'Digital Intra-Oral X-Ray Image Storage - For Presentation',
|
||||
'1.2.840.10008.5.1.4.1.1.1.3.1':'Digital Intra-Oral X-Ray Image Storage - For Processing',
|
||||
'1.2.840.10008.5.1.4.1.1.2':'CT Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.2.1':'Enhanced CT Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.2.2':'Legacy Converted Enhanced CT Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.3':'Ultrasound Multi-frame Image Storage (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.1.3.1':'Ultrasound Multi-frame Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.4':'MR Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.4.1':'Enhanced MR Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.4.2':'MR Spectroscopy Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.4.3':'Enhanced MR Color Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.4.4':'Legacy Converted Enhanced MR Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.5':'Nuclear Medicine Image Storage (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.1.6':'Ultrasound Image Storage (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.1.6.1':'Ultrasound Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.6.2':'Enhanced US Volume Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.7':'Secondary Capture Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.7.1':'Multi-frame Single Bit Secondary Capture Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.7.2':'Multi-frame Grayscale Byte Secondary Capture Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.7.3':'Multi-frame Grayscale Word Secondary Capture Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.7.4':'Multi-frame True Color Secondary Capture Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.8':'Standalone Overlay Storage (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.1.9':'Standalone Curve Storage (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.1.9.1':'Waveform Storage - Trial (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.1.9.1.1':'12-lead ECG Waveform Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.9.1.2':'General ECG Waveform Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.9.1.3':'Ambulatory ECG Waveform Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.9.2.1':'Hemodynamic Waveform Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.9.3.1':'Cardiac Electrophysiology Waveform Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.9.4.1':'Basic Voice Audio Waveform Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.9.4.2':'General Audio Waveform Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.9.5.1':'Arterial Pulse Waveform Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.9.6.1':'Respiratory Waveform Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.10':'Standalone Modality LUT Storage (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.1.11':'Standalone VOI LUT Storage (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.1.11.1':'Grayscale Softcopy Presentation State Storage SOP Class',
|
||||
'1.2.840.10008.5.1.4.1.1.11.2':'Color Softcopy Presentation State Storage SOP Class',
|
||||
'1.2.840.10008.5.1.4.1.1.11.3':'Pseudo-Color Softcopy Presentation State Storage SOP Class',
|
||||
'1.2.840.10008.5.1.4.1.1.11.4':'Blending Softcopy Presentation State Storage SOP Class',
|
||||
'1.2.840.10008.5.1.4.1.1.11.5':'XA/XRF Grayscale Softcopy Presentation State Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.12.1':'X-Ray Angiographic Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.12.1.1':'Enhanced XA Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.12.2':'X-Ray Radiofluoroscopic Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.12.2.1':'Enhanced XRF Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.12.3':'X-Ray Angiographic Bi-Plane Image Storage (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.1.13.1.1':'X-Ray 3D Angiographic Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.13.1.2':'X-Ray 3D Craniofacial Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.13.1.3':'Breast Tomosynthesis Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.13.1.4':'Breast Projection X-Ray Image Storage - For Presentation',
|
||||
'1.2.840.10008.5.1.4.1.1.13.1.5':'Breast Projection X-Ray Image Storage - For Processing',
|
||||
'1.2.840.10008.5.1.4.1.1.14.1':'Intravascular Optical Coherence Tomography Image Storage - For Presentation',
|
||||
'1.2.840.10008.5.1.4.1.1.14.2':'Intravascular Optical Coherence Tomography Image Storage - For Processing',
|
||||
'1.2.840.10008.5.1.4.1.1.20':'Nuclear Medicine Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.30':'Parametric Map Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.66':'Raw Data Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.66.1':'Spatial Registration Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.66.2':'Spatial Fiducials Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.66.3':'Deformable Spatial Registration Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.66.4':'Segmentation Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.66.5':'Surface Segmentation Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.67':'Real World Value Mapping Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.68.1':'Surface Scan Mesh Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.68.2':'Surface Scan Point Cloud Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.77.1':'VL Image Storage - Trial (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.1.77.2':'VL Multi-frame Image Storage - Trial (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.1.77.1.1':'VL Endoscopic Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.77.1.1.1':'Video Endoscopic Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.77.1.2':'VL Microscopic Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.77.1.2.1':'Video Microscopic Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.77.1.3':'VL Slide-Coordinates Microscopic Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.77.1.4':'VL Photographic Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.77.1.4.1':'Video Photographic Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.77.1.5.1':'Ophthalmic Photography 8 Bit Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.77.1.5.2':'Ophthalmic Photography 16 Bit Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.77.1.5.3':'Stereometric Relationship Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.77.1.5.4':'Ophthalmic Tomography Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.77.1.5.5':'Wide Field Ophthalmic Photography Stereographic Projection Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.77.1.5.6':'Wide Field Ophthalmic Photography 3D Coordinates Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.77.1.6':'VL Whole Slide Microscopy Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.78.1':'Lensometry Measurements Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.78.2':'Autorefraction Measurements Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.78.3':'Keratometry Measurements Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.78.4':'Subjective Refraction Measurements Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.78.5':'Visual Acuity Measurements Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.78.6':'Spectacle Prescription Report Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.78.7':'Ophthalmic Axial Measurements Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.78.8':'Intraocular Lens Calculations Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.79.1':'Macular Grid Thickness and Volume Report Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.80.1':'Ophthalmic Visual Field Static Perimetry Measurements Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.81.1':'Ophthalmic Thickness Map Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.82.1':'Corneal Topography Map Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.88.1':'Text SR Storage - Trial (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.1.88.2':'Audio SR Storage - Trial (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.1.88.3':'Detail SR Storage - Trial (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.1.88.4':'Comprehensive SR Storage - Trial (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.1.88.11':'Basic Text SR Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.88.22':'Enhanced SR Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.88.33':'Comprehensive SR Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.88.34':'Comprehensive 3D SR Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.88.35':'Extensible SR Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.88.40':'Procedure Log Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.88.50':'Mammography CAD SR Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.88.59':'Key Object Selection Document Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.88.65':'Chest CAD SR Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.88.67':'X-Ray Radiation Dose SR Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.88.68':'Radiopharmaceutical Radiation Dose SR Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.88.69':'Colon CAD SR Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.88.70':'Implantation Plan SR Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.104.1':'Encapsulated PDF Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.104.2':'Encapsulated CDA Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.128':'Positron Emission Tomography Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.128.1':'Legacy Converted Enhanced PET Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.129':'Standalone PET Curve Storage (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.1.130':'Enhanced PET Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.131':'Basic Structured Display Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.481.1':'RT Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.481.2':'RT Dose Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.481.3':'RT Structure Set Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.481.4':'RT Beams Treatment Record Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.481.5':'RT Plan Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.481.6':'RT Brachy Treatment Record Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.481.7':'RT Treatment Summary Record Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.481.8':'RT Ion Plan Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.481.9':'RT Ion Beams Treatment Record Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.501.1':'DICOS CT Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.501.2.1':'DICOS Digital X-Ray Image Storage - For Presentation',
|
||||
'1.2.840.10008.5.1.4.1.1.501.2.2':'DICOS Digital X-Ray Image Storage - For Processing',
|
||||
'1.2.840.10008.5.1.4.1.1.501.3':'DICOS Threat Detection Report Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.501.4':'DICOS 2D AIT Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.501.5':'DICOS 3D AIT Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.501.6':'DICOS Quadrupole Resonance (QR) Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.601.1':'Eddy Current Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.1.601.2':'Eddy Current Multi-frame Image Storage',
|
||||
'1.2.840.10008.5.1.4.1.2.1.1':'Patient Root Query/Retrieve Information Model - FIND',
|
||||
'1.2.840.10008.5.1.4.1.2.1.2':'Patient Root Query/Retrieve Information Model - MOVE',
|
||||
'1.2.840.10008.5.1.4.1.2.1.3':'Patient Root Query/Retrieve Information Model - GET',
|
||||
'1.2.840.10008.5.1.4.1.2.2.1':'Study Root Query/Retrieve Information Model - FIND',
|
||||
'1.2.840.10008.5.1.4.1.2.2.2':'Study Root Query/Retrieve Information Model - MOVE',
|
||||
'1.2.840.10008.5.1.4.1.2.2.3':'Study Root Query/Retrieve Information Model - GET',
|
||||
'1.2.840.10008.5.1.4.1.2.3.1':'Patient/Study Only Query/Retrieve Information Model - FIND (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.2.3.2':'Patient/Study Only Query/Retrieve Information Model - MOVE (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.2.3.3':'Patient/Study Only Query/Retrieve Information Model - GET (Retired)',
|
||||
'1.2.840.10008.5.1.4.1.2.4.2':'Composite Instance Root Retrieve - MOVE',
|
||||
'1.2.840.10008.5.1.4.1.2.4.3':'Composite Instance Root Retrieve - GET',
|
||||
'1.2.840.10008.5.1.4.1.2.5.3':'Composite Instance Retrieve Without Bulk Data - GET',
|
||||
'1.2.840.10008.5.1.4.31':'Modality Worklist Information Model - FIND',
|
||||
'1.2.840.10008.5.1.4.32':'General Purpose Worklist Management Meta SOP Class (Retired)',
|
||||
'1.2.840.10008.5.1.4.32.1':'General Purpose Worklist Information Model - FIND (Retired)',
|
||||
'1.2.840.10008.5.1.4.32.2':'General Purpose Scheduled Procedure Step SOP Class (Retired)',
|
||||
'1.2.840.10008.5.1.4.32.3':'General Purpose Performed Procedure Step SOP Class (Retired)',
|
||||
'1.2.840.10008.5.1.4.33':'Instance Availability Notification SOP Class',
|
||||
'1.2.840.10008.5.1.4.34.1':'RT Beams Delivery Instruction Storage - Trial (Retired)',
|
||||
'1.2.840.10008.5.1.4.34.2':'RT Conventional Machine Verification - Trial (Retired)',
|
||||
'1.2.840.10008.5.1.4.34.3':'RT Ion Machine Verification - Trial (Retired)',
|
||||
'1.2.840.10008.5.1.4.34.4':'Unified Worklist and Procedure Step Service Class - Trial (Retired)',
|
||||
'1.2.840.10008.5.1.4.34.4.1':'Unified Procedure Step - Push SOP Class - Trial (Retired)',
|
||||
'1.2.840.10008.5.1.4.34.4.2':'Unified Procedure Step - Watch SOP Class - Trial (Retired)',
|
||||
'1.2.840.10008.5.1.4.34.4.3':'Unified Procedure Step - Pull SOP Class - Trial (Retired)',
|
||||
'1.2.840.10008.5.1.4.34.4.4':'Unified Procedure Step - Event SOP Class - Trial (Retired)',
|
||||
'1.2.840.10008.5.1.4.34.5':'UPS Global Subscription SOP Instance',
|
||||
'1.2.840.10008.5.1.4.34.5.1':'UPS Filtered Global Subscription SOP Instance',
|
||||
'1.2.840.10008.5.1.4.34.6':'Unified Worklist and Procedure Step Service Class',
|
||||
'1.2.840.10008.5.1.4.34.6.1':'Unified Procedure Step - Push SOP Class',
|
||||
'1.2.840.10008.5.1.4.34.6.2':'Unified Procedure Step - Watch SOP Class',
|
||||
'1.2.840.10008.5.1.4.34.6.3':'Unified Procedure Step - Pull SOP Class',
|
||||
'1.2.840.10008.5.1.4.34.6.4':'Unified Procedure Step - Event SOP Class',
|
||||
'1.2.840.10008.5.1.4.34.7':'RT Beams Delivery Instruction Storage',
|
||||
'1.2.840.10008.5.1.4.34.8':'RT Conventional Machine Verification',
|
||||
'1.2.840.10008.5.1.4.34.9':'RT Ion Machine Verification',
|
||||
'1.2.840.10008.5.1.4.37.1':'General Relevant Patient Information Query',
|
||||
'1.2.840.10008.5.1.4.37.2':'Breast Imaging Relevant Patient Information Query',
|
||||
'1.2.840.10008.5.1.4.37.3':'Cardiac Relevant Patient Information Query',
|
||||
'1.2.840.10008.5.1.4.38.1':'Hanging Protocol Storage',
|
||||
'1.2.840.10008.5.1.4.38.2':'Hanging Protocol Information Model - FIND',
|
||||
'1.2.840.10008.5.1.4.38.3':'Hanging Protocol Information Model - MOVE',
|
||||
'1.2.840.10008.5.1.4.38.4':'Hanging Protocol Information Model - GET',
|
||||
'1.2.840.10008.5.1.4.39.1':'Color Palette Storage',
|
||||
'1.2.840.10008.5.1.4.39.2':'Color Palette Information Model - FIND',
|
||||
'1.2.840.10008.5.1.4.39.3':'Color Palette Information Model - MOVE',
|
||||
'1.2.840.10008.5.1.4.39.4':'Color Palette Information Model - GET',
|
||||
'1.2.840.10008.5.1.4.41':'Product Characteristics Query SOP Class',
|
||||
'1.2.840.10008.5.1.4.42':'Substance Approval Query SOP Class',
|
||||
'1.2.840.10008.5.1.4.43.1':'Generic Implant Template Storage',
|
||||
'1.2.840.10008.5.1.4.43.2':'Generic Implant Template Information Model - FIND',
|
||||
'1.2.840.10008.5.1.4.43.3':'Generic Implant Template Information Model - MOVE',
|
||||
'1.2.840.10008.5.1.4.43.4':'Generic Implant Template Information Model - GET',
|
||||
'1.2.840.10008.5.1.4.44.1':'Implant Assembly Template Storage',
|
||||
'1.2.840.10008.5.1.4.44.2':'Implant Assembly Template Information Model - FIND',
|
||||
'1.2.840.10008.5.1.4.44.3':'Implant Assembly Template Information Model - MOVE',
|
||||
'1.2.840.10008.5.1.4.44.4':'Implant Assembly Template Information Model - GET',
|
||||
'1.2.840.10008.5.1.4.45.1':'Implant Template Group Storage',
|
||||
'1.2.840.10008.5.1.4.45.2':'Implant Template Group Information Model - FIND',
|
||||
'1.2.840.10008.5.1.4.45.3':'Implant Template Group Information Model - MOVE',
|
||||
'1.2.840.10008.5.1.4.45.4':'Implant Template Group Information Model - GET',
|
||||
'1.2.840.10008.7.1.1':'Native DICOM Model',
|
||||
'1.2.840.10008.7.1.2':'Abstract Multi-Dimensional Image Model',
|
||||
'1.2.840.10008.8.1.1':'DICOM Content Mapping Resource',
|
||||
'1.2.840.10008.15.0.3.1':'dicomDeviceName',
|
||||
'1.2.840.10008.15.0.3.2':'dicomDescription',
|
||||
'1.2.840.10008.15.0.3.3':'dicomManufacturer',
|
||||
'1.2.840.10008.15.0.3.4':'dicomManufacturerModelName',
|
||||
'1.2.840.10008.15.0.3.5':'dicomSoftwareVersion',
|
||||
'1.2.840.10008.15.0.3.6':'dicomVendorData',
|
||||
'1.2.840.10008.15.0.3.7':'dicomAETitle',
|
||||
'1.2.840.10008.15.0.3.8':'dicomNetworkConnectionReference',
|
||||
'1.2.840.10008.15.0.3.9':'dicomApplicationCluster',
|
||||
'1.2.840.10008.15.0.3.10':'dicomAssociationInitiator',
|
||||
'1.2.840.10008.15.0.3.11':'dicomAssociationAcceptor',
|
||||
'1.2.840.10008.15.0.3.12':'dicomHostname',
|
||||
'1.2.840.10008.15.0.3.13':'dicomPort',
|
||||
'1.2.840.10008.15.0.3.14':'dicomSOPClass',
|
||||
'1.2.840.10008.15.0.3.15':'dicomTransferRole',
|
||||
'1.2.840.10008.15.0.3.16':'dicomTransferSyntax',
|
||||
'1.2.840.10008.15.0.3.17':'dicomPrimaryDeviceType',
|
||||
'1.2.840.10008.15.0.3.18':'dicomRelatedDeviceReference',
|
||||
'1.2.840.10008.15.0.3.19':'dicomPreferredCalledAETitle',
|
||||
'1.2.840.10008.15.0.3.20':'dicomTLSCyphersuite',
|
||||
'1.2.840.10008.15.0.3.21':'dicomAuthorizedNodeCertificateReference',
|
||||
'1.2.840.10008.15.0.3.22':'dicomThisNodeCertificateReference',
|
||||
'1.2.840.10008.15.0.3.23':'dicomInstalled',
|
||||
'1.2.840.10008.15.0.3.24':'dicomStationName',
|
||||
'1.2.840.10008.15.0.3.25':'dicomDeviceSerialNumber',
|
||||
'1.2.840.10008.15.0.3.26':'dicomInstitutionName',
|
||||
'1.2.840.10008.15.0.3.27':'dicomInstitutionAddress',
|
||||
'1.2.840.10008.15.0.3.28':'dicomInstitutionDepartmentName',
|
||||
'1.2.840.10008.15.0.3.29':'dicomIssuerOfPatientID',
|
||||
'1.2.840.10008.15.0.3.30':'dicomPreferredCallingAETitle',
|
||||
'1.2.840.10008.15.0.3.31':'dicomSupportedCharacterSet',
|
||||
'1.2.840.10008.15.0.4.1':'dicomConfigurationRoot',
|
||||
'1.2.840.10008.15.0.4.2':'dicomDevicesRoot',
|
||||
'1.2.840.10008.15.0.4.3':'dicomUniqueAETitlesRegistryRoot',
|
||||
'1.2.840.10008.15.0.4.4':'dicomDevice',
|
||||
'1.2.840.10008.15.0.4.5':'dicomNetworkAE',
|
||||
'1.2.840.10008.15.0.4.6':'dicomNetworkConnection',
|
||||
'1.2.840.10008.15.0.4.7':'dicomUniqueAETitle',
|
||||
'1.2.840.10008.15.0.4.8':'dicomTransferCapability',
|
||||
'1.2.840.10008.15.1.1':'Universal Coordinated Time',
|
||||
};
|
||||
2
nv/html/nv-nopdf/scripts/flatpickr.min.js
vendored
Normal file
2
nv/html/nv-nopdf/scripts/flatpickr.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2643
nv/html/nv-nopdf/scripts/hammer.js
Normal file
2643
nv/html/nv-nopdf/scripts/hammer.js
Normal file
File diff suppressed because it is too large
Load Diff
16
nv/html/nv-nopdf/scripts/initWebWorker.js
Normal file
16
nv/html/nv-nopdf/scripts/initWebWorker.js
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
cornerstoneWADOImageLoader.external.cornerstone = cornerstone;
|
||||
|
||||
var webWorkerUrl = 'scripts/cornerstone/cornerstoneWADOImageLoaderWebWorker.js';
|
||||
var codecsUrl = 'cornerstoneWADOImageLoaderCodecs.js';
|
||||
|
||||
var config = {
|
||||
webWorkerPath : webWorkerUrl,
|
||||
taskConfiguration: {
|
||||
'decodeTask' : {
|
||||
codecsPath: codecsUrl
|
||||
}
|
||||
}
|
||||
};
|
||||
cornerstoneWADOImageLoader.webWorkerManager.initialize(config);
|
||||
|
||||
1445
nv/html/nv-nopdf/scripts/main.js
Normal file
1445
nv/html/nv-nopdf/scripts/main.js
Normal file
File diff suppressed because it is too large
Load Diff
314
nv/html/nv-nopdf/scripts/main.js.backup
Normal file
314
nv/html/nv-nopdf/scripts/main.js.backup
Normal file
@@ -0,0 +1,314 @@
|
||||
var viewport_active = null;
|
||||
var viewerContainer = null;
|
||||
var layoutManager = null;
|
||||
var viewport_template = null;
|
||||
|
||||
var _gel = (a) => { return document.getElementById(a); };
|
||||
var _dqs = (a) => { return document.querySelectorAll(a); };
|
||||
var _gec = (a) => { return document.getElementsByClassName(a); };
|
||||
var _oY = (a) => { return a.offsetTop; };
|
||||
var _oX = (a) => { return a.offsetLeft; };
|
||||
var _pos = (el) => { for (var lx=0, ly=0;el != null;lx += el.offsetLeft, ly += el.offsetTop, el = el.offsetParent); return {x: lx,y: ly}; };
|
||||
var _rmc = (el) => { while (el.lastChild) { el.removeChild(el.lastChild); } };
|
||||
// draggable item
|
||||
var dragstart = (ev) => { ev.dataTransfer.setData("text", ev.target.id); ev.target.style.opacity = .5; };
|
||||
var dragend = (ev) => { ev.target.style.opacity = 1; };
|
||||
// dropable container
|
||||
var dragover = (ev) => { ev.preventDefault(); };
|
||||
var dragenter = (ev) => { ev.target.parentNode.style.opacity = .5; };
|
||||
var dragleave = (ev) => { ev.target.parentNode.style.opacity = 1; };
|
||||
|
||||
function loadTemplate(url,callback) {
|
||||
http = new XMLHttpRequest();
|
||||
http.open("GET", url, true);
|
||||
http.onreadystatechange = function() {
|
||||
if(http.readyState == 4 && http.status == 200) {
|
||||
var parser = new DOMParser();
|
||||
var dom = parser.parseFromString(http.responseText, 'text/html');
|
||||
callback(dom.getElementsByClassName('viewportContainer')[0]);
|
||||
}
|
||||
};
|
||||
http.send();
|
||||
}
|
||||
|
||||
|
||||
function init_thumbnail_drag() {
|
||||
var ts = _gec('thumbnailEntry');
|
||||
[].forEach.call(ts, function (el) {
|
||||
el.addEventListener('dragstart',dragstart);
|
||||
el.addEventListener('dragend',dragend);
|
||||
});
|
||||
}
|
||||
|
||||
function init_viewport_drop() {
|
||||
var vps = viewerContainer.childNodes;
|
||||
vps.forEach(function(el) {
|
||||
el.addEventListener('dragover',dragover,false);
|
||||
el.addEventListener('dragenter',dragenter,false);
|
||||
el.addEventListener('dragleave',dragleave,false);
|
||||
el.addEventListener('drop',function(ev) {
|
||||
ev.preventDefault();
|
||||
var thumb_id = ev.dataTransfer.getData("text");
|
||||
ev.target.parentNode.style.opacity = 1;
|
||||
var series_iuid = _gel(thumb_id).getAttribute('data-value');
|
||||
console.log('dropped at',el.idx,series_iuid);
|
||||
},false);
|
||||
});
|
||||
}
|
||||
|
||||
function viewportSetActive(d) {
|
||||
var vps = viewerContainer.childNodes;
|
||||
vps.forEach(function(el) {
|
||||
el.classList.remove('active');
|
||||
});
|
||||
d.classList.add('active');
|
||||
viewport_active = d;
|
||||
console.log('Active viewport: '+d.idx);
|
||||
}
|
||||
|
||||
function init_layout() {
|
||||
layoutManager = _gel('layoutManagerTarget');
|
||||
viewerContainer = _gel('imageViewerViewports');
|
||||
layoutManager.stacks = [];
|
||||
layoutManager.viewport_idx = {};
|
||||
layoutManager.setLayout = function(y,x) {
|
||||
/// render layout
|
||||
layoutManager.className = 'layout-'+y+'-'+x;
|
||||
_rmc(viewerContainer);
|
||||
layoutManager.viewports = [];
|
||||
var w = 100/x;
|
||||
var h = 100/y;
|
||||
var row_top = 1;
|
||||
var row_middle = 0;
|
||||
var row_bottom = 0;
|
||||
if(y>2) {
|
||||
row_bottom = 1;
|
||||
row_middle = y-2;
|
||||
} else if(y==2) {
|
||||
row_bottom = 1;
|
||||
}
|
||||
/// add top
|
||||
for(var j=1;j<=x;j++) {
|
||||
var vp = viewport_template.cloneNode(true);
|
||||
vp.style.height = h+'%';
|
||||
vp.style.width = w+'%';
|
||||
vp.classList.add('top');
|
||||
vp.idx = 1+'x'+j;
|
||||
layoutManager.viewport_idx[vp.idx] = layoutManager.viewports.length;
|
||||
vp.addEventListener('click',function(e) { viewportSetActive(this); });
|
||||
layoutManager.viewports.push(viewerContainer.appendChild(vp));
|
||||
if(vp.idx=='1x1') viewportSetActive(vp);
|
||||
}
|
||||
/// add middle
|
||||
for(var i=1;i<=row_middle;i++) {
|
||||
for(var j=1;j<=x;j++) {
|
||||
var vp = viewport_template.cloneNode(true);
|
||||
vp.style.height = h+'%';
|
||||
vp.style.width = w+'%';
|
||||
vp.classList.add('middle');
|
||||
vp.idx = (i+1)+'x'+j;
|
||||
layoutManager.viewport_idx[vp.idx] = layoutManager.viewports.length;
|
||||
vp.addEventListener('click',function(e) { viewportSetActive(this); });
|
||||
layoutManager.viewports.push(viewerContainer.appendChild(vp));
|
||||
}
|
||||
}
|
||||
/// add bottom
|
||||
if(row_bottom==1) {
|
||||
for(var j=1;j<=x;j++) {
|
||||
var vp = viewport_template.cloneNode(true);
|
||||
vp.style.height = h+'%';
|
||||
vp.style.width = w+'%';
|
||||
vp.classList.add('bottom');
|
||||
vp.idx = y+'x'+j;
|
||||
layoutManager.viewport_idx[vp.idx] = layoutManager.viewports.length;
|
||||
vp.addEventListener('click',function(e) { viewportSetActive(this); });
|
||||
layoutManager.viewports.push(viewerContainer.appendChild(vp));
|
||||
}
|
||||
}
|
||||
|
||||
layoutManager.forEachElement(function(vp) {
|
||||
cornerstone.enable(vp);
|
||||
});
|
||||
|
||||
init_viewport_drop();
|
||||
|
||||
};
|
||||
|
||||
layoutManager.forEachElement = function(cb) {
|
||||
layoutManager.viewports.forEach(function(vp, i){
|
||||
cb.call(self, vp.getElementsByClassName('imageViewerViewport')[0], vp, i);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function useStack(viewport_idx,stack) {
|
||||
var imageId = layoutManager.stacks[stack].imageIds[0];
|
||||
var idx = layoutManager.viewport_idx[viewport_idx];
|
||||
var viewport = layoutManager.viewports[idx].getElementsByClassName('imageViewerViewport')[0];
|
||||
displayImage(imageId,viewport,layoutManager.stacks[stack],function(el) {
|
||||
if(!el.setup||(el.setup!=true)) {
|
||||
setupViewport(el, layoutManager.stacks[stack], this);
|
||||
el.setup = true;
|
||||
}
|
||||
});
|
||||
layoutManager.viewports[idx].getElementsByClassName('viewportInstructions')[0].style.display = 'none';
|
||||
}
|
||||
|
||||
function displayImage(imageId,viewport,stack,loaded) {
|
||||
var enabledImage = cornerstone.getEnabledElement(viewport);
|
||||
if (enabledImage.image) {
|
||||
// Stop clip from if playing on element
|
||||
cornerstoneTools.stopClip(viewport);
|
||||
// Disable stack scrolling
|
||||
cornerstoneTools.stackScroll.disable(viewport);
|
||||
// Enable stackScroll on selected series
|
||||
cornerstoneTools.stackScroll.enable(viewport);
|
||||
}
|
||||
|
||||
// Load the first image of the selected series stack
|
||||
cornerstone.loadAndCacheImage(imageId).then(function(image) {
|
||||
if (loaded) {
|
||||
loaded.call(image, viewport, stack);
|
||||
}
|
||||
|
||||
// Get the state of the stack tool
|
||||
var stackState = cornerstoneTools.getToolState(viewport, 'stack');
|
||||
console.log(stackState);
|
||||
stackState.data[0] = stack;
|
||||
stackState.data[0].currentImageIdIndex = 0;
|
||||
|
||||
// Get the default viewport
|
||||
var defViewport = cornerstone.getDefaultViewport(viewport, image);
|
||||
// Get the current series stack index
|
||||
// Display the image
|
||||
cornerstone.displayImage(viewport, image, defViewport);
|
||||
// Fit the image to the viewport window
|
||||
cornerstone.fitToWindow(viewport);
|
||||
|
||||
cornerstoneTools.mouseInput.enable(viewport);
|
||||
|
||||
// Prefetch the remaining images in the stack (?)
|
||||
cornerstoneTools.stackPrefetch.enable(viewport);
|
||||
cornerstoneTools.mouseWheelInput.enable(viewport);
|
||||
|
||||
// Play clip if stack is a movie (has framerate)
|
||||
if (stack.frameRate !== undefined) {
|
||||
cornerstoneTools.playClip(viewport, stack.frameRate);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function resizeMain() {
|
||||
layoutManager.forEachElement(function(el, vp) {
|
||||
cornerstone.resize(el, true);
|
||||
cornerstone.fitToWindow(el);
|
||||
});
|
||||
}
|
||||
|
||||
function setupViewport(element, stack, image) {
|
||||
// Display the image on the viewer element
|
||||
cornerstone.displayImage(element, image);
|
||||
|
||||
// If it's a movie (has frames), then play the clip
|
||||
if (stack.frameRate !== undefined) {
|
||||
cornerstone.playClip(element, stack.frameRate);
|
||||
}
|
||||
|
||||
// Activate mouse clicks, mouse wheel and touch
|
||||
cornerstoneTools.mouseInput.enable(element);
|
||||
cornerstoneTools.mouseWheelInput.enable(element);
|
||||
// cornerstoneTools.touchInput.enable(element);
|
||||
|
||||
// Enable all tools we want to use with this element
|
||||
// cornerstoneTools.wwwc.activate(element, 1); // ww/wc is the default tool for left mouse button
|
||||
// cornerstoneTools.pan.activate(element, 2); // pan is the default tool for middle mouse button
|
||||
// cornerstoneTools.zoom.activate(element, 4); // zoom is the default tool for right mouse button
|
||||
// cornerstoneTools.probe.enable(element);
|
||||
// cornerstoneTools.length.enable(element);
|
||||
// cornerstoneTools.ellipticalRoi.enable(element);
|
||||
// cornerstoneTools.rectangleRoi.enable(element);
|
||||
// cornerstoneTools.wwwcTouchDrag.activate(element);
|
||||
// cornerstoneTools.zoomTouchPinch.activate(element);
|
||||
cornerstoneTools.stackScroll.activate(element,1);
|
||||
|
||||
// Stack tools
|
||||
cornerstoneTools.addStackStateManager(element, ['stack']);
|
||||
cornerstoneTools.addToolState(element, 'stack', stack);
|
||||
cornerstoneTools.stackScrollWheel.activate(element);
|
||||
cornerstoneTools.stackPrefetch.enable(element);
|
||||
}
|
||||
|
||||
function enable_tools() {
|
||||
|
||||
// sidebar button
|
||||
var sidebar = _dqs('[data-value="studies"]')[0];
|
||||
sidebar.intransition = false;
|
||||
sidebar.addEventListener('click',function(e) {
|
||||
var c = this.classList.toggle('active');
|
||||
_gec('sidebarMenu sidebar-left')[0].classList.toggle('sidebar-open');
|
||||
_gec('mainContent')[0].classList.toggle('sidebar-left-open');
|
||||
sidebar.intransition = true;
|
||||
// sidebar.t = setInterval(resizeMain,100);
|
||||
},false);
|
||||
|
||||
sidebar.addEventListener('transitionend',function(e) {
|
||||
// clearInterval(sidebar.t);
|
||||
resizeMain();
|
||||
sidebar.intransition = false;
|
||||
},false);
|
||||
|
||||
/// layout chooser
|
||||
var lc = _gel('layoutChooser');
|
||||
lc.getElementsByTagName('table')[0].addEventListener('mouseover', function(e) {
|
||||
var y = e.target.parentElement.rowIndex;
|
||||
var x = e.target.cellIndex;
|
||||
for(var i=0;i<=3;i++) {
|
||||
for(var j=0;j<=3;j++) {
|
||||
if(!isNaN(y) && i<=y) {
|
||||
if(!isNaN(x) && j<=x) {
|
||||
this.rows[i].cells[j].className = 'hover';
|
||||
} else {
|
||||
this.rows[i].cells[j].className = '';
|
||||
}
|
||||
} else {
|
||||
this.rows[i].cells[j].className = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
lc.x = x+1;
|
||||
lc.y = y+1;
|
||||
}, false);
|
||||
|
||||
lc.getElementsByTagName('table')[0].addEventListener('click', function(e) {
|
||||
var y = e.target.parentElement.rowIndex+1;
|
||||
var x = e.target.cellIndex+1;
|
||||
console.log('Layout selected : '+y+'x'+x);
|
||||
lc.classList.toggle('open');
|
||||
lc.classList.toggle('dialog-open');
|
||||
layoutManager.setLayout(y,x);
|
||||
}, false);
|
||||
|
||||
var lb = _gel('layout');
|
||||
lb.addEventListener('click',function(e) {
|
||||
lc.classList.toggle('open');
|
||||
lc.classList.toggle('dialog-open');
|
||||
lc.style.top = (_pos(this).y+parseInt(this.offsetHeight))+'px';
|
||||
lc.style.left = (_pos(this).x)+'px';
|
||||
},false);
|
||||
}
|
||||
|
||||
function init_final() {
|
||||
|
||||
init_thumbnail_drag();
|
||||
|
||||
// Call resize main on window resize
|
||||
window.addEventListener('resize',function() {
|
||||
resizeMain();
|
||||
});
|
||||
|
||||
// Prevent scrolling on iOS
|
||||
document.body.addEventListener('touchmove', function(e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
270
nv/html/nv-nopdf/scripts/viewer.js
Normal file
270
nv/html/nv-nopdf/scripts/viewer.js
Normal file
@@ -0,0 +1,270 @@
|
||||
function loadTemplateOld(url, callback) {
|
||||
$.get(url, function(data) {
|
||||
var parsed = $.parseHTML(data);
|
||||
$.each(parsed, function(index, ele) {
|
||||
if(ele.nodeName === 'DIV')
|
||||
{
|
||||
var element = $(ele);
|
||||
callback(element);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function loadTemplate(url,callback) {
|
||||
http=new XMLHttpRequest();
|
||||
http.open("GET", url, true);
|
||||
http.onreadystatechange = function() {
|
||||
if(http.readyState == 4 && http.status == 200) {
|
||||
var parser = new DOMParser();
|
||||
callback(parser.parseFromString(http.responseText, 'text/html'));
|
||||
}
|
||||
};
|
||||
http.send(params);
|
||||
}
|
||||
|
||||
|
||||
function setupViewport(element, stack, image) {
|
||||
// Display the image on the viewer element
|
||||
cornerstone.displayImage(element, image);
|
||||
|
||||
// If it's a movie (has frames), then play the clip
|
||||
if (stack.frameRate !== undefined) {
|
||||
cornerstone.playClip(element, stack.frameRate);
|
||||
}
|
||||
|
||||
// Activate mouse clicks, mouse wheel and touch
|
||||
cornerstoneTools.mouseInput.enable(element);
|
||||
cornerstoneTools.mouseWheelInput.enable(element);
|
||||
cornerstoneTools.touchInput.enable(element);
|
||||
|
||||
// Enable all tools we want to use with this element
|
||||
cornerstoneTools.wwwc.activate(element, 1); // ww/wc is the default tool for left mouse button
|
||||
cornerstoneTools.pan.activate(element, 2); // pan is the default tool for middle mouse button
|
||||
cornerstoneTools.zoom.activate(element, 4); // zoom is the default tool for right mouse button
|
||||
cornerstoneTools.probe.enable(element);
|
||||
cornerstoneTools.length.enable(element);
|
||||
cornerstoneTools.ellipticalRoi.enable(element);
|
||||
cornerstoneTools.rectangleRoi.enable(element);
|
||||
cornerstoneTools.wwwcTouchDrag.activate(element);
|
||||
cornerstoneTools.zoomTouchPinch.activate(element);
|
||||
|
||||
// Stack tools
|
||||
cornerstoneTools.addStackStateManager(element, ['playClip']);
|
||||
cornerstoneTools.addToolState(element, 'stack', stack);
|
||||
cornerstoneTools.stackScrollWheel.activate(element);
|
||||
cornerstoneTools.stackPrefetch.enable(element);
|
||||
}
|
||||
|
||||
// Load JSON study information for each study
|
||||
function loadStudy(studyViewer, viewportModel, studyId) {
|
||||
|
||||
// Get the JSON data for the selected studyId
|
||||
$.getJSON('studies/' + studyId, function(data) {
|
||||
|
||||
var imageViewer = new ImageViewer(studyViewer, viewportModel);
|
||||
imageViewer.setLayout('1x1'); // default layout
|
||||
|
||||
function initViewports() {
|
||||
imageViewer.forEachElement(function(el) {
|
||||
cornerstone.enable(el);
|
||||
$(el).droppable({
|
||||
drop : function(evt, ui) {
|
||||
var fromStack = $(ui.draggable.context).data('stack'), toItem = $(this).data('index');
|
||||
useItemStack(toItem, fromStack);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// setup the tool buttons
|
||||
setupButtons(studyViewer);
|
||||
|
||||
// layout choose
|
||||
$(studyViewer).find('.choose-layout a').click(function(){
|
||||
var previousUsed = [];
|
||||
imageViewer.forEachElement(function(el, vp, i){
|
||||
if (!isNaN($(el).data('useStack'))) {
|
||||
previousUsed.push($(el).data('useStack'));
|
||||
}
|
||||
});
|
||||
|
||||
var type = $(this).text();
|
||||
imageViewer.setLayout(type);
|
||||
initViewports();
|
||||
resizeStudyViewer();
|
||||
if (previousUsed.length > 0) {
|
||||
previousUsed = previousUsed.slice(0, imageViewer.viewports.length);
|
||||
var item = 0;
|
||||
previousUsed.forEach(function(v){
|
||||
useItemStack(item++, v);
|
||||
});
|
||||
}
|
||||
|
||||
//return false;
|
||||
});
|
||||
|
||||
// Load the first series into the viewport (?)
|
||||
//var stacks = [];
|
||||
//var currentStackIndex = 0;
|
||||
var seriesIndex = 0;
|
||||
|
||||
// Create a stack object for each series
|
||||
data.seriesList.forEach(function(series) {
|
||||
var stack = {
|
||||
seriesDescription: series.seriesDescription,
|
||||
stackId: series.seriesNumber,
|
||||
imageIds: [],
|
||||
seriesIndex: seriesIndex,
|
||||
currentImageIdIndex: 0,
|
||||
frameRate: series.frameRate
|
||||
};
|
||||
|
||||
|
||||
// Populate imageIds array with the imageIds from each series
|
||||
// For series with frame information, get the image url's by requesting each frame
|
||||
if (series.numberOfFrames !== undefined) {
|
||||
var numberOfFrames = series.numberOfFrames;
|
||||
for (var i = 0; i < numberOfFrames; i++) {
|
||||
var imageId = series.instanceList[0].imageId + "?frame=" + i;
|
||||
if (imageId.substr(0, 4) !== 'http') {
|
||||
imageId = "dicomweb://cornerstonetech.org/images/ClearCanvas/" + imageId;
|
||||
}
|
||||
stack.imageIds.push(imageId);
|
||||
}
|
||||
// Otherwise, get each instance url
|
||||
} else {
|
||||
series.instanceList.forEach(function(image) {
|
||||
var imageId = image.imageId;
|
||||
|
||||
if (image.imageId.substr(0, 4) !== 'http') {
|
||||
imageId = "dicomweb://cornerstonetech.org/images/ClearCanvas/" + image.imageId;
|
||||
}
|
||||
stack.imageIds.push(imageId);
|
||||
});
|
||||
}
|
||||
// Move to next series
|
||||
seriesIndex++;
|
||||
|
||||
// Add the series stack to the stacks array
|
||||
imageViewer.stacks.push(stack);
|
||||
});
|
||||
|
||||
// Resize the parent div of the viewport to fit the screen
|
||||
var imageViewerElement = $(studyViewer).find('.imageViewer')[0];
|
||||
var viewportWrapper = $(imageViewerElement).find('.viewportWrapper')[0];
|
||||
var parentDiv = $(studyViewer).find('.viewer')[0];
|
||||
|
||||
//viewportWrapper.style.width = (parentDiv.style.width - 10) + "px";
|
||||
//viewportWrapper.style.height = (window.innerHeight - 150) + "px";
|
||||
|
||||
var studyRow = $(studyViewer).find('.studyRow')[0];
|
||||
var width = $(studyRow).width();
|
||||
|
||||
//$(parentDiv).width(width - 170);
|
||||
//viewportWrapper.style.width = (parentDiv.style.width - 10) + "px";
|
||||
//viewportWrapper.style.height = (window.innerHeight - 150) + "px";
|
||||
|
||||
// Get the viewport elements
|
||||
var element = $(studyViewer).find('.viewport')[0];
|
||||
|
||||
// Image enable the dicomImage element
|
||||
initViewports();
|
||||
//cornerstone.enable(element);
|
||||
|
||||
// Get series list from the series thumbnails (?)
|
||||
var seriesList = $(studyViewer).find('.thumbnails')[0];
|
||||
imageViewer.stacks.forEach(function(stack, stackIndex) {
|
||||
|
||||
// Create series thumbnail item
|
||||
var seriesEntry = '<a class="list-group-item" + ' +
|
||||
'oncontextmenu="return false"' +
|
||||
'unselectable="on"' +
|
||||
'onselectstart="return false;"' +
|
||||
'onmousedown="return false;">' +
|
||||
'<div class="csthumbnail"' +
|
||||
'oncontextmenu="return false"' +
|
||||
'unselectable="on"' +
|
||||
'onselectstart="return false;"' +
|
||||
'onmousedown="return false;"></div>' +
|
||||
"<div class='text-center small'>" + stack.seriesDescription + '</div></a>';
|
||||
|
||||
// Add to series list
|
||||
var seriesElement = $(seriesEntry).appendTo(seriesList);
|
||||
|
||||
// Find thumbnail
|
||||
var thumbnail = $(seriesElement).find('div')[0];
|
||||
|
||||
// Enable cornerstone on the thumbnail
|
||||
cornerstone.enable(thumbnail);
|
||||
|
||||
// Have cornerstone load the thumbnail image
|
||||
cornerstone.loadAndCacheImage(imageViewer.stacks[stack.seriesIndex].imageIds[0]).then(function(image) {
|
||||
// Make the first thumbnail active
|
||||
if (stack.seriesIndex === 0) {
|
||||
$(seriesElement).addClass('active');
|
||||
}
|
||||
// Display the image
|
||||
cornerstone.displayImage(thumbnail, image);
|
||||
$(seriesElement).draggable({helper: "clone"});
|
||||
});
|
||||
|
||||
// Handle thumbnail click
|
||||
$(seriesElement).on('click touchstart', function() {
|
||||
useItemStack(0, stackIndex);
|
||||
}).data('stack', stackIndex);
|
||||
});
|
||||
|
||||
function useItemStack(item, stack) {
|
||||
var imageId = imageViewer.stacks[stack].imageIds[0], element = imageViewer.getElement(item);
|
||||
if ($(element).data('waiting')) {
|
||||
imageViewer.viewports[item].find('.overlay-text').remove();
|
||||
$(element).data('waiting', false);
|
||||
}
|
||||
$(element).data('useStack', stack);
|
||||
|
||||
displayThumbnail(seriesList, $(seriesList).find('.list-group-item')[stack], element, imageViewer.stacks[stack], function(el, stack){
|
||||
if (!$(el).data('setup')) {
|
||||
setupViewport(el, stack, this);
|
||||
setupViewportOverlays(el, data);
|
||||
$(el).data('setup', true);
|
||||
}
|
||||
});
|
||||
/*cornerstone.loadAndCacheImage(imageId).then(function(image){
|
||||
setupViewport(element, imageViewer.stacks[stack], image);
|
||||
setupViewportOverlays(element, data);
|
||||
});*/
|
||||
}
|
||||
// Resize study viewer
|
||||
function resizeStudyViewer() {
|
||||
var studyRow = $(studyViewer).find('.studyContainer')[0];
|
||||
var height = $(studyRow).height();
|
||||
var width = $(studyRow).width();console.log($(studyRow).innerWidth(),$(studyRow).outerWidth(),$(studyRow).width());
|
||||
$(seriesList).height("100%");
|
||||
$(parentDiv).width(width - $(studyViewer).find('.thumbnailSelector:eq(0)').width());
|
||||
$(parentDiv).css({height : '100%'});
|
||||
$(imageViewerElement).css({height : $(parentDiv).height() - $(parentDiv).find('.text-center:eq(0)').height()});
|
||||
|
||||
imageViewer.forEachElement(function(el, vp) {
|
||||
cornerstone.resize(el, true);
|
||||
|
||||
if ($(el).data('waiting')) {
|
||||
var ol = vp.find('.overlay-text');
|
||||
if (ol.length < 1) {
|
||||
ol = $('<div class="overlay overlay-text">Please drag a stack onto here to view images.</div>').appendTo(vp);
|
||||
}
|
||||
var ow = vp.width() / 2, oh = vp.height() / 2;
|
||||
ol.css({top : oh, left : ow - (ol.width() / 2)});
|
||||
}
|
||||
});
|
||||
}
|
||||
// Call resize viewer on window resize
|
||||
$(window).resize(function() {
|
||||
resizeStudyViewer();
|
||||
});
|
||||
resizeStudyViewer();
|
||||
if (imageViewer.isSingle())
|
||||
useItemStack(0, 0);
|
||||
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user