dicom-viewer/dwv.js
2022-10-24 17:28:07 +03:00

3 lines
436 KiB
JavaScript

/*! dwv 0.30.8 2022-01-04 12:43:27 */
!function(e,t){"function"==typeof define&&define.amd?define(["i18next","i18next-http-backend","i18next-browser-languagedetector","jszip","konva","magic-wand-tool"],t):"object"==typeof module&&module.exports?module.exports=t(require("i18next"),require("i18next-http-backend"),require("i18next-browser-languagedetector"),require("jszip"),require("konva/cmj"),require("magic-wand-tool")):e.dwv=t(e.i18next,e.i18nextHttpBackend,e.i18nextBrowserLanguageDetector,e.JSZip,e.Konva,e.MagicWand)}(this,function(i,r,o,c,y,p){function e(e){return void 0!==e&&void 0!==e.default}var s=void 0!==s?s:"undefined"!=typeof self?self:"undefined"!=typeof global?global:{};e(i)&&(i=i.default),e(r)&&(r=r.default),e(o)&&(o=o.default),e(y)&&(y=y.default);var A=A||{};A.App=function(){var r=this,S=null,m=null,h=null,f=null,p=null,y=null,e=new A.gui.Style,n=new A.utils.ListenerHandler;function D(e){n.fireEvent(e)}function v(e){e.type="loadstart",D(e)}function C(e){e.type="loadprogress",D(e)}function L(e){void 0===e.data&&A.logger.error("Missing loaditem event data."),void 0===e.loadtype&&A.logger.error("Missing loaditem event load type.");var t=e.isfirstitem,n=0;void 0!==e.timepoint&&(n=e.timepoint.id);var i=null;"image"===e.loadtype?(t&&0===n?m.addNew(e.data.image,e.data.info):m.update(e.loadid,e.data.image,e.data.info,n),i=e.data.info):"state"===e.loadtype&&((n=new A.io.State).apply(r,n.fromJSON(e.data)),i="state"),D({type:"loaditem",data:i,source:e.source,loadtype:e.loadtype}),"image"===e.loadtype&&t&&S.viewOnFirstLoadItem&&r.render(e.loadid)}function T(e){e.type="load",D(e)}function I(e){e.type="loadend",D(e)}function w(e){e.type="error",D(e)}function P(e){e.type="abort",D(e)}function a(e,t){var n=m.get(e);if(!n)throw new Error("Cannot initialise layers with data id: "+e);var i=p.getLayerGroupWithElementId(t);if(!i)throw new Error("Cannot initialise layers with group id: "+t);var r=n.image.getGeometry();p.unbindLayerGroups();var o=(new A.ViewFactory).create(new A.dicom.DicomElementsWrapper(n.meta),n.image),a=A.gui.getViewOrientation(r,i.getTargetOrientation());o.setOrientation(a);var s=1;0!==e&&(o.setColourMap(A.image.lut.rainbow),s=.5);t=i.addViewLayer();t.setView(o);n=r.getSize(a).get2D(),o=r.getSpacing(a).get2D();t.initialise(n,o,e),t.setOpacity(s);var l,a=null;0!==e&&(s=m.get(0).image.getGeometry().getOrigin(),l=r.getOrigin(),a=s.minus(l),t.setBaseOffset(a)),m.addEventListener("imagechange",t.onimagechange),p.bindLayerGroups(),h&&h.hasTool("Draw")&&((l=i.addDrawLayer()).initialise(n,o,e),l.setPlaneHelper(t.getViewController().getPlaneHelper()),t=[(t=t.getViewController()).getCurrentIndex().getValues(),t.getCurrentPosition().getValues()],i.updateLayersToPositionChange({value:t}),0!==e&&l.setBaseOffset(a));for(var u={x:0,y:0},c=0;c<m.length();++c){var g=m.get(c).image.getGeometry(),d=A.gui.getViewOrientation(g,i.getTargetOrientation()),x=g.getSize(d).get2D(),g=g.getSpacing(d).get2D(),d=x.x*g.x;d>u.x&&(u.x=d);g=x.y*g.y;g>u.y&&(u.y=g)}i.fitToContainer(u)}this.getImage=function(e){return m.get(e).image},this.getLastImage=function(){return m.get(m.length()-1).image},this.setImage=function(e,t){m.setImage(e,t)},this.setLastImage=function(e){m.setImage(m.length()-1,e)},this.getMetaData=function(e){return m.get(e).meta},this.getNumberOfLoadedData=function(){return m.length()},this.canScroll=function(){return p.getActiveLayerGroup().getActiveViewLayer().getViewController().canScroll()},this.canWindowLevel=function(){return p.getActiveLayerGroup().getActiveViewLayer().getViewController().canWindowLevel()},this.getAddedScale=function(){return p.getActiveLayerGroup().getAddedScale()},this.getBaseScale=function(){return p.getActiveLayerGroup().getBaseScale()},this.getOffset=function(){return p.getActiveLayerGroup().getOffset()},this.getToolboxController=function(){return h},this.getActiveLayerGroup=function(){return p.getActiveLayerGroup()},this.getViewLayersByDataIndex=function(e){return p.getViewLayersByDataIndex(e)},this.getLayerGroupById=function(e){return p.getLayerGroup(e)},this.getNumberOfLayerGroups=function(){return p.getNumberOfLayerGroups()},this.getStyle=function(){return e},this.addToUndoStack=function(e){null!==y&&y.add(e)},this.init=function(e){if(void 0===(S=e).viewOnFirstLoadItem&&(S.viewOnFirstLoadItem=!0),(y=new A.tool.UndoStack).addEventListener("undoadd",D),y.addEventListener("undo",D),y.addEventListener("redo",D),S.tools&&0!==S.tools.length){for(var t={},n=Object.keys(S.tools),i=0;i<n.length;++i){var r=n[i],o=S.tools[r];if(void 0!==A.tool[r]){if(t[r]=new A.tool[r](this),void 0!==t[r].addEventListener&&void 0!==o.events)for(var a=0;a<o.events.length;++a){var s=o.events[a];t[r].addEventListener(s,D)}if(void 0!==o.options){var l="raw";void 0!==o.type&&(l=o.type);var u=o.options;if("instance"===l||"factory"===l)for(var u={},c=0;c<o.options.length;++c){var g=o.options[c],d=g;"factory"===l&&(d+="Factory");var x=r.charAt(0).toLowerCase()+r.slice(1);void 0!==A.tool[x][d]?u[g]=A.tool[x][d]:A.logger.warn("Could not find option class for: "+g)}t[r].setOptions(u)}}else A.logger.warn("Could not initialise unknown tool: "+r)}h=new A.ctrl.ToolboxController(t)}(f=new A.ctrl.LoadController(S.defaultCharacterSet)).onloadstart=v,f.onprogress=C,f.onloaditem=L,f.onload=T,f.onloadend=I,f.onerror=w,f.onabort=P,m=new A.ctrl.DataController,p=new A.gui.Stage,void 0!==S.binders&&p.setBinders(S.binders)},this.getElement=function(e){return null},this.reset=function(){m.reset(),p.empty(),y&&((y=new A.tool.UndoStack).addEventListener("undoadd",D),y.addEventListener("undo",D),y.addEventListener("redo",D))},this.resetLayout=function(){p.reset(),p.draw()},this.addEventListener=function(e,t){n.add(e,t)},this.removeEventListener=function(e,t){n.remove(e,t)},this.loadFiles=function(e,t){0!==e.length?f.loadFiles(e,t):A.logger.warn("Ignoring empty input file list.")},this.loadURLs=function(e,t){0!==e.length?f.loadURLs(e,t):A.logger.warn("Ignoring empty input url list.")},this.loadImageObject=function(e){f.loadImageObject(e)},this.abortLoad=function(){f.abort()},this.fitToContainer=function(){var e,t,n,i=p.getActiveLayerGroup();i&&(e=(t=r.getLastImage().getGeometry()).getSize().get2D(),n=t.getSpacing().get2D(),t=e.x*n.x,n=e.y*n.y,i.fitToContainer({x:t,y:n}),i.draw())},this.initWLDisplay=function(){p.getActiveLayerGroup().getActiveViewLayer().getViewController().initialise()},this.setDataViewConfig=function(e){p.empty(),S.dataViewConfigs=e,p.bindLayerGroups()},this.setLayerGroupsBinders=function(e){p.setBinders(e)},this.render=function(e){if(null==e)throw new Error("Cannot render without data index");var t=function(e){if(null===S.dataViewConfigs||void 0===S.dataViewConfigs)throw new Error("No available data iew configuration");return void 0!==S.dataViewConfigs["*"]?S.dataViewConfigs["*"]:S.dataViewConfigs[e]}(e);if(!t)throw new Error("No view config for data: "+e);for(var n=0;n<t.length;++n){var i,r=t[n],o=p.getLayerGroupWithElementId(r.divId);o||(i=document.getElementById(r.divId),function(e){e.addEventListener("zoomchange",D),e.addEventListener("offsetchange",D),e.addEventListener("renderstart",D),e.addEventListener("renderend",D);for(var t=0;t<A.image.viewEventNames.length;++t)e.addEventListener(A.image.viewEventNames[t],D)}(o=p.addLayerGroup(i)),void 0!==r.orientation&&o.setTargetOrientation(A.math.getMatrixFromName(r.orientation))),0===o.getViewLayersByDataIndex(e).length&&(0===o.getNumberOfLayers()?function(e,t){if(!m.get(e))throw new Error("Cannot initialise layers with data id: "+e);if(!p.getLayerGroupWithElementId(t))throw new Error("Cannot initialise layers with group id: "+t);a(e,t),h&&h.init()}:a)(e,r.divId),o.draw()}},this.zoom=function(e,t,n){var i=p.getActiveLayerGroup(),r=i.getActiveViewLayer().getViewController().getCurrentScrollPosition();i.addScale(e,{x:t,y:n,z:r}),i.draw()},this.translate=function(e,t){var n=p.getActiveLayerGroup();n.addTranslation({x:e,y:t}),n.draw()},this.setOpacity=function(e){var t=p.getActiveLayerGroup().getActiveViewLayer();t.setOpacity(e),t.draw()},this.getDrawDisplayDetails=function(){return p.getActiveLayerGroup().getActiveDrawLayer().getDrawController().getDrawDisplayDetails()},this.getDrawStoreDetails=function(){return p.getActiveLayerGroup().getActiveDrawLayer().getDrawController().getDrawStoreDetails()},this.setDrawings=function(e,t){var n=p.getActiveLayerGroup(),i=n.getActiveViewLayer().getViewController(),n=n.getActiveDrawLayer().getDrawController();n.setDrawings(e,t,D,this.addToUndoStack),n.activateDrawLayer(i.getCurrentOrientedIndex(),i.getScrollIndex())},this.updateDraw=function(e){p.getActiveLayerGroup().getActiveDrawLayer().getDrawController().updateDraw(e)},this.deleteDraws=function(){p.getActiveLayerGroup().getActiveDrawLayer().getDrawController().deleteDraws(D,this.addToUndoStack)},this.isGroupVisible=function(e){return p.getActiveLayerGroup().getActiveDrawLayer().getDrawController().isGroupVisible(e)},this.toogleGroupVisibility=function(e){p.getActiveLayerGroup().getActiveDrawLayer().getDrawController().toogleGroupVisibility(e)},this.getState=function(){return(new A.io.State).toJSON(r)},this.onResize=function(e){r.fitToContainer()},this.onKeydown=function(e){D(e)},this.defaultOnKeydown=function(e){var t=p.getActiveLayerGroup().getActiveViewLayer().getViewController(),n=t.getImageSize();e.ctrlKey&&(37===e.keyCode?(e.preventDefault(),n.moreThanOne(3)&&t.decrementIndex(3)):38===e.keyCode?(e.preventDefault(),t.canScroll()&&t.incrementScrollIndex()):39===e.keyCode?(e.preventDefault(),n.moreThanOne(3)&&t.incrementIndex(3)):40===e.keyCode?(e.preventDefault(),t.canScroll()&&t.decrementScrollIndex()):89===e.keyCode?y.redo():90===e.keyCode&&y.undo())},this.resetDisplay=function(){r.resetLayout(),r.initWLDisplay()},this.resetZoom=function(){r.resetLayout()},this.setColourMap=function(e){p.getActiveLayerGroup().getActiveViewLayer().getViewController().setColourMapFromName(e)},this.setWindowLevelPreset=function(e){p.getActiveLayerGroup().getActiveViewLayer().getViewController().setWindowLevelPreset(e)},this.setTool=function(e){for(var t=0;t<p.getNumberOfLayerGroups();++t){var n=p.getLayerGroup(t),i=n.getActiveViewLayer();i&&h.unbindLayer(i);i=n.getActiveDrawLayer();i&&h.unbindLayer(i);i=null,i="Draw"===e||"Livewire"===e||"Floodfill"===e?n.getActiveDrawLayer():n.getActiveViewLayer();h.bindLayer(i)}h.setSelectedTool(e)},this.setDrawShape=function(e){h.setSelectedShape(e)},this.setImageFilter=function(e){h.setSelectedFilter(e)},this.runImageFilter=function(){h.runSelectedFilter()},this.setDrawLineColour=function(e){h.setLineColour(e)},this.setFilterMinMax=function(e){h.setRange(e)},this.undo=function(){y.undo()},this.redo=function(){y.redo()}},(A=A||{}).ctrl=A.ctrl||{},A.ctrl.DataController=function(){var o=[],n=new A.utils.ListenerHandler;function a(e){return void 0!==e.x00020010?new A.dicom.DicomElementsWrapper(e).dumpToObject():e}this.length=function(){return o.length},this.reset=function(){o=[]},this.get=function(e){return o[e]},this.setImage=function(e,t){o[e].image=t,t={type:"imagechange",value:[e,t]},n.fireEvent(t)},this.addNew=function(e,t){o.push({image:e,meta:a(t)})},this.update=function(e,t,n,i){var r=o[e];void 0===i||(3===(e=r.image.getGeometry().getSize()).length()&&0!==i||3<e.length()&&i>=e.get(3))&&r.image.appendFrame(),r.image.appendSlice(t,i),0===i&&(i="",i=void 0!==n.x00020010?"InstanceNumber":"imageUid",r.meta=A.utils.mergeObjects(r.meta,a(n),i,"value"))},this.addEventListener=function(e,t){n.add(e,t)},this.removeEventListener=function(e,t){n.remove(e,t)}},(A=A||{}).draw=A.draw||{},A.ctrl=A.ctrl||{};y=y||{};A.draw.getDrawPositionGroupId=function(e){return"slice-"+e.get(2)+"_frame-"+(4===e.length()?e.get(3):0)},A.draw.getPositionFromGroupId=function(e){var t=e.indexOf("_");return-1===t&&A.logger.warn("Badly formed PositionGroupId: "+e),{sliceNumber:e.substring(6,t),frameNumber:e.substring(t+7)}},A.draw.isNodeNameShape=function(e){return"shape"===e.name()},A.draw.isNodeNameShapeExtra=function(e){return e.name().startsWith("shape-")},A.draw.isNodeNameLabel=function(e){return"label"===e.name()},A.draw.isPositionNode=function(e){return"position-group"===e.name()},A.draw.isNodeWithId=function(t){return function(e){return e.id()===t}},A.draw.canNodeChangeColour=function(e){return"anchor"!==e.name()&&"label"!==e.name()},A.draw.getHierarchyLog=function(e,t){void 0===t&&(t="");for(var n=e.getChildren(),i=t+"|__ "+e.name()+": "+e.id()+"\n",r=0;r<n.length;++r)i+=A.draw.getHierarchyLog(n[r],t+" ");return i},A.ctrl.DrawController=function(m){var l=null;this.getCurrentPosGroup=function(){var e=m.getChildren(function(e){return e.id()===l}),t=null;return 1===e.length?t=e[0]:0===e.length?((t=new y.Group).name("position-group"),t.id(l),t.visible(!0),m.add(t)):A.logger.warn("Unexpected number of draw position groups."),t},this.reset=function(){m=null},this.activateDrawLayer=function(e,t){for(var n=[t],i=3;i<e.length();++i)n.push(i);l=e.toStringId(n);for(var r,o=m.getChildren(A.draw.isPositionNode),a=0,s=o.length;a<s;++a)r=!1,o[a].id()===l&&(r=!0),o[a].visible(r);m.draw()},this.getDrawDisplayDetails=function(){for(var e=[],t=m.getChildren(),n=0,i=t.length;n<i;++n)for(var r=A.math.getIndexFromStringId(t[n].id()),o=t[n].getChildren(),a=0,s=o.length;a<s;++a){var l,u=o[a].getChildren(A.draw.isNodeNameShape)[0],c=o[a].getChildren(A.draw.isNodeNameLabel)[0].getChildren()[0],g=u.className;"Line"===g&&(l=o[a].getChildren(A.draw.isNodeNameShapeExtra),u.closed()?g="Roi":0!==l.length&&(g=-1!==l[0].name().indexOf("triangle")?"Arrow":"Ruler")),"Rect"===g&&(g="Rectangle"),e.push({id:o[a].id(),position:r.toString(),type:g,color:u.stroke(),meta:c.meta})}return e},this.getDrawStoreDetails=function(){for(var e={},t=m.getChildren(A.draw.isPositionNode),n=0,i=t.length;n<i;++n)for(var r,o=0,a=(r=t[n].getChildren()).length;o<a;++o){for(var s,l=(s=r[o]).find(".anchor"),u=0;u<l.length;++u)l[u].remove();var c=s.find(".text");1!==c.length&&A.logger.warn("There should not be more than one text per shape."),e[s.id()]={meta:c[0].meta}}return e},this.setDrawings=function(e,t,n,i){for(var r=y.Node.create(e).getChildren(A.draw.isPositionNode),o=0,a=r.length;o<a;++o){var s=r[o],l=m.getChildren(A.draw.isNodeWithId(s.id()))[0];void 0===l&&(l=new y.Group({id:s.id(),name:"position-group",visible:!1}),m.add(l));for(var u=s.getChildren(),c=0,g=u.length;c<g;++c){var d=u[0];l.add(d);var x=d.getChildren(A.draw.isNodeNameShape)[0],S=new A.tool.DrawGroupCommand(d,x.className,m);S.onExecute=n,S.onUndo=n,t&&(x=t[d.id()],(d=d.getChildren(A.draw.isNodeNameLabel)[0].getText()).meta=x.meta,d.setText(A.utils.replaceFlags(d.meta.textExpr,d.meta.quantification))),S.execute(),i(S)}}},this.updateDraw=function(e){var t=m.findOne("#"+e.id);if(void 0!==t){for(var n=t.getChildren(A.draw.isNodeNameShape),i=0;i<n.length;++i)n[i].stroke(e.color);for(var r=t.getChildren(A.draw.isNodeNameShapeExtra),o=0;o<r.length;++o)void 0!==r[o].stroke()?r[o].stroke(e.color):void 0!==r[o].fill()&&r[o].fill(e.color);for(var a,s=t.getChildren(A.draw.isNodeNameLabel)[0],l=A.utils.getShadowColour(e.color),u=s.getChildren(),c=0;c<u.length;++c)u[c].fill(e.color),"Text"===u[c].className&&((a=u[c]).shadowColor(l),void 0!==e.meta&&(a.meta=e.meta,a.setText(A.utils.replaceFlags(a.meta.textExpr,a.meta.quantification)),s.setVisible(0!==a.meta.textExpr.length)));m.draw()}else A.logger.warn("[updateDraw] Cannot find group with id: "+e.id)},this.isGroupVisible=function(e){var t=m.findOne("#"+e.id);return void 0===t?(A.logger.warn("[isGroupVisible] Cannot find node with id: "+e.id),!1):t.isVisible()},this.toogleGroupVisibility=function(e){var t=m.findOne("#"+e.id);if(void 0===t)return A.logger.warn("[toogleGroupVisibility] Cannot find node with id: "+e.id),!1;t.visible(!t.isVisible()),m.draw()},this.deleteDrawGroupId=function(t,e,n){var i=m.getChildren().getChildren(function(e){return e.id()===t});1===i.length?this.deleteDrawGroup(i[0],e,n):0===i.length?A.logger.warn("Can't delete group with id:'"+t+"', cannot find it."):A.logger.warn("Can't delete group with id:'"+t+"', too many with the same id.")},this.deleteDrawGroup=function(e,t,n){var i=e.getChildren(A.draw.isNodeNameShape)[0],i=A.tool.GetShapeDisplayName(i),i=new A.tool.DeleteGroupCommand(e,i,m);i.onExecute=t,i.onUndo=t,i.execute(),n(i)},this.deleteDraws=function(e,t){for(var n=m.getChildren();n.length;)this.deleteDrawGroup(n[0],e,t)}},(A=A||{}).ctrl=A.ctrl||{},A.ctrl.LoadController=function(o){var s=this,l={},u=-1;function a(e,t,i,r){var n={loadtype:i},o=!1;void 0!==r&&void 0!==r.timepoint&&(o=!0);var a=null;o?(a=r.timepoint.dataId,n.timepoint=r.timepoint):a=++u,n.loadid=a,t.onloadstart=function(e){l[a]={loader:t,isFirstItem:!0},c(s.onloadstart,n)(e)},t.onprogress=c(s.onprogress,n),t.onloaditem=function(e){var t=l[a].isFirstItem,n={loadtype:i,loadid:a,isfirstitem:t};o&&(n.timepoint=r.timepoint),c(s.onloaditem,n)(e),t&&(l[a].isFirstItem=!1)},t.onload=c(s.onload,n),t.onloadend=function(e){delete l[a],c(s.onloadend,n)(e)},t.onerror=c(s.onerror,n),t.onabort=c(s.onabort,n);try{t.load(e,r)}catch(e){return s.onerror({error:e,loadId:a}),void s.onloadend({loadId:a})}}function c(r,o){return function(e){for(var t=Object.keys(o),n=0;n<t.length;++n){var i=t[n];e[i]=o[i]}r(e)}}this.loadFiles=function(e,t){var n,i,r;"json"===e[0].name.split(".").pop().toLowerCase()?(n=e[0],i=t,r=new A.io.FilesLoader,a([n],r,"state",i)):(i=e,e=t,(t=new A.io.FilesLoader).setDefaultCharacterSet(o),a(i,t,"image",e))},this.loadURLs=function(e,t){var n,i,r;"json"===e[0].split(".").pop().toLowerCase()?(n=e[0],i=t,r=new A.io.UrlsLoader,a([n],r,"state",i)):(i=e,e=t,(t=new A.io.UrlsLoader).setDefaultCharacterSet(o),a(i,t,"image",e))},this.loadImageObject=function(e){a(e,new A.io.MemoryLoader,"image")},this.abort=function(){for(var e=Object.keys(l),t=0;t<e.length;++t)l[t].loader.abort(),delete l[t]}},A.ctrl.LoadController.prototype.onloadstart=function(e){},A.ctrl.LoadController.prototype.onprogress=function(e){},A.ctrl.LoadController.prototype.onload=function(e){},A.ctrl.LoadController.prototype.onloadend=function(e){},A.ctrl.LoadController.prototype.onerror=function(e){},A.ctrl.LoadController.prototype.onabort=function(e){},(A=A||{}).ctrl=A.ctrl||{},A.ctrl.ToolboxController=function(t){var n=null,r=[];function i(e,t){function i(e){var t;!n||(t=n[e.type])&&t(e)}return void 0===r[e]&&(r[e]=[]),void 0===r[e][t]&&(r[e][t]="keydown"===t?function(e){i(e)}:"touchend"===t?function(e){e.preventDefault(),i(e)}:function(e){var t,n;e.preventDefault(),t=e,n=A.gui.getEventOffset(t),t._x=n[0].x,t._y=n[0].y,2===n.length&&(t._x1=n[1].x,t._y1=n[1].y),i(e)}),r[e][t]}this.init=function(){for(var e in t)t[e].init();s.addEventListener("keydown",i("window","keydown"),!0)},this.getToolList=function(){return t},this.hasTool=function(e){return void 0!==this.getToolList()[e]},this.getSelectedTool=function(){return n},this.getSelectedToolEventHandler=function(e){return this.getSelectedTool()[e]},this.setSelectedTool=function(e){if(!this.hasTool(e))throw new Error("Unknown tool: '"+e+"'");n&&n.activate(!1),(n=t[e]).activate(!0)},this.setSelectedShape=function(e){this.getSelectedTool().setShapeName(e)},this.setSelectedFilter=function(e){this.getSelectedTool().setSelectedFilter(e)},this.runSelectedFilter=function(){this.getSelectedTool().getSelectedFilter().run()},this.setLineColour=function(e){this.getSelectedTool().setLineColour(e)},this.setRange=function(e){this.getSelectedTool()&&this.getSelectedTool().getSelectedFilter()&&this.getSelectedTool().getSelectedFilter().run(e)},this.bindLayer=function(e){e.bindInteraction();for(var t=A.gui.interactionEventNames,n=0;n<t.length;++n)e.addEventListener(t[n],i(e.getId(),t[n]))},this.unbindLayer=function(e){e.unbindInteraction();for(var t=A.gui.interactionEventNames,n=0;n<t.length;++n)e.removeEventListener(t[n],i(e.getId(),t[n]))}},(A=A||{}).ctrl=A.ctrl||{},A.ctrl.ViewController=function(u){var i=this,r=null,n=new A.image.PlaneHelper(u.getImage().getGeometry().getSpacing(),u.getOrientation());this.getPlaneHelper=function(){return n},this.initialise=function(){this.setWindowLevelPresetById(0),this.setCurrentPosition2D(0,0)},this.getWindowLevelPresetsNames=function(){return u.getWindowPresetsNames()},this.addWindowLevelPresets=function(e){return u.addWindowPresets(e)},this.setWindowLevelPreset=function(e){u.setWindowLevelPreset(e)},this.setWindowLevelPresetById=function(e){u.setWindowLevelPresetById(e)},this.isPlaying=function(){return null!==r},this.getCurrentPosition=function(){return u.getCurrentPosition()},this.getCurrentIndex=function(){return u.getCurrentIndex()},this.getCurrentOrientedIndex=function(){var e,t=u.getCurrentIndex();return void 0!==u.getOrientation()&&(e=new A.math.Index([t.get(0),t.get(1),t.get(2)]),e=u.getOrientation().getInverse().getAbs().multiplyIndex3D(e).getValues(),t=new A.math.Index(e)),t},this.getScrollIndex=function(){return u.getScrollIndex()},this.getCurrentScrollIndexValue=function(){return u.getCurrentIndex().get(u.getScrollIndex())},this.getCurrentScrollPosition=function(){var e=u.getScrollIndex();return u.getCurrentPosition().get(e)},this.generateImageData=function(e){u.generateImageData(e)},this.setImage=function(e){u.setImage(e)},this.get2DSpacing=function(){var e=u.getImage().getGeometry().getSpacing();return[e.get(0),e.get(1)]},this.getImageRegionValues=function(e,t){var n,i,r,o=u.getImage(),a=u.getOrientation(),s=this.getCurrentIndex(),l=!0;A.math.isIdentityMat33(a)||(i=A.image.getSliceIterator(o,s,l,a),n=A.image.getIteratorValues(i),(r=o.getGeometry().getSize(a).getValues())[2]=1,i=new A.image.Size(r),(r=o.getGeometry().getSpacing(a).getValues())[2]=1,a=new A.image.Spacing(r),r=new A.math.Point3D(0,0,0),a=new A.image.Geometry(r,i,a),o=new A.image.Image(a,n),s=new A.math.Index([0,0,0]),l=!1);e=A.image.getRegionSliceIterator(o,s,l,e,t),t=[];return t=e?A.image.getIteratorValues(e):t},this.getImageVariableRegionValues=function(e){var t=A.image.getVariableRegionSliceIterator(u.getImage(),this.getCurrentIndex(),!0,e),e=[];return e=t?A.image.getIteratorValues(t):e},this.canQuantifyImage=function(){return u.getImage().canQuantify()},this.canWindowLevel=function(){return u.getImage().canWindowLevel()},this.canScroll=function(){return u.getImage().canScroll(u.getOrientation())},this.getImageSize=function(){return u.getImage().getGeometry().getSize()},this.setCurrentPosition=function(e,t){return u.setCurrentPosition(e,t)},this.setCurrentPosition2D=function(e,t){return u.setCurrentPosition(this.getPositionFromPlanePoint({x:e,y:t}))},this.setCurrentIndex=function(e,t){return u.setCurrentIndex(e,t)},this.getPositionFromPlanePoint=function(e){var t=this.getCurrentScrollIndexValue(),t=new A.math.Point3D(e.x,e.y,t),t=n.getDeOrientedVector3D(t),t=u.getImage().getGeometry().pointToWorld(t);return this.getCurrentPosition().mergeWith3D(t)},this.getPlanePositionFromPlanePoint=function(e){var t=this.getCurrentScrollIndexValue(),e=new A.math.Point3D(e.x,e.y,t),t=n.getDeOrientedVector3D(e),e=u.getImage().getGeometry().getSpacing();return new A.math.Point3D(t.getX()*e.get(0),t.getY()*e.get(1),t.getZ()*e.get(2))},this.getOffset3DFromPlaneOffset=function(e){return n.getOffset3DFromPlaneOffset(e)},this.incrementIndex=function(e,t){return u.incrementIndex(e,t)},this.decrementIndex=function(e,t){return u.decrementIndex(e,t)},this.decrementScrollIndex=function(e){return u.decrementScrollIndex(e)},this.incrementScrollIndex=function(e){return u.incrementScrollIndex(e)},this.play=function(){var e,t,n;this.canScroll()&&(null===r?(t=(e=u.getImage()).getMeta().RecommendedDisplayFrameRate,t=u.getPlaybackMilliseconds(t),n=e.getGeometry().getSize().canScroll3D(),r=setInterval(function(){var e,t;(n?i.incrementScrollIndex():i.incrementIndex(3))||(t=i.getCurrentIndex().getValues(),e=u.getOrientation(),n?t[e.getThirdColMajorDirection()]=0:t[3]=0,e=new A.math.Index(t),t=u.getImage().getGeometry(),i.setCurrentPosition(t.indexToWorld(e)))},t)):this.stop())},this.stop=function(){null!==r&&(clearInterval(r),r=null)},this.getWindowLevel=function(){return{width:u.getCurrentWindowLut().getWindowLevel().getWidth(),center:u.getCurrentWindowLut().getWindowLevel().getCenter()}},this.setWindowLevel=function(e,t){u.setWindowLevel(e,t)},this.getColourMap=function(){return u.getColourMap()},this.setColourMap=function(e){u.setColourMap(e)},this.setViewAlphaFunction=function(e){u.setAlphaFunction(e)},this.setColourMapFromName=function(e){if(!A.tool.colourMaps[e])throw new Error("Unknown colour map: '"+e+"'");this.setColourMap(A.tool.colourMaps[e])}},(A=A||{}).dicom=A.dicom||{},A.dicom.isNativeLittleEndian=function(){return 0<new Int8Array(new Int16Array([1]).buffer)[0]},A.dicom.flipArrayEndianness=function(e){for(var t,n=e.byteLength,i=new Uint8Array(e.buffer,e.byteOffset,n),r=e.BYTES_PER_ELEMENT,o=0;o<n;o+=r)for(var a=o+r-1,s=o;s<a;a--,s++)t=i[s],i[s]=i[a],i[a]=t},A.dicom.DataReader=function(l,t){void 0===t&&(t=!0);var n={decode:function(e){for(var t="",n=0,i=e.length;n<i;++n)t+=String.fromCharCode(e[n]);return t}},i=n;void 0!==s.TextDecoder&&(i=new TextDecoder("iso-8859-1")),this.setUtfLabel=function(e){void 0!==s.TextDecoder&&(i=new TextDecoder(e))};var e=A.dicom.isNativeLittleEndian(),a=t!==e,r=new DataView(l);this.readUint16=function(e){return r.getUint16(e,t)},this.readUint32=function(e){return r.getUint32(e,t)},this.readInt32=function(e){return r.getInt32(e,t)},this.readFloat32=function(e){return r.getFloat32(e,t)},this.readFloat64=function(e){return r.getFloat64(e,t)},this.readBinaryArray=function(e,t){for(var n,i,r=new Uint8Array(l,e,t),o=8*r.length,a=new Uint8Array(o),s=0;s<o;++s)n=s%8,i=Math.floor(s/8),a[s]=255*(0!=(r[i]&1<<n));return a},this.readUint8Array=function(e,t){return new Uint8Array(l,e,t)},this.readInt8Array=function(e,t){return new Int8Array(l,e,t)},this.readUint16Array=function(e,t){var n=Uint16Array.BYTES_PER_ELEMENT,i=t/n,r=null;if(e%n==0)r=new Uint16Array(l,e,i),a&&A.dicom.flipArrayEndianness(r);else for(var r=new Uint16Array(i),o=0;o<i;++o)r[o]=this.readUint16(e+n*o);return r},this.readInt16Array=function(e,t){var n=Int16Array.BYTES_PER_ELEMENT,i=t/n,r=null;if(e%n==0)r=new Int16Array(l,e,i),a&&A.dicom.flipArrayEndianness(r);else for(var r=new Int16Array(i),o=0;o<i;++o)r[o]=this.readInt16(e+n*o);return r},this.readUint32Array=function(e,t){var n=Uint32Array.BYTES_PER_ELEMENT,i=t/n,r=null;if(e%n==0)r=new Uint32Array(l,e,i),a&&A.dicom.flipArrayEndianness(r);else for(var r=new Uint32Array(i),o=0;o<i;++o)r[o]=this.readUint32(e+n*o);return r},this.readInt32Array=function(e,t){var n=Int32Array.BYTES_PER_ELEMENT,i=t/n,r=null;if(e%n==0)r=new Int32Array(l,e,i),a&&A.dicom.flipArrayEndianness(r);else for(var r=new Int32Array(i),o=0;o<i;++o)r[o]=this.readInt32(e+n*o);return r},this.readFloat32Array=function(e,t){var n=Float32Array.BYTES_PER_ELEMENT,i=t/n,r=null;if(e%n==0)r=new Float32Array(l,e,i),a&&A.dicom.flipArrayEndianness(r);else for(var r=new Float32Array(i),o=0;o<i;++o)r[o]=this.readFloat32(e+n*o);return r},this.readFloat64Array=function(e,t){var n=Float64Array.BYTES_PER_ELEMENT,i=t/n,r=null;if(e%n==0)r=new Float64Array(l,e,i),a&&A.dicom.flipArrayEndianness(r);else for(var r=new Float64Array(i),o=0;o<i;++o)r[o]=this.readFloat64(e+n*o);return r},this.readString=function(e,t){t=this.readUint8Array(e,t);return n.decode(t)},this.readSpecialString=function(e,t){t=this.readUint8Array(e,t);return i.decode(t)}},A.dicom.DataReader.prototype.readHex=function(e){e=this.readUint16(e).toString(16);return"0x0000".substr(0,6-e.length)+e.toUpperCase()},(A=A||{}).dicom=A.dicom||{},A.dicom.DataWriter=function(e,n){void 0===n&&(n=!0);var i={encode:function(e){for(var t=new Uint8Array(e.length),n=0,i=e.length;n<i;++n)t[n]=e.charCodeAt(n);return t}},r=i;void 0!==s.TextEncoder&&(r=new TextEncoder("iso-8859-1")),this.setUtfLabel=function(e){void 0!==s.TextEncoder&&(r=new TextEncoder(e))};var o=new DataView(e);this.useUnVrForPrivateSq=!1,this.writeUint8=function(e,t){return o.setUint8(e,t),e+Uint8Array.BYTES_PER_ELEMENT},this.writeInt8=function(e,t){return o.setInt8(e,t),e+Int8Array.BYTES_PER_ELEMENT},this.writeUint16=function(e,t){return o.setUint16(e,t,n),e+Uint16Array.BYTES_PER_ELEMENT},this.writeInt16=function(e,t){return o.setInt16(e,t,n),e+Int16Array.BYTES_PER_ELEMENT},this.writeUint32=function(e,t){return o.setUint32(e,t,n),e+Uint32Array.BYTES_PER_ELEMENT},this.writeInt32=function(e,t){return o.setInt32(e,t,n),e+Int32Array.BYTES_PER_ELEMENT},this.writeFloat32=function(e,t){return o.setFloat32(e,t,n),e+Float32Array.BYTES_PER_ELEMENT},this.writeFloat64=function(e,t){return o.setFloat64(e,t,n),e+Float64Array.BYTES_PER_ELEMENT},this.writeHex=function(e,t){t=parseInt(t.substr(2),16);return o.setUint16(e,t,n),e+Uint16Array.BYTES_PER_ELEMENT},this.writeString=function(e,t){t=i.encode(t);return this.writeUint8Array(e,t)},this.writeSpecialString=function(e,t){t=r.encode(t);return this.writeUint8Array(e,t)}},A.dicom.DataWriter.prototype.writeBinaryArray=function(e,t){if(t.length%8!=0)throw new Error("Cannot write boolean array as binary.");for(var n=null,i=0,r=t.length;i<r;i+=8){for(var n=0,o=0;o<8;++o)n+=(0===t[i+o]?0:1)<<o;e=this.writeUint8(e,n)}return e},A.dicom.DataWriter.prototype.writeUint8Array=function(e,t){for(var n=0,i=t.length;n<i;++n)e=this.writeUint8(e,t[n]);return e},A.dicom.DataWriter.prototype.writeInt8Array=function(e,t){for(var n=0,i=t.length;n<i;++n)e=this.writeInt8(e,t[n]);return e},A.dicom.DataWriter.prototype.writeUint16Array=function(e,t){for(var n=0,i=t.length;n<i;++n)e=this.writeUint16(e,t[n]);return e},A.dicom.DataWriter.prototype.writeInt16Array=function(e,t){for(var n=0,i=t.length;n<i;++n)e=this.writeInt16(e,t[n]);return e},A.dicom.DataWriter.prototype.writeUint32Array=function(e,t){for(var n=0,i=t.length;n<i;++n)e=this.writeUint32(e,t[n]);return e},A.dicom.DataWriter.prototype.writeInt32Array=function(e,t){for(var n=0,i=t.length;n<i;++n)e=this.writeInt32(e,t[n]);return e},A.dicom.DataWriter.prototype.writeFloat32Array=function(e,t){for(var n=0,i=t.length;n<i;++n)e=this.writeFloat32(e,t[n]);return e},A.dicom.DataWriter.prototype.writeFloat64Array=function(e,t){for(var n=0,i=t.length;n<i;++n)e=this.writeFloat64(e,t[n]);return e},(A=A||{}).dicom=A.dicom||{},A.dicom.DicomElementsWrapper=function(s){this.getDEFromKey=function(e){return s[e]},this.getFromKey=function(e,t){void 0===t&&(t=!1);var n=null,e=s[e];return n=void 0!==e?1===e.value.length&&!1===t?e.value[0]:e.value:n},this.dumpToObject=function(){for(var e,t=Object.keys(s),n={},i=0,r=t.length;i<r;++i)e=s[t[i]],n[this.getTagName(e.tag)]=this.getElementAsObject(e);return n},this.getTagName=function(e){var t=new A.dicom.Tag(e.group,e.element),e=t.getNameFromDictionary();return e=null===e?t.getKey2():e},this.getElementAsObject=function(e){var t=null,n="0x7FE0"===e.tag.group&&"0x0010"===e.tag.element,i=e.vr;if("SQ"!==i||void 0===e.value||n)t=this.getElementValueAsString(e);else for(var t=[],r=e.value,o=null,a=0;a<r.length;++a){for(var o={},s=Object.keys(r[a]),l=0;l<s.length;++l){var u=r[a][s[l]],c=this.getTagName(u.tag);"Item"!==c&&(o[c]=this.getElementAsObject(u))}t.push(o)}return{value:t,group:e.tag.group,element:e.tag.element,vr:i,vl:e.vl}},this.dump=function(){var e=Object.keys(s),t="\n";t+="# Dicom-File-Format\n",t+="\n",t+="# Dicom-Meta-Information-Header\n",t+="# Used TransferSyntax: ",A.dicom.isNativeLittleEndian()?t+="Little Endian Explicit\n":t+="NOT Little Endian Explicit\n";for(var n=!0,i=0,r=e.length;i<r;++i){var o,a=s[e[i]];n&&"0x0002"!==a.tag.group&&(t+="\n",t+="# Dicom-Data-Set\n",t+="# Used TransferSyntax: ",o=A.dicom.cleanString(s.x00020010.value[0]),t+=A.dicom.getTransferSyntaxName(o),t+="\n",n=!1),t+=this.getElementAsString(a)+"\n"}return t}},A.dicom.DicomElementsWrapper.prototype.getElementValueAsString=function(e,t){var n="";if(void 0===t&&(t=!0),null==e)return n;var i=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};if("SQ"!==e.vr&&1===e.value.length&&""===e.value[0])n+="(no value available)";else if("0x7FE0"===e.tag.group&&"0x0010"===e.tag.element&&"u/l"===e.vl)n="(PixelSequence)";else if("DA"===e.vr&&t){var r=e.value[0],o=4,a=6;8!==r.length&&(o=5,a=8);n=new Date(parseInt(r.substr(0,4),10),parseInt(r.substr(o,2),10)-1,parseInt(r.substr(a,2),10)).toLocaleDateString()}else if("TM"===e.vr&&t){a=e.value[0];n=a.substr(0,2)+":"+(4<=a.length?a.substr(2,2):"00")+":"+(6<=a.length?a.substr(4,2):"00")}else{var s=!1;0!==e.vr.length&&(s="O"===e.vr[0].toUpperCase());for(var l="FL"===e.vr||"FD"===e.vr||"DS"===e.vr,u="",c=0,g=e.value.length;c<g;++c){var d,u="";if(0!==c&&(u+="\\"),l?("string"==typeof(d=e.value[c])&&(d=A.dicom.cleanString(d)),!i(d=Number(d))&&t?u+=d.toPrecision(4):u+=d.toString()):s?(d=e.value[c].toString(16),u+=d="OB"===e.vr?"00".substr(0,2-d.length)+d:"0000".substr(0,4-d.length)+d):"string"==typeof e.value[c]?u+=A.dicom.cleanString(e.value[c]):u+=e.value[c],!(n.length+u.length<=65)){n+="...";break}n+=u}}return n},A.dicom.DicomElementsWrapper.prototype.getElementValueAsStringFromKey=function(e){return this.getElementValueAsString(this.getDEFromKey(e))},A.dicom.DicomElementsWrapper.prototype.getElementAsString=function(e,t){t=t||"";var n=new A.dicom.Tag(e.tag.group,e.tag.element).getNameFromDictionary(),i=e.value.length,r=!1;0!==e.vr.length&&(r="O"===e.vr[0].toUpperCase()),"0xFFFE"!==e.tag.group||"0xE00D"!==e.tag.element&&"0xE0DD"!==e.tag.element?r&&(i=1):i=0;var o="0x7FE0"===e.tag.group&&"0x0010"===e.tag.element&&"u/l"===e.vl,a=null,a="(";a+=e.tag.group.substr(2,5).toLowerCase(),a+=",",a+=e.tag.element.substr(2,5).toLowerCase(),a+=") ",a+=e.vr,"SQ"!==e.vr&&1===e.value.length&&""===e.value[0]?(a+=" (no value available)",i=0):"na"===e.vr?(a+=" ",a+=e.value[0]):o?a+=" (PixelSequence #="+i+")":"SQ"===e.vr?(a+=" (Sequence with","u/l"===e.vl?a+=" undefined":a+=" explicit",a+=" length #=",a+=e.value.length,a+=")"):r||"pi"===e.vr||"UL"===e.vr||"US"===e.vr||"SL"===e.vr||"SS"===e.vr||"FL"===e.vr||"FD"===e.vr||"AT"===e.vr?(a+=" ",a+=this.getElementValueAsString(e,!1)):(a+=" [",a+=this.getElementValueAsString(e,!1),a+="]");var s=55-a.length;if(0<s)for(var l=0;l<s;++l)a+=" ";a+=" # ",e.vl<100&&(a+=" "),e.vl<10&&(a+=" "),a+=e.vl,a+=", ",a+=i,a+=" ",a+=null!==n?n:"Unknown Tag & Data";var u=null;if("SQ"===e.vr){for(var c=0,g=e.value.length;c<g;++c){var d=e.value[c],x=Object.keys(d);if(0!==x.length){var S=d.xFFFEE000,u="(Item with";"u/l"===S.vl?u+=" undefined":u+=" explicit",u+=" length #="+(x.length-1)+")",S.value=[u],S.vr="na",a+="\n",a+=this.getElementAsString(S,t+" ");for(var m=0,h=x.length;m<h;++m)"xFFFEE000"!==x[m]&&(a+="\n",a+=this.getElementAsString(d[x[m]],t+" "));u="(ItemDelimitationItem","u/l"!==S.vl&&(u+=" for re-encoding"),u+=")",a+="\n",a+=this.getElementAsString({tag:{group:"0xFFFE",element:"0xE00D"},vr:"na",vl:"0",value:[u]},t+" ")}}u="(SequenceDelimitationItem","u/l"!==e.vl&&(u+=" for re-encod."),a+="\n",a+=this.getElementAsString({tag:{group:"0xFFFE",element:"0xE0DD"},vr:"na",vl:"0",value:[u+=")"]},t)}else if(o){for(var f=null,p=0,y=e.value.length;p<y;++p)a+="\n",(f=e.value[p]).vr="pi",a+=this.getElementAsString(f,t+" ");a+="\n",a+=this.getElementAsString({tag:{group:"0xFFFE",element:"0xE0DD"},vr:"na",vl:"0",value:["(SequenceDelimitationItem)"]},t)}return t+a},A.dicom.DicomElementsWrapper.prototype.getFromGroupElement=function(e,t){return this.getFromKey(new A.dicom.Tag(e,t).getKey())},A.dicom.DicomElementsWrapper.prototype.getFromName=function(e){var t=null,e=A.dicom.getTagFromDictionary(e);return t=null!==e?this.getFromKey(e.getKey()):t},A.dicom.DicomElementsWrapper.prototype.getPixelSpacing=function(){for(var e=1,t=1,n=["x00280030","x00181164","x00182010","x00280034"],i=0;i<n.length;++i){var r=this.getFromKey(n[i],!0);if(r&&2===r.length){e=parseFloat(r[0]),t=parseFloat(r[1]);break}}return 0===t&&(A.logger.warn("Zero column spacing."),t=1),0===e&&(A.logger.warn("Zero row spacing."),e=1),new A.image.Spacing([t,e,1])},A.dicom.getFileListFromDicomDir=function(e){var t=new A.dicom.DicomParser;t.parse(e);t=t.getRawDicomElements();if(void 0!==t.x00041220&&void 0!==t.x00041220.value){var n=t.x00041220.value;if(0!==n.length){for(var i=[],r=null,o=null,a=0;a<n.length;++a)if(void 0!==n[a].x00041430&&void 0!==n[a].x00041430.value){var s=A.dicom.cleanString(n[a].x00041430.value[0]);if("STUDY"===s)i.push(o=[]);else if("SERIES"===s)o.push(r=[]);else if("IMAGE"===s&&void 0!==n[a].x00041500&&void 0!==n[a].x00041500.value){for(var l=n[a].x00041500.value,u="",c=0;c<l.length;++c)0!==c&&(u+="/"),u+=A.dicom.cleanString(l[c]);r.push(u)}}return i}A.logger.warn("The Directory Record Sequence of the DICOMDIR is empty.")}else A.logger.warn("No Directory Record Sequence found in DICOMDIR.")},(A=A||{}).dicom=A.dicom||{},A.getVersion=function(){return"0.30.8"},A.dicom.hasDicomPrefix=function(e){return"DICM"===new Uint8Array(e,128,4).reduce(function(e,t){return e+String.fromCharCode(t)},"")},A.dicom.cleanString=function(e){var t=e;return t=e&&(t=e.trim())[t.length-1]===String.fromCharCode("u200B")?t.substring(0,t.length-1):t},A.dicom.getUtfLabel=function(e){var t="utf-8";return"ISO_IR 100"===e?t="iso-8859-1":"ISO_IR 101"===e?t="iso-8859-2":"ISO_IR 109"===e?t="iso-8859-3":"ISO_IR 110"===e?t="iso-8859-4":"ISO_IR 144"===e?t="iso-8859-5":"ISO_IR 127"===e?t="iso-8859-6":"ISO_IR 126"===e?t="iso-8859-7":"ISO_IR 138"===e?t="iso-8859-8":"ISO_IR 148"===e?t="iso-8859-9":"ISO_IR 13"===e?t="shift-jis":"ISO_IR 166"===e?t="iso-8859-11":"ISO 2022 IR 87"===e?t="iso-2022-jp":"ISO 2022 IR 149"===e||"ISO 2022 IR 58"===e||("ISO_IR 192"===e?t="utf-8":"GB18030"===e?t="gb18030":"GB2312"===e?t="gb2312":"GBK"===e&&(t="chinese")),t},A.dicom.getReverseOrientation=function(e){if(!e)return null;for(var t={L:"R",R:"L",A:"P",P:"A",H:"F",F:"H"},n="",i=0;i<e.length;i++){var r=t[e.substr(i,1)];r&&(n+=r)}return n},A.dicom.isImplicitTransferSyntax=function(e){return"1.2.840.10008.1.2"===e},A.dicom.isBigEndianTransferSyntax=function(e){return"1.2.840.10008.1.2.2"===e},A.dicom.isJpegBaselineTransferSyntax=function(e){return"1.2.840.10008.1.2.4.50"===e||"1.2.840.10008.1.2.4.51"===e},A.dicom.isJpegRetiredTransferSyntax=function(e){return null!==e.match(/1.2.840.10008.1.2.4.5/)&&!A.dicom.isJpegBaselineTransferSyntax()&&!A.dicom.isJpegLosslessTransferSyntax()||null!==e.match(/1.2.840.10008.1.2.4.6/)},A.dicom.isJpegLosslessTransferSyntax=function(e){return"1.2.840.10008.1.2.4.57"===e||"1.2.840.10008.1.2.4.70"===e},A.dicom.isJpeglsTransferSyntax=function(e){return null!==e.match(/1.2.840.10008.1.2.4.8/)},A.dicom.isJpeg2000TransferSyntax=function(e){return null!==e.match(/1.2.840.10008.1.2.4.9/)},A.dicom.isRleTransferSyntax=function(e){return null!==e.match(/1.2.840.10008.1.2.5/)},A.dicom.getSyntaxDecompressionName=function(e){var t=null;return A.dicom.isJpeg2000TransferSyntax(e)?t="jpeg2000":A.dicom.isJpegBaselineTransferSyntax(e)?t="jpeg-baseline":A.dicom.isJpegLosslessTransferSyntax(e)?t="jpeg-lossless":A.dicom.isRleTransferSyntax(e)&&(t="rle"),t},A.dicom.isReadSupportedTransferSyntax=function(e){return"1.2.840.10008.1.2"===e||"1.2.840.10008.1.2.1"===e||"1.2.840.10008.1.2.2"===e||A.dicom.isJpegBaselineTransferSyntax(e)||A.dicom.isJpegLosslessTransferSyntax(e)||A.dicom.isJpeg2000TransferSyntax(e)||A.dicom.isRleTransferSyntax(e)},A.dicom.getTransferSyntaxName=function(e){var t="Unknown";return"1.2.840.10008.1.2"===e?t="Little Endian Implicit":"1.2.840.10008.1.2.1"===e?t="Little Endian Explicit":"1.2.840.10008.1.2.1.99"===e?t="Little Endian Deflated Explicit":"1.2.840.10008.1.2.2"===e?t="Big Endian Explicit":A.dicom.isJpegBaselineTransferSyntax(e)?t="1.2.840.10008.1.2.4.50"===e?"JPEG Baseline":"JPEG Extended, Process 2+4":A.dicom.isJpegLosslessTransferSyntax(e)?t="1.2.840.10008.1.2.4.57"===e?"JPEG Lossless, Nonhierarchical (Processes 14)":"JPEG Lossless, Non-hierarchical, 1st Order Prediction":A.dicom.isJpegRetiredTransferSyntax(e)?t="Retired JPEG":A.dicom.isJpeglsTransferSyntax(e)?t="JPEG-LS":A.dicom.isJpeg2000TransferSyntax(e)?t="1.2.840.10008.1.2.4.91"===e?"JPEG 2000 (Lossless or Lossy)":"JPEG 2000 (Lossless only)":"1.2.840.10008.1.2.4.100"===e?t="MPEG2":A.dicom.isRleTransferSyntax(e)&&(t="RLE"),t},A.dicom.guessTransferSyntax=function(e){var t=e.tag.group;if("0x0800"!==t&&"0x0008"!==t)throw new Error("Not a valid DICOM file (no magic DICM word foundand first element not in 0x0008 group)");var n=e.vr,i=n.charCodeAt(0),n=n.charCodeAt(1),i=!(65<=i&&i<=90&&65<=n&&n<=90),n=null;if("0x0008"===t)n=i?"1.2.840.10008.1.2":"1.2.840.10008.1.2.1";else{if(i)throw new Error("Not a valid DICOM file (no magic DICM word foundand implicit VR big endian detected)");n="1.2.840.10008.1.2.2"}i={tag:{group:"0x0002",element:"0x0010",name:"x00020010",endOffset:4},vr:"UI"};return i.value=[n+" "],i.vl=i.value[0].length,i.startOffset=e.startOffset,i.endOffset=i.startOffset+i.vl,i},A.dicom.getTypedArray=function(e,t,n){var i=null;try{8===e?i=new(0===t?Uint8Array:Int8Array)(n):16===e?i=new(0===t?Uint16Array:Int16Array)(n):32===e&&(i=new(0===t?Uint32Array:Int32Array)(n))}catch(e){e instanceof RangeError&&(t=Math.floor(Math.log(n)/Math.log(2)),A.logger.error("Cannot allocate array of size: "+n+" (>2^"+t+")."))}return i},A.dicom.is32bitVLVR=function(e){return"OB"===e||"OW"===e||"OF"===e||"ox"===e||"UT"===e||"SQ"===e||"UN"===e},A.dicom.getDataElementPrefixByteSize=function(e,t){return!t&&A.dicom.is32bitVLVR(e)?12:8},A.dicom.DicomParser=function(){var t;this.dicomElements={},this.getDefaultCharacterSet=function(){return t},this.setDefaultCharacterSet=function(e){t=e}},A.dicom.DicomParser.prototype.getRawDicomElements=function(){return this.dicomElements},A.dicom.DicomParser.prototype.getDicomElements=function(){return new A.dicom.DicomElementsWrapper(this.dicomElements)},A.dicom.DicomParser.prototype.readTag=function(e,t){var n=e.readHex(t);t+=Uint16Array.BYTES_PER_ELEMENT;e=e.readHex(t);return t+=Uint16Array.BYTES_PER_ELEMENT,{group:n,element:e,name:new A.dicom.Tag(n,e).getKey(),endOffset:t}},A.dicom.DicomParser.prototype.readExplicitItemDataElement=function(e,t,n){var i={},r=this.readDataElement(e,t,n),o=t=r.endOffset;for(t-=(i[r.tag.name]=r).vl;t<o;)t=(r=this.readDataElement(e,t,n)).endOffset,i[r.tag.name]=r;return{data:i,endOffset:t,isSeqDelim:!1}},A.dicom.DicomParser.prototype.readImplicitItemDataElement=function(e,t,n){var i={},r=this.readDataElement(e,t,n);if(t=r.endOffset,"xFFFEE0DD"===r.tag.name)return{data:i,endOffset:r.endOffset,isSeqDelim:!0};i[r.tag.name]=r;for(var o=!1;!o;)t=(r=this.readDataElement(e,t,n)).endOffset,(o="xFFFEE00D"===r.tag.name)||(i[r.tag.name]=r);return{data:i,endOffset:t,isSeqDelim:!1}},A.dicom.DicomParser.prototype.readPixelItemDataElement=function(e,t,n){var i=[],r=this.readDataElement(e,t,n),o=r.vl;t=r.endOffset;for(var a=!1;!a;)t=(r=this.readDataElement(e,t,n)).endOffset,(a="xFFFEE0DD"===r.tag.name)||i.push(r);return{data:i,endOffset:t,offsetTableVl:o}},A.dicom.DicomParser.prototype.readDataElement=function(e,t,n){var i=this.readTag(e,t),r=new A.dicom.Tag(i.group,i.element);t=i.endOffset;var o=null,a=!1;r.isWithVR()?n?(null===(o=r.getVrFromDictionary())&&(o="UN"),a=!0):(o=e.readString(t,2),t+=2*Uint8Array.BYTES_PER_ELEMENT,(a=A.dicom.is32bitVLVR(o))&&(t+=2*Uint8Array.BYTES_PER_ELEMENT)):(o="UN",a=!0);var s=0;a?(s=e.readUint32(t),t+=Uint32Array.BYTES_PER_ELEMENT):(s=e.readUint16(t),t+=Uint16Array.BYTES_PER_ELEMENT);var l=s;4294967295===s&&(l="u/l",s=0),r.isPrivate()&&"UN"===o&&0===s&&(o="SQ");var u=t,a=u+s,c=null;if(A.dicom.isPixelDataTag(r)&&"u/l"===l){r=this.readPixelItemDataElement(e,t,n);t=r.endOffset,u+=r.offsetTableVl,c=r.data,a=t}else if("SQ"===o){var g,c=[];if("u/l"!==l){if(0!==s){for(var d=t+s;t<d;)g=this.readExplicitItemDataElement(e,t,n),c.push(g.data),t=g.endOffset;a=t}}else{for(var x=!1;!x;)x=(g=this.readImplicitItemDataElement(e,t,n)).isSeqDelim,t=g.endOffset,x||c.push(g.data);a=t}}a={tag:i,vr:o,vl:l,startOffset:u,endOffset:a};return c&&(a.elements=c),a},A.dicom.DicomParser.prototype.interpretElement=function(e,t,n,i){var r=e.tag,o=e.vl,a=e.vr,s=e.startOffset,l=null,r=A.dicom.isPixelDataTag(new A.dicom.Tag(r.group,r.element));if(r&&"u/l"===o)for(var l=[],u=0;u<e.elements.length;++u)l.push(this.interpretElement(e.elements[u],t,n,i));else if(!r||"OB"!==a&&"OW"!==a&&"OF"!==a&&"ox"!==a)if("OB"===a)l=t.readUint8Array(s,o);else if("OW"===a)l=t.readUint16Array(s,o);else if("OF"===a)l=t.readUint32Array(s,o);else if("OD"===a)l=t.readUint64Array(s,o);else if("US"===a)l=t.readUint16Array(s,o);else if("UL"===a)l=t.readUint32Array(s,o);else if("SS"===a)l=t.readInt16Array(s,o);else if("SL"===a)l=t.readInt32Array(s,o);else if("FL"===a)l=t.readFloat32Array(s,o);else if("FD"===a)l=t.readFloat64Array(s,o);else if("xs"===a)l=0===n?t.readUint16Array(s,o):t.readInt16Array(s,o);else if("AT"===a){var c=t.readUint16Array(s,o);l=[];for(var g=0,d=c.length;g<d;g+=2){var x=c[g].toString(16),S=c[g+1].toString(16),m="(";m+="0000".substr(0,4-x.length)+x.toUpperCase(),m+=",",m+="0000".substr(0,4-S.length)+S.toUpperCase(),m+=")",l.push(m)}}else if("UN"===a)l=t.readUint8Array(s,o);else if("SQ"===a){l=[];for(var h=0;h<e.elements.length;++h){for(var f=e.elements[h],p={},y=Object.keys(f),D=0;D<y.length;++D){var v=f[y[D]];v.value=this.interpretElement(v,t,n,i),p[y[D]]=v}l.push(p)}}else l=(l="SH"===a||"LO"===a||"ST"===a||"PN"===a||"LT"===a||"UT"===a?t.readSpecialString(s,o):t.readString(s,o)).split("\\");else if(8===i&&"OW"===a&&A.logger.warn("Reading DICOM pixel data with vr=OW and bitsAllocated=8 (should be 16)."),16===i&&"OB"===a&&A.logger.warn("Reading DICOM pixel data with vr=OB and bitsAllocated=16 (should be 8)."),l=[],1===i)l.push(t.readBinaryArray(s,o));else if(8===i)0===n?l.push(t.readUint8Array(s,o)):l.push(t.readInt8Array(s,o));else if(16===i)0===n?l.push(t.readUint16Array(s,o)):l.push(t.readInt16Array(s,o));else if(32===i)0===n?l.push(t.readUint32Array(s,o)):l.push(t.readInt32Array(s,o));else{if(64!==i)throw new Error("Unsupported bits allocated: "+i);0===n?l.push(t.readUint64Array(s,o)):l.push(t.readInt64Array(s,o))}return l},A.dicom.DicomParser.prototype.interpret=function(e,t,n,i){for(var r=Object.keys(e),o=0;o<r.length;++o){var a=e[r[o]];void 0===a.value&&(a.value=this.interpretElement(a,t,n,i))}},A.dicom.DicomParser.prototype.parse=function(e){var t=0,n="",i=null,r=new A.dicom.DataReader(e),o=new A.dicom.DataReader(e),a=r.readString(t=128,4);if(t+=4*Uint8Array.BYTES_PER_ELEMENT,"DICM"===a){(i=this.readDataElement(r,t,!1)).value=this.interpretElement(i,r),t=i.endOffset,this.dicomElements[i.tag.name]=i;for(var s=t+parseInt(i.value[0],10);t<s;)t=(i=this.readDataElement(r,t,!1)).endOffset,this.dicomElements[i.tag.name]=i;if(void 0===(i=this.dicomElements.x00020010))throw new Error("Not a valid DICOM file (no TransferSyntaxUID found)");i.value=this.interpretElement(i,r),n=A.dicom.cleanString(i.value[0])}else{var i=this.readDataElement(o,0,!1),l=A.dicom.guessTransferSyntax(i);this.dicomElements[l.tag.name]=l,n=A.dicom.cleanString(l.value[0]),t=0}if(!A.dicom.isReadSupportedTransferSyntax(n))throw new Error("Unsupported DICOM transfer syntax: '"+n+"' ("+A.dicom.getTransferSyntaxName(n)+")");var u=!1;for(A.dicom.isImplicitTransferSyntax(n)&&(u=!0),A.dicom.isBigEndianTransferSyntax(n)&&(o=new A.dicom.DataReader(e,!1)),void 0!==this.getDefaultCharacterSet()&&o.setUtfLabel(this.getDefaultCharacterSet());t<e.byteLength;)t=(i=this.readDataElement(o,t,u)).endOffset,void 0===this.dicomElements[i.tag.name]?this.dicomElements[i.tag.name]=i:A.logger.warn("Not saving duplicate tag: "+i.tag.name);if(isNaN(t))throw new Error("Problem while parsing, bad offset");e.byteLength!==t&&A.logger.warn("Did not reach the end of the buffer: "+t+" != "+e.byteLength);l=0;void 0!==(i=this.dicomElements.x00280103)?(i.value=this.interpretElement(i,o),l=i.value[0]):A.logger.warn("Reading DICOM pixel data with default pixelRepresentation.");var c,n=16;if(void 0!==(i=this.dicomElements.x00280100)?(i.value=this.interpretElement(i,o),n=i.value[0]):A.logger.warn("Reading DICOM pixel data with default bitsAllocated."),void 0!==(i=this.dicomElements.x00080005)&&(i.value=this.interpretElement(i,o),1===i.value.length?c=A.dicom.cleanString(i.value[0]):(c=A.dicom.cleanString(i.value[1]),A.logger.warn("Unsupported character set with code extensions: '"+c+"'.")),o.setUtfLabel(A.dicom.getUtfLabel(c))),this.interpret(this.dicomElements,o,l,n),void 0!==(i=this.dicomElements.x7FE00010)&&"u/l"===i.vl){var g=1;void 0!==this.dicomElements.x00280008&&(g=A.dicom.cleanString(this.dicomElements.x00280008.value[0]));var d=i.value;if(1<d.length&&d.length>g){for(var x=d.length/g,S=[],m=0;m<g;++m){for(var h=m*x,f=0,p=0;p<x;++p)f+=d[h+p].length;for(var y=new d[0].constructor(f),D=0,v=0;v<x;++v)y.set(d[h+v],D),D+=d[h+v].length;S[m]=y}i.value=S}}},(A=A||{}).dicom=A.dicom||{},A.dicom.Tag=function(e,t){this.getGroup=function(){return e},this.getElement=function(){return t}},A.dicom.Tag.prototype.equals=function(e){return null!==e&&this.getGroup()===e.getGroup()&&this.getElement()===e.getElement()},A.dicom.Tag.prototype.equals2=function(e){return null!==e&&void 0!==e.group&&void 0!==e.element&&this.equals(new A.dicom.Tag(e.group,e.element))},A.dicom.Tag.prototype.getKey=function(){return"x"+this.getGroup().substr(2,6)+this.getElement().substr(2,6)},A.dicom.Tag.prototype.getKey2=function(){return this.getGroup().substr(2,6)+this.getElement().substr(2,6)},A.dicom.Tag.prototype.getGroupName=function(){return A.dicom.TagGroups[this.getGroup().substr(1)]},A.dicom.getTagFromKey=function(e){return new A.dicom.Tag(e.substr(1,4),e.substr(5,8))},A.dicom.Tag.prototype.isWithVR=function(){var e=this.getElement();return!("0xFFFE"===this.getGroup()&&("0xE000"===e||"0xE00D"===e||"0xE0DD"===e))},A.dicom.Tag.prototype.isPrivate=function(){return parseInt(this.getGroup().substr(2,6),10)%2==1},A.dicom.Tag.prototype.getInfoFromDictionary=function(){var e=null;return e=void 0!==A.dicom.dictionary[this.getGroup()]&&void 0!==A.dicom.dictionary[this.getGroup()][this.getElement()]?A.dicom.dictionary[this.getGroup()][this.getElement()]:e},A.dicom.Tag.prototype.getVrFromDictionary=function(){var e=null,t=this.getInfoFromDictionary();return e=null!==t?t[0]:e},A.dicom.Tag.prototype.getNameFromDictionary=function(){var e=null,t=this.getInfoFromDictionary();return e=null!==t?t[2]:e},A.dicom.getTransferSyntaxUIDTag=function(){return new A.dicom.Tag("0x0002","0x0010")},A.dicom.getFileMetaInformationGroupLengthTag=function(){return new A.dicom.Tag("0x0002","0x0000")},A.dicom.isFileMetaInformationGroupLengthTag=function(e){return e.equals(A.dicom.getFileMetaInformationGroupLengthTag())},A.dicom.getItemTag=function(){return new A.dicom.Tag("0xFFFE","0xE000")},A.dicom.isItemTag=function(e){return e.equals(A.dicom.getItemTag())},A.dicom.getItemDelimitationItemTag=function(){return new A.dicom.Tag("0xFFFE","0xE00D")},A.dicom.isItemDelimitationItemTag=function(e){return e.equals(A.dicom.getItemDelimitationItemTag())},A.dicom.getSequenceDelimitationItemTag=function(){return new A.dicom.Tag("0xFFFE","0xE0DD")},A.dicom.isSequenceDelimitationItemTag=function(e){return e.equals(A.dicom.getSequenceDelimitationItemTag())},A.dicom.getPixelDataTag=function(){return new A.dicom.Tag("0x7FE0","0x0010")},A.dicom.isPixelDataTag=function(e){return e.equals(A.dicom.getPixelDataTag())},A.dicom.getTagFromDictionary=function(e){var t=null,n=null,i=A.dicom.dictionary,r=Object.keys(i),o=null;e:for(var a=0,s=r.length;a<s;++a)for(var t=r[a],l=0,u=(o=Object.keys(i[t])).length;l<u;++l)if(n=o[l],i[t][n][2]===e)break e;var c=null;return c=null!==t&&null!==n?new A.dicom.Tag(t,n):c},(A=A||{}).dicom=A.dicom||{},A.dicom.getDwvUIDPrefix=function(){return"1.2.826.0.1.3680043.9.7278.1."},A.dicom.getUID=function(e){var t=A.dicom.getDwvUIDPrefix();if("ImplementationClassUID"===e)t+=A.getVersion();else{if("SOPInstanceUID"!==e)throw new Error("Don't know how to generate a UID for the tag "+e);for(var n=0;n<e.length;++n)t+=e.charCodeAt(n);t+="."+(new Date).toISOString().replace(/\D/g,"")}return t},A.dicom.isEven=function(e){return e%2==0},A.dicom.isNonStringVr=function(e){return"UN"===e||"OB"===e||"OW"===e||"OF"===e||"OD"===e||"US"===e||"SS"===e||"UL"===e||"SL"===e||"FL"===e||"FD"===e||"SQ"===e||"AT"===e},A.dicom.isStringVr=function(e){return!A.dicom.isNonStringVr(e)},A.dicom.isVrToPad=function(e){return A.dicom.isStringVr(e)||"OB"===e},A.dicom.getVrPad=function(e){var t=0;return t=A.dicom.isStringVr(e)?"UI"===e?"\0":" ":t},A.dicom.padElementValue=function(e,t){return void 0!==t&&void 0!==t.length&&A.dicom.isVrToPad(e.vr)&&!A.dicom.isEven(t.length)&&(t instanceof Array?t[t.length-1]+=A.dicom.getVrPad(e.vr):t+=A.dicom.getVrPad(e.vr)),t},A.dicom.isImplicitLengthSequence=function(e){return"SQ"===e.vr&&"u/l"===e.vl},A.dicom.isImplicitLengthItem=function(e){return"xFFFEE000"===e.tag.name&&"u/l"===e.vl},A.dicom.isImplicitLengthPixels=function(e){return"x7FE00010"===e.tag.name&&"u/l"===e.vl},A.dicom.flattenArrayOfTypedArrays=function(e){var t=e.length,n=e[0].length;if(void 0===n)return e;for(var i=new e[0].constructor(t*n),r=0;r<t;r++)i.set(e[r],r*n);return i},A.dicom.DicomWriter=function(){this.useUnVrForPrivateSq=!1;var i={copy:function(e){return e},remove:function(){return null},clear:function(e){return e.value[0]="",e.vl=0,e.endOffset=e.startOffset,e},replace:function(e,t){t=A.dicom.padElementValue(e,t);return e.value[0]=t,e.vl=t.length,e.endOffset=e.startOffset+t.length,e}};this.rules={default:{action:"copy",value:null}},this.anonymisationRules={default:{action:"remove",value:null},PatientName:{action:"replace",value:"Anonymized"},"Meta Element":{action:"copy",value:null},Acquisition:{action:"copy",value:null},"Image Presentation":{action:"copy",value:null},Procedure:{action:"copy",value:null},"Pixel Data":{action:"copy",value:null}},this.getElementToWrite=function(e){var t=new A.dicom.Tag(e.tag.group,e.tag.element),n=t.getGroupName(),t=t.getNameFromDictionary(),n=void 0!==this.rules[e.tag.name]?this.rules[e.tag.name]:null!==t&&void 0!==this.rules[t]?this.rules[t]:void 0!==this.rules[n]?this.rules[n]:this.rules.default;return i[n.action](e,n.value)}},A.dicom.DicomWriter.prototype.writeDataElementItems=function(e,t,n,i){for(var r=0;r<n.length;++r){var o=n[r],a=Object.keys(o);if(0!==a.length){var s="u/l"===o.xFFFEE000.vl,l={tag:o.xFFFEE000.tag,vr:o.xFFFEE000.vr,vl:s?4294967295:o.xFFFEE000.vl,value:[]};t=this.writeDataElement(e,l,t,i);for(var u=0;u<a.length;++u)"xFFFEE000"!==a[u]&&"xFFFEE00D"!==a[u]&&(t=this.writeDataElement(e,o[a[u]],t,i));s&&(t=this.writeDataElement(e,{tag:{group:"0xFFFE",element:"0xE00D",name:"ItemDelimitationItem"},vr:"NONE",vl:0,value:[]},t,i))}}return t},A.dicom.DicomWriter.prototype.writeDataElementValue=function(e,t,n,i,r,o){if(r instanceof Uint8Array)i=r.length===8*n?e.writeBinaryArray(i,r):e.writeUint8Array(i,r);else if(r instanceof Int8Array)i=e.writeInt8Array(i,r);else if(r instanceof Uint16Array)i=e.writeUint16Array(i,r);else if(r instanceof Int16Array)i=e.writeInt16Array(i,r);else if(r instanceof Uint32Array)i=e.writeUint32Array(i,r);else if(r instanceof Int32Array)i=e.writeInt32Array(i,r);else if("UN"===t)i=e.writeUint8Array(i,r);else if("OB"===t)i=e.writeInt8Array(i,r);else if("OW"===t)i=e.writeInt16Array(i,r);else if("OF"===t)i=e.writeInt32Array(i,r);else if("OD"===t)i=e.writeInt64Array(i,r);else if("US"===t)i=e.writeUint16Array(i,r);else if("SS"===t)i=e.writeInt16Array(i,r);else if("UL"===t)i=e.writeUint32Array(i,r);else if("SL"===t)i=e.writeInt32Array(i,r);else if("FL"===t)i=e.writeFloat32Array(i,r);else if("FD"===t)i=e.writeFloat64Array(i,r);else if("SQ"===t)i=this.writeDataElementItems(e,i,r,o);else if("AT"===t)for(var a=0;a<r.length;++a){var s=r[a]+"",l=s.substring(1,5),s=s.substring(6,10),l=parseInt(l,16),s=parseInt(s,16),s=new Uint16Array([l,s]);i=e.writeUint16Array(i,s)}else Array.isArray(r)&&(r=r.join("\\")),i="SH"===t||"LO"===t||"ST"===t||"PN"===t||"LT"===t||"UT"===t?e.writeSpecialString(i,r):e.writeString(i,r);return i},A.dicom.DicomWriter.prototype.writePixelDataElementValue=function(e,t,n,i,r,o){if("u/l"!==n){var a=r[0];1<r.length&&(a=A.dicom.flattenArrayOfTypedArrays(r)),i=this.writeDataElementValue(e,t,n,i,a,o)}else{for(var s={xFFFEE000:{tag:{group:"0xFFFE",element:"0xE000",name:"xFFFEE000"},vr:"UN",vl:0,value:[]}},l=0;l<r.length;++l)s[l]={tag:{group:"0xFFFE",element:"0xE000",name:"xFFFEE000"},vr:t,vl:r[l].length,value:r[l]};i=this.writeDataElementItems(e,i,[s],o)}return i},A.dicom.DicomWriter.prototype.writeDataElement=function(e,t,n,i){var r=new A.dicom.Tag(t.tag.group,t.tag.element).isWithVR(),o=!(!i&&r)||A.dicom.is32bitVLVR(t.vr);n=e.writeHex(n,t.tag.group),n=e.writeHex(n,t.tag.element);var a=t.vr;this.useUnVrForPrivateSq&&new A.dicom.Tag(t.tag.group,t.tag.element).isPrivate()&&"SQ"===a&&(A.logger.warn("Write element using VR=UN for private sequence."),a="UN"),r&&!i&&(n=e.writeString(n,a),o&&(n+=2));a=t.vl;(A.dicom.isImplicitLengthSequence(t)||A.dicom.isImplicitLengthItem(t)||A.dicom.isImplicitLengthPixels(t))&&(a=4294967295),n=o?e.writeUint32(n,a):e.writeUint16(n,a);a=t.value;return void 0===a&&(a=[]),n="x7FE00010"===t.tag.name?this.writePixelDataElementValue(e,t.vr,t.vl,n,a,i):this.writeDataElementValue(e,t.vr,t.vl,n,a,i),(A.dicom.isImplicitLengthSequence(t)||A.dicom.isImplicitLengthPixels(t))&&(n=this.writeDataElement(e,{tag:{group:"0xFFFE",element:"0xE0DD",name:"SequenceDelimitationItem"},vr:"NONE",vl:0,value:[]},n,i)),n},A.dicom.DicomWriter.prototype.getBuffer=function(e){for(var t,n,i,r=Object.keys(e),o=A.dicom.cleanString(e.x00020010.value[0]),a=A.dicom.isImplicitTransferSyntax(o),s=A.dicom.isBigEndianTransferSyntax(o),l=132,u=0,c=[],g=[],d=0,x=A.dicom.getFileMetaInformationGroupLengthTag(),S=new A.dicom.Tag("0x0002","0x0012"),m=new A.dicom.Tag("0x0002","0x0013"),h=0,f=r.length;h<f;++h)null===(i=this.getElementToWrite(e[r[h]]))||x.equals2(i.tag)||S.equals2(i.tag)||m.equals2(i.tag)||(u=0,A.dicom.checkUnknownVR(i),u+="Meta Element"===(t=A.dicom.TagGroups[i.tag.group.substr(1)])?A.dicom.getDataElementPrefixByteSize(i.vr,!1):A.dicom.getDataElementPrefixByteSize(i.vr,a),n=i.endOffset-i.startOffset,u+=parseInt(n,10),"Meta Element"===t?(c.push(i),d+=u):g.push(i),l+=u);var p=A.dicom.getDicomElement("ImplementationClassUID"),y=A.dicom.getDataElementPrefixByteSize(p.vr,a);y+=A.dicom.setElementValue(p,A.dicom.getUID("ImplementationClassUID"),!1),c.push(p),d+=y,l+=y;o=A.dicom.getDicomElement("ImplementationVersionName"),p=A.dicom.getDataElementPrefixByteSize(o.vr,a),y="DWV_"+A.getVersion();p+=A.dicom.setElementValue(o,y,!1),c.push(o),d+=p,l+=p;y=A.dicom.getDicomElement("FileMetaInformationGroupLength"),o=A.dicom.getDataElementPrefixByteSize(y.vr,a);l+=o+=A.dicom.setElementValue(y,d,!1);var p=new ArrayBuffer(l),D=new A.dicom.DataWriter(p),v=new A.dicom.DataWriter(p,!s);void 0!==e.x00080005&&(s=A.dicom.cleanString(e.x00080005.value[0]),v.setUtfLabel(A.dicom.getUtfLabel(s)));var C=D.writeString(C=128,"DICM");C=this.writeDataElement(D,y,C,!1);for(var L=0,T=c.length;L<T;++L)C=this.writeDataElement(D,c[L],C,!1);o=132+o+d;C!==o&&A.logger.warn("Bad size calculation... meta offset: "+C+", calculated size:"+o+" (diff:"+(C-o)+")"),v.useUnVrForPrivateSq=this.useUnVrForPrivateSq;for(var I=0,w=g.length;I<w;++I)C=this.writeDataElement(v,g[I],C,a);return C!==l&&A.logger.warn("Bad size calculation... final offset: "+C+", calculated size:"+l+" (diff:"+(C-l)+")"),p},A.dicom.checkUnknownVR=function(e){var t;"UN"!==e.vr||null!==(t=new A.dicom.Tag(e.tag.group,e.tag.element).getVrFromDictionary())&&e.vr!==t&&(e.vr=t,A.logger.info("Element "+e.tag.group+" "+e.tag.element+" VR changed from UN to "+e.vr))},A.dicom.getDicomElement=function(e){e=A.dicom.getTagFromDictionary(e);return{tag:{group:e.getGroup(),element:e.getElement()},vr:e.getVrFromDictionary()}},A.dicom.setElementValue=function(e,t,n){var i=0;if("SQ"===e.vr){if(e.value=t,e.vl=0,null!==t&&0!==t){var r=[],o=!0;void 0!==t.explicitLength&&(o=t.explicitLength,delete t.explicitLength);for(var a=Object.keys(t),s=0,l=a.length;s<l;++s){var u,c={},g=0;if(null!==(u=t[a[s]])&&0!==u){for(var d,x=Object.keys(u),S=0,m=x.length;S<m;++S)d=A.dicom.getDicomElement(x[S]),g+=A.dicom.setElementValue(d,u[x[S]]),c[new A.dicom.Tag(d.tag.group,d.tag.element).getKey()]=d,g+=A.dicom.getDataElementPrefixByteSize(d.vr,n);var h={tag:{group:"0xFFFE",element:"0xE000"},vr:"NONE",vl:o?g:"u/l",value:[]};c[new A.dicom.Tag(h.tag.group,h.tag.element).getKey()]=h,g+=A.dicom.getDataElementPrefixByteSize("NONE",n),o||(c[new A.dicom.Tag((h={tag:{group:"0xFFFE",element:"0xE00D"},vr:"NONE",vl:0,value:[]}).tag.group,h.tag.element).getKey()]=h,g+=A.dicom.getDataElementPrefixByteSize("NONE",n)),i+=g,r.push(c)}}o||(i+=A.dicom.getDataElementPrefixByteSize("NONE",n)),e.value=r,e.vl=o?i:"u/l"}}else{var i=0,f=A.dicom.padElementValue(e,t);if(t instanceof Array){e.value=f;for(var p=0;p<f.length;++p)0!==p&&(i+=1),i+=f[p].toString().length}else e.value=[f],i=void 0!==f&&void 0!==f.length?f.length:1;"US"===e.vr||"OW"===e.vr?i*=Uint16Array.BYTES_PER_ELEMENT:"SS"===e.vr?i*=Int16Array.BYTES_PER_ELEMENT:"UL"===e.vr?i*=Uint32Array.BYTES_PER_ELEMENT:"SL"===e.vr?i*=Int32Array.BYTES_PER_ELEMENT:"FL"===e.vr?i*=Float32Array.BYTES_PER_ELEMENT:"FD"===e.vr?i*=Float64Array.BYTES_PER_ELEMENT:i*=Uint8Array.BYTES_PER_ELEMENT,e.vl=i}return i},(A=A||{}).dicom=A.dicom||{},A.dicom.dictionary={"0x0000":{"0x0000":["UL","1","GroupLength"],"0x0001":["UL","1","CommandLengthToEnd"],"0x0002":["UI","1","AffectedSOPClassUID"],"0x0003":["UI","1","RequestedSOPClassUID"],"0x0010":["CS","1","CommandRecognitionCode"],"0x0100":["US","1","CommandField"],"0x0110":["US","1","MessageID"],"0x0120":["US","1","MessageIDBeingRespondedTo"],"0x0200":["AE","1","Initiator"],"0x0300":["AE","1","Receiver"],"0x0400":["AE","1","FindLocation"],"0x0600":["AE","1","MoveDestination"],"0x0700":["US","1","Priority"],"0x0800":["US","1","DataSetType"],"0x0850":["US","1","NumberOfMatches"],"0x0860":["US","1","ResponseSequenceNumber"],"0x0900":["US","1","Status"],"0x0901":["AT","1-n","OffendingElement"],"0x0902":["LO","1","ErrorComment"],"0x0903":["US","1","ErrorID"],"0x0904":["OT","1-n","ErrorInformation"],"0x1000":["UI","1","AffectedSOPInstanceUID"],"0x1001":["UI","1","RequestedSOPInstanceUID"],"0x1002":["US","1","EventTypeID"],"0x1003":["OT","1-n","EventInformation"],"0x1005":["AT","1-n","AttributeIdentifierList"],"0x1007":["AT","1-n","ModificationList"],"0x1008":["US","1","ActionTypeID"],"0x1009":["OT","1-n","ActionInformation"],"0x1013":["UI","1-n","SuccessfulSOPInstanceUIDList"],"0x1014":["UI","1-n","FailedSOPInstanceUIDList"],"0x1015":["UI","1-n","WarningSOPInstanceUIDList"],"0x1020":["US","1","NumberOfRemainingSuboperations"],"0x1021":["US","1","NumberOfCompletedSuboperations"],"0x1022":["US","1","NumberOfFailedSuboperations"],"0x1023":["US","1","NumberOfWarningSuboperations"],"0x1030":["AE","1","MoveOriginatorApplicationEntityTitle"],"0x1031":["US","1","MoveOriginatorMessageID"],"0x4000":["AT","1","DialogReceiver"],"0x4010":["AT","1","TerminalType"],"0x5010":["SH","1","MessageSetID"],"0x5020":["SH","1","EndMessageSet"],"0x5110":["AT","1","DisplayFormat"],"0x5120":["AT","1","PagePositionID"],"0x5130":["CS","1","TextFormatID"],"0x5140":["CS","1","NormalReverse"],"0x5150":["CS","1","AddGrayScale"],"0x5160":["CS","1","Borders"],"0x5170":["IS","1","Copies"],"0x5180":["CS","1","OldMagnificationType"],"0x5190":["CS","1","Erase"],"0x51A0":["CS","1","Print"],"0x51B0":["US","1-n","Overlays"]},"0x0002":{"0x0000":["UL","1","FileMetaInformationGroupLength"],"0x0001":["OB","1","FileMetaInformationVersion"],"0x0002":["UI","1","MediaStorageSOPClassUID"],"0x0003":["UI","1","MediaStorageSOPInstanceUID"],"0x0010":["UI","1","TransferSyntaxUID"],"0x0012":["UI","1","ImplementationClassUID"],"0x0013":["SH","1","ImplementationVersionName"],"0x0016":["AE","1","SourceApplicationEntityTitle"],"0x0017":["AE","1","SendingApplicationEntityTitle"],"0x0018":["AE","1","ReceivingApplicationEntityTitle"],"0x0100":["UI","1","PrivateInformationCreatorUID"],"0x0102":["OB","1","PrivateInformation"]},"0x0004":{"0x0000":["UL","1","GenericGroupLength"],"0x1130":["CS","1","FileSetID"],"0x1141":["CS","1-8","FileSetDescriptorFileID"],"0x1142":["CS","1","SpecificCharacterSetOfFileSetDescriptorFile"],"0x1200":["UL","1","OffsetOfTheFirstDirectoryRecordOfTheRootDirectoryEntity"],"0x1202":["UL","1","OffsetOfTheLastDirectoryRecordOfTheRootDirectoryEntity"],"0x1212":["US","1","FileSetConsistencyFlag"],"0x1220":["SQ","1","DirectoryRecordSequence"],"0x1400":["UL","1","OffsetOfTheNextDirectoryRecord"],"0x1410":["US","1","RecordInUseFlag"],"0x1420":["UL","1","OffsetOfReferencedLowerLevelDirectoryEntity"],"0x1430":["CS","1","DirectoryRecordType"],"0x1432":["UI","1","PrivateRecordUID"],"0x1500":["CS","1-8","ReferencedFileID"],"0x1504":["UL","1","MRDRDirectoryRecordOffset"],"0x1510":["UI","1","ReferencedSOPClassUIDInFile"],"0x1511":["UI","1","ReferencedSOPInstanceUIDInFile"],"0x1512":["UI","1","ReferencedTransferSyntaxUIDInFile"],"0x151A":["UI","1-n","ReferencedRelatedGeneralSOPClassUIDInFile"],"0x1600":["UL","1","NumberOfReferences"]},"0x0008":{"0x0000":["UL","1","GenericGroupLength"],"0x0001":["UL","1","LengthToEnd"],"0x0005":["CS","1-n","SpecificCharacterSet"],"0x0006":["SQ","1","LanguageCodeSequence"],"0x0008":["CS","2-n","ImageType"],"0x0010":["SH","1","RecognitionCode"],"0x0012":["DA","1","InstanceCreationDate"],"0x0013":["TM","1","InstanceCreationTime"],"0x0014":["UI","1","InstanceCreatorUID"],"0x0015":["DT","1","InstanceCoercionDateTime"],"0x0016":["UI","1","SOPClassUID"],"0x0018":["UI","1","SOPInstanceUID"],"0x001A":["UI","1-n","RelatedGeneralSOPClassUID"],"0x001B":["UI","1","OriginalSpecializedSOPClassUID"],"0x0020":["DA","1","StudyDate"],"0x0021":["DA","1","SeriesDate"],"0x0022":["DA","1","AcquisitionDate"],"0x0023":["DA","1","ContentDate"],"0x0024":["DA","1","OverlayDate"],"0x0025":["DA","1","CurveDate"],"0x002A":["DT","1","AcquisitionDateTime"],"0x0030":["TM","1","StudyTime"],"0x0031":["TM","1","SeriesTime"],"0x0032":["TM","1","AcquisitionTime"],"0x0033":["TM","1","ContentTime"],"0x0034":["TM","1","OverlayTime"],"0x0035":["TM","1","CurveTime"],"0x0040":["US","1","DataSetType"],"0x0041":["LO","1","DataSetSubtype"],"0x0042":["CS","1","NuclearMedicineSeriesType"],"0x0050":["SH","1","AccessionNumber"],"0x0051":["SQ","1","IssuerOfAccessionNumberSequence"],"0x0052":["CS","1","QueryRetrieveLevel"],"0x0053":["CS","1","QueryRetrieveView"],"0x0054":["AE","1-n","RetrieveAETitle"],"0x0056":["CS","1","InstanceAvailability"],"0x0058":["UI","1-n","FailedSOPInstanceUIDList"],"0x0060":["CS","1","Modality"],"0x0061":["CS","1-n","ModalitiesInStudy"],"0x0062":["UI","1-n","SOPClassesInStudy"],"0x0064":["CS","1","ConversionType"],"0x0068":["CS","1","PresentationIntentType"],"0x0070":["LO","1","Manufacturer"],"0x0080":["LO","1","InstitutionName"],"0x0081":["ST","1","InstitutionAddress"],"0x0082":["SQ","1","InstitutionCodeSequence"],"0x0090":["PN","1","ReferringPhysicianName"],"0x0092":["ST","1","ReferringPhysicianAddress"],"0x0094":["SH","1-n","ReferringPhysicianTelephoneNumbers"],"0x0096":["SQ","1","ReferringPhysicianIdentificationSequence"],"0x009C":["PN","1-n","ConsultingPhysicianName"],"0x009D":["SQ","1","ConsultingPhysicianIdentificationSequence"],"0x0100":["SH","1","CodeValue"],"0x0101":["LO","1","ExtendedCodeValue"],"0x0102":["SH","1","CodingSchemeDesignator"],"0x0103":["SH","1","CodingSchemeVersion"],"0x0104":["LO","1","CodeMeaning"],"0x0105":["CS","1","MappingResource"],"0x0106":["DT","1","ContextGroupVersion"],"0x0107":["DT","1","ContextGroupLocalVersion"],"0x0108":["LT","1","ExtendedCodeMeaning"],"0x010B":["CS","1","ContextGroupExtensionFlag"],"0x010C":["UI","1","CodingSchemeUID"],"0x010D":["UI","1","ContextGroupExtensionCreatorUID"],"0x010F":["CS","1","ContextIdentifier"],"0x0110":["SQ","1","CodingSchemeIdentificationSequence"],"0x0112":["LO","1","CodingSchemeRegistry"],"0x0114":["ST","1","CodingSchemeExternalID"],"0x0115":["ST","1","CodingSchemeName"],"0x0116":["ST","1","CodingSchemeResponsibleOrganization"],"0x0117":["UI","1","ContextUID"],"0x0118":["UI","1","MappingResourceUID"],"0x0119":["UC","1","LongCodeValue"],"0x0120":["UR","1","URNCodeValue"],"0x0121":["SQ","1","EquivalentCodeSequence"],"0x0201":["SH","1","TimezoneOffsetFromUTC"],"0x0300":["SQ","1","PrivateDataElementCharacteristicsSequence"],"0x0301":["US","1","PrivateGroupReference"],"0x0302":["LO","1","PrivateCreatorReference"],"0x0303":["CS","1","BlockIdentifyingInformationStatus"],"0x0304":["US","1-n","NonidentifyingPrivateElements"],"0x0306":["US","1-n","IdentifyingPrivateElements"],"0x0305":["SQ","1","DeidentificationActionSequence"],"0x0307":["CS","1","DeidentificationAction"],"0x1000":["AE","1","NetworkID"],"0x1010":["SH","1","StationName"],"0x1030":["LO","1","StudyDescription"],"0x1032":["SQ","1","ProcedureCodeSequence"],"0x103E":["LO","1","SeriesDescription"],"0x103F":["SQ","1","SeriesDescriptionCodeSequence"],"0x1040":["LO","1","InstitutionalDepartmentName"],"0x1048":["PN","1-n","PhysiciansOfRecord"],"0x1049":["SQ","1","PhysiciansOfRecordIdentificationSequence"],"0x1050":["PN","1-n","PerformingPhysicianName"],"0x1052":["SQ","1","PerformingPhysicianIdentificationSequence"],"0x1060":["PN","1-n","NameOfPhysiciansReadingStudy"],"0x1062":["SQ","1","PhysiciansReadingStudyIdentificationSequence"],"0x1070":["PN","1-n","OperatorsName"],"0x1072":["SQ","1","OperatorIdentificationSequence"],"0x1080":["LO","1-n","AdmittingDiagnosesDescription"],"0x1084":["SQ","1","AdmittingDiagnosesCodeSequence"],"0x1090":["LO","1","ManufacturerModelName"],"0x1100":["SQ","1","ReferencedResultsSequence"],"0x1110":["SQ","1","ReferencedStudySequence"],"0x1111":["SQ","1","ReferencedPerformedProcedureStepSequence"],"0x1115":["SQ","1","ReferencedSeriesSequence"],"0x1120":["SQ","1","ReferencedPatientSequence"],"0x1125":["SQ","1","ReferencedVisitSequence"],"0x1130":["SQ","1","ReferencedOverlaySequence"],"0x1134":["SQ","1","ReferencedStereometricInstanceSequence"],"0x113A":["SQ","1","ReferencedWaveformSequence"],"0x1140":["SQ","1","ReferencedImageSequence"],"0x1145":["SQ","1","ReferencedCurveSequence"],"0x114A":["SQ","1","ReferencedInstanceSequence"],"0x114B":["SQ","1","ReferencedRealWorldValueMappingInstanceSequence"],"0x1150":["UI","1","ReferencedSOPClassUID"],"0x1155":["UI","1","ReferencedSOPInstanceUID"],"0x115A":["UI","1-n","SOPClassesSupported"],"0x1160":["IS","1-n","ReferencedFrameNumber"],"0x1161":["UL","1-n","SimpleFrameList"],"0x1162":["UL","3-3n","CalculatedFrameList"],"0x1163":["FD","2","TimeRange"],"0x1164":["SQ","1","FrameExtractionSequence"],"0x1167":["UI","1","MultiFrameSourceSOPInstanceUID"],"0x1190":["UR","1","RetrieveURL"],"0x1195":["UI","1","TransactionUID"],"0x1196":["US","1","WarningReason"],"0x1197":["US","1","FailureReason"],"0x1198":["SQ","1","FailedSOPSequence"],"0x1199":["SQ","1","ReferencedSOPSequence"],"0x1200":["SQ","1","StudiesContainingOtherReferencedInstancesSequence"],"0x1250":["SQ","1","RelatedSeriesSequence"],"0x2110":["CS","1","LossyImageCompressionRetired"],"0x2111":["ST","1","DerivationDescription"],"0x2112":["SQ","1","SourceImageSequence"],"0x2120":["SH","1","StageName"],"0x2122":["IS","1","StageNumber"],"0x2124":["IS","1","NumberOfStages"],"0x2127":["SH","1","ViewName"],"0x2128":["IS","1","ViewNumber"],"0x2129":["IS","1","NumberOfEventTimers"],"0x212A":["IS","1","NumberOfViewsInStage"],"0x2130":["DS","1-n","EventElapsedTimes"],"0x2132":["LO","1-n","EventTimerNames"],"0x2133":["SQ","1","EventTimerSequence"],"0x2134":["FD","1","EventTimeOffset"],"0x2135":["SQ","1","EventCodeSequence"],"0x2142":["IS","1","StartTrim"],"0x2143":["IS","1","StopTrim"],"0x2144":["IS","1","RecommendedDisplayFrameRate"],"0x2200":["CS","1","TransducerPosition"],"0x2204":["CS","1","TransducerOrientation"],"0x2208":["CS","1","AnatomicStructure"],"0x2218":["SQ","1","AnatomicRegionSequence"],"0x2220":["SQ","1","AnatomicRegionModifierSequence"],"0x2228":["SQ","1","PrimaryAnatomicStructureSequence"],"0x2229":["SQ","1","AnatomicStructureSpaceOrRegionSequence"],"0x2230":["SQ","1","PrimaryAnatomicStructureModifierSequence"],"0x2240":["SQ","1","TransducerPositionSequence"],"0x2242":["SQ","1","TransducerPositionModifierSequence"],"0x2244":["SQ","1","TransducerOrientationSequence"],"0x2246":["SQ","1","TransducerOrientationModifierSequence"],"0x2251":["SQ","1","AnatomicStructureSpaceOrRegionCodeSequenceTrial"],"0x2253":["SQ","1","AnatomicPortalOfEntranceCodeSequenceTrial"],"0x2255":["SQ","1","AnatomicApproachDirectionCodeSequenceTrial"],"0x2256":["ST","1","AnatomicPerspectiveDescriptionTrial"],"0x2257":["SQ","1","AnatomicPerspectiveCodeSequenceTrial"],"0x2258":["ST","1","AnatomicLocationOfExaminingInstrumentDescriptionTrial"],"0x2259":["SQ","1","AnatomicLocationOfExaminingInstrumentCodeSequenceTrial"],"0x225A":["SQ","1","AnatomicStructureSpaceOrRegionModifierCodeSequenceTrial"],"0x225C":["SQ","1","OnAxisBackgroundAnatomicStructureCodeSequenceTrial"],"0x3001":["SQ","1","AlternateRepresentationSequence"],"0x3010":["UI","1-n","IrradiationEventUID"],"0x3011":["SQ","1","SourceIrradiationEventSequence"],"0x3012":["UI","1","RadiopharmaceuticalAdministrationEventUID"],"0x4000":["LT","1","IdentifyingComments"],"0x9007":["CS","4","FrameType"],"0x9092":["SQ","1","ReferencedImageEvidenceSequence"],"0x9121":["SQ","1","ReferencedRawDataSequence"],"0x9123":["UI","1","CreatorVersionUID"],"0x9124":["SQ","1","DerivationImageSequence"],"0x9154":["SQ","1","SourceImageEvidenceSequence"],"0x9205":["CS","1","PixelPresentation"],"0x9206":["CS","1","VolumetricProperties"],"0x9207":["CS","1","VolumeBasedCalculationTechnique"],"0x9208":["CS","1","ComplexImageComponent"],"0x9209":["CS","1","AcquisitionContrast"],"0x9215":["SQ","1","DerivationCodeSequence"],"0x9237":["SQ","1","ReferencedPresentationStateSequence"],"0x9410":["SQ","1","ReferencedOtherPlaneSequence"],"0x9458":["SQ","1","FrameDisplaySequence"],"0x9459":["FL","1","RecommendedDisplayFrameRateInFloat"],"0x9460":["CS","1","SkipFrameRangeFlag"]},"0x0010":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["PN","1","PatientName"],"0x0020":["LO","1","PatientID"],"0x0021":["LO","1","IssuerOfPatientID"],"0x0022":["CS","1","TypeOfPatientID"],"0x0024":["SQ","1","IssuerOfPatientIDQualifiersSequence"],"0x0030":["DA","1","PatientBirthDate"],"0x0032":["TM","1","PatientBirthTime"],"0x0040":["CS","1","PatientSex"],"0x0050":["SQ","1","PatientInsurancePlanCodeSequence"],"0x0101":["SQ","1","PatientPrimaryLanguageCodeSequence"],"0x0102":["SQ","1","PatientPrimaryLanguageModifierCodeSequence"],"0x0200":["CS","1","QualityControlSubject"],"0x0201":["SQ","1","QualityControlSubjectTypeCodeSequence"],"0x1000":["LO","1-n","OtherPatientIDs"],"0x1001":["PN","1-n","OtherPatientNames"],"0x1002":["SQ","1","OtherPatientIDsSequence"],"0x1005":["PN","1","PatientBirthName"],"0x1010":["AS","1","PatientAge"],"0x1020":["DS","1","PatientSize"],"0x1021":["SQ","1","PatientSizeCodeSequence"],"0x1030":["DS","1","PatientWeight"],"0x1040":["LO","1","PatientAddress"],"0x1050":["LO","1-n","InsurancePlanIdentification"],"0x1060":["PN","1","PatientMotherBirthName"],"0x1080":["LO","1","MilitaryRank"],"0x1081":["LO","1","BranchOfService"],"0x1090":["LO","1","MedicalRecordLocator"],"0x1100":["SQ","1","ReferencedPatientPhotoSequence"],"0x2000":["LO","1-n","MedicalAlerts"],"0x2110":["LO","1-n","Allergies"],"0x2150":["LO","1","CountryOfResidence"],"0x2152":["LO","1","RegionOfResidence"],"0x2154":["SH","1-n","PatientTelephoneNumbers"],"0x2155":["LT","1","PatientTelecomInformation"],"0x2160":["SH","1","EthnicGroup"],"0x2180":["SH","1","Occupation"],"0x21A0":["CS","1","SmokingStatus"],"0x21B0":["LT","1","AdditionalPatientHistory"],"0x21C0":["US","1","PregnancyStatus"],"0x21D0":["DA","1","LastMenstrualDate"],"0x21F0":["LO","1","PatientReligiousPreference"],"0x2201":["LO","1","PatientSpeciesDescription"],"0x2202":["SQ","1","PatientSpeciesCodeSequence"],"0x2203":["CS","1","PatientSexNeutered"],"0x2210":["CS","1","AnatomicalOrientationType"],"0x2292":["LO","1","PatientBreedDescription"],"0x2293":["SQ","1","PatientBreedCodeSequence"],"0x2294":["SQ","1","BreedRegistrationSequence"],"0x2295":["LO","1","BreedRegistrationNumber"],"0x2296":["SQ","1","BreedRegistryCodeSequence"],"0x2297":["PN","1","ResponsiblePerson"],"0x2298":["CS","1","ResponsiblePersonRole"],"0x2299":["LO","1","ResponsibleOrganization"],"0x4000":["LT","1","PatientComments"],"0x9431":["FL","1","ExaminedBodyThickness"]},"0x0012":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["LO","1","ClinicalTrialSponsorName"],"0x0020":["LO","1","ClinicalTrialProtocolID"],"0x0021":["LO","1","ClinicalTrialProtocolName"],"0x0030":["LO","1","ClinicalTrialSiteID"],"0x0031":["LO","1","ClinicalTrialSiteName"],"0x0040":["LO","1","ClinicalTrialSubjectID"],"0x0042":["LO","1","ClinicalTrialSubjectReadingID"],"0x0050":["LO","1","ClinicalTrialTimePointID"],"0x0051":["ST","1","ClinicalTrialTimePointDescription"],"0x0060":["LO","1","ClinicalTrialCoordinatingCenterName"],"0x0062":["CS","1","PatientIdentityRemoved"],"0x0063":["LO","1-n","DeidentificationMethod"],"0x0064":["SQ","1","DeidentificationMethodCodeSequence"],"0x0071":["LO","1","ClinicalTrialSeriesID"],"0x0072":["LO","1","ClinicalTrialSeriesDescription"],"0x0081":["LO","1","ClinicalTrialProtocolEthicsCommitteeName"],"0x0082":["LO","1","ClinicalTrialProtocolEthicsCommitteeApprovalNumber"],"0x0083":["SQ","1","ConsentForClinicalTrialUseSequence"],"0x0084":["CS","1","DistributionType"],"0x0085":["CS","1","ConsentForDistributionFlag"]},"0x0014":{"0x0000":["UL","1","GenericGroupLength"],"0x0023":["ST","1-n","CADFileFormat"],"0x0024":["ST","1-n","ComponentReferenceSystem"],"0x0025":["ST","1-n","ComponentManufacturingProcedure"],"0x0028":["ST","1-n","ComponentManufacturer"],"0x0030":["DS","1-n","MaterialThickness"],"0x0032":["DS","1-n","MaterialPipeDiameter"],"0x0034":["DS","1-n","MaterialIsolationDiameter"],"0x0042":["ST","1-n","MaterialGrade"],"0x0044":["ST","1-n","MaterialPropertiesDescription"],"0x0045":["ST","1-n","MaterialPropertiesFileFormatRetired"],"0x0046":["LT","1","MaterialNotes"],"0x0050":["CS","1","ComponentShape"],"0x0052":["CS","1","CurvatureType"],"0x0054":["DS","1","OuterDiameter"],"0x0056":["DS","1","InnerDiameter"],"0x1010":["ST","1","ActualEnvironmentalConditions"],"0x1020":["DA","1","ExpiryDate"],"0x1040":["ST","1","EnvironmentalConditions"],"0x2002":["SQ","1","EvaluatorSequence"],"0x2004":["IS","1","EvaluatorNumber"],"0x2006":["PN","1","EvaluatorName"],"0x2008":["IS","1","EvaluationAttempt"],"0x2012":["SQ","1","IndicationSequence"],"0x2014":["IS","1","IndicationNumber"],"0x2016":["SH","1","IndicationLabel"],"0x2018":["ST","1","IndicationDescription"],"0x201A":["CS","1-n","IndicationType"],"0x201C":["CS","1","IndicationDisposition"],"0x201E":["SQ","1","IndicationROISequence"],"0x2030":["SQ","1","IndicationPhysicalPropertySequence"],"0x2032":["SH","1","PropertyLabel"],"0x2202":["IS","1","CoordinateSystemNumberOfAxes"],"0x2204":["SQ","1","CoordinateSystemAxesSequence"],"0x2206":["ST","1","CoordinateSystemAxisDescription"],"0x2208":["CS","1","CoordinateSystemDataSetMapping"],"0x220A":["IS","1","CoordinateSystemAxisNumber"],"0x220C":["CS","1","CoordinateSystemAxisType"],"0x220E":["CS","1","CoordinateSystemAxisUnits"],"0x2210":["OB","1","CoordinateSystemAxisValues"],"0x2220":["SQ","1","CoordinateSystemTransformSequence"],"0x2222":["ST","1","TransformDescription"],"0x2224":["IS","1","TransformNumberOfAxes"],"0x2226":["IS","1-n","TransformOrderOfAxes"],"0x2228":["CS","1","TransformedAxisUnits"],"0x222A":["DS","1-n","CoordinateSystemTransformRotationAndScaleMatrix"],"0x222C":["DS","1-n","CoordinateSystemTransformTranslationMatrix"],"0x3011":["DS","1","InternalDetectorFrameTime"],"0x3012":["DS","1","NumberOfFramesIntegrated"],"0x3020":["SQ","1","DetectorTemperatureSequence"],"0x3022":["ST","1","SensorName"],"0x3024":["DS","1","HorizontalOffsetOfSensor"],"0x3026":["DS","1","VerticalOffsetOfSensor"],"0x3028":["DS","1","SensorTemperature"],"0x3040":["SQ","1","DarkCurrentSequence"],"0x3050":["ox","1","DarkCurrentCounts"],"0x3060":["SQ","1","GainCorrectionReferenceSequence"],"0x3070":["ox","1","AirCounts"],"0x3071":["DS","1","KVUsedInGainCalibration"],"0x3072":["DS","1","MAUsedInGainCalibration"],"0x3073":["DS","1","NumberOfFramesUsedForIntegration"],"0x3074":["LO","1","FilterMaterialUsedInGainCalibration"],"0x3075":["DS","1","FilterThicknessUsedInGainCalibration"],"0x3076":["DA","1","DateOfGainCalibration"],"0x3077":["TM","1","TimeOfGainCalibration"],"0x3080":["OB","1","BadPixelImage"],"0x3099":["LT","1","CalibrationNotes"],"0x4002":["SQ","1","PulserEquipmentSequence"],"0x4004":["CS","1","PulserType"],"0x4006":["LT","1","PulserNotes"],"0x4008":["SQ","1","ReceiverEquipmentSequence"],"0x400A":["CS","1","AmplifierType"],"0x400C":["LT","1","ReceiverNotes"],"0x400E":["SQ","1","PreAmplifierEquipmentSequence"],"0x400F":["LT","1","PreAmplifierNotes"],"0x4010":["SQ","1","TransmitTransducerSequence"],"0x4011":["SQ","1","ReceiveTransducerSequence"],"0x4012":["US","1","NumberOfElements"],"0x4013":["CS","1","ElementShape"],"0x4014":["DS","1","ElementDimensionA"],"0x4015":["DS","1","ElementDimensionB"],"0x4016":["DS","1","ElementPitchA"],"0x4017":["DS","1","MeasuredBeamDimensionA"],"0x4018":["DS","1","MeasuredBeamDimensionB"],"0x4019":["DS","1","LocationOfMeasuredBeamDiameter"],"0x401A":["DS","1","NominalFrequency"],"0x401B":["DS","1","MeasuredCenterFrequency"],"0x401C":["DS","1","MeasuredBandwidth"],"0x401D":["DS","1","ElementPitchB"],"0x4020":["SQ","1","PulserSettingsSequence"],"0x4022":["DS","1","PulseWidth"],"0x4024":["DS","1","ExcitationFrequency"],"0x4026":["CS","1","ModulationType"],"0x4028":["DS","1","Damping"],"0x4030":["SQ","1","ReceiverSettingsSequence"],"0x4031":["DS","1","AcquiredSoundpathLength"],"0x4032":["CS","1","AcquisitionCompressionType"],"0x4033":["IS","1","AcquisitionSampleSize"],"0x4034":["DS","1","RectifierSmoothing"],"0x4035":["SQ","1","DACSequence"],"0x4036":["CS","1","DACType"],"0x4038":["DS","1-n","DACGainPoints"],"0x403A":["DS","1-n","DACTimePoints"],"0x403C":["DS","1-n","DACAmplitude"],"0x4040":["SQ","1","PreAmplifierSettingsSequence"],"0x4050":["SQ","1","TransmitTransducerSettingsSequence"],"0x4051":["SQ","1","ReceiveTransducerSettingsSequence"],"0x4052":["DS","1","IncidentAngle"],"0x4054":["ST","1","CouplingTechnique"],"0x4056":["ST","1","CouplingMedium"],"0x4057":["DS","1","CouplingVelocity"],"0x4058":["DS","1","ProbeCenterLocationX"],"0x4059":["DS","1","ProbeCenterLocationZ"],"0x405A":["DS","1","SoundPathLength"],"0x405C":["ST","1","DelayLawIdentifier"],"0x4060":["SQ","1","GateSettingsSequence"],"0x4062":["DS","1","GateThreshold"],"0x4064":["DS","1","VelocityOfSound"],"0x4070":["SQ","1","CalibrationSettingsSequence"],"0x4072":["ST","1","CalibrationProcedure"],"0x4074":["SH","1","ProcedureVersion"],"0x4076":["DA","1","ProcedureCreationDate"],"0x4078":["DA","1","ProcedureExpirationDate"],"0x407A":["DA","1","ProcedureLastModifiedDate"],"0x407C":["TM","1-n","CalibrationTime"],"0x407E":["DA","1-n","CalibrationDate"],"0x4080":["SQ","1","ProbeDriveEquipmentSequence"],"0x4081":["CS","1","DriveType"],"0x4082":["LT","1","ProbeDriveNotes"],"0x4083":["SQ","1","DriveProbeSequence"],"0x4084":["DS","1","ProbeInductance"],"0x4085":["DS","1","ProbeResistance"],"0x4086":["SQ","1","ReceiveProbeSequence"],"0x4087":["SQ","1","ProbeDriveSettingsSequence"],"0x4088":["DS","1","BridgeResistors"],"0x4089":["DS","1","ProbeOrientationAngle"],"0x408B":["DS","1","UserSelectedGainY"],"0x408C":["DS","1","UserSelectedPhase"],"0x408D":["DS","1","UserSelectedOffsetX"],"0x408E":["DS","1","UserSelectedOffsetY"],"0x4091":["SQ","1","ChannelSettingsSequence"],"0x4092":["DS","1","ChannelThreshold"],"0x409A":["SQ","1","ScannerSettingsSequence"],"0x409B":["ST","1","ScanProcedure"],"0x409C":["DS","1","TranslationRateX"],"0x409D":["DS","1","TranslationRateY"],"0x409F":["DS","1","ChannelOverlap"],"0x40A0":["LO","1","ImageQualityIndicatorType"],"0x40A1":["LO","1","ImageQualityIndicatorMaterial"],"0x40A2":["LO","1","ImageQualityIndicatorSize"],"0x5002":["IS","1","LINACEnergy"],"0x5004":["IS","1","LINACOutput"],"0x5100":["US","1","ActiveAperture"],"0x5101":["DS","1","TotalAperture"],"0x5102":["DS","1","ApertureElevation"],"0x5103":["DS","1","MainLobeAngle"],"0x5104":["DS","1","MainRoofAngle"],"0x5105":["CS","1","ConnectorType"],"0x5106":["SH","1","WedgeModelNumber"],"0x5107":["DS","1","WedgeAngleFloat"],"0x5108":["DS","1","WedgeRoofAngle"],"0x5109":["CS","1","WedgeElement1Position"],"0x510A":["DS","1","WedgeMaterialVelocity"],"0x510B":["SH","1","WedgeMaterial"],"0x510C":["DS","1","WedgeOffsetZ"],"0x510D":["DS","1","WedgeOriginOffsetX"],"0x510E":["DS","1","WedgeTimeDelay"],"0x510F":["SH","1","WedgeName"],"0x5110":["SH","1","WedgeManufacturerName"],"0x5111":["LO","1","WedgeDescription"],"0x5112":["DS","1","NominalBeamAngle"],"0x5113":["DS","1","WedgeOffsetX"],"0x5114":["DS","1","WedgeOffsetY"],"0x5115":["DS","1","WedgeTotalLength"],"0x5116":["DS","1","WedgeInContactLength"],"0x5117":["DS","1","WedgeFrontGap"],"0x5118":["DS","1","WedgeTotalHeight"],"0x5119":["DS","1","WedgeFrontHeight"],"0x511A":["DS","1","WedgeRearHeight"],"0x511B":["DS","1","WedgeTotalWidth"],"0x511C":["DS","1","WedgeInContactWidth"],"0x511D":["DS","1","WedgeChamferHeight"],"0x511E":["CS","1","WedgeCurve"],"0x511F":["DS","1","RadiusAlongWedge"]},"0x0018":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["LO","1","ContrastBolusAgent"],"0x0012":["SQ","1","ContrastBolusAgentSequence"],"0x0013":["FL","1","ContrastBolusT1Relaxivity"],"0x0014":["SQ","1","ContrastBolusAdministrationRouteSequence"],"0x0015":["CS","1","BodyPartExamined"],"0x0020":["CS","1-n","ScanningSequence"],"0x0021":["CS","1-n","SequenceVariant"],"0x0022":["CS","1-n","ScanOptions"],"0x0023":["CS","1","MRAcquisitionType"],"0x0024":["SH","1","SequenceName"],"0x0025":["CS","1","AngioFlag"],"0x0026":["SQ","1","InterventionDrugInformationSequence"],"0x0027":["TM","1","InterventionDrugStopTime"],"0x0028":["DS","1","InterventionDrugDose"],"0x0029":["SQ","1","InterventionDrugCodeSequence"],"0x002A":["SQ","1","AdditionalDrugSequence"],"0x0030":["LO","1-n","Radionuclide"],"0x0031":["LO","1","Radiopharmaceutical"],"0x0032":["DS","1","EnergyWindowCenterline"],"0x0033":["DS","1-n","EnergyWindowTotalWidth"],"0x0034":["LO","1","InterventionDrugName"],"0x0035":["TM","1","InterventionDrugStartTime"],"0x0036":["SQ","1","InterventionSequence"],"0x0037":["CS","1","TherapyType"],"0x0038":["CS","1","InterventionStatus"],"0x0039":["CS","1","TherapyDescription"],"0x003A":["ST","1","InterventionDescription"],"0x0040":["IS","1","CineRate"],"0x0042":["CS","1","InitialCineRunState"],"0x0050":["DS","1","SliceThickness"],"0x0060":["DS","1","KVP"],"0x0070":["IS","1","CountsAccumulated"],"0x0071":["CS","1","AcquisitionTerminationCondition"],"0x0072":["DS","1","EffectiveDuration"],"0x0073":["CS","1","AcquisitionStartCondition"],"0x0074":["IS","1","AcquisitionStartConditionData"],"0x0075":["IS","1","AcquisitionTerminationConditionData"],"0x0080":["DS","1","RepetitionTime"],"0x0081":["DS","1","EchoTime"],"0x0082":["DS","1","InversionTime"],"0x0083":["DS","1","NumberOfAverages"],"0x0084":["DS","1","ImagingFrequency"],"0x0085":["SH","1","ImagedNucleus"],"0x0086":["IS","1-n","EchoNumbers"],"0x0087":["DS","1","MagneticFieldStrength"],"0x0088":["DS","1","SpacingBetweenSlices"],"0x0089":["IS","1","NumberOfPhaseEncodingSteps"],"0x0090":["DS","1","DataCollectionDiameter"],"0x0091":["IS","1","EchoTrainLength"],"0x0093":["DS","1","PercentSampling"],"0x0094":["DS","1","PercentPhaseFieldOfView"],"0x0095":["DS","1","PixelBandwidth"],"0x1000":["LO","1","DeviceSerialNumber"],"0x1002":["UI","1","DeviceUID"],"0x1003":["LO","1","DeviceID"],"0x1004":["LO","1","PlateID"],"0x1005":["LO","1","GeneratorID"],"0x1006":["LO","1","GridID"],"0x1007":["LO","1","CassetteID"],"0x1008":["LO","1","GantryID"],"0x1010":["LO","1","SecondaryCaptureDeviceID"],"0x1011":["LO","1","HardcopyCreationDeviceID"],"0x1012":["DA","1","DateOfSecondaryCapture"],"0x1014":["TM","1","TimeOfSecondaryCapture"],"0x1016":["LO","1","SecondaryCaptureDeviceManufacturer"],"0x1017":["LO","1","HardcopyDeviceManufacturer"],"0x1018":["LO","1","SecondaryCaptureDeviceManufacturerModelName"],"0x1019":["LO","1-n","SecondaryCaptureDeviceSoftwareVersions"],"0x101A":["LO","1-n","HardcopyDeviceSoftwareVersion"],"0x101B":["LO","1","HardcopyDeviceManufacturerModelName"],"0x1020":["LO","1-n","SoftwareVersions"],"0x1022":["SH","1","VideoImageFormatAcquired"],"0x1023":["LO","1","DigitalImageFormatAcquired"],"0x1030":["LO","1","ProtocolName"],"0x1040":["LO","1","ContrastBolusRoute"],"0x1041":["DS","1","ContrastBolusVolume"],"0x1042":["TM","1","ContrastBolusStartTime"],"0x1043":["TM","1","ContrastBolusStopTime"],"0x1044":["DS","1","ContrastBolusTotalDose"],"0x1045":["IS","1","SyringeCounts"],"0x1046":["DS","1-n","ContrastFlowRate"],"0x1047":["DS","1-n","ContrastFlowDuration"],"0x1048":["CS","1","ContrastBolusIngredient"],"0x1049":["DS","1","ContrastBolusIngredientConcentration"],"0x1050":["DS","1","SpatialResolution"],"0x1060":["DS","1","TriggerTime"],"0x1061":["LO","1","TriggerSourceOrType"],"0x1062":["IS","1","NominalInterval"],"0x1063":["DS","1","FrameTime"],"0x1064":["LO","1","CardiacFramingType"],"0x1065":["DS","1-n","FrameTimeVector"],"0x1066":["DS","1","FrameDelay"],"0x1067":["DS","1","ImageTriggerDelay"],"0x1068":["DS","1","MultiplexGroupTimeOffset"],"0x1069":["DS","1","TriggerTimeOffset"],"0x106A":["CS","1","SynchronizationTrigger"],"0x106C":["US","2","SynchronizationChannel"],"0x106E":["UL","1","TriggerSamplePosition"],"0x1070":["LO","1","RadiopharmaceuticalRoute"],"0x1071":["DS","1","RadiopharmaceuticalVolume"],"0x1072":["TM","1","RadiopharmaceuticalStartTime"],"0x1073":["TM","1","RadiopharmaceuticalStopTime"],"0x1074":["DS","1","RadionuclideTotalDose"],"0x1075":["DS","1","RadionuclideHalfLife"],"0x1076":["DS","1","RadionuclidePositronFraction"],"0x1077":["DS","1","RadiopharmaceuticalSpecificActivity"],"0x1078":["DT","1","RadiopharmaceuticalStartDateTime"],"0x1079":["DT","1","RadiopharmaceuticalStopDateTime"],"0x1080":["CS","1","BeatRejectionFlag"],"0x1081":["IS","1","LowRRValue"],"0x1082":["IS","1","HighRRValue"],"0x1083":["IS","1","IntervalsAcquired"],"0x1084":["IS","1","IntervalsRejected"],"0x1085":["LO","1","PVCRejection"],"0x1086":["IS","1","SkipBeats"],"0x1088":["IS","1","HeartRate"],"0x1090":["IS","1","CardiacNumberOfImages"],"0x1094":["IS","1","TriggerWindow"],"0x1100":["DS","1","ReconstructionDiameter"],"0x1110":["DS","1","DistanceSourceToDetector"],"0x1111":["DS","1","DistanceSourceToPatient"],"0x1114":["DS","1","EstimatedRadiographicMagnificationFactor"],"0x1120":["DS","1","GantryDetectorTilt"],"0x1121":["DS","1","GantryDetectorSlew"],"0x1130":["DS","1","TableHeight"],"0x1131":["DS","1","TableTraverse"],"0x1134":["CS","1","TableMotion"],"0x1135":["DS","1-n","TableVerticalIncrement"],"0x1136":["DS","1-n","TableLateralIncrement"],"0x1137":["DS","1-n","TableLongitudinalIncrement"],"0x1138":["DS","1","TableAngle"],"0x113A":["CS","1","TableType"],"0x1140":["CS","1","RotationDirection"],"0x1141":["DS","1","AngularPosition"],"0x1142":["DS","1-n","RadialPosition"],"0x1143":["DS","1","ScanArc"],"0x1144":["DS","1","AngularStep"],"0x1145":["DS","1","CenterOfRotationOffset"],"0x1146":["DS","1-n","RotationOffset"],"0x1147":["CS","1","FieldOfViewShape"],"0x1149":["IS","1-2","FieldOfViewDimensions"],"0x1150":["IS","1","ExposureTime"],"0x1151":["IS","1","XRayTubeCurrent"],"0x1152":["IS","1","Exposure"],"0x1153":["IS","1","ExposureInuAs"],"0x1154":["DS","1","AveragePulseWidth"],"0x1155":["CS","1","RadiationSetting"],"0x1156":["CS","1","RectificationType"],"0x115A":["CS","1","RadiationMode"],"0x115E":["DS","1","ImageAndFluoroscopyAreaDoseProduct"],"0x1160":["SH","1","FilterType"],"0x1161":["LO","1-n","TypeOfFilters"],"0x1162":["DS","1","IntensifierSize"],"0x1164":["DS","2","ImagerPixelSpacing"],"0x1166":["CS","1-n","Grid"],"0x1170":["IS","1","GeneratorPower"],"0x1180":["SH","1","CollimatorGridName"],"0x1181":["CS","1","CollimatorType"],"0x1182":["IS","1-2","FocalDistance"],"0x1183":["DS","1-2","XFocusCenter"],"0x1184":["DS","1-2","YFocusCenter"],"0x1190":["DS","1-n","FocalSpots"],"0x1191":["CS","1","AnodeTargetMaterial"],"0x11A0":["DS","1","BodyPartThickness"],"0x11A2":["DS","1","CompressionForce"],"0x11A4":["LO","1","PaddleDescription"],"0x1200":["DA","1-n","DateOfLastCalibration"],"0x1201":["TM","1-n","TimeOfLastCalibration"],"0x1202":["DT","1","DateTimeOfLastCalibration"],"0x1210":["SH","1-n","ConvolutionKernel"],"0x1240":["IS","1-n","UpperLowerPixelValues"],"0x1242":["IS","1","ActualFrameDuration"],"0x1243":["IS","1","CountRate"],"0x1244":["US","1","PreferredPlaybackSequencing"],"0x1250":["SH","1","ReceiveCoilName"],"0x1251":["SH","1","TransmitCoilName"],"0x1260":["SH","1","PlateType"],"0x1261":["LO","1","PhosphorType"],"0x1300":["DS","1","ScanVelocity"],"0x1301":["CS","1-n","WholeBodyTechnique"],"0x1302":["IS","1","ScanLength"],"0x1310":["US","4","AcquisitionMatrix"],"0x1312":["CS","1","InPlanePhaseEncodingDirection"],"0x1314":["DS","1","FlipAngle"],"0x1315":["CS","1","VariableFlipAngleFlag"],"0x1316":["DS","1","SAR"],"0x1318":["DS","1","dBdt"],"0x1400":["LO","1","AcquisitionDeviceProcessingDescription"],"0x1401":["LO","1","AcquisitionDeviceProcessingCode"],"0x1402":["CS","1","CassetteOrientation"],"0x1403":["CS","1","CassetteSize"],"0x1404":["US","1","ExposuresOnPlate"],"0x1405":["IS","1","RelativeXRayExposure"],"0x1411":["DS","1","ExposureIndex"],"0x1412":["DS","1","TargetExposureIndex"],"0x1413":["DS","1","DeviationIndex"],"0x1450":["DS","1","ColumnAngulation"],"0x1460":["DS","1","TomoLayerHeight"],"0x1470":["DS","1","TomoAngle"],"0x1480":["DS","1","TomoTime"],"0x1490":["CS","1","TomoType"],"0x1491":["CS","1","TomoClass"],"0x1495":["IS","1","NumberOfTomosynthesisSourceImages"],"0x1500":["CS","1","PositionerMotion"],"0x1508":["CS","1","PositionerType"],"0x1510":["DS","1","PositionerPrimaryAngle"],"0x1511":["DS","1","PositionerSecondaryAngle"],"0x1520":["DS","1-n","PositionerPrimaryAngleIncrement"],"0x1521":["DS","1-n","PositionerSecondaryAngleIncrement"],"0x1530":["DS","1","DetectorPrimaryAngle"],"0x1531":["DS","1","DetectorSecondaryAngle"],"0x1600":["CS","1-3","ShutterShape"],"0x1602":["IS","1","ShutterLeftVerticalEdge"],"0x1604":["IS","1","ShutterRightVerticalEdge"],"0x1606":["IS","1","ShutterUpperHorizontalEdge"],"0x1608":["IS","1","ShutterLowerHorizontalEdge"],"0x1610":["IS","2","CenterOfCircularShutter"],"0x1612":["IS","1","RadiusOfCircularShutter"],"0x1620":["IS","2-2n","VerticesOfThePolygonalShutter"],"0x1622":["US","1","ShutterPresentationValue"],"0x1623":["US","1","ShutterOverlayGroup"],"0x1624":["US","3","ShutterPresentationColorCIELabValue"],"0x1700":["CS","1-3","CollimatorShape"],"0x1702":["IS","1","CollimatorLeftVerticalEdge"],"0x1704":["IS","1","CollimatorRightVerticalEdge"],"0x1706":["IS","1","CollimatorUpperHorizontalEdge"],"0x1708":["IS","1","CollimatorLowerHorizontalEdge"],"0x1710":["IS","2","CenterOfCircularCollimator"],"0x1712":["IS","1","RadiusOfCircularCollimator"],"0x1720":["IS","2-2n","VerticesOfThePolygonalCollimator"],"0x1800":["CS","1","AcquisitionTimeSynchronized"],"0x1801":["SH","1","TimeSource"],"0x1802":["CS","1","TimeDistributionProtocol"],"0x1803":["LO","1","NTPSourceAddress"],"0x2001":["IS","1-n","PageNumberVector"],"0x2002":["SH","1-n","FrameLabelVector"],"0x2003":["DS","1-n","FramePrimaryAngleVector"],"0x2004":["DS","1-n","FrameSecondaryAngleVector"],"0x2005":["DS","1-n","SliceLocationVector"],"0x2006":["SH","1-n","DisplayWindowLabelVector"],"0x2010":["DS","2","NominalScannedPixelSpacing"],"0x2020":["CS","1","DigitizingDeviceTransportDirection"],"0x2030":["DS","1","RotationOfScannedFilm"],"0x2041":["SQ","1","BiopsyTargetSequence"],"0x2042":["UI","1","TargetUID"],"0x2043":["FL","2","LocalizingCursorPosition"],"0x2044":["FL","3","CalculatedTargetPosition"],"0x2045":["SH","1","TargetLabel"],"0x2046":["FL","1","DisplayedZValue"],"0x3100":["CS","1","IVUSAcquisition"],"0x3101":["DS","1","IVUSPullbackRate"],"0x3102":["DS","1","IVUSGatedRate"],"0x3103":["IS","1","IVUSPullbackStartFrameNumber"],"0x3104":["IS","1","IVUSPullbackStopFrameNumber"],"0x3105":["IS","1-n","LesionNumber"],"0x4000":["LT","1","AcquisitionComments"],"0x5000":["SH","1-n","OutputPower"],"0x5010":["LO","1-n","TransducerData"],"0x5012":["DS","1","FocusDepth"],"0x5020":["LO","1","ProcessingFunction"],"0x5021":["LO","1","PostprocessingFunction"],"0x5022":["DS","1","MechanicalIndex"],"0x5024":["DS","1","BoneThermalIndex"],"0x5026":["DS","1","CranialThermalIndex"],"0x5027":["DS","1","SoftTissueThermalIndex"],"0x5028":["DS","1","SoftTissueFocusThermalIndex"],"0x5029":["DS","1","SoftTissueSurfaceThermalIndex"],"0x5030":["DS","1","DynamicRange"],"0x5040":["DS","1","TotalGain"],"0x5050":["IS","1","DepthOfScanField"],"0x5100":["CS","1","PatientPosition"],"0x5101":["CS","1","ViewPosition"],"0x5104":["SQ","1","ProjectionEponymousNameCodeSequence"],"0x5210":["DS","6","ImageTransformationMatrix"],"0x5212":["DS","3","ImageTranslationVector"],"0x6000":["DS","1","Sensitivity"],"0x6011":["SQ","1","SequenceOfUltrasoundRegions"],"0x6012":["US","1","RegionSpatialFormat"],"0x6014":["US","1","RegionDataType"],"0x6016":["UL","1","RegionFlags"],"0x6018":["UL","1","RegionLocationMinX0"],"0x601A":["UL","1","RegionLocationMinY0"],"0x601C":["UL","1","RegionLocationMaxX1"],"0x601E":["UL","1","RegionLocationMaxY1"],"0x6020":["SL","1","ReferencePixelX0"],"0x6022":["SL","1","ReferencePixelY0"],"0x6024":["US","1","PhysicalUnitsXDirection"],"0x6026":["US","1","PhysicalUnitsYDirection"],"0x6028":["FD","1","ReferencePixelPhysicalValueX"],"0x602A":["FD","1","ReferencePixelPhysicalValueY"],"0x602C":["FD","1","PhysicalDeltaX"],"0x602E":["FD","1","PhysicalDeltaY"],"0x6030":["UL","1","TransducerFrequency"],"0x6031":["CS","1","TransducerType"],"0x6032":["UL","1","PulseRepetitionFrequency"],"0x6034":["FD","1","DopplerCorrectionAngle"],"0x6036":["FD","1","SteeringAngle"],"0x6038":["UL","1","DopplerSampleVolumeXPositionRetired"],"0x6039":["SL","1","DopplerSampleVolumeXPosition"],"0x603A":["UL","1","DopplerSampleVolumeYPositionRetired"],"0x603B":["SL","1","DopplerSampleVolumeYPosition"],"0x603C":["UL","1","TMLinePositionX0Retired"],"0x603D":["SL","1","TMLinePositionX0"],"0x603E":["UL","1","TMLinePositionY0Retired"],"0x603F":["SL","1","TMLinePositionY0"],"0x6040":["UL","1","TMLinePositionX1Retired"],"0x6041":["SL","1","TMLinePositionX1"],"0x6042":["UL","1","TMLinePositionY1Retired"],"0x6043":["SL","1","TMLinePositionY1"],"0x6044":["US","1","PixelComponentOrganization"],"0x6046":["UL","1","PixelComponentMask"],"0x6048":["UL","1","PixelComponentRangeStart"],"0x604A":["UL","1","PixelComponentRangeStop"],"0x604C":["US","1","PixelComponentPhysicalUnits"],"0x604E":["US","1","PixelComponentDataType"],"0x6050":["UL","1","NumberOfTableBreakPoints"],"0x6052":["UL","1-n","TableOfXBreakPoints"],"0x6054":["FD","1-n","TableOfYBreakPoints"],"0x6056":["UL","1","NumberOfTableEntries"],"0x6058":["UL","1-n","TableOfPixelValues"],"0x605A":["FL","1-n","TableOfParameterValues"],"0x6060":["FL","1-n","RWaveTimeVector"],"0x7000":["CS","1","DetectorConditionsNominalFlag"],"0x7001":["DS","1","DetectorTemperature"],"0x7004":["CS","1","DetectorType"],"0x7005":["CS","1","DetectorConfiguration"],"0x7006":["LT","1","DetectorDescription"],"0x7008":["LT","1","DetectorMode"],"0x700A":["SH","1","DetectorID"],"0x700C":["DA","1","DateOfLastDetectorCalibration"],"0x700E":["TM","1","TimeOfLastDetectorCalibration"],"0x7010":["IS","1","ExposuresOnDetectorSinceLastCalibration"],"0x7011":["IS","1","ExposuresOnDetectorSinceManufactured"],"0x7012":["DS","1","DetectorTimeSinceLastExposure"],"0x7014":["DS","1","DetectorActiveTime"],"0x7016":["DS","1","DetectorActivationOffsetFromExposure"],"0x701A":["DS","2","DetectorBinning"],"0x7020":["DS","2","DetectorElementPhysicalSize"],"0x7022":["DS","2","DetectorElementSpacing"],"0x7024":["CS","1","DetectorActiveShape"],"0x7026":["DS","1-2","DetectorActiveDimensions"],"0x7028":["DS","2","DetectorActiveOrigin"],"0x702A":["LO","1","DetectorManufacturerName"],"0x702B":["LO","1","DetectorManufacturerModelName"],"0x7030":["DS","2","FieldOfViewOrigin"],"0x7032":["DS","1","FieldOfViewRotation"],"0x7034":["CS","1","FieldOfViewHorizontalFlip"],"0x7036":["FL","2","PixelDataAreaOriginRelativeToFOV"],"0x7038":["FL","1","PixelDataAreaRotationAngleRelativeToFOV"],"0x7040":["LT","1","GridAbsorbingMaterial"],"0x7041":["LT","1","GridSpacingMaterial"],"0x7042":["DS","1","GridThickness"],"0x7044":["DS","1","GridPitch"],"0x7046":["IS","2","GridAspectRatio"],"0x7048":["DS","1","GridPeriod"],"0x704C":["DS","1","GridFocalDistance"],"0x7050":["CS","1-n","FilterMaterial"],"0x7052":["DS","1-n","FilterThicknessMinimum"],"0x7054":["DS","1-n","FilterThicknessMaximum"],"0x7056":["FL","1-n","FilterBeamPathLengthMinimum"],"0x7058":["FL","1-n","FilterBeamPathLengthMaximum"],"0x7060":["CS","1","ExposureControlMode"],"0x7062":["LT","1","ExposureControlModeDescription"],"0x7064":["CS","1","ExposureStatus"],"0x7065":["DS","1","PhototimerSetting"],"0x8150":["DS","1","ExposureTimeInuS"],"0x8151":["DS","1","XRayTubeCurrentInuA"],"0x9004":["CS","1","ContentQualification"],"0x9005":["SH","1","PulseSequenceName"],"0x9006":["SQ","1","MRImagingModifierSequence"],"0x9008":["CS","1","EchoPulseSequence"],"0x9009":["CS","1","InversionRecovery"],"0x9010":["CS","1","FlowCompensation"],"0x9011":["CS","1","MultipleSpinEcho"],"0x9012":["CS","1","MultiPlanarExcitation"],"0x9014":["CS","1","PhaseContrast"],"0x9015":["CS","1","TimeOfFlightContrast"],"0x9016":["CS","1","Spoiling"],"0x9017":["CS","1","SteadyStatePulseSequence"],"0x9018":["CS","1","EchoPlanarPulseSequence"],"0x9019":["FD","1","TagAngleFirstAxis"],"0x9020":["CS","1","MagnetizationTransfer"],"0x9021":["CS","1","T2Preparation"],"0x9022":["CS","1","BloodSignalNulling"],"0x9024":["CS","1","SaturationRecovery"],"0x9025":["CS","1","SpectrallySelectedSuppression"],"0x9026":["CS","1","SpectrallySelectedExcitation"],"0x9027":["CS","1","SpatialPresaturation"],"0x9028":["CS","1","Tagging"],"0x9029":["CS","1","OversamplingPhase"],"0x9030":["FD","1","TagSpacingFirstDimension"],"0x9032":["CS","1","GeometryOfKSpaceTraversal"],"0x9033":["CS","1","SegmentedKSpaceTraversal"],"0x9034":["CS","1","RectilinearPhaseEncodeReordering"],"0x9035":["FD","1","TagThickness"],"0x9036":["CS","1","PartialFourierDirection"],"0x9037":["CS","1","CardiacSynchronizationTechnique"],"0x9041":["LO","1","ReceiveCoilManufacturerName"],"0x9042":["SQ","1","MRReceiveCoilSequence"],"0x9043":["CS","1","ReceiveCoilType"],"0x9044":["CS","1","QuadratureReceiveCoil"],"0x9045":["SQ","1","MultiCoilDefinitionSequence"],"0x9046":["LO","1","MultiCoilConfiguration"],"0x9047":["SH","1","MultiCoilElementName"],"0x9048":["CS","1","MultiCoilElementUsed"],"0x9049":["SQ","1","MRTransmitCoilSequence"],"0x9050":["LO","1","TransmitCoilManufacturerName"],"0x9051":["CS","1","TransmitCoilType"],"0x9052":["FD","1-2","SpectralWidth"],"0x9053":["FD","1-2","ChemicalShiftReference"],"0x9054":["CS","1","VolumeLocalizationTechnique"],"0x9058":["US","1","MRAcquisitionFrequencyEncodingSteps"],"0x9059":["CS","1","Decoupling"],"0x9060":["CS","1-2","DecoupledNucleus"],"0x9061":["FD","1-2","DecouplingFrequency"],"0x9062":["CS","1","DecouplingMethod"],"0x9063":["FD","1-2","DecouplingChemicalShiftReference"],"0x9064":["CS","1","KSpaceFiltering"],"0x9065":["CS","1-2","TimeDomainFiltering"],"0x9066":["US","1-2","NumberOfZeroFills"],"0x9067":["CS","1","BaselineCorrection"],"0x9069":["FD","1","ParallelReductionFactorInPlane"],"0x9070":["FD","1","CardiacRRIntervalSpecified"],"0x9073":["FD","1","AcquisitionDuration"],"0x9074":["DT","1","FrameAcquisitionDateTime"],"0x9075":["CS","1","DiffusionDirectionality"],"0x9076":["SQ","1","DiffusionGradientDirectionSequence"],"0x9077":["CS","1","ParallelAcquisition"],"0x9078":["CS","1","ParallelAcquisitionTechnique"],"0x9079":["FD","1-n","InversionTimes"],"0x9080":["ST","1","MetaboliteMapDescription"],"0x9081":["CS","1","PartialFourier"],"0x9082":["FD","1","EffectiveEchoTime"],"0x9083":["SQ","1","MetaboliteMapCodeSequence"],"0x9084":["SQ","1","ChemicalShiftSequence"],"0x9085":["CS","1","CardiacSignalSource"],"0x9087":["FD","1","DiffusionBValue"],"0x9089":["FD","3","DiffusionGradientOrientation"],"0x9090":["FD","3","VelocityEncodingDirection"],"0x9091":["FD","1","VelocityEncodingMinimumValue"],"0x9092":["SQ","1","VelocityEncodingAcquisitionSequence"],"0x9093":["US","1","NumberOfKSpaceTrajectories"],"0x9094":["CS","1","CoverageOfKSpace"],"0x9095":["UL","1","SpectroscopyAcquisitionPhaseRows"],"0x9096":["FD","1","ParallelReductionFactorInPlaneRetired"],"0x9098":["FD","1-2","TransmitterFrequency"],"0x9100":["CS","1-2","ResonantNucleus"],"0x9101":["CS","1","FrequencyCorrection"],"0x9103":["SQ","1","MRSpectroscopyFOVGeometrySequence"],"0x9104":["FD","1","SlabThickness"],"0x9105":["FD","3","SlabOrientation"],"0x9106":["FD","3","MidSlabPosition"],"0x9107":["SQ","1","MRSpatialSaturationSequence"],"0x9112":["SQ","1","MRTimingAndRelatedParametersSequence"],"0x9114":["SQ","1","MREchoSequence"],"0x9115":["SQ","1","MRModifierSequence"],"0x9117":["SQ","1","MRDiffusionSequence"],"0x9118":["SQ","1","CardiacSynchronizationSequence"],"0x9119":["SQ","1","MRAveragesSequence"],"0x9125":["SQ","1","MRFOVGeometrySequence"],"0x9126":["SQ","1","VolumeLocalizationSequence"],"0x9127":["UL","1","SpectroscopyAcquisitionDataColumns"],"0x9147":["CS","1","DiffusionAnisotropyType"],"0x9151":["DT","1","FrameReferenceDateTime"],"0x9152":["SQ","1","MRMetaboliteMapSequence"],"0x9155":["FD","1","ParallelReductionFactorOutOfPlane"],"0x9159":["UL","1","SpectroscopyAcquisitionOutOfPlanePhaseSteps"],"0x9166":["CS","1","BulkMotionStatus"],"0x9168":["FD","1","ParallelReductionFactorSecondInPlane"],"0x9169":["CS","1","CardiacBeatRejectionTechnique"],"0x9170":["CS","1","RespiratoryMotionCompensationTechnique"],"0x9171":["CS","1","RespiratorySignalSource"],"0x9172":["CS","1","BulkMotionCompensationTechnique"],"0x9173":["CS","1","BulkMotionSignalSource"],"0x9174":["CS","1","ApplicableSafetyStandardAgency"],"0x9175":["LO","1","ApplicableSafetyStandardDescription"],"0x9176":["SQ","1","OperatingModeSequence"],"0x9177":["CS","1","OperatingModeType"],"0x9178":["CS","1","OperatingMode"],"0x9179":["CS","1","SpecificAbsorptionRateDefinition"],"0x9180":["CS","1","GradientOutputType"],"0x9181":["FD","1","SpecificAbsorptionRateValue"],"0x9182":["FD","1","GradientOutput"],"0x9183":["CS","1","FlowCompensationDirection"],"0x9184":["FD","1","TaggingDelay"],"0x9185":["ST","1","RespiratoryMotionCompensationTechniqueDescription"],"0x9186":["SH","1","RespiratorySignalSourceID"],"0x9195":["FD","1","ChemicalShiftMinimumIntegrationLimitInHz"],"0x9196":["FD","1","ChemicalShiftMaximumIntegrationLimitInHz"],"0x9197":["SQ","1","MRVelocityEncodingSequence"],"0x9198":["CS","1","FirstOrderPhaseCorrection"],"0x9199":["CS","1","WaterReferencedPhaseCorrection"],"0x9200":["CS","1","MRSpectroscopyAcquisitionType"],"0x9214":["CS","1","RespiratoryCyclePosition"],"0x9217":["FD","1","VelocityEncodingMaximumValue"],"0x9218":["FD","1","TagSpacingSecondDimension"],"0x9219":["SS","1","TagAngleSecondAxis"],"0x9220":["FD","1","FrameAcquisitionDuration"],"0x9226":["SQ","1","MRImageFrameTypeSequence"],"0x9227":["SQ","1","MRSpectroscopyFrameTypeSequence"],"0x9231":["US","1","MRAcquisitionPhaseEncodingStepsInPlane"],"0x9232":["US","1","MRAcquisitionPhaseEncodingStepsOutOfPlane"],"0x9234":["UL","1","SpectroscopyAcquisitionPhaseColumns"],"0x9236":["CS","1","CardiacCyclePosition"],"0x9239":["SQ","1","SpecificAbsorptionRateSequence"],"0x9240":["US","1","RFEchoTrainLength"],"0x9241":["US","1","GradientEchoTrainLength"],"0x9250":["CS","1","ArterialSpinLabelingContrast"],"0x9251":["SQ","1","MRArterialSpinLabelingSequence"],"0x9252":["LO","1","ASLTechniqueDescription"],"0x9253":["US","1","ASLSlabNumber"],"0x9254":["FD","1","ASLSlabThickness"],"0x9255":["FD","3","ASLSlabOrientation"],"0x9256":["FD","3","ASLMidSlabPosition"],"0x9257":["CS","1","ASLContext"],"0x9258":["UL","1","ASLPulseTrainDuration"],"0x9259":["CS","1","ASLCrusherFlag"],"0x925A":["FD","1","ASLCrusherFlowLimit"],"0x925B":["LO","1","ASLCrusherDescription"],"0x925C":["CS","1","ASLBolusCutoffFlag"],"0x925D":["SQ","1","ASLBolusCutoffTimingSequence"],"0x925E":["LO","1","ASLBolusCutoffTechnique"],"0x925F":["UL","1","ASLBolusCutoffDelayTime"],"0x9260":["SQ","1","ASLSlabSequence"],"0x9295":["FD","1","ChemicalShiftMinimumIntegrationLimitInppm"],"0x9296":["FD","1","ChemicalShiftMaximumIntegrationLimitInppm"],"0x9297":["CS","1","WaterReferenceAcquisition"],"0x9298":["IS","1","EchoPeakPosition"],"0x9301":["SQ","1","CTAcquisitionTypeSequence"],"0x9302":["CS","1","AcquisitionType"],"0x9303":["FD","1","TubeAngle"],"0x9304":["SQ","1","CTAcquisitionDetailsSequence"],"0x9305":["FD","1","RevolutionTime"],"0x9306":["FD","1","SingleCollimationWidth"],"0x9307":["FD","1","TotalCollimationWidth"],"0x9308":["SQ","1","CTTableDynamicsSequence"],"0x9309":["FD","1","TableSpeed"],"0x9310":["FD","1","TableFeedPerRotation"],"0x9311":["FD","1","SpiralPitchFactor"],"0x9312":["SQ","1","CTGeometrySequence"],"0x9313":["FD","3","DataCollectionCenterPatient"],"0x9314":["SQ","1","CTReconstructionSequence"],"0x9315":["CS","1","ReconstructionAlgorithm"],"0x9316":["CS","1","ConvolutionKernelGroup"],"0x9317":["FD","2","ReconstructionFieldOfView"],"0x9318":["FD","3","ReconstructionTargetCenterPatient"],"0x9319":["FD","1","ReconstructionAngle"],"0x9320":["SH","1","ImageFilter"],"0x9321":["SQ","1","CTExposureSequence"],"0x9322":["FD","2","ReconstructionPixelSpacing"],"0x9323":["CS","1","ExposureModulationType"],"0x9324":["FD","1","EstimatedDoseSaving"],"0x9325":["SQ","1","CTXRayDetailsSequence"],"0x9326":["SQ","1","CTPositionSequence"],"0x9327":["FD","1","TablePosition"],"0x9328":["FD","1","ExposureTimeInms"],"0x9329":["SQ","1","CTImageFrameTypeSequence"],"0x9330":["FD","1","XRayTubeCurrentInmA"],"0x9332":["FD","1","ExposureInmAs"],"0x9333":["CS","1","ConstantVolumeFlag"],"0x9334":["CS","1","FluoroscopyFlag"],"0x9335":["FD","1","DistanceSourceToDataCollectionCenter"],"0x9337":["US","1","ContrastBolusAgentNumber"],"0x9338":["SQ","1","ContrastBolusIngredientCodeSequence"],"0x9340":["SQ","1","ContrastAdministrationProfileSequence"],"0x9341":["SQ","1","ContrastBolusUsageSequence"],"0x9342":["CS","1","ContrastBolusAgentAdministered"],"0x9343":["CS","1","ContrastBolusAgentDetected"],"0x9344":["CS","1","ContrastBolusAgentPhase"],"0x9345":["FD","1","CTDIvol"],"0x9346":["SQ","1","CTDIPhantomTypeCodeSequence"],"0x9351":["FL","1","CalciumScoringMassFactorPatient"],"0x9352":["FL","3","CalciumScoringMassFactorDevice"],"0x9353":["FL","1","EnergyWeightingFactor"],"0x9360":["SQ","1","CTAdditionalXRaySourceSequence"],"0x9401":["SQ","1","ProjectionPixelCalibrationSequence"],"0x9402":["FL","1","DistanceSourceToIsocenter"],"0x9403":["FL","1","DistanceObjectToTableTop"],"0x9404":["FL","2","ObjectPixelSpacingInCenterOfBeam"],"0x9405":["SQ","1","PositionerPositionSequence"],"0x9406":["SQ","1","TablePositionSequence"],"0x9407":["SQ","1","CollimatorShapeSequence"],"0x9410":["CS","1","PlanesInAcquisition"],"0x9412":["SQ","1","XAXRFFrameCharacteristicsSequence"],"0x9417":["SQ","1","FrameAcquisitionSequence"],"0x9420":["CS","1","XRayReceptorType"],"0x9423":["LO","1","AcquisitionProtocolName"],"0x9424":["LT","1","AcquisitionProtocolDescription"],"0x9425":["CS","1","ContrastBolusIngredientOpaque"],"0x9426":["FL","1","DistanceReceptorPlaneToDetectorHousing"],"0x9427":["CS","1","IntensifierActiveShape"],"0x9428":["FL","1-2","IntensifierActiveDimensions"],"0x9429":["FL","2","PhysicalDetectorSize"],"0x9430":["FL","2","PositionOfIsocenterProjection"],"0x9432":["SQ","1","FieldOfViewSequence"],"0x9433":["LO","1","FieldOfViewDescription"],"0x9434":["SQ","1","ExposureControlSensingRegionsSequence"],"0x9435":["CS","1","ExposureControlSensingRegionShape"],"0x9436":["SS","1","ExposureControlSensingRegionLeftVerticalEdge"],"0x9437":["SS","1","ExposureControlSensingRegionRightVerticalEdge"],"0x9438":["SS","1","ExposureControlSensingRegionUpperHorizontalEdge"],"0x9439":["SS","1","ExposureControlSensingRegionLowerHorizontalEdge"],"0x9440":["SS","2","CenterOfCircularExposureControlSensingRegion"],"0x9441":["US","1","RadiusOfCircularExposureControlSensingRegion"],"0x9442":["SS","2-n","VerticesOfThePolygonalExposureControlSensingRegion"],"0x9445":["","",""],"0x9447":["FL","1","ColumnAngulationPatient"],"0x9449":["FL","1","BeamAngle"],"0x9451":["SQ","1","FrameDetectorParametersSequence"],"0x9452":["FL","1","CalculatedAnatomyThickness"],"0x9455":["SQ","1","CalibrationSequence"],"0x9456":["SQ","1","ObjectThicknessSequence"],"0x9457":["CS","1","PlaneIdentification"],"0x9461":["FL","1-2","FieldOfViewDimensionsInFloat"],"0x9462":["SQ","1","IsocenterReferenceSystemSequence"],"0x9463":["FL","1","PositionerIsocenterPrimaryAngle"],"0x9464":["FL","1","PositionerIsocenterSecondaryAngle"],"0x9465":["FL","1","PositionerIsocenterDetectorRotationAngle"],"0x9466":["FL","1","TableXPositionToIsocenter"],"0x9467":["FL","1","TableYPositionToIsocenter"],"0x9468":["FL","1","TableZPositionToIsocenter"],"0x9469":["FL","1","TableHorizontalRotationAngle"],"0x9470":["FL","1","TableHeadTiltAngle"],"0x9471":["FL","1","TableCradleTiltAngle"],"0x9472":["SQ","1","FrameDisplayShutterSequence"],"0x9473":["FL","1","AcquiredImageAreaDoseProduct"],"0x9474":["CS","1","CArmPositionerTabletopRelationship"],"0x9476":["SQ","1","XRayGeometrySequence"],"0x9477":["SQ","1","IrradiationEventIdentificationSequence"],"0x9504":["SQ","1","XRay3DFrameTypeSequence"],"0x9506":["SQ","1","ContributingSourcesSequence"],"0x9507":["SQ","1","XRay3DAcquisitionSequence"],"0x9508":["FL","1","PrimaryPositionerScanArc"],"0x9509":["FL","1","SecondaryPositionerScanArc"],"0x9510":["FL","1","PrimaryPositionerScanStartAngle"],"0x9511":["FL","1","SecondaryPositionerScanStartAngle"],"0x9514":["FL","1","PrimaryPositionerIncrement"],"0x9515":["FL","1","SecondaryPositionerIncrement"],"0x9516":["DT","1","StartAcquisitionDateTime"],"0x9517":["DT","1","EndAcquisitionDateTime"],"0x9518":["SS","1","PrimaryPositionerIncrementSign"],"0x9519":["SS","1","SecondaryPositionerIncrementSign"],"0x9524":["LO","1","ApplicationName"],"0x9525":["LO","1","ApplicationVersion"],"0x9526":["LO","1","ApplicationManufacturer"],"0x9527":["CS","1","AlgorithmType"],"0x9528":["LO","1","AlgorithmDescription"],"0x9530":["SQ","1","XRay3DReconstructionSequence"],"0x9531":["LO","1","ReconstructionDescription"],"0x9538":["SQ","1","PerProjectionAcquisitionSequence"],"0x9541":["SQ","1","DetectorPositionSequence"],"0x9542":["SQ","1","XRayAcquisitionDoseSequence"],"0x9543":["FD","1","XRaySourceIsocenterPrimaryAngle"],"0x9544":["FD","1","XRaySourceIsocenterSecondaryAngle"],"0x9545":["FD","1","BreastSupportIsocenterPrimaryAngle"],"0x9546":["FD","1","BreastSupportIsocenterSecondaryAngle"],"0x9547":["FD","1","BreastSupportXPositionToIsocenter"],"0x9548":["FD","1","BreastSupportYPositionToIsocenter"],"0x9549":["FD","1","BreastSupportZPositionToIsocenter"],"0x9550":["FD","1","DetectorIsocenterPrimaryAngle"],"0x9551":["FD","1","DetectorIsocenterSecondaryAngle"],"0x9552":["FD","1","DetectorXPositionToIsocenter"],"0x9553":["FD","1","DetectorYPositionToIsocenter"],"0x9554":["FD","1","DetectorZPositionToIsocenter"],"0x9555":["SQ","1","XRayGridSequence"],"0x9556":["SQ","1","XRayFilterSequence"],"0x9557":["FD","3","DetectorActiveAreaTLHCPosition"],"0x9558":["FD","6","DetectorActiveAreaOrientation"],"0x9559":["CS","1","PositionerPrimaryAngleDirection"],"0x9601":["SQ","1","DiffusionBMatrixSequence"],"0x9602":["FD","1","DiffusionBValueXX"],"0x9603":["FD","1","DiffusionBValueXY"],"0x9604":["FD","1","DiffusionBValueXZ"],"0x9605":["FD","1","DiffusionBValueYY"],"0x9606":["FD","1","DiffusionBValueYZ"],"0x9607":["FD","1","DiffusionBValueZZ"],"0x9701":["DT","1","DecayCorrectionDateTime"],"0x9715":["FD","1","StartDensityThreshold"],"0x9716":["FD","1","StartRelativeDensityDifferenceThreshold"],"0x9717":["FD","1","StartCardiacTriggerCountThreshold"],"0x9718":["FD","1","StartRespiratoryTriggerCountThreshold"],"0x9719":["FD","1","TerminationCountsThreshold"],"0x9720":["FD","1","TerminationDensityThreshold"],"0x9721":["FD","1","TerminationRelativeDensityThreshold"],"0x9722":["FD","1","TerminationTimeThreshold"],"0x9723":["FD","1","TerminationCardiacTriggerCountThreshold"],"0x9724":["FD","1","TerminationRespiratoryTriggerCountThreshold"],"0x9725":["CS","1","DetectorGeometry"],"0x9726":["FD","1","TransverseDetectorSeparation"],"0x9727":["FD","1","AxialDetectorDimension"],"0x9729":["US","1","RadiopharmaceuticalAgentNumber"],"0x9732":["SQ","1","PETFrameAcquisitionSequence"],"0x9733":["SQ","1","PETDetectorMotionDetailsSequence"],"0x9734":["SQ","1","PETTableDynamicsSequence"],"0x9735":["SQ","1","PETPositionSequence"],"0x9736":["SQ","1","PETFrameCorrectionFactorsSequence"],"0x9737":["SQ","1","RadiopharmaceuticalUsageSequence"],"0x9738":["CS","1","AttenuationCorrectionSource"],"0x9739":["US","1","NumberOfIterations"],"0x9740":["US","1","NumberOfSubsets"],"0x9749":["SQ","1","PETReconstructionSequence"],"0x9751":["SQ","1","PETFrameTypeSequence"],"0x9755":["CS","1","TimeOfFlightInformationUsed"],"0x9756":["CS","1","ReconstructionType"],"0x9758":["CS","1","DecayCorrected"],"0x9759":["CS","1","AttenuationCorrected"],"0x9760":["CS","1","ScatterCorrected"],"0x9761":["CS","1","DeadTimeCorrected"],"0x9762":["CS","1","GantryMotionCorrected"],"0x9763":["CS","1","PatientMotionCorrected"],"0x9764":["CS","1","CountLossNormalizationCorrected"],"0x9765":["CS","1","RandomsCorrected"],"0x9766":["CS","1","NonUniformRadialSamplingCorrected"],"0x9767":["CS","1","SensitivityCalibrated"],"0x9768":["CS","1","DetectorNormalizationCorrection"],"0x9769":["CS","1","IterativeReconstructionMethod"],"0x9770":["CS","1","AttenuationCorrectionTemporalRelationship"],"0x9771":["SQ","1","PatientPhysiologicalStateSequence"],"0x9772":["SQ","1","PatientPhysiologicalStateCodeSequence"],"0x9801":["FD","1-n","DepthsOfFocus"],"0x9803":["SQ","1","ExcludedIntervalsSequence"],"0x9804":["DT","1","ExclusionStartDateTime"],"0x9805":["FD","1","ExclusionDuration"],"0x9806":["SQ","1","USImageDescriptionSequence"],"0x9807":["SQ","1","ImageDataTypeSequence"],"0x9808":["CS","1","DataType"],"0x9809":["SQ","1","TransducerScanPatternCodeSequence"],"0x980B":["CS","1","AliasedDataType"],"0x980C":["CS","1","PositionMeasuringDeviceUsed"],"0x980D":["SQ","1","TransducerGeometryCodeSequence"],"0x980E":["SQ","1","TransducerBeamSteeringCodeSequence"],"0x980F":["SQ","1","TransducerApplicationCodeSequence"],"0x9810":["xs","1","ZeroVelocityPixelValue"],"0xA001":["SQ","1","ContributingEquipmentSequence"],"0xA002":["DT","1","ContributionDateTime"],"0xA003":["ST","1","ContributionDescription"]},"0x0020":{"0x0000":["UL","1","GenericGroupLength"],"0x000D":["UI","1","StudyInstanceUID"],"0x000E":["UI","1","SeriesInstanceUID"],"0x0010":["SH","1","StudyID"],"0x0011":["IS","1","SeriesNumber"],"0x0012":["IS","1","AcquisitionNumber"],"0x0013":["IS","1","InstanceNumber"],"0x0014":["IS","1","IsotopeNumber"],"0x0015":["IS","1","PhaseNumber"],"0x0016":["IS","1","IntervalNumber"],"0x0017":["IS","1","TimeSlotNumber"],"0x0018":["IS","1","AngleNumber"],"0x0019":["IS","1","ItemNumber"],"0x0020":["CS","2","PatientOrientation"],"0x0022":["IS","1","OverlayNumber"],"0x0024":["IS","1","CurveNumber"],"0x0026":["IS","1","LUTNumber"],"0x0030":["DS","3","ImagePosition"],"0x0032":["DS","3","ImagePositionPatient"],"0x0035":["DS","6","ImageOrientation"],"0x0037":["DS","6","ImageOrientationPatient"],"0x0050":["DS","1","Location"],"0x0052":["UI","1","FrameOfReferenceUID"],"0x0060":["CS","1","Laterality"],"0x0062":["CS","1","ImageLaterality"],"0x0070":["LO","1","ImageGeometryType"],"0x0080":["CS","1-n","MaskingImage"],"0x00AA":["IS","1","ReportNumber"],"0x0100":["IS","1","TemporalPositionIdentifier"],"0x0105":["IS","1","NumberOfTemporalPositions"],"0x0110":["DS","1","TemporalResolution"],"0x0200":["UI","1","SynchronizationFrameOfReferenceUID"],"0x0242":["UI","1","SOPInstanceUIDOfConcatenationSource"],"0x1000":["IS","1","SeriesInStudy"],"0x1001":["IS","1","AcquisitionsInSeries"],"0x1002":["IS","1","ImagesInAcquisition"],"0x1003":["IS","1","ImagesInSeries"],"0x1004":["IS","1","AcquisitionsInStudy"],"0x1005":["IS","1","ImagesInStudy"],"0x1020":["LO","1-n","Reference"],"0x1040":["LO","1","PositionReferenceIndicator"],"0x1041":["DS","1","SliceLocation"],"0x1070":["IS","1-n","OtherStudyNumbers"],"0x1200":["IS","1","NumberOfPatientRelatedStudies"],"0x1202":["IS","1","NumberOfPatientRelatedSeries"],"0x1204":["IS","1","NumberOfPatientRelatedInstances"],"0x1206":["IS","1","NumberOfStudyRelatedSeries"],"0x1208":["IS","1","NumberOfStudyRelatedInstances"],"0x1209":["IS","1","NumberOfSeriesRelatedInstances"],"0x3100":["CS","1-n","SourceImageIDs"],"0x3401":["CS","1","ModifyingDeviceID"],"0x3402":["CS","1","ModifiedImageID"],"0x3403":["DA","1","ModifiedImageDate"],"0x3404":["LO","1","ModifyingDeviceManufacturer"],"0x3405":["TM","1","ModifiedImageTime"],"0x3406":["LO","1","ModifiedImageDescription"],"0x4000":["LT","1","ImageComments"],"0x5000":["AT","1-n","OriginalImageIdentification"],"0x5002":["LO","1-n","OriginalImageIdentificationNomenclature"],"0x9056":["SH","1","StackID"],"0x9057":["UL","1","InStackPositionNumber"],"0x9071":["SQ","1","FrameAnatomySequence"],"0x9072":["CS","1","FrameLaterality"],"0x9111":["SQ","1","FrameContentSequence"],"0x9113":["SQ","1","PlanePositionSequence"],"0x9116":["SQ","1","PlaneOrientationSequence"],"0x9128":["UL","1","TemporalPositionIndex"],"0x9153":["FD","1","NominalCardiacTriggerDelayTime"],"0x9154":["FL","1","NominalCardiacTriggerTimePriorToRPeak"],"0x9155":["FL","1","ActualCardiacTriggerTimePriorToRPeak"],"0x9156":["US","1","FrameAcquisitionNumber"],"0x9157":["UL","1-n","DimensionIndexValues"],"0x9158":["LT","1","FrameComments"],"0x9161":["UI","1","ConcatenationUID"],"0x9162":["US","1","InConcatenationNumber"],"0x9163":["US","1","InConcatenationTotalNumber"],"0x9164":["UI","1","DimensionOrganizationUID"],"0x9165":["AT","1","DimensionIndexPointer"],"0x9167":["AT","1","FunctionalGroupPointer"],"0x9170":["SQ","1","UnassignedSharedConvertedAttributesSequence"],"0x9171":["SQ","1","UnassignedPerFrameConvertedAttributesSequence"],"0x9172":["SQ","1","ConversionSourceAttributesSequence"],"0x9213":["LO","1","DimensionIndexPrivateCreator"],"0x9221":["SQ","1","DimensionOrganizationSequence"],"0x9222":["SQ","1","DimensionIndexSequence"],"0x9228":["UL","1","ConcatenationFrameOffsetNumber"],"0x9238":["LO","1","FunctionalGroupPrivateCreator"],"0x9241":["FL","1","NominalPercentageOfCardiacPhase"],"0x9245":["FL","1","NominalPercentageOfRespiratoryPhase"],"0x9246":["FL","1","StartingRespiratoryAmplitude"],"0x9247":["CS","1","StartingRespiratoryPhase"],"0x9248":["FL","1","EndingRespiratoryAmplitude"],"0x9249":["CS","1","EndingRespiratoryPhase"],"0x9250":["CS","1","RespiratoryTriggerType"],"0x9251":["FD","1","RRIntervalTimeNominal"],"0x9252":["FD","1","ActualCardiacTriggerDelayTime"],"0x9253":["SQ","1","RespiratorySynchronizationSequence"],"0x9254":["FD","1","RespiratoryIntervalTime"],"0x9255":["FD","1","NominalRespiratoryTriggerDelayTime"],"0x9256":["FD","1","RespiratoryTriggerDelayThreshold"],"0x9257":["FD","1","ActualRespiratoryTriggerDelayTime"],"0x9301":["FD","3","ImagePositionVolume"],"0x9302":["FD","6","ImageOrientationVolume"],"0x9307":["CS","1","UltrasoundAcquisitionGeometry"],"0x9308":["FD","3","ApexPosition"],"0x9309":["FD","16","VolumeToTransducerMappingMatrix"],"0x930A":["FD","16","VolumeToTableMappingMatrix"],"0x930B":["CS","1","VolumeToTransducerRelationship"],"0x930C":["CS","1","PatientFrameOfReferenceSource"],"0x930D":["FD","1","TemporalPositionTimeOffset"],"0x930E":["SQ","1","PlanePositionVolumeSequence"],"0x930F":["SQ","1","PlaneOrientationVolumeSequence"],"0x9310":["SQ","1","TemporalPositionSequence"],"0x9311":["CS","1","DimensionOrganizationType"],"0x9312":["UI","1","VolumeFrameOfReferenceUID"],"0x9313":["UI","1","TableFrameOfReferenceUID"],"0x9421":["LO","1","DimensionDescriptionLabel"],"0x9450":["SQ","1","PatientOrientationInFrameSequence"],"0x9453":["LO","1","FrameLabel"],"0x9518":["US","1-n","AcquisitionIndex"],"0x9529":["SQ","1","ContributingSOPInstancesReferenceSequence"],"0x9536":["US","1","ReconstructionIndex"]},"0x0022":{"0x0000":["UL","1","GenericGroupLength"],"0x0001":["US","1","LightPathFilterPassThroughWavelength"],"0x0002":["US","2","LightPathFilterPassBand"],"0x0003":["US","1","ImagePathFilterPassThroughWavelength"],"0x0004":["US","2","ImagePathFilterPassBand"],"0x0005":["CS","1","PatientEyeMovementCommanded"],"0x0006":["SQ","1","PatientEyeMovementCommandCodeSequence"],"0x0007":["FL","1","SphericalLensPower"],"0x0008":["FL","1","CylinderLensPower"],"0x0009":["FL","1","CylinderAxis"],"0x000A":["FL","1","EmmetropicMagnification"],"0x000B":["FL","1","IntraOcularPressure"],"0x000C":["FL","1","HorizontalFieldOfView"],"0x000D":["CS","1","PupilDilated"],"0x000E":["FL","1","DegreeOfDilation"],"0x0010":["FL","1","StereoBaselineAngle"],"0x0011":["FL","1","StereoBaselineDisplacement"],"0x0012":["FL","1","StereoHorizontalPixelOffset"],"0x0013":["FL","1","StereoVerticalPixelOffset"],"0x0014":["FL","1","StereoRotation"],"0x0015":["SQ","1","AcquisitionDeviceTypeCodeSequence"],"0x0016":["SQ","1","IlluminationTypeCodeSequence"],"0x0017":["SQ","1","LightPathFilterTypeStackCodeSequence"],"0x0018":["SQ","1","ImagePathFilterTypeStackCodeSequence"],"0x0019":["SQ","1","LensesCodeSequence"],"0x001A":["SQ","1","ChannelDescriptionCodeSequence"],"0x001B":["SQ","1","RefractiveStateSequence"],"0x001C":["SQ","1","MydriaticAgentCodeSequence"],"0x001D":["SQ","1","RelativeImagePositionCodeSequence"],"0x001E":["FL","1","CameraAngleOfView"],"0x0020":["SQ","1","StereoPairsSequence"],"0x0021":["SQ","1","LeftImageSequence"],"0x0022":["SQ","1","RightImageSequence"],"0x0028":["CS","1","StereoPairsPresent"],"0x0030":["FL","1","AxialLengthOfTheEye"],"0x0031":["SQ","1","OphthalmicFrameLocationSequence"],"0x0032":["FL","2-2n","ReferenceCoordinates"],"0x0035":["FL","1","DepthSpatialResolution"],"0x0036":["FL","1","MaximumDepthDistortion"],"0x0037":["FL","1","AlongScanSpatialResolution"],"0x0038":["FL","1","MaximumAlongScanDistortion"],"0x0039":["CS","1","OphthalmicImageOrientation"],"0x0041":["FL","1","DepthOfTransverseImage"],"0x0042":["SQ","1","MydriaticAgentConcentrationUnitsSequence"],"0x0048":["FL","1","AcrossScanSpatialResolution"],"0x0049":["FL","1","MaximumAcrossScanDistortion"],"0x004E":["DS","1","MydriaticAgentConcentration"],"0x0055":["FL","1","IlluminationWaveLength"],"0x0056":["FL","1","IlluminationPower"],"0x0057":["FL","1","IlluminationBandwidth"],"0x0058":["SQ","1","MydriaticAgentSequence"],"0x1007":["SQ","1","OphthalmicAxialMeasurementsRightEyeSequence"],"0x1008":["SQ","1","OphthalmicAxialMeasurementsLeftEyeSequence"],"0x1009":["CS","1","OphthalmicAxialMeasurementsDeviceType"],"0x1010":["CS","1","OphthalmicAxialLengthMeasurementsType"],"0x1012":["SQ","1","OphthalmicAxialLengthSequence"],"0x1019":["FL","1","OphthalmicAxialLength"],"0x1024":["SQ","1","LensStatusCodeSequence"],"0x1025":["SQ","1","VitreousStatusCodeSequence"],"0x1028":["SQ","1","IOLFormulaCodeSequence"],"0x1029":["LO","1","IOLFormulaDetail"],"0x1033":["FL","1","KeratometerIndex"],"0x1035":["SQ","1","SourceOfOphthalmicAxialLengthCodeSequence"],"0x1037":["FL","1","TargetRefraction"],"0x1039":["CS","1","RefractiveProcedureOccurred"],"0x1040":["SQ","1","RefractiveSurgeryTypeCodeSequence"],"0x1044":["SQ","1","OphthalmicUltrasoundMethodCodeSequence"],"0x1050":["SQ","1","OphthalmicAxialLengthMeasurementsSequence"],"0x1053":["FL","1","IOLPower"],"0x1054":["FL","1","PredictedRefractiveError"],"0x1059":["FL","1","OphthalmicAxialLengthVelocity"],"0x1065":["LO","1","LensStatusDescription"],"0x1066":["LO","1","VitreousStatusDescription"],"0x1090":["SQ","1","IOLPowerSequence"],"0x1092":["SQ","1","LensConstantSequence"],"0x1093":["LO","1","IOLManufacturer"],"0x1094":["LO","1","LensConstantDescription"],"0x1095":["LO","1","ImplantName"],"0x1096":["SQ","1","KeratometryMeasurementTypeCodeSequence"],"0x1097":["LO","1","ImplantPartNumber"],"0x1100":["SQ","1","ReferencedOphthalmicAxialMeasurementsSequence"],"0x1101":["SQ","1","OphthalmicAxialLengthMeasurementsSegmentNameCodeSequence"],"0x1103":["SQ","1","RefractiveErrorBeforeRefractiveSurgeryCodeSequence"],"0x1121":["FL","1","IOLPowerForExactEmmetropia"],"0x1122":["FL","1","IOLPowerForExactTargetRefraction"],"0x1125":["SQ","1","AnteriorChamberDepthDefinitionCodeSequence"],"0x1127":["SQ","1","LensThicknessSequence"],"0x1128":["SQ","1","AnteriorChamberDepthSequence"],"0x1130":["FL","1","LensThickness"],"0x1131":["FL","1","AnteriorChamberDepth"],"0x1132":["SQ","1","SourceOfLensThicknessDataCodeSequence"],"0x1133":["SQ","1","SourceOfAnteriorChamberDepthDataCodeSequence"],"0x1134":["SQ","1","SourceOfRefractiveMeasurementsSequence"],"0x1135":["SQ","1","SourceOfRefractiveMeasurementsCodeSequence"],"0x1140":["CS","1","OphthalmicAxialLengthMeasurementModified"],"0x1150":["SQ","1","OphthalmicAxialLengthDataSourceCodeSequence"],"0x1153":["SQ","1","OphthalmicAxialLengthAcquisitionMethodCodeSequence"],"0x1155":["FL","1","SignalToNoiseRatio"],"0x1159":["LO","1","OphthalmicAxialLengthDataSourceDescription"],"0x1210":["SQ","1","OphthalmicAxialLengthMeasurementsTotalLengthSequence"],"0x1211":["SQ","1","OphthalmicAxialLengthMeasurementsSegmentalLengthSequence"],"0x1212":["SQ","1","OphthalmicAxialLengthMeasurementsLengthSummationSequence"],"0x1220":["SQ","1","UltrasoundOphthalmicAxialLengthMeasurementsSequence"],"0x1225":["SQ","1","OpticalOphthalmicAxialLengthMeasurementsSequence"],"0x1230":["SQ","1","UltrasoundSelectedOphthalmicAxialLengthSequence"],"0x1250":["SQ","1","OphthalmicAxialLengthSelectionMethodCodeSequence"],"0x1255":["SQ","1","OpticalSelectedOphthalmicAxialLengthSequence"],"0x1257":["SQ","1","SelectedSegmentalOphthalmicAxialLengthSequence"],"0x1260":["SQ","1","SelectedTotalOphthalmicAxialLengthSequence"],"0x1262":["SQ","1","OphthalmicAxialLengthQualityMetricSequence"],"0x1265":["SQ","1","OphthalmicAxialLengthQualityMetricTypeCodeSequence"],"0x1273":["LO","1","OphthalmicAxialLengthQualityMetricTypeDescription"],"0x1300":["SQ","1","IntraocularLensCalculationsRightEyeSequence"],"0x1310":["SQ","1","IntraocularLensCalculationsLeftEyeSequence"],"0x1330":["SQ","1","ReferencedOphthalmicAxialLengthMeasurementQCImageSequence"],"0x1415":["CS","1","OphthalmicMappingDeviceType"],"0x1420":["SQ","1","AcquisitionMethodCodeSequence"],"0x1423":["SQ","1","AcquisitionMethodAlgorithmSequence"],"0x1436":["SQ","1","OphthalmicThicknessMapTypeCodeSequence"],"0x1443":["SQ","1","OphthalmicThicknessMappingNormalsSequence"],"0x1445":["SQ","1","RetinalThicknessDefinitionCodeSequence"],"0x1450":["SQ","1","PixelValueMappingToCodedConceptSequence"],"0x1452":["xs","1","MappedPixelValue"],"0x1454":["LO","1","PixelValueMappingExplanation"],"0x1458":["SQ","1","OphthalmicThicknessMapQualityThresholdSequence"],"0x1460":["FL","1","OphthalmicThicknessMapThresholdQualityRating"],"0x1463":["FL","2","AnatomicStructureReferencePoint"],"0x1465":["SQ","1","RegistrationToLocalizerSequence"],"0x1466":["CS","1","RegisteredLocalizerUnits"],"0x1467":["FL","2","RegisteredLocalizerTopLeftHandCorner"],"0x1468":["FL","2","RegisteredLocalizerBottomRightHandCorner"],"0x1470":["SQ","1","OphthalmicThicknessMapQualityRatingSequence"],"0x1472":["SQ","1","RelevantOPTAttributesSequence"],"0x1512":["SQ","1","TransformationMethodCodeSequence"],"0x1513":["SQ","1","TransformationAlgorithmSequence"],"0x1515":["CS","1","OphthalmicAxialLengthMethod"],"0x1517":["FL","1","OphthalmicFOV"],"0x1518":["SQ","1","TwoDimensionalToThreeDimensionalMapSequence"],"0x1525":["SQ","1","WideFieldOphthalmicPhotographyQualityRatingSequence"],"0x1526":["SQ","1","WideFieldOphthalmicPhotographyQualityThresholdSequence"],"0x1527":["FL","1","WideFieldOphthalmicPhotographyThresholdQualityRating"],"0x1528":["FL","1","XCoordinatesCenterPixelViewAngle"],"0x1529":["FL","1","YCoordinatesCenterPixelViewAngle"],"0x1530":["UL","1","NumberOfMapPoints"],"0x1531":["OF","1","TwoDimensionalToThreeDimensionalMapData"]},"0x0024":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["FL","1","VisualFieldHorizontalExtent"],"0x0011":["FL","1","VisualFieldVerticalExtent"],"0x0012":["CS","1","VisualFieldShape"],"0x0016":["SQ","1","ScreeningTestModeCodeSequence"],"0x0018":["FL","1","MaximumStimulusLuminance"],"0x0020":["FL","1","BackgroundLuminance"],"0x0021":["SQ","1","StimulusColorCodeSequence"],"0x0024":["SQ","1","BackgroundIlluminationColorCodeSequence"],"0x0025":["FL","1","StimulusArea"],"0x0028":["FL","1","StimulusPresentationTime"],"0x0032":["SQ","1","FixationSequence"],"0x0033":["SQ","1","FixationMonitoringCodeSequence"],"0x0034":["SQ","1","VisualFieldCatchTrialSequence"],"0x0035":["US","1","FixationCheckedQuantity"],"0x0036":["US","1","PatientNotProperlyFixatedQuantity"],"0x0037":["CS","1","PresentedVisualStimuliDataFlag"],"0x0038":["US","1","NumberOfVisualStimuli"],"0x0039":["CS","1","ExcessiveFixationLossesDataFlag"],"0x0040":["CS","1","ExcessiveFixationLosses"],"0x0042":["US","1","StimuliRetestingQuantity"],"0x0044":["LT","1","CommentsOnPatientPerformanceOfVisualField"],"0x0045":["CS","1","FalseNegativesEstimateFlag"],"0x0046":["FL","1","FalseNegativesEstimate"],"0x0048":["US","1","NegativeCatchTrialsQuantity"],"0x0050":["US","1","FalseNegativesQuantity"],"0x0051":["CS","1","ExcessiveFalseNegativesDataFlag"],"0x0052":["CS","1","ExcessiveFalseNegatives"],"0x0053":["CS","1","FalsePositivesEstimateFlag"],"0x0054":["FL","1","FalsePositivesEstimate"],"0x0055":["CS","1","CatchTrialsDataFlag"],"0x0056":["US","1","PositiveCatchTrialsQuantity"],"0x0057":["CS","1","TestPointNormalsDataFlag"],"0x0058":["SQ","1","TestPointNormalsSequence"],"0x0059":["CS","1","GlobalDeviationProbabilityNormalsFlag"],"0x0060":["US","1","FalsePositivesQuantity"],"0x0061":["CS","1","ExcessiveFalsePositivesDataFlag"],"0x0062":["CS","1","ExcessiveFalsePositives"],"0x0063":["CS","1","VisualFieldTestNormalsFlag"],"0x0064":["SQ","1","ResultsNormalsSequence"],"0x0065":["SQ","1","AgeCorrectedSensitivityDeviationAlgorithmSequence"],"0x0066":["FL","1","GlobalDeviationFromNormal"],"0x0067":["SQ","1","GeneralizedDefectSensitivityDeviationAlgorithmSequence"],"0x0068":["FL","1","LocalizedDeviationFromNormal"],"0x0069":["LO","1","PatientReliabilityIndicator"],"0x0070":["FL","1","VisualFieldMeanSensitivity"],"0x0071":["FL","1","GlobalDeviationProbability"],"0x0072":["CS","1","LocalDeviationProbabilityNormalsFlag"],"0x0073":["FL","1","LocalizedDeviationProbability"],"0x0074":["CS","1","ShortTermFluctuationCalculated"],"0x0075":["FL","1","ShortTermFluctuation"],"0x0076":["CS","1","ShortTermFluctuationProbabilityCalculated"],"0x0077":["FL","1","ShortTermFluctuationProbability"],"0x0078":["CS","1","CorrectedLocalizedDeviationFromNormalCalculated"],"0x0079":["FL","1","CorrectedLocalizedDeviationFromNormal"],"0x0080":["CS","1","CorrectedLocalizedDeviationFromNormalProbabilityCalculated"],"0x0081":["FL","1","CorrectedLocalizedDeviationFromNormalProbability"],"0x0083":["SQ","1","GlobalDeviationProbabilitySequence"],"0x0085":["SQ","1","LocalizedDeviationProbabilitySequence"],"0x0086":["CS","1","FovealSensitivityMeasured"],"0x0087":["FL","1","FovealSensitivity"],"0x0088":["FL","1","VisualFieldTestDuration"],"0x0089":["SQ","1","VisualFieldTestPointSequence"],"0x0090":["FL","1","VisualFieldTestPointXCoordinate"],"0x0091":["FL","1","VisualFieldTestPointYCoordinate"],"0x0092":["FL","1","AgeCorrectedSensitivityDeviationValue"],"0x0093":["CS","1","StimulusResults"],"0x0094":["FL","1","SensitivityValue"],"0x0095":["CS","1","RetestStimulusSeen"],"0x0096":["FL","1","RetestSensitivityValue"],"0x0097":["SQ","1","VisualFieldTestPointNormalsSequence"],"0x0098":["FL","1","QuantifiedDefect"],"0x0100":["FL","1","AgeCorrectedSensitivityDeviationProbabilityValue"],"0x0102":["CS","1","GeneralizedDefectCorrectedSensitivityDeviationFlag"],"0x0103":["FL","1","GeneralizedDefectCorrectedSensitivityDeviationValue"],"0x0104":["FL","1","GeneralizedDefectCorrectedSensitivityDeviationProbabilityValue"],"0x0105":["FL","1","MinimumSensitivityValue"],"0x0106":["CS","1","BlindSpotLocalized"],"0x0107":["FL","1","BlindSpotXCoordinate"],"0x0108":["FL","1","BlindSpotYCoordinate"],"0x0110":["SQ","1","VisualAcuityMeasurementSequence"],"0x0112":["SQ","1","RefractiveParametersUsedOnPatientSequence"],"0x0113":["CS","1","MeasurementLaterality"],"0x0114":["SQ","1","OphthalmicPatientClinicalInformationLeftEyeSequence"],"0x0115":["SQ","1","OphthalmicPatientClinicalInformationRightEyeSequence"],"0x0117":["CS","1","FovealPointNormativeDataFlag"],"0x0118":["FL","1","FovealPointProbabilityValue"],"0x0120":["CS","1","ScreeningBaselineMeasured"],"0x0122":["SQ","1","ScreeningBaselineMeasuredSequence"],"0x0124":["CS","1","ScreeningBaselineType"],"0x0126":["FL","1","ScreeningBaselineValue"],"0x0202":["LO","1","AlgorithmSource"],"0x0306":["LO","1","DataSetName"],"0x0307":["LO","1","DataSetVersion"],"0x0308":["LO","1","DataSetSource"],"0x0309":["LO","1","DataSetDescription"],"0x0317":["SQ","1","VisualFieldTestReliabilityGlobalIndexSequence"],"0x0320":["SQ","1","VisualFieldGlobalResultsIndexSequence"],"0x0325":["SQ","1","DataObservationSequence"],"0x0338":["CS","1","IndexNormalsFlag"],"0x0341":["FL","1","IndexProbability"],"0x0344":["SQ","1","IndexProbabilitySequence"]},"0x0028":{"0x0000":["UL","1","GenericGroupLength"],"0x0002":["US","1","SamplesPerPixel"],"0x0003":["US","1","SamplesPerPixelUsed"],"0x0004":["CS","1","PhotometricInterpretation"],"0x0005":["US","1","ImageDimensions"],"0x0006":["US","1","PlanarConfiguration"],"0x0008":["IS","1","NumberOfFrames"],"0x0009":["AT","1-n","FrameIncrementPointer"],"0x000A":["AT","1-n","FrameDimensionPointer"],"0x0010":["US","1","Rows"],"0x0011":["US","1","Columns"],"0x0012":["US","1","Planes"],"0x0014":["US","1","UltrasoundColorDataPresent"],"0x0020":["","",""],"0x0030":["DS","2","PixelSpacing"],"0x0031":["DS","2","ZoomFactor"],"0x0032":["DS","2","ZoomCenter"],"0x0034":["IS","2","PixelAspectRatio"],"0x0040":["CS","1","ImageFormat"],"0x0050":["LO","1-n","ManipulatedImage"],"0x0051":["CS","1-n","CorrectedImage"],"0x005F":["LO","1","CompressionRecognitionCode"],"0x0060":["CS","1","CompressionCode"],"0x0061":["SH","1","CompressionOriginator"],"0x0062":["LO","1","CompressionLabel"],"0x0063":["SH","1","CompressionDescription"],"0x0065":["CS","1-n","CompressionSequence"],"0x0066":["AT","1-n","CompressionStepPointers"],"0x0068":["US","1","RepeatInterval"],"0x0069":["US","1","BitsGrouped"],"0x0070":["US","1-n","PerimeterTable"],"0x0071":["xs","1","PerimeterValue"],"0x0080":["US","1","PredictorRows"],"0x0081":["US","1","PredictorColumns"],"0x0082":["US","1-n","PredictorConstants"],"0x0090":["CS","1","BlockedPixels"],"0x0091":["US","1","BlockRows"],"0x0092":["US","1","BlockColumns"],"0x0093":["US","1","RowOverlap"],"0x0094":["US","1","ColumnOverlap"],"0x0100":["US","1","BitsAllocated"],"0x0101":["US","1","BitsStored"],"0x0102":["US","1","HighBit"],"0x0103":["US","1","PixelRepresentation"],"0x0104":["xs","1","SmallestValidPixelValue"],"0x0105":["xs","1","LargestValidPixelValue"],"0x0106":["xs","1","SmallestImagePixelValue"],"0x0107":["xs","1","LargestImagePixelValue"],"0x0108":["xs","1","SmallestPixelValueInSeries"],"0x0109":["xs","1","LargestPixelValueInSeries"],"0x0110":["xs","1","SmallestImagePixelValueInPlane"],"0x0111":["xs","1","LargestImagePixelValueInPlane"],"0x0120":["xs","1","PixelPaddingValue"],"0x0121":["xs","1","PixelPaddingRangeLimit"],"0x0122":["FL","1","FloatPixelPaddingValue"],"0x0123":["FD","1","DoubleFloatPixelPaddingValue"],"0x0124":["FL","1","FloatPixelPaddingRangeLimit"],"0x0125":["FD","1","DoubleFloatPixelPaddingRangeLimit"],"0x0200":["US","1","ImageLocation"],"0x0300":["CS","1","QualityControlImage"],"0x0301":["CS","1","BurnedInAnnotation"],"0x0302":["CS","1","RecognizableVisualFeatures"],"0x0303":["CS","1","LongitudinalTemporalInformationModified"],"0x0304":["UI","1","ReferencedColorPaletteInstanceUID"],"0x0400":["LO","1","TransformLabel"],"0x0401":["LO","1","TransformVersionNumber"],"0x0402":["US","1","NumberOfTransformSteps"],"0x0403":["LO","1-n","SequenceOfCompressedData"],"0x0404":["AT","1-n","DetailsOfCoefficients"],"0x04x0":["US","1","RowsForNthOrderCoefficients"],"0x04x1":["US","1","ColumnsForNthOrderCoefficients"],"0x04x2":["LO","1-n","CoefficientCoding"],"0x04x3":["AT","1-n","CoefficientCodingPointers"],"0x0700":["LO","1","DCTLabel"],"0x0701":["CS","1-n","DataBlockDescription"],"0x0702":["AT","1-n","DataBlock"],"0x0710":["US","1","NormalizationFactorFormat"],"0x0720":["US","1","ZonalMapNumberFormat"],"0x0721":["AT","1-n","ZonalMapLocation"],"0x0722":["US","1","ZonalMapFormat"],"0x0730":["US","1","AdaptiveMapFormat"],"0x0740":["US","1","CodeNumberFormat"],"0x08x0":["CS","1-n","CodeLabel"],"0x08x2":["US","1","NumberOfTables"],"0x08x3":["AT","1-n","CodeTableLocation"],"0x08x4":["US","1","BitsForCodeWord"],"0x08x8":["AT","1-n","ImageDataLocation"],"0x0A02":["CS","1","PixelSpacingCalibrationType"],"0x0A04":["LO","1","PixelSpacingCalibrationDescription"],"0x1040":["CS","1","PixelIntensityRelationship"],"0x1041":["SS","1","PixelIntensityRelationshipSign"],"0x1050":["DS","1-n","WindowCenter"],"0x1051":["DS","1-n","WindowWidth"],"0x1052":["DS","1","RescaleIntercept"],"0x1053":["DS","1","RescaleSlope"],"0x1054":["LO","1","RescaleType"],"0x1055":["LO","1-n","WindowCenterWidthExplanation"],"0x1056":["CS","1","VOILUTFunction"],"0x1080":["CS","1","GrayScale"],"0x1090":["CS","1","RecommendedViewingMode"],"0x1100":["xs","3","GrayLookupTableDescriptor"],"0x1101":["xs","3","RedPaletteColorLookupTableDescriptor"],"0x1102":["xs","3","GreenPaletteColorLookupTableDescriptor"],"0x1103":["xs","3","BluePaletteColorLookupTableDescriptor"],"0x1104":["US","3","AlphaPaletteColorLookupTableDescriptor"],"0x1111":["xs","4","LargeRedPaletteColorLookupTableDescriptor"],"0x1112":["xs","4","LargeGreenPaletteColorLookupTableDescriptor"],"0x1113":["xs","4","LargeBluePaletteColorLookupTableDescriptor"],"0x1199":["UI","1","PaletteColorLookupTableUID"],"0x1200":["US or SS or OW","1-n or 1","GrayLookupTableData"],"0x1201":["OW","1","RedPaletteColorLookupTableData"],"0x1202":["OW","1","GreenPaletteColorLookupTableData"],"0x1203":["OW","1","BluePaletteColorLookupTableData"],"0x1204":["OW","1","AlphaPaletteColorLookupTableData"],"0x1211":["OW","1","LargeRedPaletteColorLookupTableData"],"0x1212":["OW","1","LargeGreenPaletteColorLookupTableData"],"0x1213":["OW","1","LargeBluePaletteColorLookupTableData"],"0x1214":["UI","1","LargePaletteColorLookupTableUID"],"0x1221":["OW","1","SegmentedRedPaletteColorLookupTableData"],"0x1222":["OW","1","SegmentedGreenPaletteColorLookupTableData"],"0x1223":["OW","1","SegmentedBluePaletteColorLookupTableData"],"0x1300":["CS","1","BreastImplantPresent"],"0x1350":["CS","1","PartialView"],"0x1351":["ST","1","PartialViewDescription"],"0x1352":["SQ","1","PartialViewCodeSequence"],"0x135A":["CS","1","SpatialLocationsPreserved"],"0x1401":["SQ","1","DataFrameAssignmentSequence"],"0x1402":["CS","1","DataPathAssignment"],"0x1403":["US","1","BitsMappedToColorLookupTable"],"0x1404":["SQ","1","BlendingLUT1Sequence"],"0x1405":["CS","1","BlendingLUT1TransferFunction"],"0x1406":["FD","1","BlendingWeightConstant"],"0x1407":["US","3","BlendingLookupTableDescriptor"],"0x1408":["OW","1","BlendingLookupTableData"],"0x140B":["SQ","1","EnhancedPaletteColorLookupTableSequence"],"0x140C":["SQ","1","BlendingLUT2Sequence"],"0x140D":["CS","1","BlendingLUT2TransferFunction"],"0x140E":["CS","1","DataPathID"],"0x140F":["CS","1","RGBLUTTransferFunction"],"0x1410":["CS","1","AlphaLUTTransferFunction"],"0x2000":["OB","1","ICCProfile"],"0x2110":["CS","1","LossyImageCompression"],"0x2112":["DS","1-n","LossyImageCompressionRatio"],"0x2114":["CS","1-n","LossyImageCompressionMethod"],"0x3000":["SQ","1","ModalityLUTSequence"],"0x3002":["xs","3","LUTDescriptor"],"0x3003":["LO","1","LUTExplanation"],"0x3004":["LO","1","ModalityLUTType"],"0x3006":["US or OW","1-n or 1","LUTData"],"0x3010":["SQ","1","VOILUTSequence"],"0x3110":["SQ","1","SoftcopyVOILUTSequence"],"0x4000":["LT","1","ImagePresentationComments"],"0x5000":["SQ","1","BiPlaneAcquisitionSequence"],"0x6010":["US","1","RepresentativeFrameNumber"],"0x6020":["US","1-n","FrameNumbersOfInterest"],"0x6022":["LO","1-n","FrameOfInterestDescription"],"0x6023":["CS","1-n","FrameOfInterestType"],"0x6030":["US","1-n","MaskPointers"],"0x6040":["US","1-n","RWavePointer"],"0x6100":["SQ","1","MaskSubtractionSequence"],"0x6101":["CS","1","MaskOperation"],"0x6102":["US","2-2n","ApplicableFrameRange"],"0x6110":["US","1-n","MaskFrameNumbers"],"0x6112":["US","1","ContrastFrameAveraging"],"0x6114":["FL","2","MaskSubPixelShift"],"0x6120":["SS","1","TIDOffset"],"0x6190":["ST","1","MaskOperationExplanation"],"0x7000":["SQ","1","EquipmentAdministratorSequence"],"0x7001":["US","1","NumberOfDisplaySubsystems"],"0x7002":["US","1","CurrentConfigurationID"],"0x7003":["US","1","DisplaySubsystemID"],"0x7004":["SH","1","DisplaySubsystemName"],"0x7005":["LO","1","DisplaySubsystemDescription"],"0x7006":["CS","1","SystemStatus"],"0x7007":["LO","1","SystemStatusComment"],"0x7008":["SQ","1","TargetLuminanceCharacteristicsSequence"],"0x7009":["US","1","LuminanceCharacteristicsID"],"0x700A":["SQ","1","DisplaySubsystemConfigurationSequence"],"0x700B":["US","1","ConfigurationID"],"0x700C":["SH","1","ConfigurationName"],"0x700D":["LO","1","ConfigurationDescription"],"0x700E":["US","1","ReferencedTargetLuminanceCharacteristicsID"],"0x700F":["SQ","1","QAResultsSequence"],"0x7010":["SQ","1","DisplaySubsystemQAResultsSequence"],"0x7011":["SQ","1","ConfigurationQAResultsSequence"],"0x7012":["SQ","1","MeasurementEquipmentSequence"],"0x7013":["CS","1-n","MeasurementFunctions"],"0x7014":["CS","1","MeasurementEquipmentType"],"0x7015":["SQ","1","VisualEvaluationResultSequence"],"0x7016":["SQ","1","DisplayCalibrationResultSequence"],"0x7017":["US","1","DDLValue"],"0x7018":["FL","2","CIExyWhitePoint"],"0x7019":["CS","1","DisplayFunctionType"],"0x701A":["FL","1","GammaValue"],"0x701B":["US","1","NumberOfLuminancePoints"],"0x701C":["SQ","1","LuminanceResponseSequence"],"0x701D":["FL","1","TargetMinimumLuminance"],"0x701E":["FL","1","TargetMaximumLuminance"],"0x701F":["FL","1","LuminanceValue"],"0x7020":["LO","1","LuminanceResponseDescription"],"0x7021":["CS","1","WhitePointFlag"],"0x7022":["SQ","1","DisplayDeviceTypeCodeSequence"],"0x7023":["SQ","1","DisplaySubsystemSequence"],"0x7024":["SQ","1","LuminanceResultSequence"],"0x7025":["CS","1","AmbientLightValueSource"],"0x7026":["CS","1-n","MeasuredCharacteristics"],"0x7027":["SQ","1","LuminanceUniformityResultSequence"],"0x7028":["SQ","1","VisualEvaluationTestSequence"],"0x7029":["CS","1","TestResult"],"0x702A":["LO","1","TestResultComment"],"0x702B":["CS","1","TestImageValidation"],"0x702C":["SQ","1","TestPatternCodeSequence"],"0x702D":["SQ","1","MeasurementPatternCodeSequence"],"0x702E":["SQ","1","VisualEvaluationMethodCodeSequence"],"0x7FE0":["UR","1","PixelDataProviderURL"],"0x9001":["UL","1","DataPointRows"],"0x9002":["UL","1","DataPointColumns"],"0x9003":["CS","1","SignalDomainColumns"],"0x9099":["US","1","LargestMonochromePixelValue"],"0x9108":["CS","1","DataRepresentation"],"0x9110":["SQ","1","PixelMeasuresSequence"],"0x9132":["SQ","1","FrameVOILUTSequence"],"0x9145":["SQ","1","PixelValueTransformationSequence"],"0x9235":["CS","1","SignalDomainRows"],"0x9411":["FL","1","DisplayFilterPercentage"],"0x9415":["SQ","1","FramePixelShiftSequence"],"0x9416":["US","1","SubtractionItemID"],"0x9422":["SQ","1","PixelIntensityRelationshipLUTSequence"],"0x9443":["SQ","1","FramePixelDataPropertiesSequence"],"0x9444":["CS","1","GeometricalProperties"],"0x9445":["FL","1","GeometricMaximumDistortion"],"0x9446":["CS","1-n","ImageProcessingApplied"],"0x9454":["CS","1","MaskSelectionMode"],"0x9474":["CS","1","LUTFunction"],"0x9478":["FL","1","MaskVisibilityPercentage"],"0x9501":["SQ","1","PixelShiftSequence"],"0x9502":["SQ","1","RegionPixelShiftSequence"],"0x9503":["SS","2-2n","VerticesOfTheRegion"],"0x9505":["SQ","1","MultiFramePresentationSequence"],"0x9506":["US","2-2n","PixelShiftFrameRange"],"0x9507":["US","2-2n","LUTFrameRange"],"0x9520":["DS","16","ImageToEquipmentMappingMatrix"],"0x9537":["CS","1","EquipmentCoordinateSystemIdentification"]},"0x0032":{"0x0000":["UL","1","GenericGroupLength"],"0x000A":["CS","1","StudyStatusID"],"0x000C":["CS","1","StudyPriorityID"],"0x0012":["LO","1","StudyIDIssuer"],"0x0032":["DA","1","StudyVerifiedDate"],"0x0033":["TM","1","StudyVerifiedTime"],"0x0034":["DA","1","StudyReadDate"],"0x0035":["TM","1","StudyReadTime"],"0x1000":["DA","1","ScheduledStudyStartDate"],"0x1001":["TM","1","ScheduledStudyStartTime"],"0x1010":["DA","1","ScheduledStudyStopDate"],"0x1011":["TM","1","ScheduledStudyStopTime"],"0x1020":["LO","1","ScheduledStudyLocation"],"0x1021":["AE","1-n","ScheduledStudyLocationAETitle"],"0x1030":["LO","1","ReasonForStudy"],"0x1031":["SQ","1","RequestingPhysicianIdentificationSequence"],"0x1032":["PN","1","RequestingPhysician"],"0x1033":["LO","1","RequestingService"],"0x1034":["SQ","1","RequestingServiceCodeSequence"],"0x1040":["DA","1","StudyArrivalDate"],"0x1041":["TM","1","StudyArrivalTime"],"0x1050":["DA","1","StudyCompletionDate"],"0x1051":["TM","1","StudyCompletionTime"],"0x1055":["CS","1","StudyComponentStatusID"],"0x1060":["LO","1","RequestedProcedureDescription"],"0x1064":["SQ","1","RequestedProcedureCodeSequence"],"0x1070":["LO","1","RequestedContrastAgent"],"0x4000":["LT","1","StudyComments"]},"0x0038":{"0x0000":["UL","1","GenericGroupLength"],"0x0004":["SQ","1","ReferencedPatientAliasSequence"],"0x0008":["CS","1","VisitStatusID"],"0x0010":["LO","1","AdmissionID"],"0x0011":["LO","1","IssuerOfAdmissionID"],"0x0014":["SQ","1","IssuerOfAdmissionIDSequence"],"0x0016":["LO","1","RouteOfAdmissions"],"0x001A":["DA","1","ScheduledAdmissionDate"],"0x001B":["TM","1","ScheduledAdmissionTime"],"0x001C":["DA","1","ScheduledDischargeDate"],"0x001D":["TM","1","ScheduledDischargeTime"],"0x001E":["LO","1","ScheduledPatientInstitutionResidence"],"0x0020":["DA","1","AdmittingDate"],"0x0021":["TM","1","AdmittingTime"],"0x0030":["DA","1","DischargeDate"],"0x0032":["TM","1","DischargeTime"],"0x0040":["LO","1","DischargeDiagnosisDescription"],"0x0044":["SQ","1","DischargeDiagnosisCodeSequence"],"0x0050":["LO","1","SpecialNeeds"],"0x0060":["LO","1","ServiceEpisodeID"],"0x0061":["LO","1","IssuerOfServiceEpisodeID"],"0x0062":["LO","1","ServiceEpisodeDescription"],"0x0064":["SQ","1","IssuerOfServiceEpisodeIDSequence"],"0x0100":["SQ","1","PertinentDocumentsSequence"],"0x0101":["SQ","1","PertinentResourcesSequence"],"0x0102":["LO","1","ResourceDescription"],"0x0300":["LO","1","CurrentPatientLocation"],"0x0400":["LO","1","PatientInstitutionResidence"],"0x0500":["LO","1","PatientState"],"0x0502":["SQ","1","PatientClinicalTrialParticipationSequence"],"0x4000":["LT","1","VisitComments"]},"0x003A":{"0x0000":["UL","1","GenericGroupLength"],"0x0004":["CS","1","WaveformOriginality"],"0x0005":["US","1","NumberOfWaveformChannels"],"0x0010":["UL","1","NumberOfWaveformSamples"],"0x001A":["DS","1","SamplingFrequency"],"0x0020":["SH","1","MultiplexGroupLabel"],"0x0200":["SQ","1","ChannelDefinitionSequence"],"0x0202":["IS","1","WaveformChannelNumber"],"0x0203":["SH","1","ChannelLabel"],"0x0205":["CS","1-n","ChannelStatus"],"0x0208":["SQ","1","ChannelSourceSequence"],"0x0209":["SQ","1","ChannelSourceModifiersSequence"],"0x020A":["SQ","1","SourceWaveformSequence"],"0x020C":["LO","1","ChannelDerivationDescription"],"0x0210":["DS","1","ChannelSensitivity"],"0x0211":["SQ","1","ChannelSensitivityUnitsSequence"],"0x0212":["DS","1","ChannelSensitivityCorrectionFactor"],"0x0213":["DS","1","ChannelBaseline"],"0x0214":["DS","1","ChannelTimeSkew"],"0x0215":["DS","1","ChannelSampleSkew"],"0x0218":["DS","1","ChannelOffset"],"0x021A":["US","1","WaveformBitsStored"],"0x0220":["DS","1","FilterLowFrequency"],"0x0221":["DS","1","FilterHighFrequency"],"0x0222":["DS","1","NotchFilterFrequency"],"0x0223":["DS","1","NotchFilterBandwidth"],"0x0230":["FL","1","WaveformDataDisplayScale"],"0x0231":["US","3","WaveformDisplayBackgroundCIELabValue"],"0x0240":["SQ","1","WaveformPresentationGroupSequence"],"0x0241":["US","1","PresentationGroupNumber"],"0x0242":["SQ","1","ChannelDisplaySequence"],"0x0244":["US","3","ChannelRecommendedDisplayCIELabValue"],"0x0245":["FL","1","ChannelPosition"],"0x0246":["CS","1","DisplayShadingFlag"],"0x0247":["FL","1","FractionalChannelDisplayScale"],"0x0248":["FL","1","AbsoluteChannelDisplayScale"],"0x0300":["SQ","1","MultiplexedAudioChannelsDescriptionCodeSequence"],"0x0301":["IS","1","ChannelIdentificationCode"],"0x0302":["CS","1","ChannelMode"]},"0x0040":{"0x0000":["UL","1","GenericGroupLength"],"0x0001":["AE","1-n","ScheduledStationAETitle"],"0x0002":["DA","1","ScheduledProcedureStepStartDate"],"0x0003":["TM","1","ScheduledProcedureStepStartTime"],"0x0004":["DA","1","ScheduledProcedureStepEndDate"],"0x0005":["TM","1","ScheduledProcedureStepEndTime"],"0x0006":["PN","1","ScheduledPerformingPhysicianName"],"0x0007":["LO","1","ScheduledProcedureStepDescription"],"0x0008":["SQ","1","ScheduledProtocolCodeSequence"],"0x0009":["SH","1","ScheduledProcedureStepID"],"0x000A":["SQ","1","StageCodeSequence"],"0x000B":["SQ","1","ScheduledPerformingPhysicianIdentificationSequence"],"0x0010":["SH","1-n","ScheduledStationName"],"0x0011":["SH","1","ScheduledProcedureStepLocation"],"0x0012":["LO","1","PreMedication"],"0x0020":["CS","1","ScheduledProcedureStepStatus"],"0x0026":["SQ","1","OrderPlacerIdentifierSequence"],"0x0027":["SQ","1","OrderFillerIdentifierSequence"],"0x0031":["UT","1","LocalNamespaceEntityID"],"0x0032":["UT","1","UniversalEntityID"],"0x0033":["CS","1","UniversalEntityIDType"],"0x0035":["CS","1","IdentifierTypeCode"],"0x0036":["SQ","1","AssigningFacilitySequence"],"0x0039":["SQ","1","AssigningJurisdictionCodeSequence"],"0x003A":["SQ","1","AssigningAgencyOrDepartmentCodeSequence"],"0x0100":["SQ","1","ScheduledProcedureStepSequence"],"0x0220":["SQ","1","ReferencedNonImageCompositeSOPInstanceSequence"],"0x0241":["AE","1","PerformedStationAETitle"],"0x0242":["SH","1","PerformedStationName"],"0x0243":["SH","1","PerformedLocation"],"0x0244":["DA","1","PerformedProcedureStepStartDate"],"0x0245":["TM","1","PerformedProcedureStepStartTime"],"0x0250":["DA","1","PerformedProcedureStepEndDate"],"0x0251":["TM","1","PerformedProcedureStepEndTime"],"0x0252":["CS","1","PerformedProcedureStepStatus"],"0x0253":["SH","1","PerformedProcedureStepID"],"0x0254":["LO","1","PerformedProcedureStepDescription"],"0x0255":["LO","1","PerformedProcedureTypeDescription"],"0x0260":["SQ","1","PerformedProtocolCodeSequence"],"0x0261":["CS","1","PerformedProtocolType"],"0x0270":["SQ","1","ScheduledStepAttributesSequence"],"0x0275":["SQ","1","RequestAttributesSequence"],"0x0280":["ST","1","CommentsOnThePerformedProcedureStep"],"0x0281":["SQ","1","PerformedProcedureStepDiscontinuationReasonCodeSequence"],"0x0293":["SQ","1","QuantitySequence"],"0x0294":["DS","1","Quantity"],"0x0295":["SQ","1","MeasuringUnitsSequence"],"0x0296":["SQ","1","BillingItemSequence"],"0x0300":["US","1","TotalTimeOfFluoroscopy"],"0x0301":["US","1","TotalNumberOfExposures"],"0x0302":["US","1","EntranceDose"],"0x0303":["US","1-2","ExposedArea"],"0x0306":["DS","1","DistanceSourceToEntrance"],"0x0307":["DS","1","DistanceSourceToSupport"],"0x030E":["SQ","1","ExposureDoseSequence"],"0x0310":["ST","1","CommentsOnRadiationDose"],"0x0312":["DS","1","XRayOutput"],"0x0314":["DS","1","HalfValueLayer"],"0x0316":["DS","1","OrganDose"],"0x0318":["CS","1","OrganExposed"],"0x0320":["SQ","1","BillingProcedureStepSequence"],"0x0321":["SQ","1","FilmConsumptionSequence"],"0x0324":["SQ","1","BillingSuppliesAndDevicesSequence"],"0x0330":["SQ","1","ReferencedProcedureStepSequence"],"0x0340":["SQ","1","PerformedSeriesSequence"],"0x0400":["LT","1","CommentsOnTheScheduledProcedureStep"],"0x0440":["SQ","1","ProtocolContextSequence"],"0x0441":["SQ","1","ContentItemModifierSequence"],"0x0500":["SQ","1","ScheduledSpecimenSequence"],"0x050A":["LO","1","SpecimenAccessionNumber"],"0x0512":["LO","1","ContainerIdentifier"],"0x0513":["SQ","1","IssuerOfTheContainerIdentifierSequence"],"0x0515":["SQ","1","AlternateContainerIdentifierSequence"],"0x0518":["SQ","1","ContainerTypeCodeSequence"],"0x051A":["LO","1","ContainerDescription"],"0x0520":["SQ","1","ContainerComponentSequence"],"0x0550":["SQ","1","SpecimenSequence"],"0x0551":["LO","1","SpecimenIdentifier"],"0x0552":["SQ","1","SpecimenDescriptionSequenceTrial"],"0x0553":["ST","1","SpecimenDescriptionTrial"],"0x0554":["UI","1","SpecimenUID"],"0x0555":["SQ","1","AcquisitionContextSequence"],"0x0556":["ST","1","AcquisitionContextDescription"],"0x059A":["SQ","1","SpecimenTypeCodeSequence"],"0x0560":["SQ","1","SpecimenDescriptionSequence"],"0x0562":["SQ","1","IssuerOfTheSpecimenIdentifierSequence"],"0x0600":["LO","1","SpecimenShortDescription"],"0x0602":["UT","1","SpecimenDetailedDescription"],"0x0610":["SQ","1","SpecimenPreparationSequence"],"0x0612":["SQ","1","SpecimenPreparationStepContentItemSequence"],"0x0620":["SQ","1","SpecimenLocalizationContentItemSequence"],"0x06FA":["LO","1","SlideIdentifier"],"0x071A":["SQ","1","ImageCenterPointCoordinatesSequence"],"0x072A":["DS","1","XOffsetInSlideCoordinateSystem"],"0x073A":["DS","1","YOffsetInSlideCoordinateSystem"],"0x074A":["DS","1","ZOffsetInSlideCoordinateSystem"],"0x08D8":["SQ","1","PixelSpacingSequence"],"0x08DA":["SQ","1","CoordinateSystemAxisCodeSequence"],"0x08EA":["SQ","1","MeasurementUnitsCodeSequence"],"0x09F8":["SQ","1","VitalStainCodeSequenceTrial"],"0x1001":["SH","1","RequestedProcedureID"],"0x1002":["LO","1","ReasonForTheRequestedProcedure"],"0x1003":["SH","1","RequestedProcedurePriority"],"0x1004":["LO","1","PatientTransportArrangements"],"0x1005":["LO","1","RequestedProcedureLocation"],"0x1006":["SH","1","PlacerOrderNumberProcedure"],"0x1007":["SH","1","FillerOrderNumberProcedure"],"0x1008":["LO","1","ConfidentialityCode"],"0x1009":["SH","1","ReportingPriority"],"0x100A":["SQ","1","ReasonForRequestedProcedureCodeSequence"],"0x1010":["PN","1-n","NamesOfIntendedRecipientsOfResults"],"0x1011":["SQ","1","IntendedRecipientsOfResultsIdentificationSequence"],"0x1012":["SQ","1","ReasonForPerformedProcedureCodeSequence"],"0x1060":["LO","1","RequestedProcedureDescriptionTrial"],"0x1101":["SQ","1","PersonIdentificationCodeSequence"],"0x1102":["ST","1","PersonAddress"],"0x1103":["LO","1-n","PersonTelephoneNumbers"],"0x1104":["LT","1","PersonTelecomInformation"],"0x1400":["LT","1","RequestedProcedureComments"],"0x2001":["LO","1","ReasonForTheImagingServiceRequest"],"0x2004":["DA","1","IssueDateOfImagingServiceRequest"],"0x2005":["TM","1","IssueTimeOfImagingServiceRequest"],"0x2006":["SH","1","PlacerOrderNumberImagingServiceRequestRetired"],"0x2007":["SH","1","FillerOrderNumberImagingServiceRequestRetired"],"0x2008":["PN","1","OrderEnteredBy"],"0x2009":["SH","1","OrderEntererLocation"],"0x2010":["SH","1","OrderCallbackPhoneNumber"],"0x2011":["LT","1","OrderCallbackTelecomInformation"],"0x2016":["LO","1","PlacerOrderNumberImagingServiceRequest"],"0x2017":["LO","1","FillerOrderNumberImagingServiceRequest"],"0x2400":["LT","1","ImagingServiceRequestComments"],"0x3001":["LO","1","ConfidentialityConstraintOnPatientDataDescription"],"0x4001":["CS","1","GeneralPurposeScheduledProcedureStepStatus"],"0x4002":["CS","1","GeneralPurposePerformedProcedureStepStatus"],"0x4003":["CS","1","GeneralPurposeScheduledProcedureStepPriority"],"0x4004":["SQ","1","ScheduledProcessingApplicationsCodeSequence"],"0x4005":["DT","1","ScheduledProcedureStepStartDateTime"],"0x4006":["CS","1","MultipleCopiesFlag"],"0x4007":["SQ","1","PerformedProcessingApplicationsCodeSequence"],"0x4009":["SQ","1","HumanPerformerCodeSequence"],"0x4010":["DT","1","ScheduledProcedureStepModificationDateTime"],"0x4011":["DT","1","ExpectedCompletionDateTime"],"0x4015":["SQ","1","ResultingGeneralPurposePerformedProcedureStepsSequence"],"0x4016":["SQ","1","ReferencedGeneralPurposeScheduledProcedureStepSequence"],"0x4018":["SQ","1","ScheduledWorkitemCodeSequence"],"0x4019":["SQ","1","PerformedWorkitemCodeSequence"],"0x4020":["CS","1","InputAvailabilityFlag"],"0x4021":["SQ","1","InputInformationSequence"],"0x4022":["SQ","1","RelevantInformationSequence"],"0x4023":["UI","1","ReferencedGeneralPurposeScheduledProcedureStepTransactionUID"],"0x4025":["SQ","1","ScheduledStationNameCodeSequence"],"0x4026":["SQ","1","ScheduledStationClassCodeSequence"],"0x4027":["SQ","1","ScheduledStationGeographicLocationCodeSequence"],"0x4028":["SQ","1","PerformedStationNameCodeSequence"],"0x4029":["SQ","1","PerformedStationClassCodeSequence"],"0x4030":["SQ","1","PerformedStationGeographicLocationCodeSequence"],"0x4031":["SQ","1","RequestedSubsequentWorkitemCodeSequence"],"0x4032":["SQ","1","NonDICOMOutputCodeSequence"],"0x4033":["SQ","1","OutputInformationSequence"],"0x4034":["SQ","1","ScheduledHumanPerformersSequence"],"0x4035":["SQ","1","ActualHumanPerformersSequence"],"0x4036":["LO","1","HumanPerformerOrganization"],"0x4037":["PN","1","HumanPerformerName"],"0x4040":["CS","1","RawDataHandling"],"0x4041":["CS","1","InputReadinessState"],"0x4050":["DT","1","PerformedProcedureStepStartDateTime"],"0x4051":["DT","1","PerformedProcedureStepEndDateTime"],"0x4052":["DT","1","ProcedureStepCancellationDateTime"],"0x8302":["DS","1","EntranceDoseInmGy"],"0x9092":["SQ","1","ParametricMapFrameTypeSequence"],"0x9094":["SQ","1","ReferencedImageRealWorldValueMappingSequence"],"0x9096":["SQ","1","RealWorldValueMappingSequence"],"0x9098":["SQ","1","PixelValueMappingCodeSequence"],"0x9210":["SH","1","LUTLabel"],"0x9211":["xs","1","RealWorldValueLastValueMapped"],"0x9212":["FD","1-n","RealWorldValueLUTData"],"0x9216":["xs","1","RealWorldValueFirstValueMapped"],"0x9220":["SQ","1","QuantityDefinitionSequence"],"0x9224":["FD","1","RealWorldValueIntercept"],"0x9225":["FD","1","RealWorldValueSlope"],"0xA007":["CS","1","FindingsFlagTrial"],"0xA010":["CS","1","RelationshipType"],"0xA020":["SQ","1","FindingsSequenceTrial"],"0xA021":["UI","1","FindingsGroupUIDTrial"],"0xA022":["UI","1","ReferencedFindingsGroupUIDTrial"],"0xA023":["DA","1","FindingsGroupRecordingDateTrial"],"0xA024":["TM","1","FindingsGroupRecordingTimeTrial"],"0xA026":["SQ","1","FindingsSourceCategoryCodeSequenceTrial"],"0xA027":["LO","1","VerifyingOrganization"],"0xA028":["SQ","1","DocumentingOrganizationIdentifierCodeSequenceTrial"],"0xA030":["DT","1","VerificationDateTime"],"0xA032":["DT","1","ObservationDateTime"],"0xA040":["CS","1","ValueType"],"0xA043":["SQ","1","ConceptNameCodeSequence"],"0xA047":["LO","1","MeasurementPrecisionDescriptionTrial"],"0xA050":["CS","1","ContinuityOfContent"],"0xA057":["CS","1-n","UrgencyOrPriorityAlertsTrial"],"0xA060":["LO","1","SequencingIndicatorTrial"],"0xA066":["SQ","1","DocumentIdentifierCodeSequenceTrial"],"0xA067":["PN","1","DocumentAuthorTrial"],"0xA068":["SQ","1","DocumentAuthorIdentifierCodeSequenceTrial"],"0xA070":["SQ","1","IdentifierCodeSequenceTrial"],"0xA073":["SQ","1","VerifyingObserverSequence"],"0xA074":["OB","1","ObjectBinaryIdentifierTrial"],"0xA075":["PN","1","VerifyingObserverName"],"0xA076":["SQ","1","DocumentingObserverIdentifierCodeSequenceTrial"],"0xA078":["SQ","1","AuthorObserverSequence"],"0xA07A":["SQ","1","ParticipantSequence"],"0xA07C":["SQ","1","CustodialOrganizationSequence"],"0xA080":["CS","1","ParticipationType"],"0xA082":["DT","1","ParticipationDateTime"],"0xA084":["CS","1","ObserverType"],"0xA085":["SQ","1","ProcedureIdentifierCodeSequenceTrial"],"0xA088":["SQ","1","VerifyingObserverIdentificationCodeSequence"],"0xA089":["OB","1","ObjectDirectoryBinaryIdentifierTrial"],"0xA090":["SQ","1","EquivalentCDADocumentSequence"],"0xA0B0":["US","2-2n","ReferencedWaveformChannels"],"0xA110":["DA","1","DateOfDocumentOrVerbalTransactionTrial"],"0xA112":["TM","1","TimeOfDocumentCreationOrVerbalTransactionTrial"],"0xA120":["DT","1","DateTime"],"0xA121":["DA","1","Date"],"0xA122":["TM","1","Time"],"0xA123":["PN","1","PersonName"],"0xA124":["UI","1","UID"],"0xA125":["CS","2","ReportStatusIDTrial"],"0xA130":["CS","1","TemporalRangeType"],"0xA132":["UL","1-n","ReferencedSamplePositions"],"0xA136":["US","1-n","ReferencedFrameNumbers"],"0xA138":["DS","1-n","ReferencedTimeOffsets"],"0xA13A":["DT","1-n","ReferencedDateTime"],"0xA160":["UT","1","TextValue"],"0xA161":["FD","1-n","FloatingPointValue"],"0xA162":["SL","1-n","RationalNumeratorValue"],"0xA163":["UL","1-n","RationalDenominatorValue"],"0xA167":["SQ","1","ObservationCategoryCodeSequenceTrial"],"0xA168":["SQ","1","ConceptCodeSequence"],"0xA16A":["ST","1","BibliographicCitationTrial"],"0xA170":["SQ","1","PurposeOfReferenceCodeSequence"],"0xA171":["UI","1","ObservationUID"],"0xA172":["UI","1","ReferencedObservationUIDTrial"],"0xA173":["CS","1","ReferencedObservationClassTrial"],"0xA174":["CS","1","ReferencedObjectObservationClassTrial"],"0xA180":["US","1","AnnotationGroupNumber"],"0xA192":["DA","1","ObservationDateTrial"],"0xA193":["TM","1","ObservationTimeTrial"],"0xA194":["CS","1","MeasurementAutomationTrial"],"0xA195":["SQ","1","ModifierCodeSequence"],"0xA224":["ST","1","IdentificationDescriptionTrial"],"0xA290":["CS","1","CoordinatesSetGeometricTypeTrial"],"0xA296":["SQ","1","AlgorithmCodeSequenceTrial"],"0xA297":["ST","1","AlgorithmDescriptionTrial"],"0xA29A":["SL","2-2n","PixelCoordinatesSetTrial"],"0xA300":["SQ","1","MeasuredValueSequence"],"0xA301":["SQ","1","NumericValueQualifierCodeSequence"],"0xA307":["PN","1","CurrentObserverTrial"],"0xA30A":["DS","1-n","NumericValue"],"0xA313":["SQ","1","ReferencedAccessionSequenceTrial"],"0xA33A":["ST","1","ReportStatusCommentTrial"],"0xA340":["SQ","1","ProcedureContextSequenceTrial"],"0xA352":["PN","1","VerbalSourceTrial"],"0xA353":["ST","1","AddressTrial"],"0xA354":["LO","1","TelephoneNumberTrial"],"0xA358":["SQ","1","VerbalSourceIdentifierCodeSequenceTrial"],"0xA360":["SQ","1","PredecessorDocumentsSequence"],"0xA370":["SQ","1","ReferencedRequestSequence"],"0xA372":["SQ","1","PerformedProcedureCodeSequence"],"0xA375":["SQ","1","CurrentRequestedProcedureEvidenceSequence"],"0xA380":["SQ","1","ReportDetailSequenceTrial"],"0xA385":["SQ","1","PertinentOtherEvidenceSequence"],"0xA390":["SQ","1","HL7StructuredDocumentReferenceSequence"],"0xA402":["UI","1","ObservationSubjectUIDTrial"],"0xA403":["CS","1","ObservationSubjectClassTrial"],"0xA404":["SQ","1","ObservationSubjectTypeCodeSequenceTrial"],"0xA491":["CS","1","CompletionFlag"],"0xA492":["LO","1","CompletionFlagDescription"],"0xA493":["CS","1","VerificationFlag"],"0xA494":["CS","1","ArchiveRequested"],"0xA496":["CS","1","PreliminaryFlag"],"0xA504":["SQ","1","ContentTemplateSequence"],"0xA525":["SQ","1","IdenticalDocumentsSequence"],"0xA600":["CS","1","ObservationSubjectContextFlagTrial"],"0xA601":["CS","1","ObserverContextFlagTrial"],"0xA603":["CS","1","ProcedureContextFlagTrial"],"0xA730":["SQ","1","ContentSequence"],"0xA731":["SQ","1","RelationshipSequenceTrial"],"0xA732":["SQ","1","RelationshipTypeCodeSequenceTrial"],"0xA744":["SQ","1","LanguageCodeSequenceTrial"],"0xA992":["ST","1","UniformResourceLocatorTrial"],"0xB020":["SQ","1","WaveformAnnotationSequence"],"0xDB00":["CS","1","TemplateIdentifier"],"0xDB06":["DT","1","TemplateVersion"],"0xDB07":["DT","1","TemplateLocalVersion"],"0xDB0B":["CS","1","TemplateExtensionFlag"],"0xDB0C":["UI","1","TemplateExtensionOrganizationUID"],"0xDB0D":["UI","1","TemplateExtensionCreatorUID"],"0xDB73":["UL","1-n","ReferencedContentItemIdentifier"],"0xE001":["ST","1","HL7InstanceIdentifier"],"0xE004":["DT","1","HL7DocumentEffectiveTime"],"0xE006":["SQ","1","HL7DocumentTypeCodeSequence"],"0xE008":["SQ","1","DocumentClassCodeSequence"],"0xE010":["UR","1","RetrieveURI"],"0xE011":["UI","1","RetrieveLocationUID"],"0xE020":["CS","1","TypeOfInstances"],"0xE021":["SQ","1","DICOMRetrievalSequence"],"0xE022":["SQ","1","DICOMMediaRetrievalSequence"],"0xE023":["SQ","1","WADORetrievalSequence"],"0xE024":["SQ","1","XDSRetrievalSequence"],"0xE025":["SQ","1","WADORSRetrievalSequence"],"0xE030":["UI","1","RepositoryUniqueID"],"0xE031":["UI","1","HomeCommunityID"]},"0x0042":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["ST","1","DocumentTitle"],"0x0011":["OB","1","EncapsulatedDocument"],"0x0012":["LO","1","MIMETypeOfEncapsulatedDocument"],"0x0013":["SQ","1","SourceInstanceSequence"],"0x0014":["LO","1-n","ListOfMIMETypes"]},"0x0044":{"0x0000":["UL","1","GenericGroupLength"],"0x0001":["ST","1","ProductPackageIdentifier"],"0x0002":["CS","1","SubstanceAdministrationApproval"],"0x0003":["LT","1","ApprovalStatusFurtherDescription"],"0x0004":["DT","1","ApprovalStatusDateTime"],"0x0007":["SQ","1","ProductTypeCodeSequence"],"0x0008":["LO","1-n","ProductName"],"0x0009":["LT","1","ProductDescription"],"0x000A":["LO","1","ProductLotIdentifier"],"0x000B":["DT","1","ProductExpirationDateTime"],"0x0010":["DT","1","SubstanceAdministrationDateTime"],"0x0011":["LO","1","SubstanceAdministrationNotes"],"0x0012":["LO","1","SubstanceAdministrationDeviceID"],"0x0013":["SQ","1","ProductParameterSequence"],"0x0019":["SQ","1","SubstanceAdministrationParameterSequence"]},"0x0046":{"0x0000":["UL","1","GenericGroupLength"],"0x0012":["LO","1","LensDescription"],"0x0014":["SQ","1","RightLensSequence"],"0x0015":["SQ","1","LeftLensSequence"],"0x0016":["SQ","1","UnspecifiedLateralityLensSequence"],"0x0018":["SQ","1","CylinderSequence"],"0x0028":["SQ","1","PrismSequence"],"0x0030":["FD","1","HorizontalPrismPower"],"0x0032":["CS","1","HorizontalPrismBase"],"0x0034":["FD","1","VerticalPrismPower"],"0x0036":["CS","1","VerticalPrismBase"],"0x0038":["CS","1","LensSegmentType"],"0x0040":["FD","1","OpticalTransmittance"],"0x0042":["FD","1","ChannelWidth"],"0x0044":["FD","1","PupilSize"],"0x0046":["FD","1","CornealSize"],"0x0050":["SQ","1","AutorefractionRightEyeSequence"],"0x0052":["SQ","1","AutorefractionLeftEyeSequence"],"0x0060":["FD","1","DistancePupillaryDistance"],"0x0062":["FD","1","NearPupillaryDistance"],"0x0063":["FD","1","IntermediatePupillaryDistance"],"0x0064":["FD","1","OtherPupillaryDistance"],"0x0070":["SQ","1","KeratometryRightEyeSequence"],"0x0071":["SQ","1","KeratometryLeftEyeSequence"],"0x0074":["SQ","1","SteepKeratometricAxisSequence"],"0x0075":["FD","1","RadiusOfCurvature"],"0x0076":["FD","1","KeratometricPower"],"0x0077":["FD","1","KeratometricAxis"],"0x0080":["SQ","1","FlatKeratometricAxisSequence"],"0x0092":["CS","1","BackgroundColor"],"0x0094":["CS","1","Optotype"],"0x0095":["CS","1","OptotypePresentation"],"0x0097":["SQ","1","SubjectiveRefractionRightEyeSequence"],"0x0098":["SQ","1","SubjectiveRefractionLeftEyeSequence"],"0x0100":["SQ","1","AddNearSequence"],"0x0101":["SQ","1","AddIntermediateSequence"],"0x0102":["SQ","1","AddOtherSequence"],"0x0104":["FD","1","AddPower"],"0x0106":["FD","1","ViewingDistance"],"0x0121":["SQ","1","VisualAcuityTypeCodeSequence"],"0x0122":["SQ","1","VisualAcuityRightEyeSequence"],"0x0123":["SQ","1","VisualAcuityLeftEyeSequence"],"0x0124":["SQ","1","VisualAcuityBothEyesOpenSequence"],"0x0125":["CS","1","ViewingDistanceType"],"0x0135":["SS","2","VisualAcuityModifiers"],"0x0137":["FD","1","DecimalVisualAcuity"],"0x0139":["LO","1","OptotypeDetailedDefinition"],"0x0145":["SQ","1","ReferencedRefractiveMeasurementsSequence"],"0x0146":["FD","1","SpherePower"],"0x0147":["FD","1","CylinderPower"],"0x0201":["CS","1","CornealTopographySurface"],"0x0202":["FL","2","CornealVertexLocation"],"0x0203":["FL","1","PupilCentroidXCoordinate"],"0x0204":["FL","1","PupilCentroidYCoordinate"],"0x0205":["FL","1","EquivalentPupilRadius"],"0x0207":["SQ","1","CornealTopographyMapTypeCodeSequence"],"0x0208":["IS","2-2n","VerticesOfTheOutlineOfPupil"],"0x0210":["SQ","1","CornealTopographyMappingNormalsSequence"],"0x0211":["SQ","1","MaximumCornealCurvatureSequence"],"0x0212":["FL","1","MaximumCornealCurvature"],"0x0213":["FL","2","MaximumCornealCurvatureLocation"],"0x0215":["SQ","1","MinimumKeratometricSequence"],"0x0218":["SQ","1","SimulatedKeratometricCylinderSequence"],"0x0220":["FL","1","AverageCornealPower"],"0x0224":["FL","1","CornealISValue"],"0x0227":["FL","1","AnalyzedArea"],"0x0230":["FL","1","SurfaceRegularityIndex"],"0x0232":["FL","1","SurfaceAsymmetryIndex"],"0x0234":["FL","1","CornealEccentricityIndex"],"0x0236":["FL","1","KeratoconusPredictionIndex"],"0x0238":["FL","1","DecimalPotentialVisualAcuity"],"0x0242":["CS","1","CornealTopographyMapQualityEvaluation"],"0x0244":["SQ","1","SourceImageCornealProcessedDataSequence"],"0x0247":["FL","3","CornealPointLocation"],"0x0248":["CS","1","CornealPointEstimated"],"0x0249":["FL","1","AxialPower"],"0x0250":["FL","1","TangentialPower"],"0x0251":["FL","1","RefractivePower"],"0x0252":["FL","1","RelativeElevation"],"0x0253":["FL","1","CornealWavefront"]},"0x0048":{"0x0000":["UL","1","GenericGroupLength"],"0x0001":["FL","1","ImagedVolumeWidth"],"0x0002":["FL","1","ImagedVolumeHeight"],"0x0003":["FL","1","ImagedVolumeDepth"],"0x0006":["UL","1","TotalPixelMatrixColumns"],"0x0007":["UL","1","TotalPixelMatrixRows"],"0x0008":["SQ","1","TotalPixelMatrixOriginSequence"],"0x0010":["CS","1","SpecimenLabelInImage"],"0x0011":["CS","1","FocusMethod"],"0x0012":["CS","1","ExtendedDepthOfField"],"0x0013":["US","1","NumberOfFocalPlanes"],"0x0014":["FL","1","DistanceBetweenFocalPlanes"],"0x0015":["US","3","RecommendedAbsentPixelCIELabValue"],"0x0100":["SQ","1","IlluminatorTypeCodeSequence"],"0x0102":["DS","6","ImageOrientationSlide"],"0x0105":["SQ","1","OpticalPathSequence"],"0x0106":["SH","1","OpticalPathIdentifier"],"0x0107":["ST","1","OpticalPathDescription"],"0x0108":["SQ","1","IlluminationColorCodeSequence"],"0x0110":["SQ","1","SpecimenReferenceSequence"],"0x0111":["DS","1","CondenserLensPower"],"0x0112":["DS","1","ObjectiveLensPower"],"0x0113":["DS","1","ObjectiveLensNumericalAperture"],"0x0120":["SQ","1","PaletteColorLookupTableSequence"],"0x0200":["SQ","1","ReferencedImageNavigationSequence"],"0x0201":["US","2","TopLeftHandCornerOfLocalizerArea"],"0x0202":["US","2","BottomRightHandCornerOfLocalizerArea"],"0x0207":["SQ","1","OpticalPathIdentificationSequence"],"0x021A":["SQ","1","PlanePositionSlideSequence"],"0x021E":["SL","1","ColumnPositionInTotalImagePixelMatrix"],"0x021F":["SL","1","RowPositionInTotalImagePixelMatrix"],"0x0301":["CS","1","PixelOriginInterpretation"]},"0x0050":{"0x0000":["UL","1","GenericGroupLength"],"0x0004":["CS","1","CalibrationImage"],"0x0010":["SQ","1","DeviceSequence"],"0x0012":["SQ","1","ContainerComponentTypeCodeSequence"],"0x0013":["FD","1","ContainerComponentThickness"],"0x0014":["DS","1","DeviceLength"],"0x0015":["FD","1","ContainerComponentWidth"],"0x0016":["DS","1","DeviceDiameter"],"0x0017":["CS","1","DeviceDiameterUnits"],"0x0018":["DS","1","DeviceVolume"],"0x0019":["DS","1","InterMarkerDistance"],"0x001A":["CS","1","ContainerComponentMaterial"],"0x001B":["LO","1","ContainerComponentID"],"0x001C":["FD","1","ContainerComponentLength"],"0x001D":["FD","1","ContainerComponentDiameter"],"0x001E":["LO","1","ContainerComponentDescription"],"0x0020":["LO","1","DeviceDescription"]},"0x0052":{"0x0000":["UL","1","GenericGroupLength"],"0x0001":["FL","1","ContrastBolusIngredientPercentByVolume"],"0x0002":["FD","1","OCTFocalDistance"],"0x0003":["FD","1","BeamSpotSize"],"0x0004":["FD","1","EffectiveRefractiveIndex"],"0x0006":["CS","1","OCTAcquisitionDomain"],"0x0007":["FD","1","OCTOpticalCenterWavelength"],"0x0008":["FD","1","AxialResolution"],"0x0009":["FD","1","RangingDepth"],"0x0011":["FD","1","ALineRate"],"0x0012":["US","1","ALinesPerFrame"],"0x0013":["FD","1","CatheterRotationalRate"],"0x0014":["FD","1","ALinePixelSpacing"],"0x0016":["SQ","1","ModeOfPercutaneousAccessSequence"],"0x0025":["SQ","1","IntravascularOCTFrameTypeSequence"],"0x0026":["CS","1","OCTZOffsetApplied"],"0x0027":["SQ","1","IntravascularFrameContentSequence"],"0x0028":["FD","1","IntravascularLongitudinalDistance"],"0x0029":["SQ","1","IntravascularOCTFrameContentSequence"],"0x0030":["SS","1","OCTZOffsetCorrection"],"0x0031":["CS","1","CatheterDirectionOfRotation"],"0x0033":["FD","1","SeamLineLocation"],"0x0034":["FD","1","FirstALineLocation"],"0x0036":["US","1","SeamLineIndex"],"0x0038":["US","1","NumberOfPaddedALines"],"0x0039":["CS","1","InterpolationType"],"0x003A":["CS","1","RefractiveIndexApplied"]},"0x0054":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["US","1-n","EnergyWindowVector"],"0x0011":["US","1","NumberOfEnergyWindows"],"0x0012":["SQ","1","EnergyWindowInformationSequence"],"0x0013":["SQ","1","EnergyWindowRangeSequence"],"0x0014":["DS","1","EnergyWindowLowerLimit"],"0x0015":["DS","1","EnergyWindowUpperLimit"],"0x0016":["SQ","1","RadiopharmaceuticalInformationSequence"],"0x0017":["IS","1","ResidualSyringeCounts"],"0x0018":["SH","1","EnergyWindowName"],"0x0020":["US","1-n","DetectorVector"],"0x0021":["US","1","NumberOfDetectors"],"0x0022":["SQ","1","DetectorInformationSequence"],"0x0030":["US","1-n","PhaseVector"],"0x0031":["US","1","NumberOfPhases"],"0x0032":["SQ","1","PhaseInformationSequence"],"0x0033":["US","1","NumberOfFramesInPhase"],"0x0036":["IS","1","PhaseDelay"],"0x0038":["IS","1","PauseBetweenFrames"],"0x0039":["CS","1","PhaseDescription"],"0x0050":["US","1-n","RotationVector"],"0x0051":["US","1","NumberOfRotations"],"0x0052":["SQ","1","RotationInformationSequence"],"0x0053":["US","1","NumberOfFramesInRotation"],"0x0060":["US","1-n","RRIntervalVector"],"0x0061":["US","1","NumberOfRRIntervals"],"0x0062":["SQ","1","GatedInformationSequence"],"0x0063":["SQ","1","DataInformationSequence"],"0x0070":["US","1-n","TimeSlotVector"],"0x0071":["US","1","NumberOfTimeSlots"],"0x0072":["SQ","1","TimeSlotInformationSequence"],"0x0073":["DS","1","TimeSlotTime"],"0x0080":["US","1-n","SliceVector"],"0x0081":["US","1","NumberOfSlices"],"0x0090":["US","1-n","AngularViewVector"],"0x0100":["US","1-n","TimeSliceVector"],"0x0101":["US","1","NumberOfTimeSlices"],"0x0200":["DS","1","StartAngle"],"0x0202":["CS","1","TypeOfDetectorMotion"],"0x0210":["IS","1-n","TriggerVector"],"0x0211":["US","1","NumberOfTriggersInPhase"],"0x0220":["SQ","1","ViewCodeSequence"],"0x0222":["SQ","1","ViewModifierCodeSequence"],"0x0300":["SQ","1","RadionuclideCodeSequence"],"0x0302":["SQ","1","AdministrationRouteCodeSequence"],"0x0304":["SQ","1","RadiopharmaceuticalCodeSequence"],"0x0306":["SQ","1","CalibrationDataSequence"],"0x0308":["US","1","EnergyWindowNumber"],"0x0400":["SH","1","ImageID"],"0x0410":["SQ","1","PatientOrientationCodeSequence"],"0x0412":["SQ","1","PatientOrientationModifierCodeSequence"],"0x0414":["SQ","1","PatientGantryRelationshipCodeSequence"],"0x0500":["CS","1","SliceProgressionDirection"],"0x0501":["CS","1","ScanProgressionDirection"],"0x1000":["CS","2","SeriesType"],"0x1001":["CS","1","Units"],"0x1002":["CS","1","CountsSource"],"0x1004":["CS","1","ReprojectionMethod"],"0x1006":["CS","1","SUVType"],"0x1100":["CS","1","RandomsCorrectionMethod"],"0x1101":["LO","1","AttenuationCorrectionMethod"],"0x1102":["CS","1","DecayCorrection"],"0x1103":["LO","1","ReconstructionMethod"],"0x1104":["LO","1","DetectorLinesOfResponseUsed"],"0x1105":["LO","1","ScatterCorrectionMethod"],"0x1200":["DS","1","AxialAcceptance"],"0x1201":["IS","2","AxialMash"],"0x1202":["IS","1","TransverseMash"],"0x1203":["DS","2","DetectorElementSize"],"0x1210":["DS","1","CoincidenceWindowWidth"],"0x1220":["CS","1-n","SecondaryCountsType"],"0x1300":["DS","1","FrameReferenceTime"],"0x1310":["IS","1","PrimaryPromptsCountsAccumulated"],"0x1311":["IS","1-n","SecondaryCountsAccumulated"],"0x1320":["DS","1","SliceSensitivityFactor"],"0x1321":["DS","1","DecayFactor"],"0x1322":["DS","1","DoseCalibrationFactor"],"0x1323":["DS","1","ScatterFractionFactor"],"0x1324":["DS","1","DeadTimeFactor"],"0x1330":["US","1","ImageIndex"],"0x1400":["CS","1-n","CountsIncluded"],"0x1401":["CS","1","DeadTimeCorrectionFlag"]},"0x0060":{"0x0000":["UL","1","GenericGroupLength"],"0x3000":["SQ","1","HistogramSequence"],"0x3002":["US","1","HistogramNumberOfBins"],"0x3004":["xs","1","HistogramFirstBinValue"],"0x3006":["xs","1","HistogramLastBinValue"],"0x3008":["US","1","HistogramBinWidth"],"0x3010":["LO","1","HistogramExplanation"],"0x3020":["UL","1-n","HistogramData"]},"0x0062":{"0x0000":["UL","1","GenericGroupLength"],"0x0001":["CS","1","SegmentationType"],"0x0002":["SQ","1","SegmentSequence"],"0x0003":["SQ","1","SegmentedPropertyCategoryCodeSequence"],"0x0004":["US","1","SegmentNumber"],"0x0005":["LO","1","SegmentLabel"],"0x0006":["ST","1","SegmentDescription"],"0x0008":["CS","1","SegmentAlgorithmType"],"0x0009":["LO","1","SegmentAlgorithmName"],"0x000A":["SQ","1","SegmentIdentificationSequence"],"0x000B":["US","1-n","ReferencedSegmentNumber"],"0x000C":["US","1","RecommendedDisplayGrayscaleValue"],"0x000D":["US","3","RecommendedDisplayCIELabValue"],"0x000E":["US","1","MaximumFractionalValue"],"0x000F":["SQ","1","SegmentedPropertyTypeCodeSequence"],"0x0010":["CS","1","SegmentationFractionalType"],"0x0011":["SQ","1","SegmentedPropertyTypeModifierCodeSequence"],"0x0012":["SQ","1","UsedSegmentsSequence"]},"0x0064":{"0x0000":["UL","1","GenericGroupLength"],"0x0002":["SQ","1","DeformableRegistrationSequence"],"0x0003":["UI","1","SourceFrameOfReferenceUID"],"0x0005":["SQ","1","DeformableRegistrationGridSequence"],"0x0007":["UL","3","GridDimensions"],"0x0008":["FD","3","GridResolution"],"0x0009":["OF","1","VectorGridData"],"0x000F":["SQ","1","PreDeformationMatrixRegistrationSequence"],"0x0010":["SQ","1","PostDeformationMatrixRegistrationSequence"]},"0x0066":{"0x0000":["UL","1","GenericGroupLength"],"0x0001":["UL","1","NumberOfSurfaces"],"0x0002":["SQ","1","SurfaceSequence"],"0x0003":["UL","1","SurfaceNumber"],"0x0004":["LT","1","SurfaceComments"],"0x0009":["CS","1","SurfaceProcessing"],"0x000A":["FL","1","SurfaceProcessingRatio"],"0x000B":["LO","1","SurfaceProcessingDescription"],"0x000C":["FL","1","RecommendedPresentationOpacity"],"0x000D":["CS","1","RecommendedPresentationType"],"0x000E":["CS","1","FiniteVolume"],"0x0010":["CS","1","Manifold"],"0x0011":["SQ","1","SurfacePointsSequence"],"0x0012":["SQ","1","SurfacePointsNormalsSequence"],"0x0013":["SQ","1","SurfaceMeshPrimitivesSequence"],"0x0015":["UL","1","NumberOfSurfacePoints"],"0x0016":["OF","1","PointCoordinatesData"],"0x0017":["FL","3","PointPositionAccuracy"],"0x0018":["FL","1","MeanPointDistance"],"0x0019":["FL","1","MaximumPointDistance"],"0x001A":["FL","6","PointsBoundingBoxCoordinates"],"0x001B":["FL","3","AxisOfRotation"],"0x001C":["FL","3","CenterOfRotation"],"0x001E":["UL","1","NumberOfVectors"],"0x001F":["US","1","VectorDimensionality"],"0x0020":["FL","1-n","VectorAccuracy"],"0x0021":["OF","1","VectorCoordinateData"],"0x0023":["OW","1","TrianglePointIndexList"],"0x0024":["OW","1","EdgePointIndexList"],"0x0025":["OW","1","VertexPointIndexList"],"0x0026":["SQ","1","TriangleStripSequence"],"0x0027":["SQ","1","TriangleFanSequence"],"0x0028":["SQ","1","LineSequence"],"0x0029":["OW","1","PrimitivePointIndexList"],"0x002A":["UL","1","SurfaceCount"],"0x002B":["SQ","1","ReferencedSurfaceSequence"],"0x002C":["UL","1","ReferencedSurfaceNumber"],"0x002D":["SQ","1","SegmentSurfaceGenerationAlgorithmIdentificationSequence"],"0x002E":["SQ","1","SegmentSurfaceSourceInstanceSequence"],"0x002F":["SQ","1","AlgorithmFamilyCodeSequence"],"0x0030":["SQ","1","AlgorithmNameCodeSequence"],"0x0031":["LO","1","AlgorithmVersion"],"0x0032":["LT","1","AlgorithmParameters"],"0x0034":["SQ","1","FacetSequence"],"0x0035":["SQ","1","SurfaceProcessingAlgorithmIdentificationSequence"],"0x0036":["LO","1","AlgorithmName"],"0x0037":["FL","1","RecommendedPointRadius"],"0x0038":["FL","1","RecommendedLineThickness"],"0x0040":["UL","1-n","LongPrimitivePointIndexList"],"0x0041":["UL","3-3n","LongTrianglePointIndexList"],"0x0042":["UL","2-2n","LongEdgePointIndexList"],"0x0043":["UL","1-n","LongVertexPointIndexList"]},"0x0068":{"0x0000":["UL","1","GenericGroupLength"],"0x6210":["LO","1","ImplantSize"],"0x6221":["LO","1","ImplantTemplateVersion"],"0x6222":["SQ","1","ReplacedImplantTemplateSequence"],"0x6223":["CS","1","ImplantType"],"0x6224":["SQ","1","DerivationImplantTemplateSequence"],"0x6225":["SQ","1","OriginalImplantTemplateSequence"],"0x6226":["DT","1","EffectiveDateTime"],"0x6230":["SQ","1","ImplantTargetAnatomySequence"],"0x6260":["SQ","1","InformationFromManufacturerSequence"],"0x6265":["SQ","1","NotificationFromManufacturerSequence"],"0x6270":["DT","1","InformationIssueDateTime"],"0x6280":["ST","1","InformationSummary"],"0x62A0":["SQ","1","ImplantRegulatoryDisapprovalCodeSequence"],"0x62A5":["FD","1","OverallTemplateSpatialTolerance"],"0x62C0":["SQ","1","HPGLDocumentSequence"],"0x62D0":["US","1","HPGLDocumentID"],"0x62D5":["LO","1","HPGLDocumentLabel"],"0x62E0":["SQ","1","ViewOrientationCodeSequence"],"0x62F0":["FD","9","ViewOrientationModifier"],"0x62F2":["FD","1","HPGLDocumentScaling"],"0x6300":["OB","1","HPGLDocument"],"0x6310":["US","1","HPGLContourPenNumber"],"0x6320":["SQ","1","HPGLPenSequence"],"0x6330":["US","1","HPGLPenNumber"],"0x6340":["LO","1","HPGLPenLabel"],"0x6345":["ST","1","HPGLPenDescription"],"0x6346":["FD","2","RecommendedRotationPoint"],"0x6347":["FD","4","BoundingRectangle"],"0x6350":["US","1-n","ImplantTemplate3DModelSurfaceNumber"],"0x6360":["SQ","1","SurfaceModelDescriptionSequence"],"0x6380":["LO","1","SurfaceModelLabel"],"0x6390":["FD","1","SurfaceModelScalingFactor"],"0x63A0":["SQ","1","MaterialsCodeSequence"],"0x63A4":["SQ","1","CoatingMaterialsCodeSequence"],"0x63A8":["SQ","1","ImplantTypeCodeSequence"],"0x63AC":["SQ","1","FixationMethodCodeSequence"],"0x63B0":["SQ","1","MatingFeatureSetsSequence"],"0x63C0":["US","1","MatingFeatureSetID"],"0x63D0":["LO","1","MatingFeatureSetLabel"],"0x63E0":["SQ","1","MatingFeatureSequence"],"0x63F0":["US","1","MatingFeatureID"],"0x6400":["SQ","1","MatingFeatureDegreeOfFreedomSequence"],"0x6410":["US","1","DegreeOfFreedomID"],"0x6420":["CS","1","DegreeOfFreedomType"],"0x6430":["SQ","1","TwoDMatingFeatureCoordinatesSequence"],"0x6440":["US","1","ReferencedHPGLDocumentID"],"0x6450":["FD","2","TwoDMatingPoint"],"0x6460":["FD","4","TwoDMatingAxes"],"0x6470":["SQ","1","TwoDDegreeOfFreedomSequence"],"0x6490":["FD","3","ThreeDDegreeOfFreedomAxis"],"0x64A0":["FD","2","RangeOfFreedom"],"0x64C0":["FD","3","ThreeDMatingPoint"],"0x64D0":["FD","9","ThreeDMatingAxes"],"0x64F0":["FD","3","TwoDDegreeOfFreedomAxis"],"0x6500":["SQ","1","PlanningLandmarkPointSequence"],"0x6510":["SQ","1","PlanningLandmarkLineSequence"],"0x6520":["SQ","1","PlanningLandmarkPlaneSequence"],"0x6530":["US","1","PlanningLandmarkID"],"0x6540":["LO","1","PlanningLandmarkDescription"],"0x6545":["SQ","1","PlanningLandmarkIdentificationCodeSequence"],"0x6550":["SQ","1","TwoDPointCoordinatesSequence"],"0x6560":["FD","2","TwoDPointCoordinates"],"0x6590":["FD","3","ThreeDPointCoordinates"],"0x65A0":["SQ","1","TwoDLineCoordinatesSequence"],"0x65B0":["FD","4","TwoDLineCoordinates"],"0x65D0":["FD","6","ThreeDLineCoordinates"],"0x65E0":["SQ","1","TwoDPlaneCoordinatesSequence"],"0x65F0":["FD","4","TwoDPlaneIntersection"],"0x6610":["FD","3","ThreeDPlaneOrigin"],"0x6620":["FD","3","ThreeDPlaneNormal"]},"0x0070":{"0x0000":["UL","1","GenericGroupLength"],"0x0001":["SQ","1","GraphicAnnotationSequence"],"0x0002":["CS","1","GraphicLayer"],"0x0003":["CS","1","BoundingBoxAnnotationUnits"],"0x0004":["CS","1","AnchorPointAnnotationUnits"],"0x0005":["CS","1","GraphicAnnotationUnits"],"0x0006":["ST","1","UnformattedTextValue"],"0x0008":["SQ","1","TextObjectSequence"],"0x0009":["SQ","1","GraphicObjectSequence"],"0x0010":["FL","2","BoundingBoxTopLeftHandCorner"],"0x0011":["FL","2","BoundingBoxBottomRightHandCorner"],"0x0012":["CS","1","BoundingBoxTextHorizontalJustification"],"0x0014":["FL","2","AnchorPoint"],"0x0015":["CS","1","AnchorPointVisibility"],"0x0020":["US","1","GraphicDimensions"],"0x0021":["US","1","NumberOfGraphicPoints"],"0x0022":["FL","2-n","GraphicData"],"0x0023":["CS","1","GraphicType"],"0x0024":["CS","1","GraphicFilled"],"0x0040":["IS","1","ImageRotationRetired"],"0x0041":["CS","1","ImageHorizontalFlip"],"0x0042":["US","1","ImageRotation"],"0x0050":["US","2","DisplayedAreaTopLeftHandCornerTrial"],"0x0051":["US","2","DisplayedAreaBottomRightHandCornerTrial"],"0x0052":["SL","2","DisplayedAreaTopLeftHandCorner"],"0x0053":["SL","2","DisplayedAreaBottomRightHandCorner"],"0x005A":["SQ","1","DisplayedAreaSelectionSequence"],"0x0060":["SQ","1","GraphicLayerSequence"],"0x0062":["IS","1","GraphicLayerOrder"],"0x0066":["US","1","GraphicLayerRecommendedDisplayGrayscaleValue"],"0x0067":["US","3","GraphicLayerRecommendedDisplayRGBValue"],"0x0068":["LO","1","GraphicLayerDescription"],"0x0080":["CS","1","ContentLabel"],"0x0081":["LO","1","ContentDescription"],"0x0082":["DA","1","PresentationCreationDate"],"0x0083":["TM","1","PresentationCreationTime"],"0x0084":["PN","1","ContentCreatorName"],"0x0086":["SQ","1","ContentCreatorIdentificationCodeSequence"],"0x0087":["SQ","1","AlternateContentDescriptionSequence"],"0x0100":["CS","1","PresentationSizeMode"],"0x0101":["DS","2","PresentationPixelSpacing"],"0x0102":["IS","2","PresentationPixelAspectRatio"],"0x0103":["FL","1","PresentationPixelMagnificationRatio"],"0x0207":["LO","1","GraphicGroupLabel"],"0x0208":["ST","1","GraphicGroupDescription"],"0x0209":["SQ","1","CompoundGraphicSequence"],"0x0226":["UL","1","CompoundGraphicInstanceID"],"0x0227":["LO","1","FontName"],"0x0228":["CS","1","FontNameType"],"0x0229":["LO","1","CSSFontName"],"0x0230":["FD","1","RotationAngle"],"0x0231":["SQ","1","TextStyleSequence"],"0x0232":["SQ","1","LineStyleSequence"],"0x0233":["SQ","1","FillStyleSequence"],"0x0234":["SQ","1","GraphicGroupSequence"],"0x0241":["US","3","TextColorCIELabValue"],"0x0242":["CS","1","HorizontalAlignment"],"0x0243":["CS","1","VerticalAlignment"],"0x0244":["CS","1","ShadowStyle"],"0x0245":["FL","1","ShadowOffsetX"],"0x0246":["FL","1","ShadowOffsetY"],"0x0247":["US","3","ShadowColorCIELabValue"],"0x0248":["CS","1","Underlined"],"0x0249":["CS","1","Bold"],"0x0250":["CS","1","Italic"],"0x0251":["US","3","PatternOnColorCIELabValue"],"0x0252":["US","3","PatternOffColorCIELabValue"],"0x0253":["FL","1","LineThickness"],"0x0254":["CS","1","LineDashingStyle"],"0x0255":["UL","1","LinePattern"],"0x0256":["OB","1","FillPattern"],"0x0257":["CS","1","FillMode"],"0x0258":["FL","1","ShadowOpacity"],"0x0261":["FL","1","GapLength"],"0x0262":["FL","1","DiameterOfVisibility"],"0x0273":["FL","2","RotationPoint"],"0x0274":["CS","1","TickAlignment"],"0x0278":["CS","1","ShowTickLabel"],"0x0279":["CS","1","TickLabelAlignment"],"0x0282":["CS","1","CompoundGraphicUnits"],"0x0284":["FL","1","PatternOnOpacity"],"0x0285":["FL","1","PatternOffOpacity"],"0x0287":["SQ","1","MajorTicksSequence"],"0x0288":["FL","1","TickPosition"],"0x0289":["SH","1","TickLabel"],"0x0294":["CS","1","CompoundGraphicType"],"0x0295":["UL","1","GraphicGroupID"],"0x0306":["CS","1","ShapeType"],"0x0308":["SQ","1","RegistrationSequence"],"0x0309":["SQ","1","MatrixRegistrationSequence"],"0x030A":["SQ","1","MatrixSequence"],"0x030C":["CS","1","FrameOfReferenceTransformationMatrixType"],"0x030D":["SQ","1","RegistrationTypeCodeSequence"],"0x030F":["ST","1","FiducialDescription"],"0x0310":["SH","1","FiducialIdentifier"],"0x0311":["SQ","1","FiducialIdentifierCodeSequence"],"0x0312":["FD","1","ContourUncertaintyRadius"],"0x0314":["SQ","1","UsedFiducialsSequence"],"0x0318":["SQ","1","GraphicCoordinatesDataSequence"],"0x031A":["UI","1","FiducialUID"],"0x031C":["SQ","1","FiducialSetSequence"],"0x031E":["SQ","1","FiducialSequence"],"0x0401":["US","3","GraphicLayerRecommendedDisplayCIELabValue"],"0x0402":["SQ","1","BlendingSequence"],"0x0403":["FL","1","RelativeOpacity"],"0x0404":["SQ","1","ReferencedSpatialRegistrationSequence"],"0x0405":["CS","1","BlendingPosition"]},"0x0072":{"0x0000":["UL","1","GenericGroupLength"],"0x0002":["SH","1","HangingProtocolName"],"0x0004":["LO","1","HangingProtocolDescription"],"0x0006":["CS","1","HangingProtocolLevel"],"0x0008":["LO","1","HangingProtocolCreator"],"0x000A":["DT","1","HangingProtocolCreationDateTime"],"0x000C":["SQ","1","HangingProtocolDefinitionSequence"],"0x000E":["SQ","1","HangingProtocolUserIdentificationCodeSequence"],"0x0010":["LO","1","HangingProtocolUserGroupName"],"0x0012":["SQ","1","SourceHangingProtocolSequence"],"0x0014":["US","1","NumberOfPriorsReferenced"],"0x0020":["SQ","1","ImageSetsSequence"],"0x0022":["SQ","1","ImageSetSelectorSequence"],"0x0024":["CS","1","ImageSetSelectorUsageFlag"],"0x0026":["AT","1","SelectorAttribute"],"0x0028":["US","1","SelectorValueNumber"],"0x0030":["SQ","1","TimeBasedImageSetsSequence"],"0x0032":["US","1","ImageSetNumber"],"0x0034":["CS","1","ImageSetSelectorCategory"],"0x0038":["US","2","RelativeTime"],"0x003A":["CS","1","RelativeTimeUnits"],"0x003C":["SS","2","AbstractPriorValue"],"0x003E":["SQ","1","AbstractPriorCodeSequence"],"0x0040":["LO","1","ImageSetLabel"],"0x0050":["CS","1","SelectorAttributeVR"],"0x0052":["AT","1-n","SelectorSequencePointer"],"0x0054":["LO","1-n","SelectorSequencePointerPrivateCreator"],"0x0056":["LO","1","SelectorAttributePrivateCreator"],"0x0060":["AT","1-n","SelectorATValue"],"0x0062":["CS","1-n","SelectorCSValue"],"0x0064":["IS","1-n","SelectorISValue"],"0x0066":["LO","1-n","SelectorLOValue"],"0x0068":["LT","1","SelectorLTValue"],"0x006A":["PN","1-n","SelectorPNValue"],"0x006C":["SH","1-n","SelectorSHValue"],"0x006E":["ST","1","SelectorSTValue"],"0x0070":["UT","1","SelectorUTValue"],"0x0072":["DS","1-n","SelectorDSValue"],"0x0074":["FD","1-n","SelectorFDValue"],"0x0076":["FL","1-n","SelectorFLValue"],"0x0078":["UL","1-n","SelectorULValue"],"0x007A":["US","1-n","SelectorUSValue"],"0x007C":["SL","1-n","SelectorSLValue"],"0x007E":["SS","1-n","SelectorSSValue"],"0x007F":["UI","1-n","SelectorUIValue"],"0x0080":["SQ","1","SelectorCodeSequenceValue"],"0x0100":["US","1","NumberOfScreens"],"0x0102":["SQ","1","NominalScreenDefinitionSequence"],"0x0104":["US","1","NumberOfVerticalPixels"],"0x0106":["US","1","NumberOfHorizontalPixels"],"0x0108":["FD","4","DisplayEnvironmentSpatialPosition"],"0x010A":["US","1","ScreenMinimumGrayscaleBitDepth"],"0x010C":["US","1","ScreenMinimumColorBitDepth"],"0x010E":["US","1","ApplicationMaximumRepaintTime"],"0x0200":["SQ","1","DisplaySetsSequence"],"0x0202":["US","1","DisplaySetNumber"],"0x0203":["LO","1","DisplaySetLabel"],"0x0204":["US","1","DisplaySetPresentationGroup"],"0x0206":["LO","1","DisplaySetPresentationGroupDescription"],"0x0208":["CS","1","PartialDataDisplayHandling"],"0x0210":["SQ","1","SynchronizedScrollingSequence"],"0x0212":["US","2-n","DisplaySetScrollingGroup"],"0x0214":["SQ","1","NavigationIndicatorSequence"],"0x0216":["US","1","NavigationDisplaySet"],"0x0218":["US","1-n","ReferenceDisplaySets"],"0x0300":["SQ","1","ImageBoxesSequence"],"0x0302":["US","1","ImageBoxNumber"],"0x0304":["CS","1","ImageBoxLayoutType"],"0x0306":["US","1","ImageBoxTileHorizontalDimension"],"0x0308":["US","1","ImageBoxTileVerticalDimension"],"0x0310":["CS","1","ImageBoxScrollDirection"],"0x0312":["CS","1","ImageBoxSmallScrollType"],"0x0314":["US","1","ImageBoxSmallScrollAmount"],"0x0316":["CS","1","ImageBoxLargeScrollType"],"0x0318":["US","1","ImageBoxLargeScrollAmount"],"0x0320":["US","1","ImageBoxOverlapPriority"],"0x0330":["FD","1","CineRelativeToRealTime"],"0x0400":["SQ","1","FilterOperationsSequence"],"0x0402":["CS","1","FilterByCategory"],"0x0404":["CS","1","FilterByAttributePresence"],"0x0406":["CS","1","FilterByOperator"],"0x0420":["US","3","StructuredDisplayBackgroundCIELabValue"],"0x0421":["US","3","EmptyImageBoxCIELabValue"],"0x0422":["SQ","1","StructuredDisplayImageBoxSequence"],"0x0424":["SQ","1","StructuredDisplayTextBoxSequence"],"0x0427":["SQ","1","ReferencedFirstFrameSequence"],"0x0430":["SQ","1","ImageBoxSynchronizationSequence"],"0x0432":["US","2-n","SynchronizedImageBoxList"],"0x0434":["CS","1","TypeOfSynchronization"],"0x0500":["CS","1","BlendingOperationType"],"0x0510":["CS","1","ReformattingOperationType"],"0x0512":["FD","1","ReformattingThickness"],"0x0514":["FD","1","ReformattingInterval"],"0x0516":["CS","1","ReformattingOperationInitialViewDirection"],"0x0520":["CS","1-n","ThreeDRenderingType"],"0x0600":["SQ","1","SortingOperationsSequence"],"0x0602":["CS","1","SortByCategory"],"0x0604":["CS","1","SortingDirection"],"0x0700":["CS","2","DisplaySetPatientOrientation"],"0x0702":["CS","1","VOIType"],"0x0704":["CS","1","PseudoColorType"],"0x0705":["SQ","1","PseudoColorPaletteInstanceReferenceSequence"],"0x0706":["CS","1","ShowGrayscaleInverted"],"0x0710":["CS","1","ShowImageTrueSizeFlag"],"0x0712":["CS","1","ShowGraphicAnnotationFlag"],"0x0714":["CS","1","ShowPatientDemographicsFlag"],"0x0716":["CS","1","ShowAcquisitionTechniquesFlag"],"0x0717":["CS","1","DisplaySetHorizontalJustification"],"0x0718":["CS","1","DisplaySetVerticalJustification"]},"0x0074":{"0x0000":["UL","1","GenericGroupLength"],"0x0120":["FD","1","ContinuationStartMeterset"],"0x0121":["FD","1","ContinuationEndMeterset"],"0x1000":["CS","1","ProcedureStepState"],"0x1002":["SQ","1","ProcedureStepProgressInformationSequence"],"0x1004":["DS","1","ProcedureStepProgress"],"0x1006":["ST","1","ProcedureStepProgressDescription"],"0x1008":["SQ","1","ProcedureStepCommunicationsURISequence"],"0x100A":["UR","1","ContactURI"],"0x100C":["LO","1","ContactDisplayName"],"0x100E":["SQ","1","ProcedureStepDiscontinuationReasonCodeSequence"],"0x1020":["SQ","1","BeamTaskSequence"],"0x1022":["CS","1","BeamTaskType"],"0x1024":["IS","1","BeamOrderIndexTrial"],"0x1025":["CS","1","AutosequenceFlag"],"0x1026":["FD","1","TableTopVerticalAdjustedPosition"],"0x1027":["FD","1","TableTopLongitudinalAdjustedPosition"],"0x1028":["FD","1","TableTopLateralAdjustedPosition"],"0x102A":["FD","1","PatientSupportAdjustedAngle"],"0x102B":["FD","1","TableTopEccentricAdjustedAngle"],"0x102C":["FD","1","TableTopPitchAdjustedAngle"],"0x102D":["FD","1","TableTopRollAdjustedAngle"],"0x1030":["SQ","1","DeliveryVerificationImageSequence"],"0x1032":["CS","1","VerificationImageTiming"],"0x1034":["CS","1","DoubleExposureFlag"],"0x1036":["CS","1","DoubleExposureOrdering"],"0x1038":["DS","1","DoubleExposureMetersetTrial"],"0x103A":["DS","4","DoubleExposureFieldDeltaTrial"],"0x1040":["SQ","1","RelatedReferenceRTImageSequence"],"0x1042":["SQ","1","GeneralMachineVerificationSequence"],"0x1044":["SQ","1","ConventionalMachineVerificationSequence"],"0x1046":["SQ","1","IonMachineVerificationSequence"],"0x1048":["SQ","1","FailedAttributesSequence"],"0x104A":["SQ","1","OverriddenAttributesSequence"],"0x104C":["SQ","1","ConventionalControlPointVerificationSequence"],"0x104E":["SQ","1","IonControlPointVerificationSequence"],"0x1050":["SQ","1","AttributeOccurrenceSequence"],"0x1052":["AT","1","AttributeOccurrencePointer"],"0x1054":["UL","1","AttributeItemSelector"],"0x1056":["LO","1","AttributeOccurrencePrivateCreator"],"0x1057":["IS","1-n","SelectorSequencePointerItems"],"0x1200":["CS","1","ScheduledProcedureStepPriority"],"0x1202":["LO","1","WorklistLabel"],"0x1204":["LO","1","ProcedureStepLabel"],"0x1210":["SQ","1","ScheduledProcessingParametersSequence"],"0x1212":["SQ","1","PerformedProcessingParametersSequence"],"0x1216":["SQ","1","UnifiedProcedureStepPerformedProcedureSequence"],"0x1220":["SQ","1","RelatedProcedureStepSequence"],"0x1222":["LO","1","ProcedureStepRelationshipType"],"0x1224":["SQ","1","ReplacedProcedureStepSequence"],"0x1230":["LO","1","DeletionLock"],"0x1234":["AE","1","ReceivingAE"],"0x1236":["AE","1","RequestingAE"],"0x1238":["LT","1","ReasonForCancellation"],"0x1242":["CS","1","SCPStatus"],"0x1244":["CS","1","SubscriptionListStatus"],"0x1246":["CS","1","UnifiedProcedureStepListStatus"],"0x1324":["UL","1","BeamOrderIndex"],"0x1338":["FD","1","DoubleExposureMeterset"],"0x133A":["FD","4","DoubleExposureFieldDelta"]},"0x0076":{"0x0000":["UL","1","GenericGroupLength"],"0x0001":["LO","1","ImplantAssemblyTemplateName"],"0x0003":["LO","1","ImplantAssemblyTemplateIssuer"],"0x0006":["LO","1","ImplantAssemblyTemplateVersion"],"0x0008":["SQ","1","ReplacedImplantAssemblyTemplateSequence"],"0x000A":["CS","1","ImplantAssemblyTemplateType"],"0x000C":["SQ","1","OriginalImplantAssemblyTemplateSequence"],"0x000E":["SQ","1","DerivationImplantAssemblyTemplateSequence"],"0x0010":["SQ","1","ImplantAssemblyTemplateTargetAnatomySequence"],"0x0020":["SQ","1","ProcedureTypeCodeSequence"],"0x0030":["LO","1","SurgicalTechnique"],"0x0032":["SQ","1","ComponentTypesSequence"],"0x0034":["CS","1","ComponentTypeCodeSequence"],"0x0036":["CS","1","ExclusiveComponentType"],"0x0038":["CS","1","MandatoryComponentType"],"0x0040":["SQ","1","ComponentSequence"],"0x0055":["US","1","ComponentID"],"0x0060":["SQ","1","ComponentAssemblySequence"],"0x0070":["US","1","Component1ReferencedID"],"0x0080":["US","1","Component1ReferencedMatingFeatureSetID"],"0x0090":["US","1","Component1ReferencedMatingFeatureID"],"0x00A0":["US","1","Component2ReferencedID"],"0x00B0":["US","1","Component2ReferencedMatingFeatureSetID"],"0x00C0":["US","1","Component2ReferencedMatingFeatureID"]},"0x0078":{"0x0000":["UL","1","GenericGroupLength"],"0x0001":["LO","1","ImplantTemplateGroupName"],"0x0010":["ST","1","ImplantTemplateGroupDescription"],"0x0020":["LO","1","ImplantTemplateGroupIssuer"],"0x0024":["LO","1","ImplantTemplateGroupVersion"],"0x0026":["SQ","1","ReplacedImplantTemplateGroupSequence"],"0x0028":["SQ","1","ImplantTemplateGroupTargetAnatomySequence"],"0x002A":["SQ","1","ImplantTemplateGroupMembersSequence"],"0x002E":["US","1","ImplantTemplateGroupMemberID"],"0x0050":["FD","3","ThreeDImplantTemplateGroupMemberMatchingPoint"],"0x0060":["FD","9","ThreeDImplantTemplateGroupMemberMatchingAxes"],"0x0070":["SQ","1","ImplantTemplateGroupMemberMatching2DCoordinatesSequence"],"0x0090":["FD","2","TwoDImplantTemplateGroupMemberMatchingPoint"],"0x00A0":["FD","4","TwoDImplantTemplateGroupMemberMatchingAxes"],"0x00B0":["SQ","1","ImplantTemplateGroupVariationDimensionSequence"],"0x00B2":["LO","1","ImplantTemplateGroupVariationDimensionName"],"0x00B4":["SQ","1","ImplantTemplateGroupVariationDimensionRankSequence"],"0x00B6":["US","1","ReferencedImplantTemplateGroupMemberID"],"0x00B8":["US","1","ImplantTemplateGroupVariationDimensionRank"]},"0x0080":{"0x0000":["UL","1","GenericGroupLength"],"0x0001":["SQ","1","SurfaceScanAcquisitionTypeCodeSequence"],"0x0002":["SQ","1","SurfaceScanModeCodeSequence"],"0x0003":["SQ","1","RegistrationMethodCodeSequence"],"0x0004":["FD","1","ShotDurationTime"],"0x0005":["FD","1","ShotOffsetTime"],"0x0006":["US","1-n","SurfacePointPresentationValueData"],"0x0007":["US","3-3n","SurfacePointColorCIELabValueData"],"0x0008":["SQ","1","UVMappingSequence"],"0x0009":["SH","1","TextureLabel"],"0x0010":["OF","1-n","UValueData"],"0x0011":["OF","1-n","VValueData"],"0x0012":["SQ","1","ReferencedTextureSequence"],"0x0013":["SQ","1","ReferencedSurfaceDataSequence"]},"0x0088":{"0x0000":["UL","1","GenericGroupLength"],"0x0130":["SH","1","StorageMediaFileSetID"],"0x0140":["UI","1","StorageMediaFileSetUID"],"0x0200":["SQ","1","IconImageSequence"],"0x0904":["LO","1","TopicTitle"],"0x0906":["ST","1","TopicSubject"],"0x0910":["LO","1","TopicAuthor"],"0x0912":["LO","1-32","TopicKeywords"]},"0x0100":{"0x0000":["UL","1","GenericGroupLength"],"0x0410":["CS","1","SOPInstanceStatus"],"0x0420":["DT","1","SOPAuthorizationDateTime"],"0x0424":["LT","1","SOPAuthorizationComment"],"0x0426":["LO","1","AuthorizationEquipmentCertificationNumber"]},"0x0400":{"0x0000":["UL","1","GenericGroupLength"],"0x0005":["US","1","MACIDNumber"],"0x0010":["UI","1","MACCalculationTransferSyntaxUID"],"0x0015":["CS","1","MACAlgorithm"],"0x0020":["AT","1-n","DataElementsSigned"],"0x0100":["UI","1","DigitalSignatureUID"],"0x0105":["DT","1","DigitalSignatureDateTime"],"0x0110":["CS","1","CertificateType"],"0x0115":["OB","1","CertificateOfSigner"],"0x0120":["OB","1","Signature"],"0x0305":["CS","1","CertifiedTimestampType"],"0x0310":["OB","1","CertifiedTimestamp"],"0x0401":["SQ","1","DigitalSignaturePurposeCodeSequence"],"0x0402":["SQ","1","ReferencedDigitalSignatureSequence"],"0x0403":["SQ","1","ReferencedSOPInstanceMACSequence"],"0x0404":["OB","1","MAC"],"0x0500":["SQ","1","EncryptedAttributesSequence"],"0x0510":["UI","1","EncryptedContentTransferSyntaxUID"],"0x0520":["OB","1","EncryptedContent"],"0x0550":["SQ","1","ModifiedAttributesSequence"],"0x0561":["SQ","1","OriginalAttributesSequence"],"0x0562":["DT","1","AttributeModificationDateTime"],"0x0563":["LO","1","ModifyingSystem"],"0x0564":["LO","1","SourceOfPreviousValues"],"0x0565":["CS","1","ReasonForTheAttributeModification"]},"0x1000":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["US","3","EscapeTriplet"],"0x0011":["US","3","RunLengthTriplet"],"0x0012":["US","1","HuffmanTableSize"],"0x0013":["US","3","HuffmanTableTriplet"],"0x0014":["US","1","ShiftTableSize"],"0x0015":["US","3","ShiftTableTriplet"]},"0x1010":{"0x0000":["UL","1","GenericGroupLength"],"0x0004":["US","1-n","ZonalMap"]},"0x2000":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["IS","1","NumberOfCopies"],"0x001E":["SQ","1","PrinterConfigurationSequence"],"0x0020":["CS","1","PrintPriority"],"0x0030":["CS","1","MediumType"],"0x0040":["CS","1","FilmDestination"],"0x0050":["LO","1","FilmSessionLabel"],"0x0060":["IS","1","MemoryAllocation"],"0x0061":["IS","1","MaximumMemoryAllocation"],"0x0062":["CS","1","ColorImagePrintingFlag"],"0x0063":["CS","1","CollationFlag"],"0x0065":["CS","1","AnnotationFlag"],"0x0067":["CS","1","ImageOverlayFlag"],"0x0069":["CS","1","PresentationLUTFlag"],"0x006A":["CS","1","ImageBoxPresentationLUTFlag"],"0x00A0":["US","1","MemoryBitDepth"],"0x00A1":["US","1","PrintingBitDepth"],"0x00A2":["SQ","1","MediaInstalledSequence"],"0x00A4":["SQ","1","OtherMediaAvailableSequence"],"0x00A8":["SQ","1","SupportedImageDisplayFormatsSequence"],"0x0500":["SQ","1","ReferencedFilmBoxSequence"],"0x0510":["SQ","1","ReferencedStoredPrintSequence"]},"0x2010":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["ST","1","ImageDisplayFormat"],"0x0030":["CS","1","AnnotationDisplayFormatID"],"0x0040":["CS","1","FilmOrientation"],"0x0050":["CS","1","FilmSizeID"],"0x0052":["CS","1","PrinterResolutionID"],"0x0054":["CS","1","DefaultPrinterResolutionID"],"0x0060":["CS","1","MagnificationType"],"0x0080":["CS","1","SmoothingType"],"0x00A6":["CS","1","DefaultMagnificationType"],"0x00A7":["CS","1-n","OtherMagnificationTypesAvailable"],"0x00A8":["CS","1","DefaultSmoothingType"],"0x00A9":["CS","1-n","OtherSmoothingTypesAvailable"],"0x0100":["CS","1","BorderDensity"],"0x0110":["CS","1","EmptyImageDensity"],"0x0120":["US","1","MinDensity"],"0x0130":["US","1","MaxDensity"],"0x0140":["CS","1","Trim"],"0x0150":["ST","1","ConfigurationInformation"],"0x0152":["LT","1","ConfigurationInformationDescription"],"0x0154":["IS","1","MaximumCollatedFilms"],"0x015E":["US","1","Illumination"],"0x0160":["US","1","ReflectedAmbientLight"],"0x0376":["DS","2","PrinterPixelSpacing"],"0x0500":["SQ","1","ReferencedFilmSessionSequence"],"0x0510":["SQ","1","ReferencedImageBoxSequence"],"0x0520":["SQ","1","ReferencedBasicAnnotationBoxSequence"]},"0x2020":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["US","1","ImageBoxPosition"],"0x0020":["CS","1","Polarity"],"0x0030":["DS","1","RequestedImageSize"],"0x0040":["CS","1","RequestedDecimateCropBehavior"],"0x0050":["CS","1","RequestedResolutionID"],"0x00A0":["CS","1","RequestedImageSizeFlag"],"0x00A2":["CS","1","DecimateCropResult"],"0x0110":["SQ","1","BasicGrayscaleImageSequence"],"0x0111":["SQ","1","BasicColorImageSequence"],"0x0130":["SQ","1","ReferencedImageOverlayBoxSequence"],"0x0140":["SQ","1","ReferencedVOILUTBoxSequence"]},"0x2030":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["US","1","AnnotationPosition"],"0x0020":["LO","1","TextString"]},"0x2040":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["SQ","1","ReferencedOverlayPlaneSequence"],"0x0011":["US","1-99","ReferencedOverlayPlaneGroups"],"0x0020":["SQ","1","OverlayPixelDataSequence"],"0x0060":["CS","1","OverlayMagnificationType"],"0x0070":["CS","1","OverlaySmoothingType"],"0x0072":["CS","1","OverlayOrImageMagnification"],"0x0074":["US","1","MagnifyToNumberOfColumns"],"0x0080":["CS","1","OverlayForegroundDensity"],"0x0082":["CS","1","OverlayBackgroundDensity"],"0x0090":["CS","1","OverlayMode"],"0x0100":["CS","1","ThresholdDensity"],"0x0500":["SQ","1","ReferencedImageBoxSequenceRetired"]},"0x2050":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["SQ","1","PresentationLUTSequence"],"0x0020":["CS","1","PresentationLUTShape"],"0x0500":["SQ","1","ReferencedPresentationLUTSequence"]},"0x2100":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["SH","1","PrintJobID"],"0x0020":["CS","1","ExecutionStatus"],"0x0030":["CS","1","ExecutionStatusInfo"],"0x0040":["DA","1","CreationDate"],"0x0050":["TM","1","CreationTime"],"0x0070":["AE","1","Originator"],"0x0140":["AE","1","DestinationAE"],"0x0160":["SH","1","OwnerID"],"0x0170":["IS","1","NumberOfFilms"],"0x0500":["SQ","1","ReferencedPrintJobSequencePullStoredPrint"]},"0x2110":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["CS","1","PrinterStatus"],"0x0020":["CS","1","PrinterStatusInfo"],"0x0030":["LO","1","PrinterName"],"0x0099":["SH","1","PrintQueueID"]},"0x2120":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["CS","1","QueueStatus"],"0x0050":["SQ","1","PrintJobDescriptionSequence"],"0x0070":["SQ","1","ReferencedPrintJobSequence"]},"0x2130":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["SQ","1","PrintManagementCapabilitiesSequence"],"0x0015":["SQ","1","PrinterCharacteristicsSequence"],"0x0030":["SQ","1","FilmBoxContentSequence"],"0x0040":["SQ","1","ImageBoxContentSequence"],"0x0050":["SQ","1","AnnotationContentSequence"],"0x0060":["SQ","1","ImageOverlayBoxContentSequence"],"0x0080":["SQ","1","PresentationLUTContentSequence"],"0x00A0":["SQ","1","ProposedStudySequence"],"0x00C0":["SQ","1","OriginalImageSequence"]},"0x2200":{"0x0000":["UL","1","GenericGroupLength"],"0x0001":["CS","1","LabelUsingInformationExtractedFromInstances"],"0x0002":["UT","1","LabelText"],"0x0003":["CS","1","LabelStyleSelection"],"0x0004":["LT","1","MediaDisposition"],"0x0005":["LT","1","BarcodeValue"],"0x0006":["CS","1","BarcodeSymbology"],"0x0007":["CS","1","AllowMediaSplitting"],"0x0008":["CS","1","IncludeNonDICOMObjects"],"0x0009":["CS","1","IncludeDisplayApplication"],"0x000A":["CS","1","PreserveCompositeInstancesAfterMediaCreation"],"0x000B":["US","1","TotalNumberOfPiecesOfMediaCreated"],"0x000C":["LO","1","RequestedMediaApplicationProfile"],"0x000D":["SQ","1","ReferencedStorageMediaSequence"],"0x000E":["AT","1-n","FailureAttributes"],"0x000F":["CS","1","AllowLossyCompression"],"0x0020":["CS","1","RequestPriority"]},"0x3002":{"0x0000":["UL","1","GenericGroupLength"],"0x0002":["SH","1","RTImageLabel"],"0x0003":["LO","1","RTImageName"],"0x0004":["ST","1","RTImageDescription"],"0x000A":["CS","1","ReportedValuesOrigin"],"0x000C":["CS","1","RTImagePlane"],"0x000D":["DS","3","XRayImageReceptorTranslation"],"0x000E":["DS","1","XRayImageReceptorAngle"],"0x0010":["DS","6","RTImageOrientation"],"0x0011":["DS","2","ImagePlanePixelSpacing"],"0x0012":["DS","2","RTImagePosition"],"0x0020":["SH","1","RadiationMachineName"],"0x0022":["DS","1","RadiationMachineSAD"],"0x0024":["DS","1","RadiationMachineSSD"],"0x0026":["DS","1","RTImageSID"],"0x0028":["DS","1","SourceToReferenceObjectDistance"],"0x0029":["IS","1","FractionNumber"],"0x0030":["SQ","1","ExposureSequence"],"0x0032":["DS","1","MetersetExposure"],"0x0034":["DS","4","DiaphragmPosition"],"0x0040":["SQ","1","FluenceMapSequence"],"0x0041":["CS","1","FluenceDataSource"],"0x0042":["DS","1","FluenceDataScale"],"0x0050":["SQ","1","PrimaryFluenceModeSequence"],"0x0051":["CS","1","FluenceMode"],"0x0052":["SH","1","FluenceModeID"]},"0x3004":{"0x0000":["UL","1","GenericGroupLength"],"0x0001":["CS","1","DVHType"],"0x0002":["CS","1","DoseUnits"],"0x0004":["CS","1","DoseType"],"0x0005":["CS","1","SpatialTransformOfDose"],"0x0006":["LO","1","DoseComment"],"0x0008":["DS","3","NormalizationPoint"],"0x000A":["CS","1","DoseSummationType"],"0x000C":["DS","2-n","GridFrameOffsetVector"],"0x000E":["DS","1","DoseGridScaling"],"0x0010":["SQ","1","RTDoseROISequence"],"0x0012":["DS","1","DoseValue"],"0x0014":["CS","1-3","TissueHeterogeneityCorrection"],"0x0040":["DS","3","DVHNormalizationPoint"],"0x0042":["DS","1","DVHNormalizationDoseValue"],"0x0050":["SQ","1","DVHSequence"],"0x0052":["DS","1","DVHDoseScaling"],"0x0054":["CS","1","DVHVolumeUnits"],"0x0056":["IS","1","DVHNumberOfBins"],"0x0058":["DS","2-2n","DVHData"],"0x0060":["SQ","1","DVHReferencedROISequence"],"0x0062":["CS","1","DVHROIContributionType"],"0x0070":["DS","1","DVHMinimumDose"],"0x0072":["DS","1","DVHMaximumDose"],"0x0074":["DS","1","DVHMeanDose"]},"0x3006":{"0x0000":["UL","1","GenericGroupLength"],"0x0002":["SH","1","StructureSetLabel"],"0x0004":["LO","1","StructureSetName"],"0x0006":["ST","1","StructureSetDescription"],"0x0008":["DA","1","StructureSetDate"],"0x0009":["TM","1","StructureSetTime"],"0x0010":["SQ","1","ReferencedFrameOfReferenceSequence"],"0x0012":["SQ","1","RTReferencedStudySequence"],"0x0014":["SQ","1","RTReferencedSeriesSequence"],"0x0016":["SQ","1","ContourImageSequence"],"0x0018":["SQ","1","PredecessorStructureSetSequence"],"0x0020":["SQ","1","StructureSetROISequence"],"0x0022":["IS","1","ROINumber"],"0x0024":["UI","1","ReferencedFrameOfReferenceUID"],"0x0026":["LO","1","ROIName"],"0x0028":["ST","1","ROIDescription"],"0x002A":["IS","3","ROIDisplayColor"],"0x002C":["DS","1","ROIVolume"],"0x0030":["SQ","1","RTRelatedROISequence"],"0x0033":["CS","1","RTROIRelationship"],"0x0036":["CS","1","ROIGenerationAlgorithm"],"0x0038":["LO","1","ROIGenerationDescription"],"0x0039":["SQ","1","ROIContourSequence"],"0x0040":["SQ","1","ContourSequence"],"0x0042":["CS","1","ContourGeometricType"],"0x0044":["DS","1","ContourSlabThickness"],"0x0045":["DS","3","ContourOffsetVector"],"0x0046":["IS","1","NumberOfContourPoints"],"0x0048":["IS","1","ContourNumber"],"0x0049":["IS","1-n","AttachedContours"],"0x0050":["DS","3-3n","ContourData"],"0x0080":["SQ","1","RTROIObservationsSequence"],"0x0082":["IS","1","ObservationNumber"],"0x0084":["IS","1","ReferencedROINumber"],"0x0085":["SH","1","ROIObservationLabel"],"0x0086":["SQ","1","RTROIIdentificationCodeSequence"],"0x0088":["ST","1","ROIObservationDescription"],"0x00A0":["SQ","1","RelatedRTROIObservationsSequence"],"0x00A4":["CS","1","RTROIInterpretedType"],"0x00A6":["PN","1","ROIInterpreter"],"0x00B0":["SQ","1","ROIPhysicalPropertiesSequence"],"0x00B2":["CS","1","ROIPhysicalProperty"],"0x00B4":["DS","1","ROIPhysicalPropertyValue"],"0x00B6":["SQ","1","ROIElementalCompositionSequence"],"0x00B7":["US","1","ROIElementalCompositionAtomicNumber"],"0x00B8":["FL","1","ROIElementalCompositionAtomicMassFraction"],"0x00B9":["SQ","1","AdditionalRTROIIdentificationCodeSequence"],"0x00C0":["SQ","1","FrameOfReferenceRelationshipSequence"],"0x00C2":["UI","1","RelatedFrameOfReferenceUID"],"0x00C4":["CS","1","FrameOfReferenceTransformationType"],"0x00C6":["DS","16","FrameOfReferenceTransformationMatrix"],"0x00C8":["LO","1","FrameOfReferenceTransformationComment"]},"0x3008":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["SQ","1","MeasuredDoseReferenceSequence"],"0x0012":["ST","1","MeasuredDoseDescription"],"0x0014":["CS","1","MeasuredDoseType"],"0x0016":["DS","1","MeasuredDoseValue"],"0x0020":["SQ","1","TreatmentSessionBeamSequence"],"0x0021":["SQ","1","TreatmentSessionIonBeamSequence"],"0x0022":["IS","1","CurrentFractionNumber"],"0x0024":["DA","1","TreatmentControlPointDate"],"0x0025":["TM","1","TreatmentControlPointTime"],"0x002A":["CS","1","TreatmentTerminationStatus"],"0x002B":["SH","1","TreatmentTerminationCode"],"0x002C":["CS","1","TreatmentVerificationStatus"],"0x0030":["SQ","1","ReferencedTreatmentRecordSequence"],"0x0032":["DS","1","SpecifiedPrimaryMeterset"],"0x0033":["DS","1","SpecifiedSecondaryMeterset"],"0x0036":["DS","1","DeliveredPrimaryMeterset"],"0x0037":["DS","1","DeliveredSecondaryMeterset"],"0x003A":["DS","1","SpecifiedTreatmentTime"],"0x003B":["DS","1","DeliveredTreatmentTime"],"0x0040":["SQ","1","ControlPointDeliverySequence"],"0x0041":["SQ","1","IonControlPointDeliverySequence"],"0x0042":["DS","1","SpecifiedMeterset"],"0x0044":["DS","1","DeliveredMeterset"],"0x0045":["FL","1","MetersetRateSet"],"0x0046":["FL","1","MetersetRateDelivered"],"0x0047":["FL","1-n","ScanSpotMetersetsDelivered"],"0x0048":["DS","1","DoseRateDelivered"],"0x0050":["SQ","1","TreatmentSummaryCalculatedDoseReferenceSequence"],"0x0052":["DS","1","CumulativeDoseToDoseReference"],"0x0054":["DA","1","FirstTreatmentDate"],"0x0056":["DA","1","MostRecentTreatmentDate"],"0x005A":["IS","1","NumberOfFractionsDelivered"],"0x0060":["SQ","1","OverrideSequence"],"0x0061":["AT","1","ParameterSequencePointer"],"0x0062":["AT","1","OverrideParameterPointer"],"0x0063":["IS","1","ParameterItemIndex"],"0x0064":["IS","1","MeasuredDoseReferenceNumber"],"0x0065":["AT","1","ParameterPointer"],"0x0066":["ST","1","OverrideReason"],"0x0068":["SQ","1","CorrectedParameterSequence"],"0x006A":["FL","1","CorrectionValue"],"0x0070":["SQ","1","CalculatedDoseReferenceSequence"],"0x0072":["IS","1","CalculatedDoseReferenceNumber"],"0x0074":["ST","1","CalculatedDoseReferenceDescription"],"0x0076":["DS","1","CalculatedDoseReferenceDoseValue"],"0x0078":["DS","1","StartMeterset"],"0x007A":["DS","1","EndMeterset"],"0x0080":["SQ","1","ReferencedMeasuredDoseReferenceSequence"],"0x0082":["IS","1","ReferencedMeasuredDoseReferenceNumber"],"0x0090":["SQ","1","ReferencedCalculatedDoseReferenceSequence"],"0x0092":["IS","1","ReferencedCalculatedDoseReferenceNumber"],"0x00A0":["SQ","1","BeamLimitingDeviceLeafPairsSequence"],"0x00B0":["SQ","1","RecordedWedgeSequence"],"0x00C0":["SQ","1","RecordedCompensatorSequence"],"0x00D0":["SQ","1","RecordedBlockSequence"],"0x00E0":["SQ","1","TreatmentSummaryMeasuredDoseReferenceSequence"],"0x00F0":["SQ","1","RecordedSnoutSequence"],"0x00F2":["SQ","1","RecordedRangeShifterSequence"],"0x00F4":["SQ","1","RecordedLateralSpreadingDeviceSequence"],"0x00F6":["SQ","1","RecordedRangeModulatorSequence"],"0x0100":["SQ","1","RecordedSourceSequence"],"0x0105":["LO","1","SourceSerialNumber"],"0x0110":["SQ","1","TreatmentSessionApplicationSetupSequence"],"0x0116":["CS","1","ApplicationSetupCheck"],"0x0120":["SQ","1","RecordedBrachyAccessoryDeviceSequence"],"0x0122":["IS","1","ReferencedBrachyAccessoryDeviceNumber"],"0x0130":["SQ","1","RecordedChannelSequence"],"0x0132":["DS","1","SpecifiedChannelTotalTime"],"0x0134":["DS","1","DeliveredChannelTotalTime"],"0x0136":["IS","1","SpecifiedNumberOfPulses"],"0x0138":["IS","1","DeliveredNumberOfPulses"],"0x013A":["DS","1","SpecifiedPulseRepetitionInterval"],"0x013C":["DS","1","DeliveredPulseRepetitionInterval"],"0x0140":["SQ","1","RecordedSourceApplicatorSequence"],"0x0142":["IS","1","ReferencedSourceApplicatorNumber"],"0x0150":["SQ","1","RecordedChannelShieldSequence"],"0x0152":["IS","1","ReferencedChannelShieldNumber"],"0x0160":["SQ","1","BrachyControlPointDeliveredSequence"],"0x0162":["DA","1","SafePositionExitDate"],"0x0164":["TM","1","SafePositionExitTime"],"0x0166":["DA","1","SafePositionReturnDate"],"0x0168":["TM","1","SafePositionReturnTime"],"0x0171":["SQ","1","PulseSpecificBrachyControlPointDeliveredSequence"],"0x0172":["US","1","PulseNumber"],"0x0173":["SQ","1","BrachyPulseControlPointDeliveredSequence"],"0x0200":["CS","1","CurrentTreatmentStatus"],"0x0202":["ST","1","TreatmentStatusComment"],"0x0220":["SQ","1","FractionGroupSummarySequence"],"0x0223":["IS","1","ReferencedFractionNumber"],"0x0224":["CS","1","FractionGroupType"],"0x0230":["CS","1","BeamStopperPosition"],"0x0240":["SQ","1","FractionStatusSummarySequence"],"0x0250":["DA","1","TreatmentDate"],"0x0251":["TM","1","TreatmentTime"]},"0x300A":{"0x0000":["UL","1","GenericGroupLength"],"0x0002":["SH","1","RTPlanLabel"],"0x0003":["LO","1","RTPlanName"],"0x0004":["ST","1","RTPlanDescription"],"0x0006":["DA","1","RTPlanDate"],"0x0007":["TM","1","RTPlanTime"],"0x0009":["LO","1-n","TreatmentProtocols"],"0x000A":["CS","1","PlanIntent"],"0x000B":["LO","1-n","TreatmentSites"],"0x000C":["CS","1","RTPlanGeometry"],"0x000E":["ST","1","PrescriptionDescription"],"0x0010":["SQ","1","DoseReferenceSequence"],"0x0012":["IS","1","DoseReferenceNumber"],"0x0013":["UI","1","DoseReferenceUID"],"0x0014":["CS","1","DoseReferenceStructureType"],"0x0015":["CS","1","NominalBeamEnergyUnit"],"0x0016":["LO","1","DoseReferenceDescription"],"0x0018":["DS","3","DoseReferencePointCoordinates"],"0x001A":["DS","1","NominalPriorDose"],"0x0020":["CS","1","DoseReferenceType"],"0x0021":["DS","1","ConstraintWeight"],"0x0022":["DS","1","DeliveryWarningDose"],"0x0023":["DS","1","DeliveryMaximumDose"],"0x0025":["DS","1","TargetMinimumDose"],"0x0026":["DS","1","TargetPrescriptionDose"],"0x0027":["DS","1","TargetMaximumDose"],"0x0028":["DS","1","TargetUnderdoseVolumeFraction"],"0x002A":["DS","1","OrganAtRiskFullVolumeDose"],"0x002B":["DS","1","OrganAtRiskLimitDose"],"0x002C":["DS","1","OrganAtRiskMaximumDose"],"0x002D":["DS","1","OrganAtRiskOverdoseVolumeFraction"],"0x0040":["SQ","1","ToleranceTableSequence"],"0x0042":["IS","1","ToleranceTableNumber"],"0x0043":["SH","1","ToleranceTableLabel"],"0x0044":["DS","1","GantryAngleTolerance"],"0x0046":["DS","1","BeamLimitingDeviceAngleTolerance"],"0x0048":["SQ","1","BeamLimitingDeviceToleranceSequence"],"0x004A":["DS","1","BeamLimitingDevicePositionTolerance"],"0x004B":["FL","1","SnoutPositionTolerance"],"0x004C":["DS","1","PatientSupportAngleTolerance"],"0x004E":["DS","1","TableTopEccentricAngleTolerance"],"0x004F":["FL","1","TableTopPitchAngleTolerance"],"0x0050":["FL","1","TableTopRollAngleTolerance"],"0x0051":["DS","1","TableTopVerticalPositionTolerance"],"0x0052":["DS","1","TableTopLongitudinalPositionTolerance"],"0x0053":["DS","1","TableTopLateralPositionTolerance"],"0x0055":["CS","1","RTPlanRelationship"],"0x0070":["SQ","1","FractionGroupSequence"],"0x0071":["IS","1","FractionGroupNumber"],"0x0072":["LO","1","FractionGroupDescription"],"0x0078":["IS","1","NumberOfFractionsPlanned"],"0x0079":["IS","1","NumberOfFractionPatternDigitsPerDay"],"0x007A":["IS","1","RepeatFractionCycleLength"],"0x007B":["LT","1","FractionPattern"],"0x0080":["IS","1","NumberOfBeams"],"0x0082":["DS","3","BeamDoseSpecificationPoint"],"0x0084":["DS","1","BeamDose"],"0x0086":["DS","1","BeamMeterset"],"0x0088":["FL","1","BeamDosePointDepth"],"0x0089":["FL","1","BeamDosePointEquivalentDepth"],"0x008A":["FL","1","BeamDosePointSSD"],"0x008B":["CS","1","BeamDoseMeaning"],"0x008C":["SQ","1","BeamDoseVerificationControlPointSequence"],"0x008D":["FL","1","AverageBeamDosePointDepth"],"0x008E":["FL","1","AverageBeamDosePointEquivalentDepth"],"0x008F":["FL","1","AverageBeamDosePointSSD"],"0x00A0":["IS","1","NumberOfBrachyApplicationSetups"],"0x00A2":["DS","3","BrachyApplicationSetupDoseSpecificationPoint"],"0x00A4":["DS","1","BrachyApplicationSetupDose"],"0x00B0":["SQ","1","BeamSequence"],"0x00B2":["SH","1","TreatmentMachineName"],"0x00B3":["CS","1","PrimaryDosimeterUnit"],"0x00B4":["DS","1","SourceAxisDistance"],"0x00B6":["SQ","1","BeamLimitingDeviceSequence"],"0x00B8":["CS","1","RTBeamLimitingDeviceType"],"0x00BA":["DS","1","SourceToBeamLimitingDeviceDistance"],"0x00BB":["FL","1","IsocenterToBeamLimitingDeviceDistance"],"0x00BC":["IS","1","NumberOfLeafJawPairs"],"0x00BE":["DS","3-n","LeafPositionBoundaries"],"0x00C0":["IS","1","BeamNumber"],"0x00C2":["LO","1","BeamName"],"0x00C3":["ST","1","BeamDescription"],"0x00C4":["CS","1","BeamType"],"0x00C5":["FD","1","BeamDeliveryDurationLimit"],"0x00C6":["CS","1","RadiationType"],"0x00C7":["CS","1","HighDoseTechniqueType"],"0x00C8":["IS","1","ReferenceImageNumber"],"0x00CA":["SQ","1","PlannedVerificationImageSequence"],"0x00CC":["LO","1-n","ImagingDeviceSpecificAcquisitionParameters"],"0x00CE":["CS","1","TreatmentDeliveryType"],"0x00D0":["IS","1","NumberOfWedges"],"0x00D1":["SQ","1","WedgeSequence"],"0x00D2":["IS","1","WedgeNumber"],"0x00D3":["CS","1","WedgeType"],"0x00D4":["SH","1","WedgeID"],"0x00D5":["IS","1","WedgeAngle"],"0x00D6":["DS","1","WedgeFactor"],"0x00D7":["FL","1","TotalWedgeTrayWaterEquivalentThickness"],"0x00D8":["DS","1","WedgeOrientation"],"0x00D9":["FL","1","IsocenterToWedgeTrayDistance"],"0x00DA":["DS","1","SourceToWedgeTrayDistance"],"0x00DB":["FL","1","WedgeThinEdgePosition"],"0x00DC":["SH","1","BolusID"],"0x00DD":["ST","1","BolusDescription"],"0x00DE":["DS","1","EffectiveWedgeAngle"],"0x00E0":["IS","1","NumberOfCompensators"],"0x00E1":["SH","1","MaterialID"],"0x00E2":["DS","1","TotalCompensatorTrayFactor"],"0x00E3":["SQ","1","CompensatorSequence"],"0x00E4":["IS","1","CompensatorNumber"],"0x00E5":["SH","1","CompensatorID"],"0x00E6":["DS","1","SourceToCompensatorTrayDistance"],"0x00E7":["IS","1","CompensatorRows"],"0x00E8":["IS","1","CompensatorColumns"],"0x00E9":["DS","2","CompensatorPixelSpacing"],"0x00EA":["DS","2","CompensatorPosition"],"0x00EB":["DS","1-n","CompensatorTransmissionData"],"0x00EC":["DS","1-n","CompensatorThicknessData"],"0x00ED":["IS","1","NumberOfBoli"],"0x00EE":["CS","1","CompensatorType"],"0x00EF":["SH","1","CompensatorTrayID"],"0x00F0":["IS","1","NumberOfBlocks"],"0x00F2":["DS","1","TotalBlockTrayFactor"],"0x00F3":["FL","1","TotalBlockTrayWaterEquivalentThickness"],"0x00F4":["SQ","1","BlockSequence"],"0x00F5":["SH","1","BlockTrayID"],"0x00F6":["DS","1","SourceToBlockTrayDistance"],"0x00F7":["FL","1","IsocenterToBlockTrayDistance"],"0x00F8":["CS","1","BlockType"],"0x00F9":["LO","1","AccessoryCode"],"0x00FA":["CS","1","BlockDivergence"],"0x00FB":["CS","1","BlockMountingPosition"],"0x00FC":["IS","1","BlockNumber"],"0x00FE":["LO","1","BlockName"],"0x0100":["DS","1","BlockThickness"],"0x0102":["DS","1","BlockTransmission"],"0x0104":["IS","1","BlockNumberOfPoints"],"0x0106":["DS","2-2n","BlockData"],"0x0107":["SQ","1","ApplicatorSequence"],"0x0108":["SH","1","ApplicatorID"],"0x0109":["CS","1","ApplicatorType"],"0x010A":["LO","1","ApplicatorDescription"],"0x010C":["DS","1","CumulativeDoseReferenceCoefficient"],"0x010E":["DS","1","FinalCumulativeMetersetWeight"],"0x0110":["IS","1","NumberOfControlPoints"],"0x0111":["SQ","1","ControlPointSequence"],"0x0112":["IS","1","ControlPointIndex"],"0x0114":["DS","1","NominalBeamEnergy"],"0x0115":["DS","1","DoseRateSet"],"0x0116":["SQ","1","WedgePositionSequence"],"0x0118":["CS","1","WedgePosition"],"0x011A":["SQ","1","BeamLimitingDevicePositionSequence"],"0x011C":["DS","2-2n","LeafJawPositions"],"0x011E":["DS","1","GantryAngle"],"0x011F":["CS","1","GantryRotationDirection"],"0x0120":["DS","1","BeamLimitingDeviceAngle"],"0x0121":["CS","1","BeamLimitingDeviceRotationDirection"],"0x0122":["DS","1","PatientSupportAngle"],"0x0123":["CS","1","PatientSupportRotationDirection"],"0x0124":["DS","1","TableTopEccentricAxisDistance"],"0x0125":["DS","1","TableTopEccentricAngle"],"0x0126":["CS","1","TableTopEccentricRotationDirection"],"0x0128":["DS","1","TableTopVerticalPosition"],"0x0129":["DS","1","TableTopLongitudinalPosition"],"0x012A":["DS","1","TableTopLateralPosition"],"0x012C":["DS","3","IsocenterPosition"],"0x012E":["DS","3","SurfaceEntryPoint"],"0x0130":["DS","1","SourceToSurfaceDistance"],"0x0131":["FL","1","AverageBeamDosePointSourceToExternalContourSurfaceDistance"],"0x0132":["FL","1","SourceToExternalContourDistance"],"0x0133":["FL","3","ExternalContourEntryPoint"],"0x0134":["DS","1","CumulativeMetersetWeight"],"0x0140":["FL","1","TableTopPitchAngle"],"0x0142":["CS","1","TableTopPitchRotationDirection"],"0x0144":["FL","1","TableTopRollAngle"],"0x0146":["CS","1","TableTopRollRotationDirection"],"0x0148":["FL","1","HeadFixationAngle"],"0x014A":["FL","1","GantryPitchAngle"],"0x014C":["CS","1","GantryPitchRotationDirection"],"0x014E":["FL","1","GantryPitchAngleTolerance"],"0x0180":["SQ","1","PatientSetupSequence"],"0x0182":["IS","1","PatientSetupNumber"],"0x0183":["LO","1","PatientSetupLabel"],"0x0184":["LO","1","PatientAdditionalPosition"],"0x0190":["SQ","1","FixationDeviceSequence"],"0x0192":["CS","1","FixationDeviceType"],"0x0194":["SH","1","FixationDeviceLabel"],"0x0196":["ST","1","FixationDeviceDescription"],"0x0198":["SH","1","FixationDevicePosition"],"0x0199":["FL","1","FixationDevicePitchAngle"],"0x019A":["FL","1","FixationDeviceRollAngle"],"0x01A0":["SQ","1","ShieldingDeviceSequence"],"0x01A2":["CS","1","ShieldingDeviceType"],"0x01A4":["SH","1","ShieldingDeviceLabel"],"0x01A6":["ST","1","ShieldingDeviceDescription"],"0x01A8":["SH","1","ShieldingDevicePosition"],"0x01B0":["CS","1","SetupTechnique"],"0x01B2":["ST","1","SetupTechniqueDescription"],"0x01B4":["SQ","1","SetupDeviceSequence"],"0x01B6":["CS","1","SetupDeviceType"],"0x01B8":["SH","1","SetupDeviceLabel"],"0x01BA":["ST","1","SetupDeviceDescription"],"0x01BC":["DS","1","SetupDeviceParameter"],"0x01D0":["ST","1","SetupReferenceDescription"],"0x01D2":["DS","1","TableTopVerticalSetupDisplacement"],"0x01D4":["DS","1","TableTopLongitudinalSetupDisplacement"],"0x01D6":["DS","1","TableTopLateralSetupDisplacement"],"0x0200":["CS","1","BrachyTreatmentTechnique"],"0x0202":["CS","1","BrachyTreatmentType"],"0x0206":["SQ","1","TreatmentMachineSequence"],"0x0210":["SQ","1","SourceSequence"],"0x0212":["IS","1","SourceNumber"],"0x0214":["CS","1","SourceType"],"0x0216":["LO","1","SourceManufacturer"],"0x0218":["DS","1","ActiveSourceDiameter"],"0x021A":["DS","1","ActiveSourceLength"],"0x021B":["SH","1","SourceModelID"],"0x021C":["LO","1","SourceDescription"],"0x0222":["DS","1","SourceEncapsulationNominalThickness"],"0x0224":["DS","1","SourceEncapsulationNominalTransmission"],"0x0226":["LO","1","SourceIsotopeName"],"0x0228":["DS","1","SourceIsotopeHalfLife"],"0x0229":["CS","1","SourceStrengthUnits"],"0x022A":["DS","1","ReferenceAirKermaRate"],"0x022B":["DS","1","SourceStrength"],"0x022C":["DA","1","SourceStrengthReferenceDate"],"0x022E":["TM","1","SourceStrengthReferenceTime"],"0x0230":["SQ","1","ApplicationSetupSequence"],"0x0232":["CS","1","ApplicationSetupType"],"0x0234":["IS","1","ApplicationSetupNumber"],"0x0236":["LO","1","ApplicationSetupName"],"0x0238":["LO","1","ApplicationSetupManufacturer"],"0x0240":["IS","1","TemplateNumber"],"0x0242":["SH","1","TemplateType"],"0x0244":["LO","1","TemplateName"],"0x0250":["DS","1","TotalReferenceAirKerma"],"0x0260":["SQ","1","BrachyAccessoryDeviceSequence"],"0x0262":["IS","1","BrachyAccessoryDeviceNumber"],"0x0263":["SH","1","BrachyAccessoryDeviceID"],"0x0264":["CS","1","BrachyAccessoryDeviceType"],"0x0266":["LO","1","BrachyAccessoryDeviceName"],"0x026A":["DS","1","BrachyAccessoryDeviceNominalThickness"],"0x026C":["DS","1","BrachyAccessoryDeviceNominalTransmission"],"0x0280":["SQ","1","ChannelSequence"],"0x0282":["IS","1","ChannelNumber"],"0x0284":["DS","1","ChannelLength"],"0x0286":["DS","1","ChannelTotalTime"],"0x0288":["CS","1","SourceMovementType"],"0x028A":["IS","1","NumberOfPulses"],"0x028C":["DS","1","PulseRepetitionInterval"],"0x0290":["IS","1","SourceApplicatorNumber"],"0x0291":["SH","1","SourceApplicatorID"],"0x0292":["CS","1","SourceApplicatorType"],"0x0294":["LO","1","SourceApplicatorName"],"0x0296":["DS","1","SourceApplicatorLength"],"0x0298":["LO","1","SourceApplicatorManufacturer"],"0x029C":["DS","1","SourceApplicatorWallNominalThickness"],"0x029E":["DS","1","SourceApplicatorWallNominalTransmission"],"0x02A0":["DS","1","SourceApplicatorStepSize"],"0x02A2":["IS","1","TransferTubeNumber"],"0x02A4":["DS","1","TransferTubeLength"],"0x02B0":["SQ","1","ChannelShieldSequence"],"0x02B2":["IS","1","ChannelShieldNumber"],"0x02B3":["SH","1","ChannelShieldID"],"0x02B4":["LO","1","ChannelShieldName"],"0x02B8":["DS","1","ChannelShieldNominalThickness"],"0x02BA":["DS","1","ChannelShieldNominalTransmission"],"0x02C8":["DS","1","FinalCumulativeTimeWeight"],"0x02D0":["SQ","1","BrachyControlPointSequence"],"0x02D2":["DS","1","ControlPointRelativePosition"],"0x02D4":["DS","3","ControlPoint3DPosition"],"0x02D6":["DS","1","CumulativeTimeWeight"],"0x02E0":["CS","1","CompensatorDivergence"],"0x02E1":["CS","1","CompensatorMountingPosition"],"0x02E2":["DS","1-n","SourceToCompensatorDistance"],"0x02E3":["FL","1","TotalCompensatorTrayWaterEquivalentThickness"],"0x02E4":["FL","1","IsocenterToCompensatorTrayDistance"],"0x02E5":["FL","1","CompensatorColumnOffset"],"0x02E6":["FL","1-n","IsocenterToCompensatorDistances"],"0x02E7":["FL","1","CompensatorRelativeStoppingPowerRatio"],"0x02E8":["FL","1","CompensatorMillingToolDiameter"],"0x02EA":["SQ","1","IonRangeCompensatorSequence"],"0x02EB":["LT","1","CompensatorDescription"],"0x0302":["IS","1","RadiationMassNumber"],"0x0304":["IS","1","RadiationAtomicNumber"],"0x0306":["SS","1","RadiationChargeState"],"0x0308":["CS","1","ScanMode"],"0x030A":["FL","2","VirtualSourceAxisDistances"],"0x030C":["SQ","1","SnoutSequence"],"0x030D":["FL","1","SnoutPosition"],"0x030F":["SH","1","SnoutID"],"0x0312":["IS","1","NumberOfRangeShifters"],"0x0314":["SQ","1","RangeShifterSequence"],"0x0316":["IS","1","RangeShifterNumber"],"0x0318":["SH","1","RangeShifterID"],"0x0320":["CS","1","RangeShifterType"],"0x0322":["LO","1","RangeShifterDescription"],"0x0330":["IS","1","NumberOfLateralSpreadingDevices"],"0x0332":["SQ","1","LateralSpreadingDeviceSequence"],"0x0334":["IS","1","LateralSpreadingDeviceNumber"],"0x0336":["SH","1","LateralSpreadingDeviceID"],"0x0338":["CS","1","LateralSpreadingDeviceType"],"0x033A":["LO","1","LateralSpreadingDeviceDescription"],"0x033C":["FL","1","LateralSpreadingDeviceWaterEquivalentThickness"],"0x0340":["IS","1","NumberOfRangeModulators"],"0x0342":["SQ","1","RangeModulatorSequence"],"0x0344":["IS","1","RangeModulatorNumber"],"0x0346":["SH","1","RangeModulatorID"],"0x0348":["CS","1","RangeModulatorType"],"0x034A":["LO","1","RangeModulatorDescription"],"0x034C":["SH","1","BeamCurrentModulationID"],"0x0350":["CS","1","PatientSupportType"],"0x0352":["SH","1","PatientSupportID"],"0x0354":["LO","1","PatientSupportAccessoryCode"],"0x0356":["FL","1","FixationLightAzimuthalAngle"],"0x0358":["FL","1","FixationLightPolarAngle"],"0x035A":["FL","1","MetersetRate"],"0x0360":["SQ","1","RangeShifterSettingsSequence"],"0x0362":["LO","1","RangeShifterSetting"],"0x0364":["FL","1","IsocenterToRangeShifterDistance"],"0x0366":["FL","1","RangeShifterWaterEquivalentThickness"],"0x0370":["SQ","1","LateralSpreadingDeviceSettingsSequence"],"0x0372":["LO","1","LateralSpreadingDeviceSetting"],"0x0374":["FL","1","IsocenterToLateralSpreadingDeviceDistance"],"0x0380":["SQ","1","RangeModulatorSettingsSequence"],"0x0382":["FL","1","RangeModulatorGatingStartValue"],"0x0384":["FL","1","RangeModulatorGatingStopValue"],"0x0386":["FL","1","RangeModulatorGatingStartWaterEquivalentThickness"],"0x0388":["FL","1","RangeModulatorGatingStopWaterEquivalentThickness"],"0x038A":["FL","1","IsocenterToRangeModulatorDistance"],"0x0390":["SH","1","ScanSpotTuneID"],"0x0392":["IS","1","NumberOfScanSpotPositions"],"0x0394":["FL","1-n","ScanSpotPositionMap"],"0x0396":["FL","1-n","ScanSpotMetersetWeights"],"0x0398":["FL","2","ScanningSpotSize"],"0x039A":["IS","1","NumberOfPaintings"],"0x03A0":["SQ","1","IonToleranceTableSequence"],"0x03A2":["SQ","1","IonBeamSequence"],"0x03A4":["SQ","1","IonBeamLimitingDeviceSequence"],"0x03A6":["SQ","1","IonBlockSequence"],"0x03A8":["SQ","1","IonControlPointSequence"],"0x03AA":["SQ","1","IonWedgeSequence"],"0x03AC":["SQ","1","IonWedgePositionSequence"],"0x0401":["SQ","1","ReferencedSetupImageSequence"],"0x0402":["ST","1","SetupImageComment"],"0x0410":["SQ","1","MotionSynchronizationSequence"],"0x0412":["FL","3","ControlPointOrientation"],"0x0420":["SQ","1","GeneralAccessorySequence"],"0x0421":["SH","1","GeneralAccessoryID"],"0x0422":["ST","1","GeneralAccessoryDescription"],"0x0423":["CS","1","GeneralAccessoryType"],"0x0424":["IS","1","GeneralAccessoryNumber"],"0x0425":["FL","1","SourceToGeneralAccessoryDistance"],"0x0431":["SQ","1","ApplicatorGeometrySequence"],"0x0432":["CS","1","ApplicatorApertureShape"],"0x0433":["FL","1","ApplicatorOpening"],"0x0434":["FL","1","ApplicatorOpeningX"],"0x0435":["FL","1","ApplicatorOpeningY"],"0x0436":["FL","1","SourceToApplicatorMountingPositionDistance"],"0x0440":["IS","1","NumberOfBlockSlabItems"],"0x0441":["SQ","1","BlockSlabSequence"],"0x0442":["DS","1","BlockSlabThickness"],"0x0443":["US","1","BlockSlabNumber"],"0x0450":["SQ","1","DeviceMotionControlSequence"],"0x0451":["CS","1","DeviceMotionExecutionMode"],"0x0452":["CS","1","DeviceMotionObservationMode"],"0x0453":["SQ","1","DeviceMotionParameterCodeSequence"]},"0x300C":{"0x0000":["UL","1","GenericGroupLength"],"0x0002":["SQ","1","ReferencedRTPlanSequence"],"0x0004":["SQ","1","ReferencedBeamSequence"],"0x0006":["IS","1","ReferencedBeamNumber"],"0x0007":["IS","1","ReferencedReferenceImageNumber"],"0x0008":["DS","1","StartCumulativeMetersetWeight"],"0x0009":["DS","1","EndCumulativeMetersetWeight"],"0x000A":["SQ","1","ReferencedBrachyApplicationSetupSequence"],"0x000C":["IS","1","ReferencedBrachyApplicationSetupNumber"],"0x000E":["IS","1","ReferencedSourceNumber"],"0x0020":["SQ","1","ReferencedFractionGroupSequence"],"0x0022":["IS","1","ReferencedFractionGroupNumber"],"0x0040":["SQ","1","ReferencedVerificationImageSequence"],"0x0042":["SQ","1","ReferencedReferenceImageSequence"],"0x0050":["SQ","1","ReferencedDoseReferenceSequence"],"0x0051":["IS","1","ReferencedDoseReferenceNumber"],"0x0055":["SQ","1","BrachyReferencedDoseReferenceSequence"],"0x0060":["SQ","1","ReferencedStructureSetSequence"],"0x006A":["IS","1","ReferencedPatientSetupNumber"],"0x0080":["SQ","1","ReferencedDoseSequence"],"0x00A0":["IS","1","ReferencedToleranceTableNumber"],"0x00B0":["SQ","1","ReferencedBolusSequence"],"0x00C0":["IS","1","ReferencedWedgeNumber"],"0x00D0":["IS","1","ReferencedCompensatorNumber"],"0x00E0":["IS","1","ReferencedBlockNumber"],"0x00F0":["IS","1","ReferencedControlPointIndex"],"0x00F2":["SQ","1","ReferencedControlPointSequence"],"0x00F4":["IS","1","ReferencedStartControlPointIndex"],"0x00F6":["IS","1","ReferencedStopControlPointIndex"],"0x0100":["IS","1","ReferencedRangeShifterNumber"],"0x0102":["IS","1","ReferencedLateralSpreadingDeviceNumber"],"0x0104":["IS","1","ReferencedRangeModulatorNumber"],"0x0111":["SQ","1","OmittedBeamTaskSequence"],"0x0112":["CS","1","ReasonForOmission"],"0x0113":["LO","1","ReasonForOmissionDescription"]},"0x300E":{"0x0000":["UL","1","GenericGroupLength"],"0x0002":["CS","1","ApprovalStatus"],"0x0004":["DA","1","ReviewDate"],"0x0005":["TM","1","ReviewTime"],"0x0008":["PN","1","ReviewerName"]},"0x4000":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["LT","1","Arbitrary"],"0x4000":["LT","1","TextComments"]},"0x4008":{"0x0000":["UL","1","GenericGroupLength"],"0x0040":["SH","1","ResultsID"],"0x0042":["LO","1","ResultsIDIssuer"],"0x0050":["SQ","1","ReferencedInterpretationSequence"],"0x00FF":["CS","1","ReportProductionStatusTrial"],"0x0100":["DA","1","InterpretationRecordedDate"],"0x0101":["TM","1","InterpretationRecordedTime"],"0x0102":["PN","1","InterpretationRecorder"],"0x0103":["LO","1","ReferenceToRecordedSound"],"0x0108":["DA","1","InterpretationTranscriptionDate"],"0x0109":["TM","1","InterpretationTranscriptionTime"],"0x010A":["PN","1","InterpretationTranscriber"],"0x010B":["ST","1","InterpretationText"],"0x010C":["PN","1","InterpretationAuthor"],"0x0111":["SQ","1","InterpretationApproverSequence"],"0x0112":["DA","1","InterpretationApprovalDate"],"0x0113":["TM","1","InterpretationApprovalTime"],"0x0114":["PN","1","PhysicianApprovingInterpretation"],"0x0115":["LT","1","InterpretationDiagnosisDescription"],"0x0117":["SQ","1","InterpretationDiagnosisCodeSequence"],"0x0118":["SQ","1","ResultsDistributionListSequence"],"0x0119":["PN","1","DistributionName"],"0x011A":["LO","1","DistributionAddress"],"0x0200":["SH","1","InterpretationID"],"0x0202":["LO","1","InterpretationIDIssuer"],"0x0210":["CS","1","InterpretationTypeID"],"0x0212":["CS","1","InterpretationStatusID"],"0x0300":["ST","1","Impressions"],"0x4000":["ST","1","ResultsComments"]},"0x4010":{"0x0000":["UL","1","GenericGroupLength"],"0x0001":["CS","1","LowEnergyDetectors"],"0x0002":["CS","1","HighEnergyDetectors"],"0x0004":["SQ","1","DetectorGeometrySequence"],"0x1001":["SQ","1","ThreatROIVoxelSequence"],"0x1004":["FL","3","ThreatROIBase"],"0x1005":["FL","3","ThreatROIExtents"],"0x1006":["OB","1","ThreatROIBitmap"],"0x1007":["SH","1","RouteSegmentID"],"0x1008":["CS","1","GantryType"],"0x1009":["CS","1","OOIOwnerType"],"0x100A":["SQ","1","RouteSegmentSequence"],"0x1010":["US","1","PotentialThreatObjectID"],"0x1011":["SQ","1","ThreatSequence"],"0x1012":["CS","1","ThreatCategory"],"0x1013":["LT","1","ThreatCategoryDescription"],"0x1014":["CS","1","ATDAbilityAssessment"],"0x1015":["CS","1","ATDAssessmentFlag"],"0x1016":["FL","1","ATDAssessmentProbability"],"0x1017":["FL","1","Mass"],"0x1018":["FL","1","Density"],"0x1019":["FL","1","ZEffective"],"0x101A":["SH","1","BoardingPassID"],"0x101B":["FL","3","CenterOfMass"],"0x101C":["FL","3","CenterOfPTO"],"0x101D":["FL","6-n","BoundingPolygon"],"0x101E":["SH","1","RouteSegmentStartLocationID"],"0x101F":["SH","1","RouteSegmentEndLocationID"],"0x1020":["CS","1","RouteSegmentLocationIDType"],"0x1021":["CS","1-n","AbortReason"],"0x1023":["FL","1","VolumeOfPTO"],"0x1024":["CS","1","AbortFlag"],"0x1025":["DT","1","RouteSegmentStartTime"],"0x1026":["DT","1","RouteSegmentEndTime"],"0x1027":["CS","1","TDRType"],"0x1028":["CS","1","InternationalRouteSegment"],"0x1029":["LO","1-n","ThreatDetectionAlgorithmandVersion"],"0x102A":["SH","1","AssignedLocation"],"0x102B":["DT","1","AlarmDecisionTime"],"0x1031":["CS","1","AlarmDecision"],"0x1033":["US","1","NumberOfTotalObjects"],"0x1034":["US","1","NumberOfAlarmObjects"],"0x1037":["SQ","1","PTORepresentationSequence"],"0x1038":["SQ","1","ATDAssessmentSequence"],"0x1039":["CS","1","TIPType"],"0x103A":["CS","1","DICOSVersion"],"0x1041":["DT","1","OOIOwnerCreationTime"],"0x1042":["CS","1","OOIType"],"0x1043":["FL","3","OOISize"],"0x1044":["CS","1","AcquisitionStatus"],"0x1045":["SQ","1","BasisMaterialsCodeSequence"],"0x1046":["CS","1","PhantomType"],"0x1047":["SQ","1","OOIOwnerSequence"],"0x1048":["CS","1","ScanType"],"0x1051":["LO","1","ItineraryID"],"0x1052":["SH","1","ItineraryIDType"],"0x1053":["LO","1","ItineraryIDAssigningAuthority"],"0x1054":["SH","1","RouteID"],"0x1055":["SH","1","RouteIDAssigningAuthority"],"0x1056":["CS","1","InboundArrivalType"],"0x1058":["SH","1","CarrierID"],"0x1059":["CS","1","CarrierIDAssigningAuthority"],"0x1060":["FL","3","SourceOrientation"],"0x1061":["FL","3","SourcePosition"],"0x1062":["FL","1","BeltHeight"],"0x1064":["SQ","1","AlgorithmRoutingCodeSequence"],"0x1067":["CS","1","TransportClassification"],"0x1068":["LT","1","OOITypeDescriptor"],"0x1069":["FL","1","TotalProcessingTime"],"0x106C":["OB","1","DetectorCalibrationData"],"0x106D":["CS","1","AdditionalScreeningPerformed"],"0x106E":["CS","1","AdditionalInspectionSelectionCriteria"],"0x106F":["SQ","1","AdditionalInspectionMethodSequence"],"0x1070":["CS","1","AITDeviceType"],"0x1071":["SQ","1","QRMeasurementsSequence"],"0x1072":["SQ","1","TargetMaterialSequence"],"0x1073":["FD","1","SNRThreshold"],"0x1075":["DS","1","ImageScaleRepresentation"],"0x1076":["SQ","1","ReferencedPTOSequence"],"0x1077":["SQ","1","ReferencedTDRInstanceSequence"],"0x1078":["ST","1","PTOLocationDescription"],"0x1079":["SQ","1","AnomalyLocatorIndicatorSequence"],"0x107A":["FL","3","AnomalyLocatorIndicator"],"0x107B":["SQ","1","PTORegionSequence"],"0x107C":["CS","1","InspectionSelectionCriteria"],"0x107D":["SQ","1","SecondaryInspectionMethodSequence"],"0x107E":["DS","6","PRCSToRCSOrientation"]},"0x4FFE":{"0x0000":["UL","1","GenericGroupLength"],"0x0001":["SQ","1","MACParametersSequence"]},"0x5000":{"0x0000":["UL","1","GenericGroupLength"],"0x0005":["US","1","CurveDimensions"],"0x0010":["US","1","NumberOfPoints"],"0x0020":["CS","1","TypeOfData"],"0x0022":["LO","1","CurveDescription"],"0x0030":["SH","1-n","AxisUnits"],"0x0040":["SH","1-n","AxisLabels"],"0x0103":["US","1","DataValueRepresentation"],"0x0104":["US","1-n","MinimumCoordinateValue"],"0x0105":["US","1-n","MaximumCoordinateValue"],"0x0106":["SH","1-n","CurveRange"],"0x0110":["US","1-n","CurveDataDescriptor"],"0x0112":["US","1-n","CoordinateStartValue"],"0x0114":["US","1-n","CoordinateStepValue"],"0x1001":["CS","1","CurveActivationLayer"],"0x2000":["US","1","AudioType"],"0x2002":["US","1","AudioSampleFormat"],"0x2004":["US","1","NumberOfChannels"],"0x2006":["UL","1","NumberOfSamples"],"0x2008":["UL","1","SampleRate"],"0x200A":["UL","1","TotalTime"],"0x200C":["ox","1","AudioSampleData"],"0x200E":["LT","1","AudioComments"],"0x2500":["LO","1","CurveLabel"],"0x2600":["SQ","1","CurveReferencedOverlaySequence"],"0x2610":["US","1","CurveReferencedOverlayGroup"],"0x3000":["ox","1","CurveData"]},"0x5200":{"0x0000":["UL","1","GenericGroupLength"],"0x9229":["SQ","1","SharedFunctionalGroupsSequence"],"0x9230":["SQ","1","PerFrameFunctionalGroupsSequence"]},"0x5400":{"0x0000":["UL","1","GenericGroupLength"],"0x0100":["SQ","1","WaveformSequence"],"0x0110":["ox","1","ChannelMinimumValue"],"0x0112":["ox","1","ChannelMaximumValue"],"0x1004":["US","1","WaveformBitsAllocated"],"0x1006":["CS","1","WaveformSampleInterpretation"],"0x100A":["ox","1","WaveformPaddingValue"],"0x1010":["ox","1","WaveformData"]},"0x5600":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["OF","1","FirstOrderPhaseCorrectionAngle"],"0x0020":["OF","1","SpectroscopyData"]},"0x6000":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["US","1","OverlayRows"],"0x0011":["US","1","OverlayColumns"],"0x0012":["US","1","OverlayPlanes"],"0x0015":["IS","1","NumberOfFramesInOverlay"],"0x0022":["LO","1","OverlayDescription"],"0x0040":["CS","1","OverlayType"],"0x0045":["LO","1","OverlaySubtype"],"0x0050":["SS","2","OverlayOrigin"],"0x0051":["US","1","ImageFrameOrigin"],"0x0052":["US","1","OverlayPlaneOrigin"],"0x0060":["CS","1","OverlayCompressionCode"],"0x0061":["SH","1","OverlayCompressionOriginator"],"0x0062":["SH","1","OverlayCompressionLabel"],"0x0063":["CS","1","OverlayCompressionDescription"],"0x0066":["AT","1-n","OverlayCompressionStepPointers"],"0x0068":["US","1","OverlayRepeatInterval"],"0x0069":["US","1","OverlayBitsGrouped"],"0x0100":["US","1","OverlayBitsAllocated"],"0x0102":["US","1","OverlayBitPosition"],"0x0110":["CS","1","OverlayFormat"],"0x0200":["US","1","OverlayLocation"],"0x0800":["CS","1-n","OverlayCodeLabel"],"0x0802":["US","1","OverlayNumberOfTables"],"0x0803":["AT","1-n","OverlayCodeTableLocation"],"0x0804":["US","1","OverlayBitsForCodeWord"],"0x1001":["CS","1","OverlayActivationLayer"],"0x1100":["US","1","OverlayDescriptorGray"],"0x1101":["US","1","OverlayDescriptorRed"],"0x1102":["US","1","OverlayDescriptorGreen"],"0x1103":["US","1","OverlayDescriptorBlue"],"0x1200":["US","1-n","OverlaysGray"],"0x1201":["US","1-n","OverlaysRed"],"0x1202":["US","1-n","OverlaysGreen"],"0x1203":["US","1-n","OverlaysBlue"],"0x1301":["IS","1","ROIArea"],"0x1302":["DS","1","ROIMean"],"0x1303":["DS","1","ROIStandardDeviation"],"0x1500":["LO","1","OverlayLabel"],"0x3000":["ox","1","OverlayData"],"0x4000":["LT","1","OverlayComments"]},"0x7FE0":{"0x0000":["UL","1","GenericGroupLength"],"0x0008":["OF","1","FloatPixelData"],"0x0009":["OD","1","DoubleFloatPixelData"],"0x0010":["ox","1","PixelData"],"0x0020":["OW","1","CoefficientsSDVN"],"0x0030":["OW","1","CoefficientsSDHN"],"0x0040":["OW","1","CoefficientsSDDN"]},"0x7F00":{"0x0000":["UL","1","GenericGroupLength"],"0x0010":["ox","1","VariablePixelData"],"0x0011":["US","1","VariableNextDataGroup"],"0x0020":["OW","1","VariableCoefficientsSDVN"],"0x0030":["OW","1","VariableCoefficientsSDHN"],"0x0040":["OW","1","VariableCoefficientsSDDN"]},"0xFFFA":{"0x0000":["UL","1","GenericGroupLength"],"0xFFFA":["SQ","1","DigitalSignaturesSequence"]},"0xFFFC":{"0x0000":["UL","1","GenericGroupLength"],"0xFFFC":["OB","1","DataSetTrailingPadding"]},"0xFFFE":{"0x0000":["UL","1","GenericGroupLength"],"0xE000":["NONE","1","Item"],"0xE00D":["NONE","1","ItemDelimitationItem"],"0xE0DD":["NONE","1","SequenceDelimitationItem"]}},A.dicom.TagGroups={x0000:"Command",x0002:"Meta Element",x0004:"File Set",x0008:"Identifying",x0009:"SPI Identifying",x0010:"Patient",x0012:"Clinical Trial",x0018:"Acquisition",x0019:"SPI Acquisition",x0020:"Image",x0021:"SPI Image",x0022:"Ophtalmology",x0028:"Image Presentation",x0032:"Study",x0038:"Visit",x003A:"Waveform",x0040:"Procedure",x0042:"Encapsulated Document",x0050:"Device Informations",x0054:"Nuclear Medicine",x0060:"Histogram",x0070:"Presentation State",x0072:"Hanging Protocol",x0088:"Storage",x0100:"Authorization",x0400:"Digital Signature",x1000:"Code Table",x1010:"Zonal Map",x2000:"Film Session",x2010:"Film Box",x2020:"Image Box",x2030:"Annotation",x2040:"Overlay Box",x2050:"Presentation LUT",x2100:"Print Job",x2110:"Printer",x2120:"Queue",x2130:"Print Content",x2200:"Media Creation",x3002:"RT Image",x3004:"RT Dose",x3006:"RT StructureSet",x3008:"RT Treatment",x300A:"RT Plan",x300C:"RT Relationship",x300E:"RT Approval",x4000:"Text",x4008:"Results",x4FFE:"MAC Parameters",x5000:"Curve",x5002:"Curve",x5004:"Curve",x5006:"Curve",x5008:"Curve",x500A:"Curve",x500C:"Curve",x500E:"Curve",x5400:"Waveform Data",x6000:"Overlays",x6002:"Overlays",x6004:"Overlays",x6008:"Overlays",x600A:"Overlays",x600C:"Overlays",x600E:"Overlays",xFFFC:"Generic",x7FE0:"Pixel Data",xFFFF:"Unknown"},(A=A||{}).gui=A.gui||{};y=y||{};A.gui.DrawLayer=function(i){i.className+=" drawLayer";var r,o,a,n,t=this,s=null,l={x:1,y:1},u={x:0,y:0},c=null,g=null;this.getDataIndex=function(){return g};var d=new A.utils.ListenerHandler;function x(e){e.srclayerid=t.getId(),e.dataindex=g,d.fireEvent(e)}this.getKonvaStage=function(){return s},this.getKonvaLayer=function(){return r},this.getDrawController=function(){return c},this.setPlaneHelper=function(e){n=e},this.getId=function(){return i.id},this.getBaseSize=function(){return o},this.getOpacity=function(){return s.opacity()},this.setOpacity=function(e){s.opacity(Math.min(Math.max(e,0),1))},this.setScale=function(e){e=n.getOrientedXYZ(e),e={x:l.x*e.x,y:l.y*e.y};s.scale(e),function(e){for(var t=2/e.x,n=2/e.y,i=s.find("Label"),r=0;r<i.length;++r)i[r].scale({x:t,y:n})}(e)},this.setOffset=function(e){e=n.getPlaneOffsetFromOffset3D(e);s.offset({x:u.x+e.x,y:u.y+e.y})},this.setBaseOffset=function(e){u=n.getPlaneOffsetFromOffset3D({x:e.getX(),y:e.getY(),z:e.getZ()}),s.offset({x:u.x,y:u.y})},this.display=function(e){i.style.display=e?"":"none"},this.isVisible=function(){return""===i.style.display},this.draw=function(){s.draw()},this.initialise=function(e,t,n){o=e,a=t,g=n,(s=new y.Stage({container:i,width:o.x,height:o.y,listening:!1})).getContent().setAttribute("style",""),r=new y.Layer({listening:!1,visible:!0}),s.add(r),c=new A.ctrl.DrawController(r)},this.fitToContainer=function(e,t){l={x:e*a.x,y:e*a.y},s.setWidth(t.x),s.setHeight(t.y),this.setScale({x:1,y:1,z:1})},this.bindInteraction=function(){s.listening(!0),i.style.pointerEvents="auto";for(var e=A.gui.interactionEventNames,t=0;t<e.length;++t)i.addEventListener(e[t],x)},this.unbindInteraction=function(){s.listening(!1),i.style.pointerEvents="none";for(var e=A.gui.interactionEventNames,t=0;t<e.length;++t)i.removeEventListener(e[t],x)},this.setCurrentPosition=function(e,t){this.getDrawController().activateDrawLayer(t,n.getScrollIndex())},this.addEventListener=function(e,t){d.add(e,t)},this.removeEventListener=function(e,t){d.remove(e,t)}},(A=A||{}).gui=A.gui||{},A.gui.interactionEventNames=["mousedown","mousemove","mouseup","mouseout","wheel","dblclick","touchstart","touchmove","touchend"],A.gui.getElement=function(e,t){var n=document.getElementById(e);if(!n)return null;n=n.getElementsByClassName(t),n=n[n.length-1];return n=void 0===n?document.getElementById(e+"-"+t):n},A.getElement=A.gui.getElement,A.gui.prompt=function(e,t){return prompt(e,t)},A.prompt=A.gui.prompt,A.openRoiDialog,A.gui.getTouchesPositions=function(e){var t=0,n=0;if(0!==e.length&&void 0!==e[0].target)for(var i=e[0].target.offsetParent;i;)isNaN(i.offsetLeft)||(t+=i.offsetLeft),isNaN(i.offsetTop)||(n+=i.offsetTop),i=i.offsetParent;else A.logger.debug("No touch target offset parent.");for(var r=[],o=0;o<e.length;++o)r.push({x:e[o].pageX-t,y:e[o].pageY-n});return r},A.gui.getEventOffset=function(e){var t=[];return void 0!==e.targetTouches&&0!==e.targetTouches.length?t=A.gui.getTouchesPositions(e.targetTouches):void 0!==e.changedTouches&&0!==e.changedTouches.length?t=A.gui.getTouchesPositions(e.changedTouches):t.push({x:e.offsetX,y:e.offsetY}),t},A.gui.canCreateCanvas=function(e,t){var n=document.createElement("canvas");n.width=e,n.height=t;var i=document.createElement("canvas");i.width=1,i.height=1;var r=n.getContext("2d"),i=i.getContext("2d");return r&&(r.fillRect(e-1,t-1,1,1),i.drawImage(n,e-1,t-1,1,1,0,0,1,1)),i&&0!==i.getImageData(0,0,1,1).data[3]},(A=A||{}).gui=A.gui||{},A.gui.getLayerGroupDivId=function(e,t){return"layer-"+e+"-"+t},A.gui.getLayerDetailsFromLayerDivId=function(e){var t=e.lastIndexOf("-"),n=null,i=null;return-1!==t&&(n=parseInt(e.substring(6,t),10),i=parseInt(e.substring(t+1),10)),{groupId:n,layerId:i}},A.gui.getLayerDetailsFromEvent=function(e){var t=null,e=e.target.closest(".layer");return t=e&&void 0!==e.id?A.gui.getLayerDetailsFromLayerDivId(e.id):t},A.gui.getViewOrientation=function(e,t){var n=A.math.getIdentityMat33();return n=void 0!==t?e.getOrientation().asOneAndZeros().getInverse().multiply(t):n},A.gui.LayerGroup=function(r,t){var n,a=this,s=[],o={x:1,y:1,z:1},e={x:1,y:1,z:1},l={x:0,y:0,z:0},i=null,u=null,c=new A.utils.ListenerHandler;function g(){var e=document.createElement("div");return e.id=A.gui.getLayerGroupDivId(t,s.length),e.className="layer",e.style.pointerEvents="none",e}function d(e){c.fireEvent(e)}this.getTargetOrientation=function(){return n},this.setTargetOrientation=function(e){n=e},this.getElementId=function(){return r.id},this.getGroupId=function(){return t},this.getScale=function(){return o},this.getBaseScale=function(){return e},this.getAddedScale=function(){return{x:o.x/e.x,y:o.y/e.y,z:o.z/e.z}},this.getOffset=function(){return l},this.getNumberOfLayers=function(){return s.length},this.getActiveViewLayer=function(){return s[i]},this.getViewLayersByDataIndex=function(e){for(var t=[],n=0;n<s.length;++n)s[n]instanceof A.gui.ViewLayer&&s[n].getDataIndex()===e&&t.push(s[n]);return t},this.getActiveDrawLayer=function(){return s[u]},this.getDrawLayersByDataIndex=function(e){for(var t=[],n=0;n<s.length;++n)s[n]instanceof A.gui.DrawLayer&&s[n].getDataIndex()===e&&t.push(s[n]);return t},this.setActiveViewLayer=function(e){i=e},this.setActiveViewLayerByDataIndex=function(e){for(var t=0;t<s.length;++t)if(s[t]instanceof A.gui.ViewLayer&&s[t].getDataIndex()===e){this.setActiveViewLayer(t);break}},this.setActiveDrawLayer=function(e){u=e},this.setActiveDrawLayerByDataIndex=function(e){for(var t=0;t<s.length;++t)if(s[t]instanceof A.gui.DrawLayer&&s[t].getDataIndex()===e){this.setActiveDrawLayer(t);break}},this.addViewLayer=function(){var e=s.length,t=g();r.append(t);t=new A.gui.ViewLayer(t);return s.push(t),this.setActiveViewLayer(e),function(e){e.addEventListener("positionchange",a.updateLayersToPositionChange);for(var t=0;t<A.image.viewEventNames.length;++t)e.addEventListener(A.image.viewEventNames[t],d);e.addEventListener("renderstart",d),e.addEventListener("renderend",d)}(t),t},this.addDrawLayer=function(){u=s.length;var e=g();r.append(e);e=new A.gui.DrawLayer(e);return s.push(e),e},this.empty=function(){s=[],u=i=null;var e=r.getElementsByClassName("layer");if(e)for(;0<e.length;)e[0].remove()},this.updateLayersToPositionChange=function(e){for(var t=0;t<s.length;++t)s[t]instanceof A.gui.ViewLayer&&(s[t].removeEventListener("positionchange",a.updateLayersToPositionChange),s[t].removeEventListener("positionchange",d));for(var n=new A.math.Index(e.value[0]),i=new A.math.Point(e.value[1]),r=0;r<s.length;++r)s[r].getId()!==e.srclayerid&&s[r].setCurrentPosition(i,n);for(var o=0;o<s.length;++o)s[o]instanceof A.gui.ViewLayer&&(s[o].addEventListener("positionchange",a.updateLayersToPositionChange),s[o].addEventListener("positionchange",d))},this.fitToContainer=function(e){if(0===r.offsetWidth&&0===r.offsetHeight)throw new Error("Cannot fit to zero sized container.");for(var t=Math.min(r.offsetWidth/e.x,r.offsetHeight/e.y),n={x:Math.floor(e.x*t),y:Math.floor(e.y*t)},i=0;i<s.length;++i)s[i].fitToContainer(t,n)},this.addScale=function(e,t){var n={x:o.x*(1+e),y:o.y*(1+e),z:o.z*(1+e)},i=(t.getX()-l.x)*o.x,e=(t.getY()-l.y)*o.y,t=(t.getZ()-l.z)*o.z,t={x:i/o.x+l.x-i/n.x,y:e/o.y+l.y-e/n.y,z:t/o.z+l.z-t/n.z};this.setOffset(t),this.setScale(n)},this.setScale=function(e){o=e;for(var t=0;t<s.length;++t)s[t].setScale(o);d({type:"zoomchange",value:[o.x,o.y,o.z]})},this.addTranslation=function(e){this.setOffset({x:l.x-e.x,y:l.y-e.y,z:l.z-e.z})},this.setOffset=function(e){l=e;for(var t=0;t<s.length;++t)s[t].setOffset(l);d({type:"offsetchange",value:[l.x,l.y,l.z]})},this.reset=function(){this.setScale(e),this.setOffset({x:0,y:0,z:0})},this.draw=function(){for(var e=0;e<s.length;++e)s[e].draw()},this.display=function(e){for(var t=0;t<s.length;++t)s[t].display(e)},this.addEventListener=function(e,t){c.add(e,t)},this.removeEventListener=function(e,t){c.remove(e,t)}},(A=A||{}).gui=A.gui||{},A.gui.WindowLevelBinder=function(){this.getEventType=function(){return"wlchange"},this.getCallback=function(n){return function(e){var t=n.getViewLayersByDataIndex(e.dataindex);0!==t.length&&t[0].getViewController().setWindowLevel(e.value[0],e.value[1])}}},A.gui.PositionBinder=function(){this.getEventType=function(){return"positionchange"},this.getCallback=function(t){return function(e){e=new A.math.Point(e.value[1]);t.getActiveViewLayer().getViewController().setCurrentPosition(e)}}},A.gui.ZoomBinder=function(){this.getEventType=function(){return"zoomchange"},this.getCallback=function(t){return function(e){t.setScale({x:e.value[0],y:e.value[1],z:e.value[2]}),t.draw()}}},A.gui.OffsetBinder=function(){this.getEventType=function(){return"offsetchange"},this.getCallback=function(t){return function(e){t.setOffset({x:e.value[0],y:e.value[1],z:e.value[2]}),t.draw()}}},A.gui.OpacityBinder=function(){this.getEventType=function(){return"opacitychange"},this.getCallback=function(n){return function(e){var t;void 0===e.dataindex||0!==(t=n.getViewLayersByDataIndex(e.dataindex)).length&&(t[0].setOpacity(e.value),t[0].draw())}}},A.gui.Stage=function(){var i=[],n=null,r=[],o=null;function a(t,n){void 0===o[n]&&(o[n]=[]);var e=o[n].find(function(e){return e.binder===t});return void 0===e&&o[n].push(e={binder:t,callback:function(e){l(n,t),t.getCallback(i[n])(e),s(n,t)}}),e.callback}function s(e,t){for(var n=0;n<i.length;++n)n!==e&&i[e].addEventListener(t.getEventType(),a(t,n))}function l(e,t){for(var n=0;n<i.length;++n)n!==e&&i[e].removeEventListener(t.getEventType(),a(t,n))}this.getLayerGroup=function(e){return i[e]},this.getNumberOfLayerGroups=function(){return i.length},this.getActiveLayerGroup=function(){return this.getLayerGroup(n)},this.getViewLayersByDataIndex=function(e){for(var t=[],n=0;n<i.length;++n)t=t.concat(i[n].getViewLayersByDataIndex(e));return t},this.addLayerGroup=function(e){n=i.length;var t=new A.gui.LayerGroup(e,n),e=o&&0!==o.length;return e&&this.unbindLayerGroups(),i.push(t),e&&this.bindLayerGroups(),t},this.getLayerGroupWithElementId=function(t){return i.find(function(e){return e.getElementId()===t})},this.setBinders=function(e){if(null==e)throw new Error("Cannot set null or undefined binders");0!==r.length&&this.unbindLayerGroups(),r=e.slice(),this.bindLayerGroups()},this.empty=function(){this.unbindLayerGroups();for(var e=0;e<i.length;++e)i[e].empty();i=[],n=null},this.reset=function(){for(var e=0;e<i.length;++e)i[e].reset()},this.draw=function(){for(var e=0;e<i.length;++e)i[e].draw()},this.bindLayerGroups=function(){if(0!==i.length&&1!==i.length&&0!==r.length){o=new Array(i.length);for(var e=0;e<i.length;++e)for(var t=0;t<r.length;++t)s(e,r[t])}},this.unbindLayerGroups=function(){if(0!==i.length&&1!==i.length&&0!==r.length&&o){for(var e=0;e<i.length;++e)for(var t=0;t<r.length;++t)l(e,r[t]);o=null}}},(A=A||{}).gui=A.gui||{},A.gui.Style=function(){var t="#ffff80",n={x:1,y:1},i={x:1,y:1},e={x:.25,y:.25};this.getFontFamily=function(){return"Verdana"},this.getFontSize=function(){return 10},this.getStrokeWidth=function(){return 2},this.getTextColour=function(){return"#fff"},this.getLineColour=function(){return t},this.setLineColour=function(e){t=e},this.setBaseScale=function(e){n=e},this.setZoomScale=function(e){i=e},this.getBaseScale=function(){return n},this.getZoomScale=function(){return i},this.scale=function(e){return e/n.x},this.applyZoomScale=function(e){return{x:2*e/i.x,y:2*e/i.y}},this.getShadowOffset=function(){return e},this.getTagOpacity=function(){return.2},this.getTextPadding=function(){return 3}},A.gui.Style.prototype.getFontStr=function(){return"normal "+this.getFontSize()+"px sans-serif"},A.gui.Style.prototype.getLineHeight=function(){return this.getFontSize()+this.getFontSize()/5},A.gui.Style.prototype.getScaledFontSize=function(){return this.scale(this.getFontSize())},A.gui.Style.prototype.getScaledStrokeWidth=function(){return this.scale(this.getStrokeWidth())},A.gui.Style.prototype.getShadowLineColour=function(){return A.utils.getShadowColour(this.getLineColour())},(A=A||{}).gui=A.gui||{},A.gui.ViewLayer=function(i){i.className+=" viewLayer";var r,o,a=this,s=null,l=null,u=null,c=null,g=null,t=1,n={x:1,y:1},d={x:1,y:1},x={x:0,y:0},S={x:0,y:0},m=null,h=null;this.getDataIndex=function(){return h};var f=new A.utils.ListenerHandler;function p(e){e.srclayerid=a.getId(),e.dataindex=h,f.fireEvent(e)}function y(e){void 0!==e.skipGenerate&&!1!==e.skipGenerate||(m=!0,a.draw())}function D(e){m=!0,a.draw()}function v(e){var t,n;void 0!==e.skipGenerate&&!1!==e.skipGenerate||(n=(t=[0,1,2]).indexOf(s.getScrollIndex()),t.splice(n,1),0!==e.diffDims.filter(function(e){return-1===t.indexOf(e)}).length&&(m=!0,a.draw()))}function C(e){void 0!==e.skipGenerate&&!1!==e.skipGenerate||(m=!0,a.draw())}this.setView=function(e){e.addEventListener("wlchange",y),e.addEventListener("colourchange",D),e.addEventListener("positionchange",v),e.addEventListener("alphafuncchange",C);for(var t=0;t<A.image.viewEventNames.length;++t)e.addEventListener(A.image.viewEventNames[t],p);s=new A.ctrl.ViewController(e)},this.getViewController=function(){return s},this.getImageData=function(){return g},this.onimagechange=function(e){h===e.value[0]&&(s.setImage(e.value[1]),m=!0)},this.getId=function(){return i.id},this.getBaseSize=function(){return r},this.getOpacity=function(){return t},this.setOpacity=function(e){p({type:"opacitychange",value:[t=Math.min(Math.max(e,0),1)]})},this.setScale=function(e){e=s.getPlaneHelper().getOrientedXYZ(e);n={x:d.x*e.x,y:d.y*e.y}},this.setBaseOffset=function(e){var t=s.getPlaneHelper();S=t.getPlaneOffsetFromOffset3D({x:e.getX(),y:e.getY(),z:e.getZ()}),x=S},this.setOffset=function(e){e=s.getPlaneHelper().getPlaneOffsetFromOffset3D(e);x={x:S.x+e.x,y:S.y+e.y}},this.displayToPlaneIndex=function(e,t){t=this.displayToPlanePos(e,t);return new A.math.Index([Math.floor(t.x),Math.floor(t.y)])},this.displayToPlaneScale=function(e,t){return{x:e/n.x,y:t/n.y}},this.displayToPlanePos=function(e,t){t=this.displayToPlaneScale(e,t);return{x:t.x+x.x,y:t.y+x.y}},this.displayToMainPlanePos=function(e,t){t=this.displayToPlanePos(e,t);return{x:t.x-S.x,y:t.y-S.y}},this.display=function(e){i.style.display=e?"":"none"},this.isVisible=function(){return""===i.style.display},this.draw=function(){var e={type:"renderstart",layerid:this.getId()};p(e),m&&(s.generateImageData(g),u.getContext("2d").putImageData(g,0,0),m=!1),c.globalAlpha=t,c.save(),c.setTransform(1,0,0,1,0,0),c.clearRect(0,0,l.width,l.height),c.restore(),c.setTransform(n.x,0,0,n.y,-1*x.x*n.x,-1*x.y*n.y),c.imageSmoothingEnabled=!1,c.drawImage(u,0,0),p({type:"renderend",layerid:this.getId()})},this.initialise=function(e,t,n){if(r=e,o=t,h=n,l=document.createElement("canvas"),i.appendChild(l),l.getContext)if(c=l.getContext("2d")){if(!A.gui.canCreateCanvas(r.x,r.y))throw new Error("Cannot create canvas "+r.x+", "+r.y);(u=document.createElement("canvas")).width=r.x,u.height=r.y,c.clearRect(0,0,r.x,r.y),g=c.createImageData(r.x,r.y),m=!0}else alert("Error: failed to get the 2D context.");else alert("Error: no canvas.getContext method.")},this.fitToContainer=function(e,t){d={x:e*o.x,y:e*o.y};e=t.x,t=t.y;if(!A.gui.canCreateCanvas(e,t))throw new Error("Cannot resize canvas "+e+", "+t);l.width=e,l.height=t,this.setScale({x:1,y:1,z:1})},this.bindInteraction=function(){i.style.pointerEvents="auto";for(var e=A.gui.interactionEventNames,t=0;t<e.length;++t)i.addEventListener(e[t],p)},this.unbindInteraction=function(){i.style.pointerEvents="none";for(var e=A.gui.interactionEventNames,t=0;t<e.length;++t)i.removeEventListener(e[t],p)},this.addEventListener=function(e,t){f.add(e,t)},this.removeEventListener=function(e,t){f.remove(e,t)},this.setCurrentPosition=function(e,t){s.setCurrentPosition(e)},this.clear=function(){c.clearRect(0,0,l.width,l.height),g=c.getImageData(0,0,l.width,l.height),this.resetLayout()},this.align=function(e){l.style.top=e.getCanvas().offsetTop,l.style.left=e.getCanvas().offsetLeft}},(A=A||{}).image=A.image||{};var g="undefined"!=typeof JpegImage,d="undefined"!=typeof jpeg&&void 0!==jpeg.lossless,x="undefined"!=typeof JpxImage;function a(e,t){return e.get(2)-1-t}A.image.AsynchPixelBufferDecoder=function(i,e){var r=new A.utils.ThreadPool(10),o=!1,a=this;this.decode=function(e,t,n){o||(o=!0,r.onworkstart=a.ondecodestart,r.onworkitem=a.ondecodeditem,r.onwork=a.ondecoded,r.onworkend=a.ondecodeend,r.onerror=a.onerror,r.onabort=a.onabort);n=new A.utils.WorkerTask(i,{buffer:e,meta:t},n);r.addWorkerTask(n)},this.abort=function(){r.abort()}},A.image.AsynchPixelBufferDecoder.prototype.ondecodestart=function(e){},A.image.AsynchPixelBufferDecoder.prototype.ondecodeditem=function(e){},A.image.AsynchPixelBufferDecoder.prototype.ondecoded=function(e){},A.image.AsynchPixelBufferDecoder.prototype.ondecodeend=function(e){},A.image.AsynchPixelBufferDecoder.prototype.onerror=function(e){},A.image.AsynchPixelBufferDecoder.prototype.onabort=function(e){},A.image.SynchPixelBufferDecoder=function(s,l){var u=0;this.decode=function(e,t,n){++u;var i=null,r=null;if("jpeg-lossless"===s){if(!d)throw new Error("No JPEG Lossless decoder provided");var o=t.bitsAllocated/8,a=new Uint8Array(e),o=(i=new jpeg.lossless.Decoder).decode(a.buffer,0,a.buffer.byteLength,o);8===t.bitsAllocated?r=new(t.isSigned?Int8Array:Uint8Array)(o.buffer):16===t.bitsAllocated&&(r=new(t.isSigned?Int16Array:Uint16Array)(o.buffer))}else if("jpeg-baseline"===s){if(!g)throw new Error("No JPEG Baseline decoder provided");(i=new JpegImage).parse(e),r=i.getData(i.width,i.height)}else if("jpeg2000"===s){if(!x)throw new Error("No JPEG 2000 decoder provided");(i=new JpxImage).parse(e),r=i.tiles[0].items}else"rle"===s&&(r=(i=new A.decoder.RleDecoder).decode(e,t.bitsAllocated,t.isSigned,t.sliceSize,t.samplesPerPixel,t.planarConfiguration));this.ondecodeditem({data:[r],index:n.itemNumber}),u===l&&(this.ondecoded({}),this.ondecodeend({}))},this.abort=function(){this.onabort({}),this.ondecodeend({})}},A.image.SynchPixelBufferDecoder.prototype.ondecodestart=function(e){},A.image.SynchPixelBufferDecoder.prototype.ondecodeditem=function(e){},A.image.SynchPixelBufferDecoder.prototype.ondecoded=function(e){},A.image.SynchPixelBufferDecoder.prototype.ondecodeend=function(e){},A.image.SynchPixelBufferDecoder.prototype.onerror=function(e){},A.image.SynchPixelBufferDecoder.prototype.onabort=function(e){},A.image.PixelBufferDecoder=function(e,t){var i=null,i=void 0!==A.image.decoderScripts&&void 0!==A.image.decoderScripts[e]?new A.image.AsynchPixelBufferDecoder(A.image.decoderScripts[e],t):new A.image.SynchPixelBufferDecoder(e,t),r=!1;this.decode=function(e,t,n){r||(r=!0,i.ondecodestart=this.ondecodestart,i.ondecodeditem=this.ondecodeditem,i.ondecoded=this.ondecoded,i.ondecodeend=this.ondecodeend,i.onerror=this.onerror,i.onabort=this.onabort),i.decode(e,t,n)},this.abort=function(){i.abort()}},A.image.PixelBufferDecoder.prototype.ondecodestart=function(e){},A.image.PixelBufferDecoder.prototype.ondecodeditem=function(e){},A.image.PixelBufferDecoder.prototype.ondecoded=function(e){},A.image.PixelBufferDecoder.prototype.ondecodeend=function(e){},A.image.PixelBufferDecoder.prototype.onerror=function(e){},A.image.PixelBufferDecoder.prototype.onabort=function(e){},(A=A||{}).image=A.image||{},A.image.DicomBufferToView=function(){var c,g=this;this.setOptions=function(e){c=e};var d=null,x=[],S=[],m=[];function h(e,t){try{var n=(new A.ImageFactory).create(x[e].getDicomElements(),S[e],c.numberOfFiles);g.onloaditem({data:{image:n,info:x[e].getRawDicomElements()},source:t})}catch(e){g.onerror({error:e,source:t}),g.onloadend({source:t})}}this.convert=function(e,t,n){g.onloadstart({source:t,dataIndex:n});var i=new A.dicom.DicomParser,r=new A.ImageFactory;void 0!==c.defaultCharacterSet&&i.setDefaultCharacterSet(c.defaultCharacterSet);try{i.parse(e),r.checkElements(i.getDicomElements())}catch(e){return g.onerror({error:e,source:t}),void g.onloadend({source:t})}var o=i.getRawDicomElements().x7FE00010.value;i.getRawDicomElements().x7FE00010.value=[];var a=A.dicom.cleanString(i.getRawDicomElements().x00020010.value[0]),e=A.dicom.getSyntaxDecompressionName(a),r=null!==e;if(x[n]=i,S[n]=o[0],r){var s={bitsAllocated:i.getRawDicomElements().x00280100.value[0],isSigned:1===i.getRawDicomElements().x00280103.value[0]},a=i.getRawDicomElements().x00280011,r=i.getRawDicomElements().x00280010;void 0!==a&&void 0!==r&&(s.sliceSize=a.value[0]*r.value[0]);r=i.getRawDicomElements().x00280002;void 0!==r&&(s.samplesPerPixel=r.value[0]);i=i.getRawDicomElements().x00280006;void 0!==i&&(s.planarConfiguration=i.value[0]);var l=o.length;null===d&&((d=new A.image.PixelBufferDecoder(e,l)).ondecodeditem=function(e){!function(e){g.onprogress({lengthComputable:!0,loaded:e.itemNumber+1,total:e.numberOfItems,index:e.dataIndex,source:origin});var t=e.dataIndex,n=e.data[0];if(1!==e.numberOfItems){if(void 0===m[t]){m[t]=n.length;var i,r=e.numberOfItems*m[t];try{S[t]=new n.constructor(r)}catch(e){return e instanceof RangeError&&(i=Math.floor(Math.log(r)/Math.log(2)),A.logger.error("Cannot allocate "+n.constructor.name+" of size: "+r+" (>2^"+i+") for decompressed data.")),d.abort(),g.onerror({error:e,source:origin}),g.onloadend({source:origin})}}n.length!==m[t]&&A.logger.warn("Unsupported varying decompressed data size: "+n.length+" != "+m[t]),S[t].set(n,m[t]*e.itemNumber)}else S[t]=n;0===e.itemNumber&&h(t,origin)}(e),e.itemNumber+1===e.numberOfItems&&(g.onload(e),g.onloadend(e))},d.onerror=g.onerror,d.onabort=g.onabort);for(var u=0;u<l;++u)d.decode(o[u],s,{itemNumber:u,numberOfItems:l,dataIndex:n})}else g.onprogress({lengthComputable:!0,loaded:100,total:100,index:n,source:t}),h(n,t),g.onload({source:t}),g.onloadend({source:t})},this.abort=function(){d&&d.abort()}},A.image.DicomBufferToView.prototype.onloadstart=function(e){},A.image.DicomBufferToView.prototype.onloaditem=function(e){},A.image.DicomBufferToView.prototype.onprogress=function(e){},A.image.DicomBufferToView.prototype.onload=function(e){},A.image.DicomBufferToView.prototype.onloadend=function(e){},A.image.DicomBufferToView.prototype.onerror=function(e){},A.image.DicomBufferToView.prototype.onabort=function(e){},(A=A||{}).image=A.image||{},A.image.imageDataToBuffer=function(e){for(var t=e.data.length,n=new Uint8Array(t/4*3),i=0,r=0;r<t;r+=4)n[i]=e.data[r],n[i+1]=e.data[r+1],n[i+2]=e.data[r+2],i+=3;return n},A.image.getDefaultImage=function(e,t,n,i,r,o){e=new A.image.Size([e,t,1]),t=new A.image.Spacing([1,1,1]),n=new A.math.Point3D(0,0,n),t=new A.image.Geometry(n,e,t),i=new A.image.Image(t,i,[o]);i.setPhotometricInterpretation("RGB");o={BitsStored:8};return void 0!==r&&(o.numberOfFiles=r),i.setMeta(o),i},A.image.getViewFromDOMImage=function(e,t){var n=e.width,i=e.height,r=document.createElement("canvas");r.width=n,r.height=i;var o=r.getContext("2d");o.drawImage(e,0,0);r=o.getImageData(0,0,n,i),o={};"string"==typeof e.origin?o.origin={value:e.origin}:(o.fileName={value:e.origin.name},o.fileType={value:e.origin.type},o.fileLastModifiedDate={value:e.origin.lastModifiedDate}),o.imageWidth={value:n},o.imageHeight={value:i};e=e.index||0;o.imageUid={value:e};r=A.image.imageDataToBuffer(r);return{data:{image:A.image.getDefaultImage(n,i,e,r,1,e),info:o},source:t}},A.image.getViewFromDOMVideo=function(t,n,i,r,o,a,s){var l=t.videoWidth,u=t.videoHeight,c=30,g=Math.ceil(t.duration*c),d={};t.file&&(d.fileName={value:t.file.name},d.fileType={value:t.file.type},d.fileLastModifiedDate={value:t.file.lastModifiedDate}),d.imageWidth={value:l},d.imageHeight={value:u},d.numberOfFrames={value:g},d.imageUid={value:0};var e=document.createElement("canvas");e.width=l,e.height=u;var x=e.getContext("2d");t.addEventListener("seeked",function e(){h();f+=1/c;f<=this.duration?this.currentTime=f:(i({source:s}),o({source:s}),t.removeEventListener("seeked",e))},!1);var S=0,m=null;function h(){r({lengthComputable:!0,loaded:S,total:g,index:a,source:s}),x.drawImage(t,0,0);var e=A.image.imageDataToBuffer(x.getImageData(0,0,l,u));0===S?(m=A.image.getDefaultImage(l,u,1,e,g,a),n({data:{image:m,info:d},source:s})):m.appendFrameBuffer(e,S),++S}var f=0;t.currentTime=f},(A=A||{}).image=A.image||{},A.image.filter=A.image.filter||{},A.image.filter.Threshold=function(){var t=0,n=0;this.getMin=function(){return t},this.setMin=function(e){t=e},this.getMax=function(){return n},this.setMax=function(e){n=e},this.getName=function(){return"Threshold"};var i=null;this.setOriginalImage=function(e){i=e},this.getOriginalImage=function(){return i}},A.image.filter.Threshold.prototype.update=function(){var e=this.getOriginalImage(),t=e.getDataRange().min,n=this;return e.transform(function(e){return e<n.getMin()||e>n.getMax()?t:e})},A.image.filter.Sharpen=function(){this.getName=function(){return"Sharpen"};var t=null;this.setOriginalImage=function(e){t=e},this.getOriginalImage=function(){return t}},A.image.filter.Sharpen.prototype.update=function(){return this.getOriginalImage().convolute2D([0,-1,0,-1,5,-1,0,-1,0])},A.image.filter.Sobel=function(){this.getName=function(){return"Sobel"};var t=null;this.setOriginalImage=function(e){t=e},this.getOriginalImage=function(){return t}},A.image.filter.Sobel.prototype.update=function(){var e=this.getOriginalImage(),t=e.convolute2D([1,0,-1,2,0,-2,1,0,-1]),e=e.convolute2D([1,2,1,0,0,0,-1,-2,-1]);return t.compose(e,function(e,t){return Math.sqrt(e*e+t*t)})},(A=A||{}).image=A.image||{},A.image.Geometry=function(e,n,i,l){var u=[e=void 0===e?new A.math.Point3D(0,0,0):e];void 0===l&&(l=new A.math.getIdentityMat33);var r=!1;this.getOrigin=function(){return u[u.length-1]},this.getOrigins=function(){return u},this.getSize=function(e){var t=n;return e&&void 0!==e&&(e=A.math.getOrientedArray3D([n.get(0),n.get(1),n.get(2)],e),t=new A.image.Size(e)),t},this.getSliceGeometrySpacing=function(){if(1===u.length)return 1;for(var e,t=null,n=l.getInverse().asOneAndZeros(),i=[],r=0;r<u.length-1;++r){var o=n.multiplyVector3D(u[r]),a=n.multiplyVector3D(u[r+1]),s=Math.abs(o.getZ()-a.getZ());if(0===s)throw new Error("Zero slice spacing."+o.toString()+" "+a.toString());null===t?t=s:A.math.isSimilar(t,s,A.math.BIG_EPSILON)||i.push(Math.abs(t-s))}return 0!==i.length&&(1e-4<(e=i.reduce(function(e,t){return e+t})/i.length)&&A.logger.warn("Varying slice spacing, mean delta: "+e.toFixed(3)+" ("+i.length+" case(s))")),t},this.getSpacing=function(e){r&&((t=i.getValues())[2]=this.getSliceGeometrySpacing(),i=new A.image.Spacing(t),r=!1);var t=i;return e&&void 0!==e&&(e=A.math.getOrientedArray3D([i.get(0),i.get(1),i.get(2)],e),t=new A.image.Spacing(e)),t},this.getOrientation=function(){return l},this.getSliceIndex=function(e){for(var t,n=0,i=e.getDistance(u[0]),r=0;r<u.length;++r)(t=e.getDistance(u[r]))<i&&(i=t,n=r);var o=u[n],o=e.minus(o);return new A.math.Vector3D(l.get(2,0),l.get(2,1),l.get(2,2)).dotProduct(o)<0?n+1:n},this.appendOrigin=function(e,t){r=!0,u.splice(t,0,e);e=n.getValues();e[2]+=1,n=new A.image.Size(e)},this.appendFrame=function(){var e=n.getValues(),t=i.getValues();4===e.length?e[3]+=1:(e.push(2),t.push(1)),n=new A.image.Size(e),i=new A.image.Spacing(t)}},A.image.Geometry.prototype.toString=function(){return"Origin: "+this.getOrigin()+", Size: "+this.getSize()+", Spacing: "+this.getSpacing()},A.image.Geometry.prototype.equals=function(e){return null!==e&&this.getOrigin().equals(e.getOrigin())&&this.getSize().equals(e.getSize())&&this.getSpacing().equals(e.getSpacing())},A.image.Geometry.prototype.isInBounds=function(e){e=this.worldToIndex(e);return this.getSize().isInBounds(e)},A.image.Geometry.prototype.indexToWorld=function(e){var t=a(this.getSize(),e.get(2)),n=this.getSpacing(),t=new A.math.Point3D(e.get(0)*n.get(0),e.get(1)*n.get(1),t*n.get(2)),n=this.getOrientation().multiplyPoint3D(t),t=e.getValues(),e=this.getOrigin();return t[0]=e.getX()+n.getX(),t[1]=e.getY()+n.getY(),t[2]=e.getZ()+n.getZ(),new A.math.Point(t)},A.image.Geometry.prototype.pointToWorld=function(e){var t=a(this.getSize(),e.getZ()),n=this.getSpacing(),t=new A.math.Point3D(e.getX()*n.get(0),e.getY()*n.get(1),t*n.get(2)),n=this.getOrientation().multiplyPoint3D(t),t=this.getOrigin();return new A.math.Point3D(t.getX()+n.getX(),t.getY()+n.getY(),t.getZ()+n.getZ())},A.image.Geometry.prototype.worldToIndex=function(e){var t=this.getOrigin(),n=new A.math.Point3D(e.get(0)-t.getX(),e.get(1)-t.getY(),e.get(2)-t.getZ()),t=this.getOrientation().getInverse().multiplyPoint3D(n),n=e.getValues(),e=this.getSpacing();return n[0]=Math.round(t.getX()/e.get(0)),n[1]=Math.round(t.getY()/e.get(1)),n[2]=a(this.getSize(),Math.round(t.getZ()/e.get(2))),new A.math.Index(n)},(A=A||{}).image=A.image||{},A.image.Image=function(p,y,D){var r=new A.image.RescaleSlopeAndIntercept(1,0),o=null,a=!0,s=!0,v="MONOCHROME2",t=0,C=y.length/p.getSize().getTotalSize(),L={},n=null,i=null,l=null,u=new A.utils.ListenerHandler;function c(){return p.getSize().getTotalSize(2)}function T(e){var t=y;if(null===(y=A.dicom.getTypedArray(8*y.BYTES_PER_ELEMENT,L.IsSigned?1:0,e)))throw new Error("Cannot reallocate data for image.");y.set(t)}this.getImageUid=function(e){var t=D[0];return t=1!==D.length&&void 0!==e?D[this.getSecondaryOffset(e)]:t},this.getGeometry=function(){return p},this.getBuffer=function(){return y},this.canQuantify=function(){return 1===this.getNumberOfComponents()},this.canWindowLevel=function(){return null!==this.getPhotometricInterpretation().match(/MONOCHROME/)},this.canScroll=function(e){var t=this.getGeometry().getSize(),n=1;return void 0!==L.numberOfFiles&&(n=L.numberOfFiles),t.canScroll(e)||1!==n},this.getSecondaryOffset=function(e){return p.getSize().indexToOffset(e,2)},this.getRescaleSlopeAndIntercept=function(e){var t=r;if(!this.isConstantRSI()){if(void 0===e)throw new Error("Cannot get non constant RSI with empty slice index.");e=this.getSecondaryOffset(e);void 0!==o[e]?t=o[e]:A.logger.warn("undefined non constant rsi at "+e)}return t},this.setRescaleSlopeAndIntercept=function(e,t){if(a=a&&e.isID(),s){if(!r.equals(e))if("undefined"==typeof index)r=e;else{s=!1,o=[];for(var n=0,i=c();n<i;++n)o.push(n);r=null,o.splice(t,0,e)}}else{if("undefined"==typeof index)throw new Error("Cannot store non constant RSI with empty slice index.");o.splice(t,0,e)}},this.isIdentityRSI=function(){return a},this.isConstantRSI=function(){return s},this.getPhotometricInterpretation=function(){return v},this.setPhotometricInterpretation=function(e){v=e},this.getPlanarConfiguration=function(){return t},this.setPlanarConfiguration=function(e){t=e},this.getNumberOfComponents=function(){return C},this.getMeta=function(){return L},this.setMeta=function(e){L=e},this.getValueAtOffset=function(e){return y[e]},this.clone=function(){var e=y.slice(0),t=new A.image.Image(this.getGeometry(),e,D);if(this.isConstantRSI())t.setRescaleSlopeAndIntercept(this.getRescaleSlopeAndIntercept());else for(var n=0;n<c();++n)t.setRescaleSlopeAndIntercept(o[n],n);return t.setPhotometricInterpretation(this.getPhotometricInterpretation()),t.setPlanarConfiguration(this.getPlanarConfiguration()),t.setMeta(this.getMeta()),t},this.appendSlice=function(e,t){if(void 0===t&&(t=0),null===e)throw new Error("Cannot append null slice");var n,i=e.getGeometry().getSize(),r=p.getSize();if(1!==i.get(2))throw new Error("Cannot append more than one slice");if(r.get(0)!==i.get(0))throw new Error("Cannot append a slice with different number of columns");if(r.get(1)!==i.get(1))throw new Error("Cannot append a slice with different number of rows");if(!p.getOrientation().equals(e.getGeometry().getOrientation(),1e-4))throw new Error("Cannot append a slice with different orientation");if(v!==e.getPhotometricInterpretation())throw new Error("Cannot append a slice with different photometric interpretation");for(n in L)if("windowPresets"!==n&&L[n]!==e.getMeta()[n])throw new Error("Cannot append a slice with different "+n);var o=C*r.getDimSize(2);if(void 0===L.numberOfFiles)throw new Error("Missing number of files for buffer manipulation.");var a=o*L.numberOfFiles;4===r.length()&&(a*=r.get(3)),y.length!==a&&T(a);var s=p.getSliceIndex(e.getGeometry().getOrigin()),i=new Array(p.getSize().length());i.fill(0),i[2]=s,4===r.length()&&(i[3]=t);var a=new A.math.Index(i),i=r.indexToOffset(a),l=this.getSecondaryOffset(a);0===t&&(a=r.get(2),r=i,0===s?y.set(y.subarray(r,r+a*o),i+o):s<a&&y.set(y.subarray(r,r+(a-s)*o),i+o)),y.set(e.getBuffer(),i),0===t&&p.appendOrigin(e.getGeometry().getOrigin(),s),this.setRescaleSlopeAndIntercept(e.getRescaleSlopeAndIntercept(),l);var u=D.length;if(D.splice(l,0,e.getImageUid()),void 0!==L.windowPresets)for(var c=L.windowPresets,g=e.getMeta().windowPresets,d=Object.keys(g),x=null,S=0;S<d.length;++S){var m=g[x=d[S]],h=c[x];if(void 0!==h){if((void 0===h.perslice||!1===h.perslice)&&!h.wl[0].equals(m.wl[0])){h.perslice=!0;for(var f=0;f<u-1;++f)h.wl.push(h.wl[0])}void 0!==h.perslice&&!0===h.perslice&&c[x].wl.splice(l,0,m.wl[0])}else c[x]=g[x]}},this.appendFrameBuffer=function(e,t){var n=p.getSize(),i=C*n.getDimSize(2);if(void 0===L.numberOfFiles)throw new Error("Missing number of files for frame buffer manipulation.");n=i*L.numberOfFiles;if(y.length!==n&&T(n),t>=L.numberOfFiles)throw new Error("Cannot append a frame at an index above the number of frames");y.set(e,i*t),this.appendFrame()},this.appendFrame=function(){p.appendFrame(),u.fireEvent({type:"appendframe"})},this.getDataRange=function(){return n=n||this.calculateDataRange()},this.getRescaledDataRange=function(){return i=i||this.calculateRescaledDataRange()},this.getHistogram=function(){var e;return l||(e=this.calculateHistogram(),n=e.dataRange,i=e.rescaledDataRange,l=e.histogram),l},this.addEventListener=function(e,t){u.add(e,t)},this.removeEventListener=function(e,t){u.remove(e,t)}},A.image.Image.prototype.getValue=function(e,t,n,i){i=new A.math.Index([e,t,n,i||0]);return this.getValueAtOffset(this.getGeometry().getSize().indexToOffset(i))},A.image.Image.prototype.getValueAtIndex=function(e){return this.getValueAtOffset(this.getGeometry().getSize().indexToOffset(e))},A.image.Image.prototype.getRescaledValue=function(e,t,n,i){var r=this.getValue(e,t,n,i=void 0===i?0:i);return r=!this.isIdentityRSI()?this.isConstantRSI()?this.getRescaleSlopeAndIntercept().apply(r):(i=new A.math.Index([e,t,n,i]),this.getRescaleSlopeAndIntercept(i).apply(r)):r},A.image.Image.prototype.getRescaledValueAtIndex=function(e){return this.getRescaledValueAtOffset(this.getGeometry().getSize().indexToOffset(e))},A.image.Image.prototype.getRescaledValueAtOffset=function(e){var t=this.getValueAtOffset(e);return t=!this.isIdentityRSI()?this.isConstantRSI()?this.getRescaleSlopeAndIntercept().apply(t):(e=this.getGeometry().getSize().offsetToIndex(e),this.getRescaleSlopeAndIntercept(e).apply(t)):t},A.image.Image.prototype.calculateDataRange=function(){var e,t=this.getValueAtOffset(0),n=t,i=this.getGeometry().getSize(),r=i.getTotalSize();3<=i.length()&&(r=i.getDimSize(3));for(var o=0;o<r;++o)n<(e=this.getValueAtOffset(o))&&(n=e),e<t&&(t=e);return{min:t,max:n}},A.image.Image.prototype.calculateRescaledDataRange=function(){if(this.isIdentityRSI())return this.getDataRange();if(this.isConstantRSI()){var e=this.getDataRange(),t=this.getRescaleSlopeAndIntercept().apply(e.min),e=this.getRescaleSlopeAndIntercept().apply(e.max);return{min:t<e?t:e,max:e<t?t:e}}var n,i=this.getRescaledValueAtOffset(0),r=i,e=this.getGeometry().getSize(),o=e.getTotalSize();3===e.length()&&(o=e.getDimSize(3));for(var a=0;a<o;++a)r<(n=this.getRescaledValueAtOffset(a))&&(r=n),n<i&&(i=n);return{min:i,max:r}},A.image.Image.prototype.calculateHistogram=function(){for(var e,t,n=this.getGeometry().getSize(),i=[],r=this.getValueAtOffset(0),o=r,a=this.getRescaledValueAtOffset(0),s=a,l=0,u=n.getTotalSize();l<u;++l)o<(e=this.getValueAtOffset(l))&&(o=e),e<r&&(r=e),s<(t=this.getRescaledValueAtOffset(l))&&(s=t),t<a&&(a=t),i[t]=(i[t]||0)+1;for(var c={min:r,max:o},n={min:a,max:s},g=[],d=a;d<=s;++d)g.push([d,i[d]||0]);return{dataRange:c,rescaledDataRange:n,histogram:g}},A.image.Image.prototype.convolute2D=function(e){if(9!==e.length)throw new Error("The convolution matrix does not have a length of 9; it has "+e.length);for(var t=this.clone(),n=t.getBuffer(),i=this.getGeometry().getSize(),r=i.getDimSize(2)*this.getNumberOfComponents(),o=0;o<i.get(2);++o)this.convoluteBuffer(e,n,o*r);return t},A.image.Image.prototype.convoluteBuffer=function(e,t,n){var i=this.getGeometry().getSize(),r=i.get(0),o=i.get(1),a=this.getNumberOfComponents(),s=1,l=1;3===a&&(0===this.getPlanarConfiguration()?s=3:l=i.getDimSize(2));var u=[];u[0]=(-r-1)*s,u[1]=-r*s,u[2]=(1-r)*s,u[3]=-s,u[4]=0,u[5]=+s,u[6]=(r-1)*s,u[7]=r*s,u[8]=(r+1)*s;var c=[];c[0]=u[4],c[1]=u[4],c[2]=u[5],c[3]=u[4],c[4]=u[4],c[5]=u[5],c[6]=u[7],c[7]=u[7],c[8]=u[8];var g=[];g[0]=u[1],g[1]=u[1],g[2]=u[2],g[3]=u[4],g[4]=u[4],g[5]=u[5],g[6]=u[7],g[7]=u[7],g[8]=u[8];var d=[];d[0]=u[1],d[1]=u[1],d[2]=u[2],d[3]=u[4],d[4]=u[4],d[5]=u[5],d[6]=u[4],d[7]=u[4],d[8]=u[5];var x=[];x[0]=u[3],x[1]=u[4],x[2]=u[5],x[3]=u[3],x[4]=u[4],x[5]=u[5],x[6]=u[6],x[7]=u[7],x[8]=u[8];var S=[];S[0]=u[0],S[1]=u[1],S[2]=u[2],S[3]=u[3],S[4]=u[4],S[5]=u[5],S[6]=u[3],S[7]=u[4],S[8]=u[5];var m=[];m[0]=u[3],m[1]=u[4],m[2]=u[4],m[3]=u[3],m[4]=u[4],m[5]=u[4],m[6]=u[6],m[7]=u[7],m[8]=u[7];var h=[];h[0]=u[0],h[1]=u[1],h[2]=u[1],h[3]=u[3],h[4]=u[4],h[5]=u[4],h[6]=u[6],h[7]=u[7],h[8]=u[7];var f=[];f[0]=u[0],f[1]=u[1],f[2]=u[1],f[3]=u[3],f[4]=u[4],f[5]=u[4],f[6]=u[3],f[7]=u[4],f[8]=u[4];for(var p=n,y=0,D=[],v=0;v<a;++v){p+=v*l;for(var C=0;C<o;++C)for(var L=0;L<r;++L){D=u,0===L&&0===C?D=c:0===L&&C===o-1?D=d:L===r-1&&0===C?D=m:L===r-1&&C===o-1?D=f:0===L&&C!==o-1&&0!==C?D=g:L===r-1&&C!==o-1&&0!==C?D=h:0!==L&&L!==r-1&&0===C?D=x:0!==L&&L!==r-1&&C===o-1&&(D=S);for(var y=0,T=0;T<9;++T)y+=this.getValueAtOffset(p+D[T])*e[T];t[p]=y,p+=s}}},A.image.Image.prototype.transform=function(e){for(var t=this.clone(),n=t.getBuffer(),i=0,r=n.length;i<r;++i)n[i]=e(t.getValueAtOffset(i));return t},A.image.Image.prototype.compose=function(e,t){for(var n=this.clone(),i=n.getBuffer(),r=0,o=i.length;r<o;++r)i[r]=Math.floor(t(this.getValueAtOffset(r),e.getValueAtOffset(r)));return n},(A=A||{}).image=A.image||{},A.image.ImageFactory=function(){},A.ImageFactory=A.image.ImageFactory,A.image.ImageFactory.prototype.checkElements=function(e){if(!e.getFromKey("x00280011"))throw new Error("Missing or empty DICOM image number of columns");if(!e.getFromKey("x00280010"))throw new Error("Missing or empty DICOM image number of rows")},A.image.ImageFactory.prototype.create=function(e,t,n){var i=e.getFromKey("x00280011");if(!i)throw new Error("Missing or empty DICOM image number of columns");var r=e.getFromKey("x00280010");if(!r)throw new Error("Missing or empty DICOM image number of rows");var o=[i,r,1],a=e.getFromKey("x00280008");a&&o.push(a);var s=new A.image.Size(o),l=e.getPixelSpacing(),u=e.getFromKey("x00020010"),c=A.dicom.cleanString(u),i=A.dicom.isJpeg2000TransferSyntax(c),r=A.dicom.isJpegBaselineTransferSyntax(c),a=A.dicom.isJpegLosslessTransferSyntax(c),o=e.getFromKey("x00200032"),u=new Array(0,0,0);o&&(u=[parseFloat(o[0]),parseFloat(o[1]),parseFloat(o[2])]);c=e.getFromKey("x00200037");c&&(o=new A.math.Vector3D(parseFloat(c[0]),parseFloat(c[1]),parseFloat(c[2])),d=new A.math.Vector3D(parseFloat(c[3]),parseFloat(c[4]),parseFloat(c[5])),g=o.crossProduct(d),d=new A.math.Matrix33([o.getX(),d.getX(),g.getX(),o.getY(),d.getY(),g.getY(),o.getZ(),d.getZ(),g.getZ()]));var g=new A.math.Point3D(u[0],u[1],u[2]),u=new A.image.Geometry(g,s,l,d),g=A.dicom.cleanString(e.getFromKey("x00080018")),l=(l=e.getFromKey("x00280002"))||1,d=s.getTotalSize()*l;if(d!==t.length){if(A.logger.warn("Badly sized pixel buffer: "+t.length+" != "+d),!(d<t.length))throw new Error("Underestimated buffer size, can't fix it...");t=t.slice(0,s.getTotalSize())}u=new A.image.Image(u,t,[g]),t=e.getFromKey("x00280004");t&&(x=A.dicom.cleanString(t).toUpperCase(),u.setPhotometricInterpretation(x="RGB"===(x=(i||r||a)&&"MONOCHROME1"!==x&&"MONOCHROME2"!==x?"RGB":x)&&1===l?"PALETTE COLOR":x));g=e.getFromKey("x00280006");g&&u.setPlanarConfiguration(g);t=1,i=e.getFromKey("x00281053");i&&(t=parseFloat(i));r=0,a=e.getFromKey("x00281052");a&&(r=parseFloat(a));l=new A.image.RescaleSlopeAndIntercept(t,r);u.setRescaleSlopeAndIntercept(l);var x={};x.numberOfFiles=n;g=e.getFromKey("x00080060");g&&(x.Modality=g);i=e.getFromKey("x0020000D");i&&(x.StudyInstanceUID=i);a=e.getFromKey("x0020000E");a&&(x.SeriesInstanceUID=a);t=e.getFromKey("x00280101");t&&(x.BitsStored=parseInt(t,10));r=e.getFromKey("x00280103");x.IsSigned=!1,r&&(x.IsSigned=1===r);l=e.getFromKey("x00185100");x.PatientPosition=!1,l&&(x.PatientPosition=l);var S={},m=e.getFromKey("x00281050",!0),h=e.getFromKey("x00281051",!0),f=e.getFromKey("x00281055",!0);if(m&&h)for(var p,y=0;y<m.length;++y){var D=parseFloat(m[y],10),v=parseFloat(h[y],10);D&&v&&0!==v&&(S[p=(p="")===(p=f?A.dicom.cleanString(f[y]):p)?"Default"+y:p]={wl:[new A.image.WindowLevel(D,v)],name:p}),0===v&&A.logger.warn("Zero window width found in DICOM.")}x.windowPresets=S,"PALETTE COLOR"===u.getPhotometricInterpretation()&&(n=e.getFromKey("x00281201"),g=e.getFromKey("x00281202"),i=e.getFromKey("x00281203"),void 0!==(a=e.getFromKey("x00281101"))&&3===a.length&&(16===a[2]?(t=!1,0===(r=a[0])&&(r=65536),(l=e.getDEFromKey("x00281201").vl)!==2*r&&(t=!0,A.logger.info("16bits lut but size is not double. desc: "+r+" vl: "+l)),8===parseInt(e.getFromKey("x00280100"),10)&&(t=!0,A.logger.info("Scaling 16bits color lut since bits allocated is 8.")),t&&(n=n.map(t=function(e){return e>>8}),g=g.map(t),i=i.map(t))):8===a[2]&&(A.logger.info("Scaling 16bits color lut since the lut descriptor is 8."),a=n.slice(0),n=new Uint8Array(a.buffer),a=g.slice(0),g=new Uint8Array(a.buffer),a=i.slice(0),i=new Uint8Array(a.buffer))),x.paletteLut={red:n,green:g,blue:i});e=e.getFromKey("x00082144");return e&&(x.RecommendedDisplayFrameRate=parseInt(e,10)),u.setMeta(x),u},(A=A||{}).image=A.image||{},A.image.simpleRange=function(t,e,n,i){void 0===i&&(i=1);var r=e;return{next:function(){if(r<n){var e={value:t(r),done:!1};return r+=i,e}return{done:!0,index:n}}}},A.image.range=function(t,e,n,i,r,o,a,s){void 0===s&&(s=!1);var l=e;(a=void 0===a?!1:a)?(o*=-1,s?l-=(r-1)*i:i*=-1):s&&(l+=(r-1)*i,i*=-1);var u=o-r*i,c=0,g=0;return{next:function(){if(c<n){var e={value:t(l),done:!1};return l+=i,++c,++g===r&&(g=0,l+=u),e}return{done:!0,index:l}}}},A.image.rangeRegion=function(t,e,n,i,r,o){var a=e,s=0;return{next:function(){if(a<n){var e={value:t(a),done:!1};return a+=i,(s+=1)===r&&(s=0,a+=o),e}return{done:!0,index:n}}}},A.image.rangeRegions=function(t,e,n,i,r){var o=e,a=0,s=0;return{next:function(){if(o<n){var e={value:t(o),done:!1};return o+=i,(s+=1)===r[a][1]&&(s=0,o+=r[a][2],(a+=1)<r.length&&(o+=r[a][0])),e}return{done:!0,index:n}}}},A.image.range3d=function(t,e,n,i,r){void 0===i&&(i=1);var o=e,a=1;(r=void 0===r?!1:r)?a=(n-e)/3:i*=3;var s=o+a,l=o+2*a;return{next:function(){if(o<n){var e={value:[t(o),t(s),t(l)],done:!1};return o+=i,s+=i,l+=i,e}return{done:!0,index:[n]}}}},A.image.getIteratorValues=function(e){for(var t=[],n=e.next();!n.done;)t.push(n.value),n=e.next();return t},A.image.getSliceIterator=function(t,e,n,i){var r=t.getGeometry().getSize(),o=2;i&&void 0!==i&&(o=i.getColAbsMax(2).index);var a=e.getValues(),s=new A.math.Index(a.map(function(e,t){return t===o||2<t?e:0})),l=r.indexToOffset(s),u=null,u=(n=void 0===n?!1:n)?function(e){return t.getRescaledValueAtOffset(e)}:function(e){return t.getValueAtOffset(e)},c=r.get(0),g=r.get(1),e=r.get(2),a=r.getDimSize(2),s=null;if(1===t.getNumberOfComponents())if(i&&void 0!==i){n=i.getColAbsMax(0),r=i.getColAbsMax(2),i=null;if(2===r.index)i=c*g,s=0===n.index?A.image.range(u,l,i,1,c,c,!1,!1):A.image.range(u,l,i,c,g,1,!1,!1);else if(0===r.index)i=e*g,s=1===n.index?A.image.range(u,l,i,c,g,a,!1,!1):A.image.range(u,l,i,a,e,c,!1,!1);else{if(1!==r.index)throw new Error("Unknown direction: "+r.index);i=e*c,s=0===n.index?A.image.range(u,l,i,1,c,a,!1,!1):A.image.range(u,l,i,a,e,1,!1,!1)}}else s=A.image.simpleRange(u,l,l+a);else{if(3!==t.getNumberOfComponents())throw new Error("Unsupported number of components: "+t.getNumberOfComponents());l*=3,a*=3;e=1===t.getPlanarConfiguration(),s=A.image.range3d(u,l,l+a,1,e)}return s},A.image.getRegionSliceIterator=function(t,e,n,i,r){if(1!==t.getNumberOfComponents())throw new Error("Unsupported number of components for region iterator: "+t.getNumberOfComponents());var o=null,o=(n=void 0===n?!1:n)?function(e){return t.getRescaledValueAtOffset(e)}:function(e){return t.getValueAtOffset(e)},a=t.getGeometry().getSize();void 0===i&&(i=new A.math.Point2D(0,0)),void 0===r&&(r=new A.math.Point2D(a.get(0)-1,a.get(1)));n=a.indexToOffset(e.getWithNew2D(i.getX(),i.getY())),e=a.indexToOffset(e.getWithNew2D(r.getX(),r.getY()-1)),i=Math.max(1,r.getX()-i.getX()),a=a.get(0)-i;return A.image.rangeRegion(o,n,e+1,1,i,a)},A.image.getVariableRegionSliceIterator=function(t,e,n,i){if(1!==t.getNumberOfComponents())throw new Error("Unsupported number of components for region iterator: "+t.getNumberOfComponents());for(var r=null,r=(n=void 0===n?!1:n)?function(e){return t.getRescaledValueAtOffset(e)}:function(e){return t.getValueAtOffset(e)},o=t.getGeometry().getSize(),a=[],s=null,l=null,u=null,c=0;c<i.length;++c){var g,d=(g=i[c])[1][0]-g[0][0];0!=d&&(u=c,s=s||g[0],a.push([g[0][0],d,o.get(0)-g[1][0]]))}if(null!==u&&(l=i[u][1]),0!==a.length){n=o.indexToOffset(e.getWithNew2D(s[0],s[1])),l=o.indexToOffset(e.getWithNew2D(l[0],l[1]));return A.image.rangeRegions(r,n,l+1,1,a)}},(A=A||{}).image=A.image||{},A.image.lut=A.image.lut||{},A.image.lut.range_max=256,A.image.lut.buildLut=function(e){for(var t=[],n=0;n<A.image.lut.range_max;++n)t.push(e(n));return t},A.image.lut.max=function(e){return A.image.lut.range_max-1},A.image.lut.maxFirstThird=function(e){return e<A.image.lut.range_max/3?A.image.lut.range_max-1:0},A.image.lut.maxSecondThird=function(e){var t=A.image.lut.range_max/3;return t<=e&&e<2*t?A.image.lut.range_max-1:0},A.image.lut.maxThirdThird=function(e){return e>=2*A.image.lut.range_max/3?A.image.lut.range_max-1:0},A.image.lut.toMaxFirstThird=function(e){e*=3;return e>A.image.lut.range_max-1?A.image.lut.range_max-1:e},A.image.lut.toMaxSecondThird=function(e){var t=A.image.lut.range_max/3,n=0;return t<=e&&(n=3*(e-t))>A.image.lut.range_max-1?A.image.lut.range_max-1:n},A.image.lut.toMaxThirdThird=function(e){var t=A.image.lut.range_max/3,n=0;return 2*t<=e&&(n=3*(e-2*t))>A.image.lut.range_max-1?A.image.lut.range_max-1:n},A.image.lut.zero=function(e){return 0},A.image.lut.id=function(e){return e},A.image.lut.invId=function(e){return A.image.lut.range_max-1-e},A.image.lut.plain={red:A.image.lut.buildLut(A.image.lut.id),green:A.image.lut.buildLut(A.image.lut.id),blue:A.image.lut.buildLut(A.image.lut.id)},A.image.lut.invPlain={red:A.image.lut.buildLut(A.image.lut.invId),green:A.image.lut.buildLut(A.image.lut.invId),blue:A.image.lut.buildLut(A.image.lut.invId)},A.image.lut.rainbow={blue:[0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,252,255,247,239,231,223,215,207,199,191,183,175,167,159,151,143,135,127,119,111,103,95,87,79,71,63,55,47,39,31,23,15,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],green:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,16,24,32,40,48,56,64,72,80,88,96,104,112,120,128,136,144,152,160,168,176,184,192,200,208,216,224,232,240,248,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,253,251,249,247,245,243,241,239,237,235,233,231,229,227,225,223,221,219,217,215,213,211,209,207,205,203,201,199,197,195,193,192,189,186,183,180,177,174,171,168,165,162,159,156,153,150,147,144,141,138,135,132,129,126,123,120,117,114,111,108,105,102,99,96,93,90,87,84,81,78,75,72,69,66,63,60,57,54,51,48,45,42,39,36,33,30,27,24,21,18,15,12,9,6,3],red:[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,62,60,58,56,54,52,50,48,46,44,42,40,38,36,34,32,30,28,26,24,22,20,18,16,14,12,10,8,6,4,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]},A.image.lut.hot={red:A.image.lut.buildLut(A.image.lut.toMaxFirstThird),green:A.image.lut.buildLut(A.image.lut.toMaxSecondThird),blue:A.image.lut.buildLut(A.image.lut.toMaxThirdThird)},A.image.lut.hot_iron={red:[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200,202,204,206,208,210,212,214,216,218,220,222,224,226,228,230,232,234,236,238,240,242,244,246,248,250,252,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],green:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200,202,204,206,208,210,212,214,216,218,220,222,224,226,228,230,232,234,236,238,240,242,244,246,248,250,252,255],blue:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,252,255]},A.image.lut.pet={red:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,171,173,175,177,179,181,183,185,187,189,191,193,195,197,199,201,203,205,207,209,211,213,215,217,219,221,223,225,227,229,231,233,235,237,239,241,243,245,247,249,251,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],green:[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,128,126,124,122,120,118,116,114,112,110,108,106,104,102,100,98,96,94,92,90,88,86,84,82,80,78,76,74,72,70,68,66,64,63,61,59,57,55,53,51,49,47,45,43,41,39,37,35,33,31,29,27,25,23,21,19,17,15,13,11,9,7,5,3,1,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,192,194,196,198,200,202,204,206,208,210,212,214,216,218,220,222,224,226,228,230,232,234,236,238,240,242,244,246,248,250,252,255],blue:[0,1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143,145,147,149,151,153,155,157,159,161,163,165,167,169,171,173,175,177,179,181,183,185,187,189,191,193,195,197,199,201,203,205,207,209,211,213,215,217,219,221,223,225,227,229,231,233,235,237,239,241,243,245,247,249,251,253,255,252,248,244,240,236,232,228,224,220,216,212,208,204,200,196,192,188,184,180,176,172,168,164,160,156,152,148,144,140,136,132,128,124,120,116,112,108,104,100,96,92,88,84,80,76,72,68,64,60,56,52,48,44,40,36,32,28,24,20,16,12,8,4,0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,85,89,93,97,101,105,109,113,117,121,125,129,133,137,141,145,149,153,157,161,165,170,174,178,182,186,190,194,198,202,206,210,214,218,222,226,230,234,238,242,246,250,255]},A.image.lut.hot_metal_blue={red:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,6,9,12,15,18,21,24,26,29,32,35,38,41,44,47,50,52,55,57,59,62,64,66,69,71,74,76,78,81,83,85,88,90,93,96,99,102,105,108,111,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,166,169,172,175,178,181,184,187,190,194,198,201,205,209,213,217,221,224,228,232,236,240,244,247,251,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],green:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,6,8,9,11,13,15,17,19,21,23,24,26,28,30,32,34,36,38,40,41,43,45,47,49,51,53,55,56,58,60,62,64,66,68,70,72,73,75,77,79,81,83,85,87,88,90,92,94,96,98,100,102,104,105,107,109,111,113,115,117,119,120,122,124,126,128,130,132,134,136,137,139,141,143,145,147,149,151,152,154,156,158,160,162,164,166,168,169,171,173,175,177,179,181,183,184,186,188,190,192,194,196,198,200,201,203,205,207,209,211,213,215,216,218,220,222,224,226,228,229,231,233,235,237,239,240,242,244,246,248,250,251,253,255],blue:[0,2,4,6,8,10,12,14,16,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,117,119,121,123,125,127,129,131,133,135,137,139,141,143,145,147,149,151,153,155,157,159,161,163,165,167,169,171,173,175,177,179,181,183,184,186,188,190,192,194,196,198,200,197,194,191,188,185,182,179,176,174,171,168,165,162,159,156,153,150,144,138,132,126,121,115,109,103,97,91,85,79,74,68,62,56,50,47,44,41,38,35,32,29,26,24,21,18,15,12,9,6,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,6,9,12,15,18,21,24,26,29,32,35,38,41,44,47,50,53,56,59,62,65,68,71,74,76,79,82,85,88,91,94,97,100,103,106,109,112,115,118,121,124,126,129,132,135,138,141,144,147,150,153,156,159,162,165,168,171,174,176,179,182,185,188,191,194,197,200,203,206,210,213,216,219,223,226,229,232,236,239,242,245,249,252,255]},A.image.lut.pet_20step={red:[0,0,0,0,0,0,0,0,0,0,0,0,0,96,96,96,96,96,96,96,96,96,96,96,96,96,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,80,80,80,80,80,80,80,80,80,80,80,80,80,96,96,96,96,96,96,96,96,96,96,96,96,96,112,112,112,112,112,112,112,112,112,112,112,112,112,128,128,128,128,128,128,128,128,128,128,128,128,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,80,80,80,80,80,80,80,80,80,80,80,80,80,64,64,64,64,64,64,64,64,64,64,64,64,224,224,224,224,224,224,224,224,224,224,224,224,224,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,208,192,192,192,192,192,192,192,192,192,192,192,192,192,176,176,176,176,176,176,176,176,176,176,176,176,176,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],green:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,80,80,80,80,80,80,80,80,80,80,80,80,80,96,96,96,96,96,96,96,96,96,96,96,96,96,112,112,112,112,112,112,112,112,112,112,112,112,112,128,128,128,128,128,128,128,128,128,128,128,128,96,96,96,96,96,96,96,96,96,96,96,96,96,144,144,144,144,144,144,144,144,144,144,144,144,144,192,192,192,192,192,192,192,192,192,192,192,192,192,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,208,208,208,208,208,208,208,208,208,208,208,208,208,176,176,176,176,176,176,176,176,176,176,176,176,176,144,144,144,144,144,144,144,144,144,144,144,144,96,96,96,96,96,96,96,96,96,96,96,96,96,48,48,48,48,48,48,48,48,48,48,48,48,48,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255],blue:[0,0,0,0,0,0,0,0,0,0,0,0,0,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,80,112,112,112,112,112,112,112,112,112,112,112,112,128,128,128,128,128,128,128,128,128,128,128,128,128,176,176,176,176,176,176,176,176,176,176,176,176,176,192,192,192,192,192,192,192,192,192,192,192,192,192,224,224,224,224,224,224,224,224,224,224,224,224,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,80,80,80,80,80,80,80,80,80,80,80,80,80,64,64,64,64,64,64,64,64,64,64,64,64,80,80,80,80,80,80,80,80,80,80,80,80,80,96,96,96,96,96,96,96,96,96,96,96,96,96,64,64,64,64,64,64,64,64,64,64,64,64,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255]},A.image.lut.test={red:A.image.lut.buildLut(A.image.lut.id),green:A.image.lut.buildLut(A.image.lut.zero),blue:A.image.lut.buildLut(A.image.lut.zero)},(A=A||{}).image=A.image||{},A.image.PlaneHelper=function(t,i){this.getOffset3DFromPlaneOffset=function(e){e=new A.math.Vector3D(e.x,e.y,0),e=this.getDeOrientedVector3D(e);return e=e,new A.math.Vector3D(e.getX()*t.get(0),e.getY()*t.get(1),e.getZ()*t.get(2))},this.getPlaneOffsetFromOffset3D=function(e){e=e,e=new A.math.Vector3D(e.x/t.get(0),e.y/t.get(1),e.z/t.get(2)),e=this.getOrientedVector3D(e);return{x:e.getX(),y:e.getY()}},this.getOrientedVector3D=function(e){var t=e;return t=void 0!==i?i.getInverse().getAbs().multiplyVector3D(e):t},this.getOrientedIndex=function(e){var t=e;return t=void 0!==i?i.getInverse().getAbs().multiplyIndex3D(e):t},this.getOrientedPoint=function(e){var t,n=e;return void 0!==i&&(t=i.getInverse().getAbs().multiplyPoint3D(e.get3D()),n=e.mergeWith3D(t)),n},this.getDeOrientedVector3D=function(e){var t=e;return t=void 0!==i?i.getAbs().multiplyVector3D(e):t},this.getOrientedXYZ=function(e){e=A.math.getOrientedArray3D([e.x,e.y,e.z],i);return{x:e[0],y:e[1],z:e[2]}},this.getDeOrientedXYZ=function(e){e=A.math.getDeOrientedArray3D([e.x,e.y,e.z],i);return{x:e[0],y:e[1],z:e[2]}},this.getScrollIndex=function(){return void 0!==i?i.getThirdColMajorDirection():2}},(A=A||{}).image=A.image||{},A.image.RescaleLut=function(t,e){var n=null,i=!1,r=Math.pow(2,e);this.getRSI=function(){return t},this.isReady=function(){return i},this.initialise=function(){if(!i){n=new Float32Array(r);for(var e=0;e<r;++e)n[e]=t.apply(e);i=!0}},this.getLength=function(){return r},this.getValue=function(e){return n[e]}},(A=A||{}).image=A.image||{},A.image.RescaleSlopeAndIntercept=function(t,n){this.getSlope=function(){return t},this.getIntercept=function(){return n},this.apply=function(e){return e*t+n}},A.image.RescaleSlopeAndIntercept.prototype.equals=function(e){return null!==e&&this.getSlope()===e.getSlope()&&this.getIntercept()===e.getIntercept()},A.image.RescaleSlopeAndIntercept.prototype.toString=function(){return this.getSlope()+", "+this.getIntercept()},A.image.RescaleSlopeAndIntercept.prototype.isID=function(){return 1===this.getSlope()&&0===this.getIntercept()},(A=A||{}).image=A.image||{},A.image.Size=function(t){if(!t||void 0===t)throw new Error("Cannot create size with no values.");if(0===t.length)throw new Error("Cannot create size with empty values.");if(!t.every(function(e){return!isNaN(e)&&0!==e}))throw new Error("Cannot create size with non number or zero values.");this.get=function(e){return t[e]},this.length=function(){return t.length},this.toString=function(){return"("+t.toString()+")"},this.getValues=function(){return t.slice()}},A.image.Size.prototype.moreThanOne=function(e){return this.length()>=e+1&&1!==this.get(e)},A.image.Size.prototype.canScroll3D=function(e){var t=2;return void 0!==e&&(t=e.getThirdColMajorDirection()),this.moreThanOne(t)},A.image.Size.prototype.canScroll=function(e){for(var t=this.canScroll3D(e),n=3;n<this.length();++n)t=t||this.moreThanOne(n);return t},A.image.Size.prototype.getDimSize=function(e,t){if(e>this.length())return null;if(void 0===t)t=0;else if(t<0||e<t)throw new Error("Invalid start value for getDimSize");for(var n=1,i=t;i<e;++i)n*=this.get(i);return n},A.image.Size.prototype.getTotalSize=function(e){return this.getDimSize(this.length(),e)},A.image.Size.prototype.equals=function(e){if(!e)return!1;var t=this.length();if(t!==e.length())return!1;for(var n=0;n<t;++n)if(this.get(n)!==e.get(n))return!1;return!0},A.image.Size.prototype.isInBounds=function(e){if(!e)return!1;var t=this.length();if(t!==e.length())return!1;for(var n=0;n<t;++n)if(e.get(n)<0||e.get(n)>this.get(n)-1)return!1;return!0},A.image.Size.prototype.indexToOffset=function(e,t){if(e.length()<this.length())throw new Error("Incompatible index and size length");if(void 0===t)t=0;else if(t<0||t>this.length()-1)throw new Error("Invalid start value for indexToOffset");for(var n=0,i=t;i<this.length();++i)n+=e.get(i)*this.getDimSize(i,t);return n},A.image.Size.prototype.offsetToIndex=function(e){for(var t,n=new Array(this.length()),i=e,r=this.length()-1;0<r;--r)t=this.getDimSize(r),n[r]=Math.floor(i/t),i-=n[r]*t;return n[0]=i,new A.math.Index(n)},A.image.Size.prototype.get2D=function(){return{x:this.get(0),y:this.get(1)}},(A=A||{}).image=A.image||{},A.image.Spacing=function(t){if(!t||void 0===t)throw new Error("Cannot create spacing with no values.");if(0===t.length)throw new Error("Cannot create spacing with empty values.");if(!t.every(function(e){return!isNaN(e)&&0!==e}))throw new Error("Cannot create spacing with non number or zero values.");this.get=function(e){return t[e]},this.length=function(){return t.length},this.toString=function(){return"("+t.toString()+")"},this.getValues=function(){return t.slice()}},A.image.Spacing.prototype.equals=function(e){if(!e)return!1;var t=this.length();if(t!==e.length())return!1;for(var n=0;n<t;++n)if(this.get(n)!==e.get(n))return!1;return!0},A.image.Spacing.prototype.get2D=function(){return{x:this.get(0),y:this.get(1)}},(A=A||{}).image=A.image||{},A.image.viewEventNames=["wlchange","wlpresetadd","colourchange","positionchange","opacitychange","alphafuncchange"],A.image.View=function(u){var t=this;u.addEventListener("appendframe",function(){var e=t.getCurrentPosition();3===e.length()&&((e=e.getValues()).push(0),t.setCurrentPosition(new A.math.Point(e)))});var n,r={},o={minmax:{name:"minmax"}},s=null,l=null,i=A.image.lut.plain,c=null,a=new A.utils.ListenerHandler;this.getImage=function(){return u},this.setImage=function(e){u=e},this.getOrientation=function(){return n},this.setOrientation=function(e){n=e},this.setInitialPosition=function(){var e=u.getGeometry(),t=new Array(e.getSize().length());t.fill(0);t=new A.math.Index(t);this.setCurrentPosition(e.indexToWorld(t),!0)},this.getPlaybackMilliseconds=function(e){return e=e||10,Math.round(1e3/e)};var g=function(e){return 255};function d(e){a.fireEvent(e)}this.getAlphaFunction=function(){return g},this.setAlphaFunction=function(e){g=e,d({type:"alphafuncchange"})},this.getCurrentWindowLut=function(e){this.getCurrentPosition()||this.setInitialPosition();var t=this.getCurrentIndex();void 0===e&&(e=u.getRescaleSlopeAndIntercept(t));var n=null;s&&void 0!==o[s]&&void 0!==o[s].perslice&&!0===o[s].perslice&&(t=u.getSecondaryOffset(t),n=o[s].wl[t]),n||(l||this.setWindowLevelPresetById(0,!0),n=l);e=r[e.toString()];void 0===e&&(i=new A.image.RescaleLut(u.getRescaleSlopeAndIntercept(0),u.getMeta().BitsStored),i=new A.image.WindowLut(i,u.getMeta().IsSigned),this.addWindowLut(i),e=i);var i=e.getWindowLevel();return n.equals(i)||(e.setWindowLevel(n),e.update(),i&&i.getWidth()===n.getWidth()&&i.getCenter()===n.getCenter()||d({type:"wlchange",value:[n.getCenter(),n.getWidth()],wc:n.getCenter(),ww:n.getWidth(),skipGenerate:!0})),e},this.addWindowLut=function(e){var t=e.getRescaleLut().getRSI();r[t.toString()]=e},this.getWindowPresets=function(){return o},this.getWindowPresetsNames=function(){return Object.keys(o)},this.setWindowPresets=function(e){o=e},this.setDefaultColourMap=function(e){i=e},this.addWindowPresets=function(e){for(var t,n=Object.keys(e),i=0;i<n.length;++i)if(t=n[i],void 0!==o[t]){if(void 0!==o[t].perslice&&!0===o[t].perslice)throw new Error("Cannot add perslice preset");o[t]=e[t]}else o[t]=e[t],d({type:"wlpresetadd",name:t})},this.getColourMap=function(){return i},this.setColourMap=function(e){i=e,d({type:"colourchange",wc:this.getCurrentWindowLut().getWindowLevel().getCenter(),ww:this.getCurrentWindowLut().getWindowLevel().getWidth()})},this.getCurrentPosition=function(){return c},this.getCurrentIndex=function(){return this.getImage().getGeometry().worldToIndex(c)},this.setCurrentPosition=function(e,t){void 0===t&&(t=!1);var n=u.getGeometry();if(!n.isInBounds(e))return!1;if(!c||!c.equals(e)){var n=n.worldToIndex(e),i=null;if(c)if(c.canCompare(e))i=c.compare(e);else{for(var i=[],r=Math.min(c.length(),e.length()),o=0;o<r;++o)c.get(o)!==e.get(o)&&i.push(o);for(var a=Math.max(c.length(),e.length()),s=r;s<a;++s)i.push(s)}else{i=[];for(var l=0;l<e.length();++l)i.push(l)}c=e,t||(t={type:"positionchange",value:[n.getValues(),c.getValues()],diffDims:i,data:{imageUid:u.getImageUid(n)}},u.canQuantify()&&(n=u.getRescaledValueAtIndex(n),t.value.push(n)),d(t))}return!0},this.setCurrentIndex=function(e,t){var n=this.getImage().getGeometry();return this.setCurrentPosition(n.indexToWorld(e),t)},this.setWindowLevel=function(e,t,n,i){var r,o,a;t<1||(void 0===n&&(n="manual"),void 0===i&&(i=!1),(r=new A.image.WindowLevel(e,t)).equals(l)||(o=!l||l.getWidth()!==t,a=!l||l.getCenter()!==e,l=r,s=n,(o||a)&&d({type:"wlchange",value:[e,t],wc:e,ww:t,skipGenerate:i})))},this.setWindowLevelPreset=function(e,t){var n=this.getWindowPresets()[e];if(void 0===n)throw new Error("Unknown window level preset: '"+e+"'");"minmax"===e&&void 0===n.wl&&(n.wl=[this.getWindowLevelMinMax()]);var i,r=n.wl[0];void 0!==n.perslice&&!0===n.perslice&&(i=u.getSecondaryOffset(this.getCurrentIndex()),r=n.wl[i]),this.setWindowLevel(r.getCenter(),r.getWidth(),e,t)},this.setWindowLevelPresetById=function(e,t){var n=Object.keys(this.getWindowPresets());this.setWindowLevelPreset(n[e],t)},this.clone=function(){var e,t=new A.image.View(this.getImage());for(e in r)t.addWindowLut(r[e]);return t.setListeners(this.getListeners()),t},this.addEventListener=function(e,t){a.add(e,t)},this.removeEventListener=function(e,t){a.remove(e,t)}},A.image.View.prototype.getWindowLevelMinMax=function(){var e=this.getImage().getRescaledDataRange(),t=e.min,e=e.max-t;return e<1&&(A.logger.warn("Zero or negative width, defaulting to one."),e=1),new A.image.WindowLevel(t+e/2,e)},A.image.View.prototype.setWindowLevelMinMax=function(){var e=this.getWindowLevelMinMax();this.setWindowLevel(e.getCenter(),e.getWidth(),"minmax")},A.image.View.prototype.generateImageData=function(e){this.getCurrentPosition()||this.setInitialPosition();var t=this.getImage(),n=this.getCurrentIndex(),i=A.image.getSliceIterator(t,n,!1,this.getOrientation()),r=t.getPhotometricInterpretation();switch(r){case"MONOCHROME1":case"MONOCHROME2":A.image.generateImageDataMonochrome(e,i,this.getAlphaFunction(),this.getCurrentWindowLut(),this.getColourMap());break;case"PALETTE COLOR":A.image.generateImageDataPaletteColor(e,i,this.getAlphaFunction(),this.getColourMap(),16===t.getMeta().BitsStored);break;case"RGB":A.image.generateImageDataRgb(e,i,this.getAlphaFunction(),this.getCurrentWindowLut());break;case"YBR_FULL":A.image.generateImageDataYbrFull(e,i,this.getAlphaFunction());break;default:throw new Error("Unsupported photometric interpretation: "+r)}},A.image.View.prototype.incrementIndex=function(e,t){var n=this.getCurrentIndex(),i=new Array(n.length());i.fill(0),e<i.length?i[e]=1:console.warn("Cannot increment given index: ",e,i.length);i=new A.math.Index(i),n=n.add(i),i=this.getImage().getGeometry();return this.setCurrentPosition(i.indexToWorld(n),t)},A.image.View.prototype.decrementIndex=function(e,t){var n=this.getCurrentIndex(),i=new Array(n.length());i.fill(0),e<i.length?i[e]=-1:console.warn("Cannot decrement given index: ",e,i.length);i=new A.math.Index(i),n=n.add(i),i=this.getImage().getGeometry();return this.setCurrentPosition(i.indexToWorld(n),t)},A.image.View.prototype.getScrollIndex=function(){var e=this.getOrientation();return void 0!==e?e.getThirdColMajorDirection():2},A.image.View.prototype.decrementScrollIndex=function(e){return this.decrementIndex(this.getScrollIndex(),e)},A.image.View.prototype.incrementScrollIndex=function(e){return this.incrementIndex(this.getScrollIndex(),e)},(A=A||{}).image=A.image||{},A.image.ViewFactory=function(){},A.ViewFactory=A.image.ViewFactory,A.image.ViewFactory.prototype.create=function(e,t){var n,i=new A.image.View(t);"MONOCHROME1"===t.getPhotometricInterpretation()?i.setDefaultColourMap(A.image.lut.invPlain):"PALETTE COLOR"!==t.getPhotometricInterpretation()||void 0!==(n=t.getMeta().paletteLut)&&i.setDefaultColourMap(n);var r={};if((r=void 0!==t.getMeta().windowPresets?t.getMeta().windowPresets:r).minmax={name:"minmax"},void 0!==A.tool&&void 0!==A.tool.defaultpresets){var o,a=t.getMeta().Modality;for(o in A.tool.defaultpresets[a]){var s=A.tool.defaultpresets[a][o];r[o]={wl:new A.image.WindowLevel(s.center,s.width),name:o}}}return i.setWindowPresets(r),i.setInitialPosition(),i},(A=A||{}).image=A.image||{},A.image.generateImageDataMonochrome=function(e,t,n,i,r){for(var o,a=0,s=t.next();!s.done;)o=i.getValue(s.value),e.data[a]=r.red[o],e.data[a+1]=r.green[o],e.data[a+2]=r.blue[o],e.data[a+3]=n(s.value),a+=4,s=t.next()},(A=A||{}).image=A.image||{},A.image.generateImageDataPaletteColor=function(e,t,n,i,r){r&&A.logger.info("Scaling 16bits data to 8bits.");for(var o,a=0,s=t.next();!s.done;)o=s.value,r?(e.data[a]=i.red[o]>>8,e.data[a+1]=i.green[o]>>8,e.data[a+2]=i.blue[o]>>8):(e.data[a]=i.red[o],e.data[a+1]=i.green[o],e.data[a+2]=i.blue[o]),e.data[a+3]=n(o),a+=4,s=t.next()},(A=A||{}).image=A.image||{},A.image.generateImageDataRgb=function(e,t,n){for(var i=0,r=t.next();!r.done;)e.data[i]=r.value[0],e.data[i+1]=r.value[1],e.data[i+2]=r.value[2],e.data[i+3]=n(r.value),i+=4,r=t.next()},(A=A||{}).image=A.image||{},A.image.generateImageDataYbrFull=function(e,t,n){for(var i,r=0,o=t.next();!o.done;)i=A.utils.ybrToRgb(o.value[0],o.value[1],o.value[2]),e.data[r]=i.r,e.data[r+1]=i.g,e.data[r+2]=i.b,e.data[r+3]=n(o.value),r+=4,o=t.next()},(A=A||{}).image=A.image||{},A.image.MinWindowWidth=1,A.image.validateWindowWidth=function(e){return e<A.image.MinWindowWidth?A.image.MinWindowWidth:e},A.image.WindowLevel=function(t,n){if(n<A.image.MinWindowWidth)throw new Error("Window width shall always be greater than or equal to "+A.image.MinWindowWidth);var i=0,r=0,o=255,a=null,s=null,l=null,u=null;function c(){var e=t+i;a=e-.5-(n-1)/2,s=e-.5+(n-1)/2,l=(o-r)/(n-1),u=(-(e-.5)/(n-1)+.5)*(o-r)+r}c(),this.getCenter=function(){return t},this.getWidth=function(){return n},this.setRange=function(e,t){r=parseInt(e,10),o=parseInt(t,10),c()},this.setSignedOffset=function(e){i=e,c()},this.apply=function(e){return e<=a?r:s<e?o:parseInt(e*l+u,10)}},A.image.WindowLevel.prototype.equals=function(e){return null!==e&&this.getCenter()===e.getCenter()&&this.getWidth()===e.getWidth()},A.image.WindowLevel.prototype.toString=function(){return this.getCenter()+", "+this.getWidth()},(A=A||{}).image=A.image||{},A.image.WindowLut=function(n,t){var i=null,r=null,o=!1,a=0;this.getWindowLevel=function(){return r},this.isSigned=function(){return t},this.getRescaleLut=function(){return n},this.isReady=function(){return o},this.setWindowLevel=function(e){a=0,(r=e).setSignedOffset(0),t&&(e=n.getLength(),a=e/2,r.setSignedOffset(n.getRSI().getSlope()*a)),o=!1},this.update=function(){if(!o){n.isReady()||n.initialise();var e=n.getLength();i=i||new Uint8ClampedArray(e);for(var t=0;t<e;++t)i[t]=r.apply(n.getValue(t));o=!0}},this.getLength=function(){return i.length},this.getValue=function(e){return i[e+a]}},(A=A||{}).io=A.io||{},A.io.DicomDataLoader=function(){var i=this,r={},o=!1;this.setOptions=function(e){r=e},this.isLoading=function(){return o};var a=new A.image.DicomBufferToView;this.load=function(e,t,n){o||(a.setOptions(r),a.onloadstart=i.onloadstart,a.onprogress=i.onprogress,a.onloaditem=i.onloaditem,a.onload=i.onload,a.onloadend=function(e){o=!1,i.onloadend(e)},a.onerror=i.onerror,a.onabort=i.onabort),o=!0,a.convert(e,t,n)},this.abort=function(){o=!1,a.abort()}},A.io.DicomDataLoader.prototype.canLoadFile=function(e){e=A.utils.getFileExtension(e.name);return null===e||"dcm"===e},A.io.DicomDataLoader.prototype.canLoadUrl=function(e){var t=A.utils.getUrlFromUri(e),n=A.utils.getFileExtension(t.pathname),e=null===n,n="dcm"===n,t=t.searchParams.get("contentType");return null!=t?"application/dicom"===t:e||n},A.io.DicomDataLoader.prototype.loadFileAs=function(){return A.io.fileContentTypes.ArrayBuffer},A.io.DicomDataLoader.prototype.loadUrlAs=function(){return A.io.urlContentTypes.ArrayBuffer},A.io.DicomDataLoader.prototype.onloadstart=function(e){},A.io.DicomDataLoader.prototype.onprogress=function(e){},A.io.DicomDataLoader.prototype.onloaditem=function(e){},A.io.DicomDataLoader.prototype.onload=function(e){},A.io.DicomDataLoader.prototype.onloadend=function(e){},A.io.DicomDataLoader.prototype.onerror=function(e){},A.io.DicomDataLoader.prototype.onabort=function(e){},A.io.loaderList=A.io.loaderList||[],A.io.loaderList.push("DicomDataLoader"),(A=A||{}).io=A.io||{},A.io.fileContentTypes={Text:0,ArrayBuffer:1,DataURL:2},A.io.FilesLoader=function(){var t,g=this,n=null,d=[],x=null,i=0,r=0;function S(e){n=e,r=i=0,d=[],x=null}function m(e){g.onloaditem(e),h()}function h(e){++i===n.length&&g.onload({source:n})}function f(e){++r===2*n.length&&g.onloadend({source:n})}function p(t,n){return function(e){e.source=n,t(e)}}this.getDefaultCharacterSet=function(){return t},this.setDefaultCharacterSet=function(e){t=e},this.load=function(e){if(void 0!==e&&0!==e.length){S(e),this.onloadstart({source:e});var t=new A.utils.MultiProgressHandler(g.onprogress);t.setNToLoad(e.length);for(var n=[],i=0;i<A.io.loaderList.length;++i)n.push(new A.io[A.io.loaderList[i]]);for(var r=e[0],o=null,a=!1,s=0;s<n.length;++s)if((o=n[s]).canLoadFile(r)){a=!0,o.setOptions({numberOfFiles:e.length,defaultCharacterSet:this.getDefaultCharacterSet()}),o.onprogress=t.getUndefinedMonoProgressHandler(1),void 0===o.onloaditem?o.onload=m:(o.onloaditem=g.onloaditem,o.onload=h),o.onloadend=f,o.onerror=g.onerror,o.onabort=g.onabort,x=o;break}if(!a)throw new Error("No loader found for file: "+r.name);for(var l,u=0;u<e.length;++u){if(r=e[u],!o.canLoadFile(r))throw new Error("Input file of different type: "+r);var c=new FileReader;l=c,d.push(l),c.onprogress=p(t.getMonoProgressHandler(u,0),r),c.onload=function(t,n,i){return function(e){t.load(e.target.result,n,i)}}(o,r,u),c.onloadend=f,c.onerror=p(g.onerror,r),c.onabort=p(g.onabort,r),o.loadFileAs()===A.io.fileContentTypes.Text?c.readAsText(r):o.loadFileAs()===A.io.fileContentTypes.DataURL?c.readAsDataURL(r):o.loadFileAs()===A.io.fileContentTypes.ArrayBuffer&&c.readAsArrayBuffer(r)}}},this.abort=function(){for(var e=0;e<d.length;++e)1===d[e].readyState&&d[e].abort();x&&x.isLoading()&&x.abort()}},A.io.FilesLoader.prototype.onloadstart=function(e){},A.io.FilesLoader.prototype.onprogress=function(e){},A.io.FilesLoader.prototype.onloaditem=function(e){},A.io.FilesLoader.prototype.onload=function(e){},A.io.FilesLoader.prototype.onloadend=function(e){},A.io.FilesLoader.prototype.onerror=function(e){},A.io.FilesLoader.prototype.onabort=function(e){},(A=A||{}).io=A.io||{},A.io.JSONTextLoader=function(){var i=this,r=!1;this.setOptions=function(e){},this.isLoading=function(){return r},this.load=function(e,t,n){r=!0,i.onloadstart({source:t});try{i.onprogress({lengthComputable:!0,loaded:100,total:100,index:n,source:t}),i.onload({data:e,source:t})}catch(e){i.onerror({error:e,source:t})}finally{r=!1,i.onloadend({source:t})}},this.abort=function(){r=!1,i.onabort({}),i.onloadend({})}},A.io.JSONTextLoader.prototype.canLoadFile=function(e){return"json"===A.utils.getFileExtension(e.name)},A.io.JSONTextLoader.prototype.canLoadUrl=function(e){e=A.utils.getUrlFromUri(e);return"json"===A.utils.getFileExtension(e.pathname)},A.io.JSONTextLoader.prototype.loadFileAs=function(){return A.io.fileContentTypes.Text},A.io.JSONTextLoader.prototype.loadUrlAs=function(){return A.io.urlContentTypes.Text},A.io.JSONTextLoader.prototype.onloadstart=function(e){},A.io.JSONTextLoader.prototype.onprogress=function(e){},A.io.JSONTextLoader.prototype.onload=function(e){},A.io.JSONTextLoader.prototype.onloadend=function(e){},A.io.JSONTextLoader.prototype.onerror=function(e){},A.io.JSONTextLoader.prototype.onabort=function(e){},A.io.loaderList=A.io.loaderList||[],A.io.loaderList.push("JSONTextLoader"),(A=A||{}).io=A.io||{},A.io.MemoryLoader=function(){var t,u=this,n=null,c=null,i=0,r=0;function g(e){n=e,r=i=0,c=null}function d(e){u.onloaditem(e),x()}function x(e){++i===n.length&&u.onload({source:n})}function S(e){++r===n.length&&u.onloadend({source:n})}this.getDefaultCharacterSet=function(){return t},this.setDefaultCharacterSet=function(e){t=e},this.load=function(e){if(void 0!==e&&0!==e.length){g(e),this.onloadstart({source:e});var t=new A.utils.MultiProgressHandler(u.onprogress);t.setNToLoad(e.length),t.setNumberOfDimensions(1);for(var n=[],i=0;i<A.io.loaderList.length;++i)n.push(new A.io[A.io.loaderList[i]]);for(var r=e[0],o=null,a=!1,s=0;s<n.length;++s)if((o=n[s]).canLoadUrl(r.filename)){a=!0,o.setOptions({numberOfFiles:e.length,defaultCharacterSet:this.getDefaultCharacterSet()}),o.onprogress=t.getUndefinedMonoProgressHandler(0),void 0===o.onloaditem?o.onload=d:(o.onloaditem=u.onloaditem,o.onload=x),o.onloadend=S,o.onerror=u.onerror,o.onabort=u.onabort,c=o;break}if(!a)throw new Error("No loader found for data: "+r.filename);for(var l=0;l<e.length;++l){if(r=e[l],!o.canLoadFile({name:r.filename}))throw new Error("Input data of different type: "+r.filename);o.load(r.data,r.filename,l)}}},this.abort=function(){c&&c.isLoading()&&c.abort()}},A.io.MemoryLoader.prototype.onloadstart=function(e){},A.io.MemoryLoader.prototype.onprogress=function(e){},A.io.MemoryLoader.prototype.onloaditem=function(e){},A.io.MemoryLoader.prototype.onload=function(e){},A.io.MemoryLoader.prototype.onloadend=function(e){},A.io.MemoryLoader.prototype.onerror=function(e){},A.io.MemoryLoader.prototype.onabort=function(e){},(A=A||{}).io=A.io||{},A.io.RawImageLoader=function(){var o=this,a=!1;this.setOptions=function(e){},this.isLoading=function(){return!0},this.load=function(e,t,n){a=!1;var i,r=new Image;r.onload=function(){try{a||(o.onprogress({lengthComputable:!0,loaded:100,total:100,index:n,source:t}),o.onload(A.image.getViewFromDOMImage(this,t)))}catch(e){o.onerror({error:e,source:t})}finally{o.onloadend({source:t})}},r.origin=t,r.index=n,"string"==typeof t?(i=t.split(".").pop().toLowerCase(),r.src=((i=i)&&"jpg"!==i||(i="jpeg"),i=new Blob([e],{type:"image/"+i}),s.URL.createObjectURL(i))):r.src=e},this.abort=function(){a=!0,o.onabort({}),o.onloadend({})}},A.io.RawImageLoader.prototype.canLoadFile=function(e){return e.type.match("image.*")},A.io.RawImageLoader.prototype.canLoadUrl=function(e){var t=A.utils.getUrlFromUri(e),e=A.utils.getFileExtension(t.pathname),e="jpeg"===e||"jpg"===e||"png"===e||"gif"===e,t=t.searchParams.get("contentType");return null!=t?"image/jpeg"===t||"image/png"===t||"image/gif"===t:e},A.io.RawImageLoader.prototype.loadFileAs=function(){return A.io.fileContentTypes.DataURL},A.io.RawImageLoader.prototype.loadUrlAs=function(){return A.io.urlContentTypes.ArrayBuffer},A.io.RawImageLoader.prototype.onloadstart=function(e){},A.io.RawImageLoader.prototype.onprogress=function(e){},A.io.RawImageLoader.prototype.onload=function(e){},A.io.RawImageLoader.prototype.onloadend=function(e){},A.io.RawImageLoader.prototype.onerror=function(e){},A.io.RawImageLoader.prototype.onabort=function(e){},A.io.loaderList=A.io.loaderList||[],A.io.loaderList.push("RawImageLoader"),(A=A||{}).io=A.io||{},A.io.RawVideoLoader=function(){var o=this;this.setOptions=function(e){},this.isLoading=function(){return!0},this.load=function(e,t,n){var i,r=document.createElement("video");"string"==typeof t?(i=t.split(".").pop().toLowerCase(),r.src=function(e,t){for(var n=new Uint8Array(e),i="",r=0;r<n.byteLength;++r)i+=String.fromCharCode(n[r]);return"data:video/"+t+";base64,"+s.btoa(i)}(e,i)):r.src=e,r.file=t,r.index=n,r.onloadedmetadata=function(){try{A.image.getViewFromDOMVideo(this,o.onloaditem,o.onload,o.onprogress,o.onloadend,n,t)}catch(e){o.onerror({error:e,source:t}),o.onloadend({source:t})}}},this.abort=function(){o.onabort({}),o.onloadend({})}},A.io.RawVideoLoader.prototype.canLoadFile=function(e){return e.type.match("video.*")},A.io.RawVideoLoader.prototype.canLoadUrl=function(e){e=A.utils.getUrlFromUri(e),e=A.utils.getFileExtension(e.pathname);return"mp4"===e||"ogg"===e||"webm"===e},A.io.RawVideoLoader.prototype.loadFileAs=function(){return A.io.fileContentTypes.DataURL},A.io.RawVideoLoader.prototype.loadUrlAs=function(){return A.io.urlContentTypes.ArrayBuffer},A.io.RawVideoLoader.prototype.onloadstart=function(e){},A.io.RawVideoLoader.prototype.onprogress=function(e){},A.io.RawVideoLoader.prototype.onloaditem=function(e){},A.io.RawVideoLoader.prototype.onload=function(e){},A.io.RawVideoLoader.prototype.onloadend=function(e){},A.io.RawVideoLoader.prototype.onerror=function(e){},A.io.RawVideoLoader.prototype.onabort=function(e){},A.io.loaderList=A.io.loaderList||[],A.io.loaderList.push("RawVideoLoader"),(A=A||{}).io=A.io||{};y=y||{};A.io.State=function(){this.toJSON=function(e){var t=e.getActiveLayerGroup(),n=t.getActiveViewLayer().getViewController(),i=t.getActiveDrawLayer(),t=n.getCurrentPosition();return JSON.stringify({version:"0.5","window-center":n.getWindowLevel().center,"window-width":n.getWindowLevel().width,position:t.getValues(),scale:e.getAddedScale(),offset:e.getOffset(),drawings:i.getKonvaLayer().toObject(),drawingsDetails:e.getDrawStoreDetails()})},this.fromJSON=function(e){var t,n,i=JSON.parse(e),r=null;if("0.1"===i.version)n=i,e=A.io.v01Tov02DrawingsAndDetails(n.drawings),n.drawings=A.io.v02Tov03Drawings(e.drawings).toObject(),n.drawingsDetails=A.io.v03Tov04DrawingsDetails(e.drawingsDetails),(n=A.io.v04Tov05Data(n)).drawings=A.io.v04Tov05Drawings(n.drawings),r=n;else if("0.2"===i.version)(n=i).drawings=A.io.v02Tov03Drawings(n.drawings).toObject(),n.drawingsDetails=A.io.v03Tov04DrawingsDetails(A.io.v02Tov03DrawingsDetails(n.drawingsDetails)),(n=A.io.v04Tov05Data(n)).drawings=A.io.v04Tov05Drawings(n.drawings),r=n;else if("0.3"===i.version)(t=i).drawingsDetails=A.io.v03Tov04DrawingsDetails(t.drawingsDetails),(t=A.io.v04Tov05Data(t)).drawings=A.io.v04Tov05Drawings(t.drawings),r=t;else if("0.4"===i.version)t=i,(t=A.io.v04Tov05Data(t)).drawings=A.io.v04Tov05Drawings(t.drawings),r=t;else{if("0.5"!==i.version)throw new Error("Unknown state file format version: '"+i.version+"'.");r=i}return r},this.apply=function(e,t){var n=e.getActiveLayerGroup().getActiveViewLayer().getViewController();n.setWindowLevel(t["window-center"],t["window-width"]),n.setCurrentPosition(new A.math.Point(t.position));var i,r=e.getActiveLayerGroup().getBaseScale(),o=null,a=null;a=void 0!==t.scaleCenter?(o={x:t.scale*r.x,y:t.scale*r.y,z:1},i=t.scaleCenter.x-t.scaleCenter.x*t.scale,n=t.scaleCenter.y-t.scaleCenter.y*t.scale,i=i+t.translation.x*o.x,n=n+t.translation.y*o.y,{x:-i/o.x,y:-n/o.y,z:0}):(o={x:t.scale.x*r.x,y:t.scale.y*r.y,z:1},{x:t.offset.x,y:t.offset.y,z:0}),e.getActiveLayerGroup().setScale(o),e.getActiveLayerGroup().setOffset(a),e.render(0),e.setDrawings(t.drawings,t.drawingsDetails)}},A.io.v02Tov03Drawings=function(e){for(var t,n,i=new y.Layer({listening:!1,visible:!0}),r="string"==typeof e?JSON.parse(e):e,o=0,a=r.length;o<a;++o)for(var s=0,l=r[o].length;s<l;++s)if(0!==(n=r[o][s]).length){for(var u=new y.Group({id:A.draw.getDrawPositionGroupId(new A.math.Index([1,1,o,s])),name:"position-group",visible:!1}),c=0,g=n.length;c<g;++c)(t=y.Node.create(n[c])).draggable(!0),t.getChildren().forEach(function(e){e.draggable(!1)}),u.add(t);i.add(u)}return i},A.io.v01Tov02DrawingsAndDetails=function(e){for(var t,n=[],i={},r=0,o=e.length;r<o;++r){n[r]=[];for(var a=0,s=e[r].length;a<s;++a){for(var l,u=[],c=0,g=(l=e[r][a]).length;c<g;++c){(t=y.Node.create(l[c])).visible(!0);var d={x:0,y:0},x=t.getChildren(function(e){return"shape"===e.name()})[0];x.stroke(A.utils.colourNameToHex(x.stroke())),"line-group"===t.name()&&(t.name("ruler-group"),S=new y.Line({points:[x.points()[0],x.points()[1],x.points()[0],x.points()[1]],name:"shape-tick0"}),t.add(S),m=new y.Line({points:[x.points()[2],x.points()[3],x.points()[2],x.points()[3]],name:"shape-tick1"}),t.add(m));var S=t.getChildren(function(e){return"arc"===e.name()});1===S.length&&S[0].name("shape-arc");var m=t.getChildren(function(e){return"text"===e.name()}),S=new y.Text({name:"text",text:""});1===m.length?(d.x=m[0].x(),d.y=m[0].y(),m[0].remove(),S=m[0]):0!==x.points().length&&(d={x:x.points()[0],y:x.points()[1]});x=new y.Label({x:d.x,y:d.y,name:"label"});x.add(S),x.add(new y.Tag),t.add(x),u.push(JSON.stringify(t.toObject()));d=S.text(),x=d.length,S=null;"ruler-group"===t.name()?(S={length:{value:parseFloat(d.substr(0,x-2)),unit:d.substr(-2,2)}},d="{length}"):"ellipse-group"===t.name()||"rectangle-group"===t.name()?(S={surface:{value:parseFloat(d.substr(0,x-3)),unit:d.substr(-3,3)}},d="{surface}"):"protractor-group"!==t.name()&&"rectangle-group"!==t.name()||(S={angle:{value:parseFloat(d.substr(0,x-1)),unit:d.substr(-1,1)}},d="{angle}"),i[t.id()]={textExpr:d,longText:"",quant:S}}n[r].push(u)}}return{drawings:n,drawingsDetails:i}},A.io.v02Tov03DrawingsDetails=function(e){for(var t={},n="string"==typeof e?JSON.parse(e):e,i=0,r=n.length;i<r;++i)for(var o=0,a=n[i].length;o<a;++o)for(var s=0,l=n[i][o].length;s<l;++s){var u=n[i][o][s];t[u.id]={textExpr:u.textExpr,longText:u.longText,quant:u.quant}}return t},A.io.v03Tov04DrawingsDetails=function(e){for(var t={},n=Object.keys(e),i=0,r=n.length;i<r;++i){var o=e[n[i]];t[n[i]]={meta:{textExpr:o.textExpr,longText:o.longText,quantification:o.quant}}}return t},A.io.v04Tov05Data=function(e){var t=e.position;return e.position=[t.i,t.j,t.k],e},A.io.v04Tov05Drawings=function(e){for(var t=e.children,n=0,i=t.length;n<i;++n){var r=t[n],o=r.attrs.id.split("_"),a=parseInt(o[0].substring(6),10),s=parseInt(o[1].substring(6),10),o="#2-";o+=0===a&&0!==s?s:a,r.attrs.id=o}return e},(A=A||{}).io=A.io||{},A.io.urlContentTypes={Text:0,ArrayBuffer:1},A.io.UrlsLoader=function(){var p,t,y=this,n=null,D=[],v=null,i=0,r=0;function C(e){n=e,r=i=0,p=!1,D=[],v=null}function L(e){y.onloaditem(e),T()}function T(e){++i===n.length&&y.onload({source:n})}function I(e){++r===2*n.length&&y.onloadend({source:n})}function w(t,n){return function(e){e.source=n,t(e)}}function l(e,t){if(void 0!==e&&0!==e.length){C(e);var n=new A.utils.MultiProgressHandler(y.onprogress);n.setNToLoad(e.length);for(var i=[],r=0;r<A.io.loaderList.length;++r)i.push(new A.io[A.io.loaderList[r]]);for(var o=e[0],a=null,s=!1,l=0;l<i.length;++l)if((a=i[l]).canLoadUrl(o)){s=!0,a.setOptions({numberOfFiles:e.length,defaultCharacterSet:y.getDefaultCharacterSet()}),a.onprogress=n.getUndefinedMonoProgressHandler(1),void 0===a.onloaditem?a.onload=L:(a.onloaditem=y.onloaditem,a.onload=T),a.onloadend=I,a.onerror=y.onerror,a.onabort=y.onabort,v=a;break}if(!s)throw new Error("No loader found for url: "+o);function u(){I(),g<D.length-1&&!p&&D[++g].send(null)}for(var c,g=0,d=0;d<e.length;++d){if(o=e[d],!a.canLoadUrl(o))throw new Error("Input url of different type: "+o);var x=new XMLHttpRequest;if(x.open("GET",o,!0),void 0!==t){if(void 0!==t.requestHeaders)for(var S=t.requestHeaders,m=0;m<S.length;++m)void 0!==S[m].name&&void 0!==S[m].value&&x.setRequestHeader(S[m].name,S[m].value);void 0!==t.withCredentials&&(x.withCredentials=t.withCredentials)}x.onprogress=w(n.getMonoProgressHandler(d,0),o),x.onload=function(n,i,r){return function(e){var t=e.target.status;200!==t&&0!==t?(y.onerror({source:i,error:"GET "+e.target.responseURL+" "+e.target.status+" ("+e.target.statusText+")",target:e.target}),I()):n.load(e.target.response,i,r)}}(a,o,d),x.onloadend=u,x.onerror=w(y.onerror,o),x.onabort=w(y.onabort,o),a.loadUrlAs()===A.io.urlContentTypes.ArrayBuffer&&(x.responseType="arraybuffer"),c=x,D.push(c)}var h=D.length;void 0!==t&&void 0!==t.batchSize&&0!==h&&(h=Math.min(t.batchSize,D.length));for(var f=0;f<h;++f)p||D[g=f].send(null)}}this.getDefaultCharacterSet=function(){return t},this.setDefaultCharacterSet=function(e){t=e},this.load=function(e,t){var a,s,n;y.onloadstart({source:e}),1===e.length&&(A.utils.endsWith(e[0],"DICOMDIR")||A.utils.endsWith(e[0],".dcmdir"))?(a=e[0],s=t,(n=new XMLHttpRequest).open("GET",a,!0),n.responseType="arraybuffer",n.onload=function(e){var t=e.target.status;if(200!==t&&0!==t)return y.onerror({source:a,error:"GET "+e.target.responseURL+" "+e.target.status+" ("+e.target.statusText+")",target:e.target}),void y.onloadend({});for(var n=A.dicom.getFileListFromDicomDir(e.target.response)[0][0],i=A.utils.getRootPath(a),r=[],o=0;o<n.length;++o)r.push(i+"/"+n[o]);l(r,s)},n.onerror=function(e){w(y.onerror,a)(e),y.onloadend({})},n.onabort=function(e){w(y.onabort,a)(e),y.onloadend({})},n.send(null)):l(e,t)},this.abort=function(){p=!0;for(var e=0;e<D.length;++e)4!==D[e].readyState&&D[e].abort();v&&v.isLoading()&&v.abort()}},A.io.UrlsLoader.prototype.onloadstart=function(e){},A.io.UrlsLoader.prototype.onprogress=function(e){},A.io.UrlsLoader.prototype.onloaditem=function(e){},A.io.UrlsLoader.prototype.onload=function(e){},A.io.UrlsLoader.prototype.onloadend=function(e){},A.io.UrlsLoader.prototype.onerror=function(e){},A.io.UrlsLoader.prototype.onabort=function(e){},(A=A||{}).io=A.io||{};c=c||{};A.io.ZipLoader=function(){var o=this,a=!1;this.setOptions=function(e){},this.isLoading=function(){return a};var s="",l=[],u=null;this.load=function(e,t,n){this.onloadstart({source:t}),a=!0,c.loadAsync(e).then(function(e){l=[],u=e.file(/.*\.dcm/);e=l.length;s=u[e].name,u[e].async("arrayBuffer").then(function(e){!function t(e,n,i){l.push({filename:s,data:e});var r,e=100*l.length/u.length;o.onprogress({lengthComputable:!0,loaded:e/2,total:100,index:i,item:{loaded:e,total:100,source:n}}),l.length<u.length?(r=l.length,s=u[r].name,u[r].async("arrayBuffer").then(function(e){t(e,n,i)})):((r=new A.io.MemoryLoader).onprogress=function(e){e.loaded=50+e.loaded/2,e.index=i,o.onprogress(e)},r.onloaditem=o.onloaditem,r.onload=o.onload,r.onloadend=function(e){a=!1,o.onloadend(e)},r.onerror=o.onerror,r.onabort=o.onabort,r.load(l))}(e,t,n)})})},this.abort=function(){a=!1,o.onabort({}),o.onloadend({})}},A.io.ZipLoader.prototype.canLoadFile=function(e){return"zip"===A.utils.getFileExtension(e.name)},A.io.ZipLoader.prototype.canLoadUrl=function(e){e=A.utils.getUrlFromUri(e);return"zip"===A.utils.getFileExtension(e.pathname)},A.io.ZipLoader.prototype.loadFileAs=function(){return A.io.fileContentTypes.ArrayBuffer},A.io.ZipLoader.prototype.loadUrlAs=function(){return A.io.urlContentTypes.ArrayBuffer},A.io.ZipLoader.prototype.onloadstart=function(e){},A.io.ZipLoader.prototype.onprogress=function(e){},A.io.ZipLoader.prototype.onloaditem=function(e){},A.io.ZipLoader.prototype.onload=function(e){},A.io.ZipLoader.prototype.onloadend=function(e){},A.io.ZipLoader.prototype.onerror=function(e){},A.io.ZipLoader.prototype.onabort=function(e){},A.io.loaderList=A.io.loaderList||[],A.io.loaderList.push("ZipLoader"),(A=A||{}).math=A.math||{},A.math.BucketQueue=function(e,t){this.bucketCount=1<<e,this.mask=this.bucketCount-1,this.size=0,this.loc=0,this.cost=void 0!==t?t:function(e){return e},this.buckets=this.buildArray(this.bucketCount)},A.math.BucketQueue.prototype.push=function(e){var t=this.getBucket(e);e.next=this.buckets[t],this.buckets[t]=e,this.size++},A.math.BucketQueue.prototype.pop=function(){if(0===this.size)throw new Error("Cannot pop, bucketQueue is empty.");for(;null===this.buckets[this.loc];)this.loc=(this.loc+1)%this.bucketCount;var e=this.buckets[this.loc];return this.buckets[this.loc]=e.next,e.next=null,this.size--,e},A.math.BucketQueue.prototype.remove=function(e){if(!e)return!1;for(var t=this.getBucket(e),n=this.buckets[t];null!==n&&(null===n.next||e.x!==n.next.x||e.y!==n.next.y);)n=n.next;return null!==n&&(n.next=n.next.next,this.size--,!0)},A.math.BucketQueue.prototype.isEmpty=function(){return 0===this.size},A.math.BucketQueue.prototype.getBucket=function(e){return this.cost(e)&this.mask},A.math.BucketQueue.prototype.buildArray=function(e){for(var t=new Array(e),n=0;n<t.length;n++)t[n]=null;return t},(A=A||{}).math=A.math||{},A.math.mulABC=function(e,t,n){return null!==t&&null!==n?e*t*n:null},A.math.Circle=function(e,t){this.getCenter=function(){return e},this.getRadius=function(){return t}},A.math.Circle.prototype.equals=function(e){return null!==e&&this.getCenter().equals(e.getCenter())&&this.getRadius()===e.getRadius()},A.math.Circle.prototype.getSurface=function(){return Math.PI*this.getRadius()*this.getRadius()},A.math.Circle.prototype.getWorldSurface=function(e,t){return A.math.mulABC(this.getSurface(),e,t)},A.math.Circle.prototype.getRound=function(){for(var e=this.getCenter().getX(),t=this.getCenter().getY(),n=this.getRadius(),i=Math.pow(n,2),r=t+n,o=[],a=t-n;a<r;++a){var s=i-Math.pow(a-t,2);Math.abs(s)<1e-7||((s=Math.sqrt(s))<.5||o.push([[Math.round(e-s),Math.round(a)],[Math.round(e+s),Math.round(a)]]))}return o},A.math.Circle.prototype.quantify=function(e,t){var n={},i=e.get2DSpacing(),i=this.getWorldSurface(i[0],i[1]);return null!==i&&(n.surface={value:i/100,unit:A.i18n("unit.cm2")}),!e.canQuantifyImage()||0!==(i=this.getRound()).length&&(i=e.getImageVariableRegionValues(i),t=A.math.getStats(i,t),n.min={value:t.getMin(),unit:""},n.max={value:t.getMax(),unit:""},n.mean={value:t.getMean(),unit:""},n.stdDev={value:t.getStdDev(),unit:""},void 0!==t.getMedian&&(n.median={value:t.getMedian(),unit:""}),void 0!==t.getP25&&(n.p25={value:t.getP25(),unit:""}),void 0!==t.getP75&&(n.p75={value:t.getP75(),unit:""})),n},(A=A||{}).math=A.math||{},A.math.mulABC=function(e,t,n){return null!==t&&null!==n?e*t*n:null},A.math.Ellipse=function(e,t,n){this.getCenter=function(){return e},this.getA=function(){return t},this.getB=function(){return n}},A.math.Ellipse.prototype.equals=function(e){return null!==e&&this.getCenter().equals(e.getCenter())&&this.getA()===e.getA()&&this.getB()===e.getB()},A.math.Ellipse.prototype.getSurface=function(){return Math.PI*this.getA()*this.getB()},A.math.Ellipse.prototype.getWorldSurface=function(e,t){return A.math.mulABC(this.getSurface(),e,t)},A.math.Ellipse.prototype.getRound=function(){for(var e=this.getCenter().getX(),t=this.getCenter().getY(),n=this.getA(),i=this.getB(),r=n/i,o=Math.pow(i,2),a=t+i,s=[],l=t-i;l<a;++l){var u=o-Math.pow(l-t,2);Math.abs(u)<1e-7||((u=r*Math.sqrt(u))<.5||s.push([[Math.round(e-u),Math.round(l)],[Math.round(e+u),Math.round(l)]]))}return s},A.math.Ellipse.prototype.quantify=function(e,t){var n={},i=e.get2DSpacing(),i=this.getWorldSurface(i[0],i[1]);return null!==i&&(n.surface={value:i/100,unit:A.i18n("unit.cm2")}),!e.canQuantifyImage()||0!==(i=this.getRound()).length&&(i=e.getImageVariableRegionValues(i),t=A.math.getStats(i,t),n.min={value:t.getMin(),unit:""},n.max={value:t.getMax(),unit:""},n.mean={value:t.getMean(),unit:""},n.stdDev={value:t.getStdDev(),unit:""},void 0!==t.getMedian&&(n.median={value:t.getMedian(),unit:""}),void 0!==t.getP25&&(n.p25={value:t.getP25(),unit:""}),void 0!==t.getP75&&(n.p75={value:t.getP75(),unit:""})),n},(A=A||{}).math=A.math||{},A.math.Index=function(t){if(!t||void 0===t)throw new Error("Cannot create index with no values.");if(0===t.length)throw new Error("Cannot create index with empty values.");if(!t.every(function(e){return!isNaN(e)}))throw new Error("Cannot create index with non number values.");this.get=function(e){return t[e]},this.length=function(){return t.length},this.toString=function(){return"("+t.toString()+")"},this.getValues=function(){return t.slice()}},A.math.Index.prototype.canCompare=function(e){return!!e&&this.length()===e.length()},A.math.Index.prototype.equals=function(e){if(!this.canCompare(e))return!1;for(var t=0,n=this.length();t<n;++t)if(this.get(t)!==e.get(t))return!1;return!0},A.math.Index.prototype.add=function(e){if(!this.canCompare(e))return null;for(var t=[],n=0,i=this.length();n<i;++n)t.push(this.get(n)+e.get(n));return new A.math.Index(t)},A.math.Index.prototype.getWithNew2D=function(e,t){for(var n=[e,t],i=2,r=this.length();i<r;++i)n.push(this.get(i));return new A.math.Index(n)},A.math.getZeroIndex=function(e){e=new Array(e);return e.fill(0),new A.math.Index(e)},A.math.Index.prototype.toStringId=function(e){if(void 0===e){e=[];for(var t=0;t<this.length();++t)e.push(t)}for(var n=0;n<e.length;++n)if(e[n]>=this.length())throw new Error("Non valid dimension for toStringId.");for(var i="",r=0;r<e.length;++r)0!==r&&(i+="_"),i+="#"+e[r]+"-"+this.get(e[r]);return i},A.math.getIndexFromStringId=function(e){for(var t=e.split("_"),n=0,i=0;i<t.length;++i)n<(a=parseInt(t[i].substring(1,2),10))&&(n=a);if(0===n)throw new Error("No dimension found in point stringId");var r=new Array(n);r.fill(0);for(var o=0;o<t.length;++o){var a=parseInt(t[o].substring(1,3),10),s=parseInt(t[o].substring(3),10);r[a]=s}return new A.math.Point(r)},(A=A||{}).math=A.math||{},A.math.Line=function(e,t){this.getBegin=function(){return e},this.getEnd=function(){return t}},A.math.Line.prototype.equals=function(e){return null!==e&&this.getBegin().equals(e.getBegin())&&this.getEnd().equals(e.getEnd())},A.math.Line.prototype.getDeltaX=function(){return this.getEnd().getX()-this.getBegin().getX()},A.math.Line.prototype.getDeltaY=function(){return this.getEnd().getY()-this.getBegin().getY()},A.math.Line.prototype.getLength=function(){return Math.sqrt(this.getDeltaX()*this.getDeltaX()+this.getDeltaY()*this.getDeltaY())},A.math.Line.prototype.getWorldLength=function(e,t){var n=null;return null!==e&&null!==t&&(e=this.getDeltaX()*e,t=this.getDeltaY()*t,n=Math.sqrt(e*e+t*t)),n},A.math.Line.prototype.getMidpoint=function(){return new A.math.Point2D(parseInt((this.getBegin().getX()+this.getEnd().getX())/2,10),parseInt((this.getBegin().getY()+this.getEnd().getY())/2,10))},A.math.Line.prototype.getSlope=function(){return this.getDeltaY()/this.getDeltaX()},A.math.Line.prototype.getIntercept=function(){return(this.getEnd().getX()*this.getBegin().getY()-this.getBegin().getX()*this.getEnd().getY())/this.getDeltaX()},A.math.Line.prototype.getInclination=function(){return 180-180*Math.atan2(this.getDeltaY(),this.getDeltaX())/Math.PI},A.math.getAngle=function(e,t){var n=e.getDeltaX(),i=e.getDeltaY(),e=t.getDeltaX(),t=t.getDeltaY();return 360-(180-180*Math.atan2(n*t-i*e,n*e+i*t)/Math.PI)},A.math.getPerpendicularLine=function(e,t,n){var i,r,o=0,a=0,s=0,l=0;return l=0!==e.getSlope()?(i=-1/e.getSlope(),r=t.getY()-i*t.getX(),e=n/(2*Math.sqrt(1+i*i)),a=i*(o=t.getX()-e)+r,i*(s=t.getX()+e)+r):(o=t.getX(),a=t.getY()-n/2,s=t.getX(),t.getY()+n/2),new A.math.Line(new A.math.Point2D(o,a),new A.math.Point2D(s,l))},A.math.Line.prototype.quantify=function(e){var t={},e=e.get2DSpacing(),e=this.getWorldLength(e[0],e[1]);return null!==e&&(t.length={value:e,unit:A.i18n("unit.mm")}),t},(A=A||{}).math=A.math||{},void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),A.math.BIG_EPSILON=1e4*Number.EPSILON,A.math.isSimilar=function(e,t,n){return void 0===n&&(n=Number.EPSILON),Math.abs(e-t)<n},A.math.Matrix33=function(n){this.get=function(e,t){return n[3*e+t]}},A.math.Matrix33.prototype.equals=function(e,t){return A.math.isSimilar(this.get(0,0),e.get(0,0),t)&&A.math.isSimilar(this.get(0,1),e.get(0,1),t)&&A.math.isSimilar(this.get(0,2),e.get(0,2),t)&&A.math.isSimilar(this.get(1,0),e.get(1,0),t)&&A.math.isSimilar(this.get(1,1),e.get(1,1),t)&&A.math.isSimilar(this.get(1,2),e.get(1,2),t)&&A.math.isSimilar(this.get(2,0),e.get(2,0),t)&&A.math.isSimilar(this.get(2,1),e.get(2,1),t)&&A.math.isSimilar(this.get(2,2),e.get(2,2),t)},A.math.Matrix33.prototype.toString=function(){return"["+this.get(0,0)+", "+this.get(0,1)+", "+this.get(0,2)+"\n "+this.get(1,0)+", "+this.get(1,1)+", "+this.get(1,2)+"\n "+this.get(2,0)+", "+this.get(2,1)+", "+this.get(2,2)+"]"},A.math.Matrix33.prototype.multiply=function(e){for(var t=[],n=0;n<3;++n)for(var i=0;i<3;++i){for(var r=0,o=0;o<3;++o)r+=this.get(n,o)*e.get(o,i);t.push(r)}return new A.math.Matrix33(t)},A.math.Matrix33.prototype.getAbs=function(){for(var e=[],t=0;t<3;++t)for(var n=0;n<3;++n)e.push(Math.abs(this.get(t,n)));return new A.math.Matrix33(e)},A.math.Matrix33.prototype.multiplyArray3D=function(e){if(3!==e.length)throw new Error("Cannot multiply 3x3 matrix with non 3D array: ",e.length);for(var t=[],n=0;n<3;++n){for(var i=0,r=0;r<3;++r)i+=this.get(n,r)*e[r];t.push(i)}return t},A.math.Matrix33.prototype.multiplyVector3D=function(e){e=this.multiplyArray3D([e.getX(),e.getY(),e.getZ()]);return new A.math.Vector3D(e[0],e[1],e[2])},A.math.Matrix33.prototype.multiplyPoint3D=function(e){e=this.multiplyArray3D([e.getX(),e.getY(),e.getZ()]);return new A.math.Point3D(e[0],e[1],e[2])},A.math.Matrix33.prototype.multiplyIndex3D=function(e){e=this.multiplyArray3D(e.getValues());return new A.math.Index(e)},A.math.Matrix33.prototype.getInverse=function(){var e=this.get(0,0),t=this.get(0,1),n=this.get(0,2),i=this.get(1,0),r=this.get(1,1),o=this.get(1,2),a=this.get(2,0),s=this.get(2,1),l=this.get(2,2),u=r*l-o*s,c=o*a-i*l,g=i*s-r*a,d=e*u+t*c+n*g;if(0!=d)return new A.math.Matrix33([u/d,(n*s-t*l)/d,(t*o-n*r)/d,c/d,(e*l-n*a)/d,(n*i-e*o)/d,g/d,(t*a-e*s)/d,(e*r-t*i)/d]);A.logger.warn("Cannot invert matrix with zero determinant.")},A.math.Matrix33.prototype.getRowAbsMax=function(e){var t=[Math.abs(this.get(e,0)),Math.abs(this.get(e,1)),Math.abs(this.get(e,2))],n=Math.max.apply(null,t),n=t.indexOf(n);return{value:this.get(e,n),index:n}},A.math.Matrix33.prototype.getColAbsMax=function(e){var t=[Math.abs(this.get(0,e)),Math.abs(this.get(1,e)),Math.abs(this.get(2,e))],n=Math.max.apply(null,t),n=t.indexOf(n);return{value:this.get(n,e),index:n}},A.math.Matrix33.prototype.asOneAndZeros=function(){for(var e=[],t=0;t<3;++t)for(var n=this.getRowAbsMax(t),i=0<n.value?1:-1,r=0;r<3;++r)r===n.index?e.push(i):e.push(0);return new A.math.Matrix33(e)},A.math.Matrix33.prototype.getThirdColMajorDirection=function(){return this.getColAbsMax(2).index},A.math.getIdentityMat33=function(){return new A.math.Matrix33([1,0,0,0,1,0,0,0,1])},A.math.isIdentityMat33=function(e){return e.equals(A.math.getIdentityMat33())},A.math.getCoronalMat33=function(){return new A.math.Matrix33([1,0,0,0,0,1,0,1,0])},A.math.getSagittalMat33=function(){return new A.math.Matrix33([0,0,1,1,0,0,0,1,0])},A.math.getMatrixFromName=function(e){var t=null;return"axial"===e?t=A.math.getIdentityMat33():"coronal"===e?t=A.math.getCoronalMat33():"sagittal"===e&&(t=A.math.getSagittalMat33()),t},A.math.getOrientedArray3D=function(e,t){return t.getInverse().getAbs().multiplyArray3D(e)},A.math.getDeOrientedArray3D=function(e,t){return t.getAbs().multiplyArray3D(e)},(A=A||{}).math=A.math||{},A.math.Path=function(e,t){this.pointArray=e?e.slice():[],this.controlPointIndexArray=t?t.slice():[]},A.math.Path.prototype.getPoint=function(e){return this.pointArray[e]},A.math.Path.prototype.isControlPoint=function(e){e=this.pointArray.indexOf(e);if(-1!==e)return-1!==this.controlPointIndexArray.indexOf(e);throw new Error("Error: isControlPoint called with not in list point.")},A.math.Path.prototype.getLength=function(){return this.pointArray.length},A.math.Path.prototype.addPoint=function(e){this.pointArray.push(e)},A.math.Path.prototype.addControlPoint=function(e){e=this.pointArray.indexOf(e);if(-1===e)throw new Error("Cannot mark a non registered point as control point.");this.controlPointIndexArray.push(e)},A.math.Path.prototype.addPoints=function(e){this.pointArray=this.pointArray.concat(e)},A.math.Path.prototype.appenPath=function(e){var t=this.pointArray.length;this.pointArray=this.pointArray.concat(e.pointArray);for(var n=[],i=0;i<e.controlPointIndexArray.length;++i)n[i]=e.controlPointIndexArray[i]+t;this.controlPointIndexArray=this.controlPointIndexArray.concat(n)},(A=A||{}).math=A.math||{},A.math.Point2D=function(e,t){this.getX=function(){return e},this.getY=function(){return t}},A.math.Point2D.prototype.equals=function(e){return null!==e&&this.getX()===e.getX()&&this.getY()===e.getY()},A.math.Point2D.prototype.toString=function(){return"("+this.getX()+", "+this.getY()+")"},A.math.Point2D.prototype.getDistance=function(e){return Math.sqrt((this.getX()-e.getX())*(this.getX()-e.getX())+(this.getY()-e.getY())*(this.getY()-e.getY()))},A.math.Point2D.prototype.getRound=function(){return new A.math.Point2D(Math.round(this.getX()),Math.round(this.getY()))},A.math.Point3D=function(e,t,n){this.getX=function(){return e},this.getY=function(){return t},this.getZ=function(){return n}},A.math.Point3D.prototype.equals=function(e){return null!==e&&this.getX()===e.getX()&&this.getY()===e.getY()&&this.getZ()===e.getZ()},A.math.Point3D.prototype.toString=function(){return"("+this.getX()+", "+this.getY()+", "+this.getZ()+")"},A.math.Point3D.prototype.getDistance=function(e){return Math.sqrt((this.getX()-e.getX())*(this.getX()-e.getX())+(this.getY()-e.getY())*(this.getY()-e.getY())+(this.getZ()-e.getZ())*(this.getZ()-e.getZ()))},A.math.Point3D.prototype.minus=function(e){return new A.math.Vector3D(this.getX()-e.getX(),this.getY()-e.getY(),this.getZ()-e.getZ())},A.math.Point=function(t){if(!t||void 0===t)throw new Error("Cannot create point with no values.");if(0===t.length)throw new Error("Cannot create point with empty values.");if(!t.every(function(e){return!isNaN(e)}))throw new Error("Cannot create point with non number values.");this.get=function(e){return t[e]},this.length=function(){return t.length},this.toString=function(){return"("+t.toString()+")"},this.getValues=function(){return t.slice()}},A.math.Point.prototype.canCompare=function(e){return!!e&&this.length()===e.length()},A.math.Point.prototype.equals=function(e){if(!this.canCompare(e))return!1;for(var t=0,n=this.length();t<n;++t)if(this.get(t)!==e.get(t))return!1;return!0},A.math.Point.prototype.compare=function(e){if(!this.canCompare(e))return null;for(var t=[],n=0,i=this.length();n<i;++n)this.get(n)!==e.get(n)&&t.push(n);return t},A.math.Point.prototype.get3D=function(){return new A.math.Point3D(this.get(0),this.get(1),this.get(2))},A.math.Point.prototype.add=function(e){if(!this.canCompare(e))return null;for(var t=[],n=this.getValues(),i=e.getValues(),r=0;r<n.length;++r)t.push(n[r]+i[r]);return new A.math.Point(t)},A.math.Point.prototype.mergeWith3D=function(e){var t=this.getValues();return t[0]=e.getX(),t[1]=e.getY(),t[2]=e.getZ(),new A.math.Point(t)},(A=A||{}).math=A.math||{},A.math.mulABC=function(e,t,n){return null!==t&&null!==n?e*t*n:null},A.math.Rectangle=function(e,t){var n;t.getX()<e.getX()&&(n=e.getX(),e=new A.math.Point2D(t.getX(),e.getY()),t=new A.math.Point2D(n,t.getY())),t.getY()<e.getY()&&(n=e.getY(),e=new A.math.Point2D(e.getX(),t.getY()),t=new A.math.Point2D(t.getX(),n)),this.getBegin=function(){return e},this.getEnd=function(){return t}},A.math.Rectangle.prototype.equals=function(e){return null!==e&&this.getBegin().equals(e.getBegin())&&this.getEnd().equals(e.getEnd())},A.math.Rectangle.prototype.getSurface=function(){var e=this.getBegin(),t=this.getEnd();return Math.abs(t.getX()-e.getX())*Math.abs(t.getY()-e.getY())},A.math.Rectangle.prototype.getWorldSurface=function(e,t){return A.math.mulABC(this.getSurface(),e,t)},A.math.Rectangle.prototype.getRealWidth=function(){return this.getEnd().getX()-this.getBegin().getX()},A.math.Rectangle.prototype.getRealHeight=function(){return this.getEnd().getY()-this.getBegin().getY()},A.math.Rectangle.prototype.getWidth=function(){return Math.abs(this.getRealWidth())},A.math.Rectangle.prototype.getHeight=function(){return Math.abs(this.getRealHeight())},A.math.Rectangle.prototype.getRound=function(){return{min:this.getBegin().getRound(),max:this.getEnd().getRound()}},A.math.Rectangle.prototype.quantify=function(e,t){var n={},i=e.get2DSpacing(),i=this.getWorldSurface(i[0],i[1]);return null!==i&&(n.surface={value:i/100,unit:A.i18n("unit.cm2")}),e.canQuantifyImage()&&(i=this.getRound(),i=e.getImageRegionValues(i.min,i.max),t=A.math.getStats(i,t),n.min={value:t.getMin(),unit:""},n.max={value:t.getMax(),unit:""},n.mean={value:t.getMean(),unit:""},n.stdDev={value:t.getStdDev(),unit:""},void 0!==t.getMedian&&(n.median={value:t.getMedian(),unit:""}),void 0!==t.getP25&&(n.p25={value:t.getP25(),unit:""}),void 0!==t.getP75&&(n.p75={value:t.getP75(),unit:""})),n},(A=A||{}).math=A.math||{},A.math.ROI=function(){var t=[];this.getPoint=function(e){return t[e]},this.getLength=function(){return t.length},this.addPoint=function(e){t.push(e)},this.addPoints=function(e){t=t.concat(e)}},(A=A||{}).math=A.math||{};var l=2/(3*Math.PI);A.math.computeGreyscale=function(e,t,n){for(var i=[],r=0;r<n;r++){i[r]=[];for(var o=0;o<t;o++){var a=4*(r*t+o);i[r][o]=(e[a]+e[1+a]+e[2+a])/765}}return i.dx=function(e,t){return e+1===this[t].length&&e--,this[t][e+1]-this[t][e]},i.dy=function(e,t){return t+1===this.length&&t--,this[t][e]-this[t+1][e]},i.gradMagnitude=function(e,t){var n=this.dx(e,t),t=this.dy(e,t);return Math.sqrt(n*n+t*t)},i.laplace=function(e,t){var n=-16*this[t][e];return n+=this[t-2][e],n+=this[t-1][e-1]+2*this[t-1][e]+this[t-1][e+1],n+=this[t][e-2]+2*this[t][e-1]+2*this[t][e+1]+this[t][e+2],n+=this[t+1][e-1]+2*this[t+1][e]+this[t+1][e+1],n+=this[t+2][e]},i},A.math.computeGradient=function(e){for(var t=[],n=0,i=0,r=0,r=0;r<e.length-1;r++){for(t[r]=[],i=0;i<e[r].length-1;i++)t[r][i]=e.gradMagnitude(i,r),n=Math.max(t[r][i],n);t[r][e[r].length-1]=t[r][e.length-2]}t[e.length-1]=[];for(var o=0;o<t[0].length;o++)t[e.length-1][o]=t[e.length-2][o];for(r=0;r<t.length;r++)for(i=0;i<t[r].length;i++)t[r][i]=1-t[r][i]/n;return t},A.math.computeLaplace=function(e){var t=[];t[0]=[],t[1]=[];for(var n=1;n<e.length;n++)t[0][n]=1,t[1][n]=1;for(var i=2;i<e.length-2;i++){t[i]=[],t[i][0]=1,t[i][1]=1;for(var r=2;r<e[i].length-2;r++)t[i][r]=.33<e.laplace(r,i)?0:1;t[i][e[i].length-2]=1,t[i][e[i].length-1]=1}t[e.length-2]=[],t[e.length-1]=[];for(var o=1;o<e.length;o++)t[e.length-2][o]=1,t[e.length-1][o]=1;return t},A.math.computeGradX=function(e){for(var t=[],n=0;n<e.length;n++){t[n]=[];for(var i=0;i<e[n].length-1;i++)t[n][i]=e.dx(i,n);t[n][e[n].length-1]=t[n][e[n].length-2]}return t},A.math.computeGradY=function(e){for(var t=[],n=0;n<e.length-1;n++){t[n]=[];for(var i=0;i<e[n].length;i++)t[n][i]=e.dy(i,n)}t[e.length-1]=[];for(var r=0;r<e[0].length;r++)t[e.length-1][r]=t[e.length-2][r];return t},A.math.gradUnitVector=function(e,t,n,i,r){e=e[i][n],i=t[i][n],n=Math.sqrt(e*e+i*i),n=Math.max(n,1e-100);r.x=e/n,r.y=i/n},A.math.gradDirection=function(e,t,n,i,r,o){var a={x:-1,y:-1},s={x:-1,y:-1};A.math.gradUnitVector(e,t,n,i,a),A.math.gradUnitVector(e,t,r,o,s);a=a.y*(r-n)-a.x*(o-i),s=s.y*(r-n)-s.x*(o-i);return a<0&&(a=-a,s=-s),n!==r&&i!==o&&(a*=Math.SQRT1_2,s*=Math.SQRT1_2),l*(Math.acos(a)+Math.acos(s))},A.math.computeSides=function(e,t,n,i){for(var r={inside:[],outside:[]},o={x:-1,y:-1},a=0;a<t.length;a++){r.inside[a]=[],r.outside[a]=[];for(var s=0;s<t[a].length;s++){A.math.gradUnitVector(t,n,s,a,o);var l=Math.round(s+e*o.y),u=Math.round(a-e*o.x),c=Math.round(s-e*o.y),g=Math.round(a+e*o.x),l=Math.max(Math.min(l,t[a].length-1),0),c=Math.max(Math.min(c,t[a].length-1),0),u=Math.max(Math.min(u,t.length-1),0),g=Math.max(Math.min(g,t.length-1),0);r.inside[a][s]=i[u][l],r.outside[a][s]=i[g][c]}}return r},A.math.gaussianBlur=function(e,t){t[0]=.4*e[0]+.5*e[1]+.1*e[1],t[1]=.25*e[0]+.4*e[1]+.25*e[2]+.1*e[3];for(var n=2;n<e.length-2;n++)t[n]=.05*e[n-2]+.25*e[n-1]+.4*e[n]+.25*e[n+1]+.05*e[n+2];var i=e.length;t[i-2]=.25*e[i-1]+.4*e[i-2]+.25*e[i-3]+.1*e[i-4],t[i-1]=.4*e[i-1]+.5*e[i-2]+.1*e[i-3]},A.math.Scissors=function(){this.width=-1,this.height=-1,this.curPoint=null,this.searchGranBits=8,this.searchGran=1<<this.earchGranBits,this.pointsPerPost=500,this.greyscale=null,this.laplace=null,this.gradient=null,this.gradX=null,this.gradY=null,this.parents=null,this.working=!1,this.trained=!1,this.trainingPoints=null,this.edgeWidth=2,this.trainingLength=32,this.edgeGran=256,this.edgeTraining=null,this.gradPointsNeeded=32,this.gradGran=1024,this.gradTraining=null,this.insideGran=256,this.insideTraining=null,this.outsideGran=256,this.outsideTraining=null},A.math.Scissors.prototype.getTrainingIdx=function(e,t){return Math.round((e-1)*t)},A.math.Scissors.prototype.getTrainedEdge=function(e){return this.edgeTraining[this.getTrainingIdx(this.edgeGran,e)]},A.math.Scissors.prototype.getTrainedGrad=function(e){return this.gradTraining[this.getTrainingIdx(this.gradGran,e)]},A.math.Scissors.prototype.getTrainedInside=function(e){return this.insideTraining[this.getTrainingIdx(this.insideGran,e)]},A.math.Scissors.prototype.getTrainedOutside=function(e){return this.outsideTraining[this.getTrainingIdx(this.outsideGran,e)]},A.math.Scissors.prototype.setWorking=function(e){this.working=e},A.math.Scissors.prototype.setDimensions=function(e,t){this.width=e,this.height=t},A.math.Scissors.prototype.setData=function(e){if(-1===this.width||-1===this.height)throw new Error("Dimensions have not been set.");this.greyscale=A.math.computeGreyscale(e,this.width,this.height),this.laplace=A.math.computeLaplace(this.greyscale),this.gradient=A.math.computeGradient(this.greyscale),this.gradX=A.math.computeGradX(this.greyscale),this.gradY=A.math.computeGradY(this.greyscale);e=A.math.computeSides(this.edgeWidth,this.gradX,this.gradY,this.greyscale);this.inside=e.inside,this.outside=e.outside,this.edgeTraining=[],this.gradTraining=[],this.insideTraining=[],this.outsideTraining=[]},A.math.Scissors.prototype.findTrainingPoints=function(e){var t=[];if(null!==this.parents)for(var n=0;n<this.trainingLength&&e;n++)t.push(e),e=this.parents[e.y][e.x];return t},A.math.Scissors.prototype.resetTraining=function(){this.trained=!1},A.math.Scissors.prototype.doTraining=function(e){this.trainingPoints=this.findTrainingPoints(e),this.trainingPoints.length<8||(this.calculateTraining(e=[],this.edgeGran,this.greyscale,this.edgeTraining),this.calculateTraining(e,this.gradGran,this.gradient,this.gradTraining),this.calculateTraining(e,this.insideGran,this.inside,this.insideTraining),this.calculateTraining(e,this.outsideGran,this.outside,this.outsideTraining),this.trainingPoints.length<this.gradPointsNeeded&&this.addInStaticGrad(this.trainingPoints.length,this.gradPointsNeeded),this.trained=!0)},A.math.Scissors.prototype.calculateTraining=function(e,t,n,i){var r=0;for(e.length=t,r=0;r<t;r++)e[r]=0;for(var o=1,r=0;r<this.trainingPoints.length;r++){var a=this.trainingPoints[r],a=this.getTrainingIdx(t,n[a.y][a.x]);e[a]+=1,o=Math.max(o,e[a])}for(r=0;r<t;r++)e[r]=1-e[r]/o;A.math.gaussianBlur(e,i)},A.math.Scissors.prototype.addInStaticGrad=function(e,t){for(var n=0;n<this.gradGran;n++)this.gradTraining[n]=Math.min(this.gradTraining[n],1-n*(t-e)/(t*this.gradGran))},A.math.Scissors.prototype.gradDirection=function(e,t,n,i){return A.math.gradDirection(this.gradX,this.gradY,e,t,n,i)},A.math.Scissors.prototype.dist=function(e,t,n,i){var r=this.gradient[i][n];e!==n&&t!==i||(r*=Math.SQRT1_2);var o=this.laplace[i][n],i=this.gradDirection(e,t,n,i);return this.trained?.3*this.getTrainedGrad(r)+.3*o+.1*(i+this.getTrainedEdge(this.greyscale[t][e])+this.getTrainedInside(this.inside[t][e])+this.getTrainedOutside(this.outside[t][e])):.43*r+.43*o+.11*i},A.math.Scissors.prototype.adj=function(e){for(var t=[],n=Math.max(e.x-1,0),i=Math.max(e.y-1,0),r=Math.min(e.x+1,this.greyscale[0].length-1),o=Math.min(e.y+1,this.greyscale.length-1),a=0,s=i;s<=o;s++)for(var l=n;l<=r;l++)l===e.x&&s===e.y||(t[a++]={x:l,y:s});return t},A.math.Scissors.prototype.setPoint=function(e){this.setWorking(!0),this.curPoint=e;var t=0,n=0;for(this.visited=[],n=0;n<this.height;n++)for(this.visited[n]=[],t=0;t<this.width;t++)this.visited[n][t]=!1;for(this.parents=[],n=0;n<this.height;n++)this.parents[n]=[];for(this.cost=[],n=0;n<this.height;n++)for(this.cost[n]=[],t=0;t<this.width;t++)this.cost[n][t]=Number.MAX_VALUE;this.pq=new A.math.BucketQueue(this.searchGranBits,function(e){return Math.round(this.searchGran*this.costArr[e.y][e.x])}),this.pq.searchGran=this.searchGran,this.pq.costArr=this.cost,this.pq.push(e),this.cost[e.y][e.x]=0},A.math.Scissors.prototype.doWork=function(){if(this.working){this.timeout=null;for(var e=0,t=[];!this.pq.isEmpty()&&e<this.pointsPerPost;){var n=this.pq.pop();t.push(n),t.push(this.parents[n.y][n.x]),this.visited[n.y][n.x]=!0;for(var i=this.adj(n),r=0;r<i.length;r++){var o=i[r],a=this.cost[n.y][n.x]+this.dist(n.x,n.y,o.x,o.y);a<this.cost[o.y][o.x]&&(this.cost[o.y][o.x]!==Number.MAX_VALUE&&this.pq.remove(o),this.cost[o.y][o.x]=a,this.parents[o.y][o.x]=n,this.pq.push(o))}e++}return t}},(A=A||{}).math=A.math||{},A.math.SimpleStats=function(e,t,n,i){this.getMin=function(){return e},this.getMax=function(){return t},this.getMean=function(){return n},this.getStdDev=function(){return i}},A.math.SimpleStats.prototype.equals=function(e){return null!==e&&this.getMin()===e.getMin()&&this.getMax()===e.getMax()&&this.getMean()===e.getMean()&&this.getStdDev()===e.getStdDev()},A.math.SimpleStats.prototype.asObject=function(){return{min:this.getMin(),max:this.getMax(),mean:this.getMean(),stdDev:this.getStdDev()}},A.math.FullStats=function(e,t,n,i,r,o,a){A.math.SimpleStats.call(this,e,t,n,i),this.getMedian=function(){return r},this.getP25=function(){return o},this.getP75=function(){return a}},A.math.FullStats.prototype=Object.create(A.math.SimpleStats.prototype),Object.defineProperty(A.math.FullStats.prototype,"constructor",{value:A.math.FullStats,enumerable:!1,writable:!0}),A.math.getStats=function(e,t){return A.math.includesFullStatsFlags(t)?A.math.getFullStats(e):A.math.getSimpleStats(e)},A.math.includesFullStatsFlags=function(e){return null!=e&&e.includes("median","p25","p75")},A.math.getSimpleStats=function(e){for(var t,n=e[0],i=n,r=0,o=0,a=e.length,s=0;s<a;++s)(t=e[s])<n?n=t:i<t&&(i=t),r+=t,o+=t*t;var l=r/a,u=Math.sqrt(o/a-l*l);return new A.math.SimpleStats(n,i,l,u)},A.math.getFullStats=function(e){var t=A.math.getSimpleStats(e);e.sort(function(e,t){return e-t});var n=A.math.getPercentile(e,.5),i=A.math.getPercentile(e,.25),e=A.math.getPercentile(e,.75);return new A.math.FullStats(t.getMin(),t.getMax(),t.getMean(),t.getStdDev(),n,i,e)},A.math.getPercentile=function(e,t){if(0===e.length)throw new Error("Empty array provided for percentile calculation.");if(t<0||1<t)throw new Error("Invalid ratio provided for percentile calculation: "+t);if(0===t)return e[0];if(1===t)return e[e.length-1];var n=(e.length-1)*t,i=Math.floor(n),t=e[i];return t+(e[i+1]-t)*(n-i)},A.math.guid=function(){return Math.random().toString(36).substring(2,15)},(A=A||{}).math=A.math||{},A.math.Vector3D=function(e,t,n){this.getX=function(){return e},this.getY=function(){return t},this.getZ=function(){return n}},A.math.Vector3D.prototype.equals=function(e){return null!==e&&this.getX()===e.getX()&&this.getY()===e.getY()&&this.getZ()===e.getZ()},A.math.Vector3D.prototype.toString=function(){return"("+this.getX()+", "+this.getY()+", "+this.getZ()+")"},A.math.Vector3D.prototype.norm=function(){return Math.sqrt(this.getX()*this.getX()+this.getY()*this.getY()+this.getZ()*this.getZ())},A.math.Vector3D.prototype.crossProduct=function(e){return new A.math.Vector3D(this.getY()*e.getZ()-e.getY()*this.getZ(),this.getZ()*e.getX()-e.getZ()*this.getX(),this.getX()*e.getY()-e.getX()*this.getY())},A.math.Vector3D.prototype.dotProduct=function(e){return this.getX()*e.getX()+this.getY()*e.getY()+this.getZ()*e.getZ()},(A=A||{}).tool=A.tool||{},A.tool.draw=A.tool.draw||{};y=y||{};A.tool.draw.defaultArrowLabelText="",A.tool.draw.ArrowFactory=function(){this.getGroupName=function(){return"line-group"},this.getNPoints=function(){return 2},this.getTimeout=function(){return 0}},A.tool.draw.ArrowFactory.prototype.isFactoryGroup=function(e){return this.getGroupName()===e.name()},A.tool.draw.ArrowFactory.prototype.create=function(e,t,n){var i=new A.math.Line(e[0],e[1]),r=new y.Line({points:[i.getBegin().getX(),i.getBegin().getY(),i.getEnd().getX(),i.getEnd().getY()],stroke:t.getLineColour(),strokeWidth:t.getStrokeWidth(),strokeScaleEnabled:!1,name:"shape"}),o=A.math.getPerpendicularLine(i,e[0],t.scale(10)),a=A.math.getPerpendicularLine(i,e[1],t.scale(10));r.hitFunc(function(e){e.beginPath(),e.moveTo(o.getBegin().getX(),o.getBegin().getY()),e.lineTo(o.getEnd().getX(),o.getEnd().getY()),e.lineTo(a.getEnd().getX(),a.getEnd().getY()),e.lineTo(a.getBegin().getX(),a.getBegin().getY()),e.closePath(),e.fillStrokeShape(this)});var s=new A.math.Point2D(i.getBegin().getX(),i.getBegin().getY()-10),l=new A.math.Line(i.getBegin(),s),u=A.math.getAngle(i,l),c=u*Math.PI/180,e=5*t.getScaledStrokeWidth(),s=new y.RegularPolygon({x:i.getBegin().getX()+e*Math.sin(c),y:i.getBegin().getY()+e*Math.cos(c),sides:3,radius:e,rotation:-u,fill:t.getLineColour(),strokeWidth:t.getStrokeWidth(),strokeScaleEnabled:!1,name:"shape-triangle"}),l=new y.Text({fontSize:t.getFontSize(),fontFamily:t.getFontFamily(),fill:t.getLineColour(),padding:t.getTextPadding(),shadowColor:t.getShadowLineColour(),shadowOffset:t.getShadowOffset(),name:"text"}),c="",c=void 0!==A.tool.draw.arrowLabelText?A.tool.draw.arrowLabelText:A.tool.draw.defaultArrowLabelText;l.setText(c),l.meta={textExpr:c,quantification:{}};e=i.getBegin().getX()>i.getEnd().getX()?0:-1,u=i.getBegin().getY()>i.getEnd().getY()?-1:0,c=new y.Label({x:i.getEnd().getX()+e*l.width(),y:i.getEnd().getY()+u*t.applyZoomScale(15).y,scale:t.applyZoomScale(1),visible:0!==c.length,name:"label"});c.add(l),c.add(new y.Tag({fill:t.getLineColour(),opacity:t.getTagOpacity()}));t=new y.Group;return t.name(this.getGroupName()),t.add(c),t.add(s),t.add(r),t.visible(!0),t},A.tool.draw.ArrowFactory.prototype.getAnchors=function(e,t){var n=e.points(),i=[];return i.push(A.tool.draw.getDefaultAnchor(n[0]+e.x(),n[1]+e.y(),"begin",t)),i.push(A.tool.draw.getDefaultAnchor(n[2]+e.x(),n[3]+e.y(),"end",t)),i},A.tool.draw.ArrowFactory.prototype.update=function(e,t,n){var i=e.getParent(),r=i.getChildren(function(e){return"shape"===e.name()})[0],o=i.getChildren(function(e){return"shape-triangle"===e.name()})[0],a=i.getChildren(function(e){return"label"===e.name()})[0],s=i.getChildren(function(e){return"begin"===e.id()})[0],l=i.getChildren(function(e){return"end"===e.id()})[0];switch(e.id()){case"begin":s.x(e.x()),s.y(e.y());break;case"end":l.x(e.x()),l.y(e.y())}var u=s.x()-r.x(),c=s.y()-r.y(),g=l.x()-r.x(),d=l.y()-r.y();r.points([u,c,g,d]);var x=new A.math.Point2D(s.x(),s.y()),i=new A.math.Point2D(l.x(),l.y()),i=new A.math.Line(x,i),c=new A.math.Point2D(u,c),d=new A.math.Point2D(g,d),S=A.math.getPerpendicularLine(i,c,10),m=A.math.getPerpendicularLine(i,d,10);r.hitFunc(function(e){e.beginPath(),e.moveTo(S.getBegin().getX(),S.getBegin().getY()),e.lineTo(S.getEnd().getX(),S.getEnd().getY()),e.lineTo(m.getEnd().getX(),m.getEnd().getY()),e.lineTo(m.getBegin().getX(),m.getBegin().getY()),e.closePath(),e.fillStrokeShape(this)});d=new A.math.Point2D(i.getBegin().getX(),i.getBegin().getY()-10),r=new A.math.Line(i.getBegin(),d),d=A.math.getAngle(i,r),r=d*Math.PI/180;o.x(i.getBegin().getX()+o.radius()*Math.sin(r)),o.y(i.getBegin().getY()+o.radius()*Math.cos(r)),o.rotation(-d);r=a.getText();r.setText(r.meta.textExpr);o=i.getBegin().getX()>i.getEnd().getX()?0:-1,d=i.getBegin().getY()>i.getEnd().getY()?-1:0,t={x:i.getEnd().getX()+o*r.width(),y:i.getEnd().getY()+d*t.applyZoomScale(15).y};a.position(t)},(A=A||{}).tool=A.tool||{},A.tool.draw=A.tool.draw||{};y=y||{};A.tool.draw.defaultCircleLabelText="{surface}",A.tool.draw.CircleFactory=function(){this.getGroupName=function(){return"circle-group"},this.getNPoints=function(){return 2},this.getTimeout=function(){return 0}},A.tool.draw.CircleFactory.prototype.isFactoryGroup=function(e){return this.getGroupName()===e.name()},A.tool.draw.CircleFactory.prototype.create=function(e,t,n){var i=Math.abs(e[0].getX()-e[1].getX()),r=Math.abs(e[0].getY()-e[1].getY()),o=Math.round(Math.sqrt(i*i+r*r)),i=new A.math.Circle(e[0],o),r=new y.Circle({x:i.getCenter().getX(),y:i.getCenter().getY(),radius:i.getRadius(),stroke:t.getLineColour(),strokeWidth:t.getStrokeWidth(),strokeScaleEnabled:!1,name:"shape"}),e=new y.Text({fontSize:t.getFontSize(),fontFamily:t.getFontFamily(),fill:t.getLineColour(),padding:t.getTextPadding(),shadowColor:t.getShadowLineColour(),shadowOffset:t.getShadowOffset(),name:"text"}),o="",o=void 0!==A.tool.draw.circleLabelText?A.tool.draw.circleLabelText:A.tool.draw.defaultCircleLabelText,n=i.quantify(n,A.utils.getFlags(o));e.setText(A.utils.replaceFlags(o,n)),e.meta={textExpr:o,quantification:n};var a,o=new y.Label({x:i.getCenter().getX(),y:i.getCenter().getY(),scale:t.applyZoomScale(1),visible:0!==o.length,name:"label"});o.add(e),o.add(new y.Tag({fill:t.getLineColour(),opacity:t.getTagOpacity()})),A.tool.draw.debug&&(a=A.tool.draw.getShadowCircle(i));i=new y.Group;return i.name(this.getGroupName()),a&&i.add(a),i.add(o),i.add(r),i.visible(!0),i},A.tool.draw.CircleFactory.prototype.getAnchors=function(e,t){var n=e.x(),i=e.y(),r=e.radius(),e=[];return e.push(A.tool.draw.getDefaultAnchor(n-r,i,"left",t)),e.push(A.tool.draw.getDefaultAnchor(n+r,i,"right",t)),e.push(A.tool.draw.getDefaultAnchor(n,i-r,"bottom",t)),e.push(A.tool.draw.getDefaultAnchor(n,i+r,"top",t)),e},A.tool.draw.CircleFactory.prototype.update=function(e,t,n){var i,r=e.getParent(),o=r.getChildren(function(e){return"shape"===e.name()})[0],a=r.getChildren(function(e){return"label"===e.name()})[0],s=r.getChildren(function(e){return"left"===e.id()})[0],l=r.getChildren(function(e){return"right"===e.id()})[0],u=r.getChildren(function(e){return"bottom"===e.id()})[0],c=r.getChildren(function(e){return"top"===e.id()})[0];A.tool.draw.debug&&(i=r.getChildren(function(e){return"shadow"===e.name()})[0]);var g,d={x:o.x(),y:o.y()};switch(e.id()){case"left":g=d.x-e.x(),s.y(l.y()),l.x(d.x+g),u.y(d.y-g),c.y(d.y+g);break;case"right":g=e.x()-d.x,l.y(s.y()),s.x(d.x-g),u.y(d.y-g),c.y(d.y+g);break;case"bottom":g=d.y-e.y(),u.x(c.x()),s.x(d.x-g),l.x(d.x+g),c.y(d.y+g);break;case"top":g=e.y()-d.y,c.x(u.x()),s.x(d.x-g),l.x(d.x+g),u.y(d.y-g);break;default:A.logger.error("Unhandled anchor id: "+e.id())}o.radius(Math.abs(g));o=new A.math.Point2D(r.x()+d.x,r.y()+d.y),o=new A.math.Circle(o,g);i&&(i.destroy(),r.add(A.tool.draw.getShadowCircle(o,r))),a.position({x:d.x,y:d.y}),A.tool.draw.updateCircleQuantification(r,n)},A.tool.draw.CircleFactory.prototype.updateQuantification=function(e,t){A.tool.draw.updateCircleQuantification(e,t)},A.tool.draw.updateCircleQuantification=function(e,t){var n=e.getChildren(function(e){return"shape"===e.name()})[0],i=e.getChildren(function(e){return"label"===e.name()})[0],e=new A.math.Point2D(e.x()+n.x(),e.y()+n.y()),n=new A.math.Circle(e,n.radius()),i=i.getText(),t=n.quantify(t,A.utils.getFlags(i.meta.textExpr));i.setText(A.utils.replaceFlags(i.meta.textExpr,t)),i.meta.quantification=t},A.tool.draw.getShadowCircle=function(e,t){var n=0,i=0;void 0!==t&&(n=t.x(),i=t.y());var r=new y.Group;r.name("shadow");for(var o=e.getRound(),a=0;a<o.length;++a){var s=o[a],l=s[0][0],u=s[0][1],s=s[1][0],l=new y.Rect({x:l-n,y:u-i,width:s-l,height:1,fill:"grey",strokeWidth:0,strokeScaleEnabled:!1,opacity:.3,name:"shadow-element"});r.add(l)}return r},(A=A||{}).tool=A.tool||{},A.tool.draw=A.tool.draw||{};y=y||{};A.tool.draw.debug=!1,A.tool.Draw=function(g){var o=this,r=!1,d=this.shapeFactoryList=null,a=null,s=null;this.shapeName=0;var l=[],u=null,x=new A.tool.ShapeEditor(g);x.setDrawEventCallback(p);var S=new y.Group,e=new y.Line({points:[-10,-10,10,10],stroke:"red"}),t=new y.Line({points:[10,-10,-10,10],stroke:"red"});S.width(20),S.height(20),S.add(e),S.add(t),this.style=g.getStyle();var i={};function n(e,t){var n=t.getActiveDrawLayer().getKonvaLayer();s&&(s.destroy(),s=null);t=t.getActiveViewLayer().getViewController();(s=d.create(e,o.style,t)).getChildren(A.draw.isNodeNameShape)[0].listening(!1),n.listening(!1),n.add(s),n.draw()}function c(e,t){var n=t.getActiveDrawLayer().getKonvaLayer();s&&(s.destroy(),s=null);var i=t.getActiveViewLayer().getViewController(),r=t.getActiveDrawLayer().getDrawController(),i=d.create(e,o.style,i);i.id(A.math.guid()),r.getCurrentPosGroup().add(i),n.listening(!0),(a=new A.tool.DrawGroupCommand(i,o.shapeName,n)).onExecute=p,a.onUndo=p,a.execute(),g.addToUndoStack(a),o.setShapeOn(i,t)}function m(e){h(!0,e)}function h(e,t){var n=t.getActiveDrawLayer().getDrawController().getCurrentPosGroup().getChildren();e?n.forEach(function(e){o.setShapeOn(e,t)}):n.forEach(function(e){(e=e).off("mouseover"),e.off("mouseout"),e.draggable(!1),e.off("dragstart.draw"),e.off("dragmove.draw"),e.off("dragend.draw"),e.off("dblclick")}),t.getActiveDrawLayer().getKonvaLayer().draw()}function f(e,t){t=t.getActiveDrawLayer().getKonvaStage();return{x:t.offset().x+e.x/t.scale().x,y:t.offset().y+e.y/t.scale().y}}function p(e){if(void 0!==i[e.type])for(var t=0;t<i[e.type].length;++t)i[e.type][t](e)}this.mousedown=function(e){var t,n,i;r||(i=A.gui.getLayerDetailsFromEvent(e),i=(n=(t=g.getLayerGroupById(i.groupId)).getActiveDrawLayer().getKonvaStage()).getIntersection({x:e._x,y:e._y}),o.style.setZoomScale(n.scale()),i?(i=i.getParent().find(".shape")[0])&&i!==x.getShape()&&(x.disable(),x.setShape(i),i=t.getActiveViewLayer().getViewController(),x.setViewController(i),x.enable()):(x.disable(),x.setShape(null),x.setViewController(null),r=!0,d=new o.shapeFactoryList[o.shapeName],l=[],e=t.getActiveViewLayer().displayToPlanePos(e._x,e._y),u=new A.math.Point2D(e.x,e.y),l.push(u)))},this.mousemove=function(e){var t;r&&(t=A.gui.getLayerDetailsFromEvent(e),e=(t=g.getLayerGroupById(t.groupId)).getActiveViewLayer().displayToPlanePos(e._x,e._y),(0<Math.abs(e.x-u.getX())||0<Math.abs(e.y-u.getY()))&&(1!==l.length&&void 0!==l[l.length-1].tmp&&l.pop(),(u=new A.math.Point2D(e.x,e.y)).tmp=!0,l.push(u),n(l,t)))},this.mouseup=function(e){r&&(0!==l.length?l.length===d.getNPoints()?(e=A.gui.getLayerDetailsFromEvent(e),e=g.getLayerGroupById(e.groupId),c(l,e),r=!1):void 0!==l[l.length-1].tmp&&delete l[l.length-1].tmp:A.logger.warn("Draw mouseup but no points..."))},this.dblclick=function(e){r&&(0!==l.length?(e=A.gui.getLayerDetailsFromEvent(e),e=g.getLayerGroupById(e.groupId),c(l,e),r=!1):A.logger.warn("Draw dblclick but no points..."))},this.mouseout=function(e){o.mouseup(e)},this.touchstart=function(e){o.mousedown(e)},this.touchmove=function(e){var t;r&&(t=A.gui.getLayerDetailsFromEvent(e),e=(t=g.getLayerGroupById(t.groupId)).getActiveViewLayer().displayToPlanePos(e._x,e._y),(0<Math.abs(e.x-u.getX())||0<Math.abs(e.y-u.getY()))&&(1!==l.length&&l.pop(),u=new A.math.Point2D(e.x,e.y),l.push(u),l.length<d.getNPoints()&&(clearTimeout(this.timer),this.timer=setTimeout(function(){l.push(u)},d.getTimeout())),n(l,t)))},this.touchend=function(e){o.dblclick(e)},this.keydown=function(e){var t,n,i;r||(e.context="dwv.tool.Draw",g.onKeydown(e)),46===e.keyCode&&x.isActive()&&(n=(t=x.getShape().getParent()).getLayer(),i=A.tool.GetShapeDisplayName(t.getChildren(A.draw.isNodeNameShape)[0]),(i=new A.tool.DeleteGroupCommand(t,i,n)).onExecute=p,i.onUndo=p,i.execute(),g.addToUndoStack(i)),27===e.keyCode&&null!==s&&(n=s.getLayer(),s.destroy(),s=null,r=!1,l=[],n.draw())},this.activate=function(e){x.disable(),x.setShape(null),x.setViewController(null),document.body.style.cursor="default";var t=g.getActiveLayerGroup();h(e,t),e?(g.addEventListener("positionchange",function(){m(t)}),this.setLineColour(this.style.getLineColour())):g.removeEventListener("positionchange",function(){m(t)})},this.setShapeOn=function(o,a){o.on("mouseover",function(){document.body.style.cursor="pointer"}),o.on("mouseout",function(){document.body.style.cursor="default"});var s=a.getActiveDrawLayer().getKonvaLayer();o.draggable(!0);var l={x:o.x(),y:o.y()},u=A.tool.GetShapeDisplayName(o.getChildren(A.draw.isNodeNameShape)[0]),c=null;o.on("dragstart.draw",function(){c=o.getChildren(A.draw.isNodeNameShape)[0].stroke();var e=a.getActiveDrawLayer().getKonvaStage(),t=e.scale(),n={x:1/t.x,y:1/t.y};S.x(e.offset().x+e.width()/(2*t.x)),S.y(e.offset().y+e.height()/(15*t.y)),S.scale(n),s.add(S),x.setAnchorsActive(!1),s.draw()}),o.on("dragmove.draw",function(e){var t=a.getActiveDrawLayer();A.tool.validateGroupPosition(t.getBaseSize(),this),void 0!==d.updateQuantification&&(n=a.getActiveViewLayer().getViewController(),d.updateQuantification(this,n));var t=f(A.gui.getEventOffset(e.evt)[0],a),n=S.width()*S.scaleX()/2,e=S.height()*S.scaleY()/2;Math.abs(t.x-S.x())<n&&Math.abs(t.y-S.y())<e?(S.getChildren().forEach(function(e){e.stroke("orange")}),o.getChildren(A.draw.canNodeChangeColour).forEach(function(e){e.stroke("red")})):(S.getChildren().forEach(function(e){e.stroke("red")}),o.getChildren(A.draw.canNodeChangeColour).forEach(function(e){void 0!==e.stroke&&e.stroke(c)})),s.draw()}),o.on("dragend.draw",function(e){var t=this.x(),n=this.y();S.remove();var i=f(A.gui.getEventOffset(e.evt)[0],a),r=S.width()*S.scaleX()/2,e=S.height()*S.scaleY()/2;Math.abs(i.x-S.x())<r&&Math.abs(i.y-S.y())<e?(this.x(l.x),this.y(l.y),x.disable(),x.setShape(null),x.setViewController(null),o.getChildren(A.draw.canNodeChangeColour).forEach(function(e){e.stroke(c)}),document.body.style.cursor="default",(e=new A.tool.DeleteGroupCommand(this,u,s)).onExecute=p,e.onUndo=p,e.execute(),g.addToUndoStack(e)):(0===(n={x:t-l.x,y:n-l.y}).x&&0===n.y||((n=new A.tool.MoveGroupCommand(this,u,n,s)).onExecute=p,n.onUndo=p,g.addToUndoStack(n),p({type:"drawmove",id:this.id()})),x.setAnchorsActive(!0),x.resetAnchors()),s.draw(),l={x:this.x(),y:this.y()}}),o.on("dblclick",function(){var t=this.findOne("Label");if(void 0===t)throw new Error("Could not find the shape label.");function e(e){i.meta=e,i.setText(A.utils.replaceFlags(i.meta.textExpr,i.meta.quantification)),t.setVisible(0!==i.meta.textExpr.length),p({type:"drawchange"}),s.draw()}var n,i=t.getText();void 0!==A.openRoiDialog?A.openRoiDialog(i.meta,e):null!==(n=A.prompt("Label",i.meta.textExpr))&&(i.meta.textExpr=n,e(i.meta))})},this.setOptions=function(e){this.shapeFactoryList=e,x.setFactoryList(e)},this.init=function(){},this.addEventListener=function(e,t){void 0===i[e]&&(i[e]=[]),i[e].push(t)},this.removeEventListener=function(e,t){if(void 0!==i[e])for(var n=0;n<i[e].length;++n)i[e][n]===t&&i[e].splice(n,1)},this.setLineColour=function(e){this.style.setLineColour(e)}},A.tool.Draw.prototype.getHelpKeys=function(){return{title:"tool.Draw.name",brief:"tool.Draw.brief",mouse:{mouse_drag:"tool.Draw.mouse_drag"},touch:{touch_drag:"tool.Draw.touch_drag"}}},A.tool.Draw.prototype.setShapeName=function(e){if(!this.hasShape(e))throw new Error("Unknown shape: '"+e+"'");this.shapeName=e},A.tool.Draw.prototype.hasShape=function(e){return this.shapeFactoryList[e]},A.tool.getAnchorMin=function(e){var t=e.find(".anchor");if(0!==t.length){for(var n=t[0].x(),i=t[0].y(),r=0;r<t.length;++r)n=Math.min(n,t[r].x()),i=Math.min(i,t[r].y());return{x:n,y:i}}},A.tool.boundNodePosition=function(e,t,n){var i=!1;return e.x()<t.x?(e.x(t.x),i=!0):e.x()>n.x&&(e.x(n.x),i=!0),e.y()<t.y?(e.y(t.y),i=!0):e.y()>n.y&&(e.y(n.y),i=!0),i},A.tool.validateGroupPosition=function(e,t){var n=t.getChildren(A.draw.isNodeNameShape)[0],i=A.tool.getAnchorMin(t);if(void 0===i)return null;var r={x:-i.x,y:-i.y},n={x:e.x-(i.x+Math.abs(n.width())),y:e.y-(i.y+Math.abs(n.height()))};return A.tool.boundNodePosition(t,r,n)},A.tool.validateAnchorPosition=function(e,t){var n=t.getParent(),i={x:-n.x(),y:-n.y()},n={x:e.x-n.x(),y:e.y-n.y()};return A.tool.boundNodePosition(t,i,n)},(A=A||{}).tool=A.tool||{};y=y||{};A.tool.GetShapeDisplayName=function(e){var t="shape";return e instanceof y.Line?t=4===e.points().length?"line":6===e.points().length?"protractor":"roi":e instanceof y.Rect?t="rectangle":e instanceof y.Ellipse&&(t="ellipse"),t},A.tool.DrawGroupCommand=function(e,t,n,i){var r=void 0!==i&&i,o=e.getParent();this.getName=function(){return"Draw-"+t},this.execute=function(){o.add(e),n.draw(),r||this.onExecute({type:"drawcreate",id:e.id()})},this.undo=function(){e.remove(),n.draw(),this.onUndo({type:"drawdelete",id:e.id()})}},A.tool.DrawGroupCommand.prototype.onExecute=function(e){},A.tool.DrawGroupCommand.prototype.onUndo=function(e){},A.tool.MoveGroupCommand=function(t,e,n,i){this.getName=function(){return"Move-"+e},this.execute=function(){t.move(n),i.draw(),this.onExecute({type:"drawmove",id:t.id()})},this.undo=function(){var e={x:-n.x,y:-n.y};t.move(e),i.draw(),this.onUndo({type:"drawmove",id:t.id()})}},A.tool.MoveGroupCommand.prototype.onExecute=function(e){},A.tool.MoveGroupCommand.prototype.onUndo=function(e){},A.tool.ChangeGroupCommand=function(e,t,n,i,r,o,a){this.getName=function(){return"Change-"+e},this.execute=function(){t(i,a,o),r.draw(),this.onExecute({type:"drawchange"})},this.undo=function(){t(n,a,o),r.draw(),this.onUndo({type:"drawchange"})}},A.tool.ChangeGroupCommand.prototype.onExecute=function(e){},A.tool.ChangeGroupCommand.prototype.onUndo=function(e){},A.tool.DeleteGroupCommand=function(e,t,n){var i=e.getParent();this.getName=function(){return"Delete-"+t},this.execute=function(){e.remove(),n.draw(),this.onExecute({type:"drawdelete",id:e.id()})},this.undo=function(){i.add(e),n.draw(),this.onUndo({type:"drawcreate",id:e.id()})}},A.tool.DeleteGroupCommand.prototype.onExecute=function(e){},A.tool.DeleteGroupCommand.prototype.onUndo=function(e){},(A=A||{}).tool=A.tool||{},A.tool.draw=A.tool.draw||{};y=y||{};A.tool.draw.getDefaultAnchor=function(e,t,n,i){return new y.Ellipse({x:e,y:t,stroke:"#999",fill:"rgba(100,100,100,0.7",strokeWidth:i.getStrokeWidth(),strokeScaleEnabled:!1,radius:i.applyZoomScale(3),name:"anchor",id:n,dragOnTop:!1,draggable:!0,visible:!1})},A.tool.ShapeEditor=function(o){var a=null,s=null,l=null,u=null,e=!1,c=null;function n(e){l&&l.getParent()&&l.getParent().find(".anchor").forEach(e)}function t(t){n(function(e){e.visible(t)})}function g(){n(function(e){e.remove()})}function d(){if(l&&l.getLayer())for(var e=l.getParent(),t=s.getAnchors(l,o.getStyle()),n=0;n<t.length;++n)i(t[n]),e.add(t[n])}function x(e){var t=e.getParent(),n=e.id(),i=e.x(),r=e.y(),e={getParent:function(){return t},id:function(){return n},x:function(){return i},y:function(){return r}};return e}function i(e){var i=null,r=A.tool.GetShapeDisplayName(l);e.on("dragstart.edit",function(e){i=x(this),e.cancelBubble=!0}),e.on("dragmove.edit",function(e){var t=A.gui.getLayerDetailsFromEvent(e.evt),t=o.getLayerGroupById(t.groupId).getActiveDrawLayer();A.tool.validateAnchorPosition(t.getBaseSize(),this),s.update(this,o.getStyle(),u),this.getLayer()?this.getLayer().draw():A.logger.warn("No layer to draw the anchor!"),e.cancelBubble=!0}),e.on("dragend.edit",function(e){var t=x(this),n=new A.tool.ChangeGroupCommand(r,s.update,i,t,this.getLayer(),u,o.getStyle());n.onExecute=c,n.onUndo=c,n.execute(),o.addToUndoStack(n),i=t,e.cancelBubble=!0}),e.on("mousedown touchstart",function(){this.moveToTop()}),e.on("mouseover.edit",function(){this.stroke("#ddd"),this.getLayer()?this.getLayer().draw():A.logger.warn("No layer to draw the anchor!")}),e.on("mouseout.edit",function(){this.stroke("#999"),this.getLayer()?this.getLayer().draw():A.logger.warn("No layer to draw the anchor!")})}this.setFactoryList=function(e){a=e},this.setShape=function(e){if(l=e){g();var t=l.getParent(),n=Object.keys(a);s=null;for(var i=0;i<n.length;++i){var r=new a[n[i]];if(r.isFactoryGroup(t)){s=r;break}}if(null===s)throw new Error("Could not find a factory to update shape.");d()}},this.setViewController=function(e){u=e},this.getShape=function(){return l},this.isActive=function(){return e},this.setDrawEventCallback=function(e){c=e},this.enable=function(){e=!0,l&&(t(!0),l.getLayer()&&l.getLayer().draw())},this.disable=function(){e=!1,l&&(t(!1),l.getLayer()&&l.getLayer().draw())},this.resetAnchors=function(){g(),d(),t(!0)},this.setAnchorsActive=function(e){n(e?function(e){i(e)}:function(e){(e=e).off("dragstart.edit"),e.off("dragmove.edit"),e.off("dragend.edit"),e.off("mousedown touchstart"),e.off("mouseover.edit"),e.off("mouseout.edit")})}},(A=A||{}).tool=A.tool||{},A.tool.draw=A.tool.draw||{};y=y||{};A.tool.draw.defaultEllipseLabelText="{surface}",A.tool.draw.EllipseFactory=function(){this.getGroupName=function(){return"ellipse-group"},this.getNPoints=function(){return 2},this.getTimeout=function(){return 0}},A.tool.draw.EllipseFactory.prototype.isFactoryGroup=function(e){return this.getGroupName()===e.name()},A.tool.draw.EllipseFactory.prototype.create=function(e,t,n){var i=Math.abs(e[0].getX()-e[1].getX()),r=Math.abs(e[0].getY()-e[1].getY()),o=new A.math.Ellipse(e[0],i,r),e=new y.Ellipse({x:o.getCenter().getX(),y:o.getCenter().getY(),radius:{x:o.getA(),y:o.getB()},stroke:t.getLineColour(),strokeWidth:t.getStrokeWidth(),strokeScaleEnabled:!1,name:"shape"}),i=new y.Text({fontSize:t.getFontSize(),fontFamily:t.getFontFamily(),fill:t.getLineColour(),padding:t.getTextPadding(),shadowColor:t.getShadowLineColour(),shadowOffset:t.getShadowOffset(),name:"text"}),r="",r=void 0!==A.tool.draw.ellipseLabelText?A.tool.draw.ellipseLabelText:A.tool.draw.defaultEllipseLabelText,n=o.quantify(n,A.utils.getFlags(r));i.setText(A.utils.replaceFlags(r,n)),i.meta={textExpr:r,quantification:n};var a,r=new y.Label({x:o.getCenter().getX(),y:o.getCenter().getY(),scale:t.applyZoomScale(1),visible:0!==r.length,name:"label"});r.add(i),r.add(new y.Tag({fill:t.getLineColour(),opacity:t.getTagOpacity()})),A.tool.draw.debug&&(a=A.tool.draw.getShadowEllipse(o));o=new y.Group;return o.name(this.getGroupName()),a&&o.add(a),o.add(r),o.add(e),o.visible(!0),o},A.tool.draw.EllipseFactory.prototype.getAnchors=function(e,t){var n=e.x(),i=e.y(),r=e.radius(),e=[];return e.push(A.tool.draw.getDefaultAnchor(n-r.x,i-r.y,"topLeft",t)),e.push(A.tool.draw.getDefaultAnchor(n+r.x,i-r.y,"topRight",t)),e.push(A.tool.draw.getDefaultAnchor(n+r.x,i+r.y,"bottomRight",t)),e.push(A.tool.draw.getDefaultAnchor(n-r.x,i+r.y,"bottomLeft",t)),e},A.tool.draw.EllipseFactory.prototype.update=function(e,t,n){var i,r=e.getParent(),o=r.getChildren(function(e){return"shape"===e.name()})[0],a=r.getChildren(function(e){return"label"===e.name()})[0],s=r.getChildren(function(e){return"topLeft"===e.id()})[0],l=r.getChildren(function(e){return"topRight"===e.id()})[0],u=r.getChildren(function(e){return"bottomRight"===e.id()})[0],c=r.getChildren(function(e){return"bottomLeft"===e.id()})[0];switch(A.tool.draw.debug&&(i=r.getChildren(function(e){return"shadow"===e.name()})[0]),e.id()){case"topLeft":s.x(e.x()),s.y(e.y()),l.y(e.y()),c.x(e.x());break;case"topRight":l.x(e.x()),l.y(e.y()),s.y(e.y()),u.x(e.x());break;case"bottomRight":u.x(e.x()),u.y(e.y()),c.y(e.y()),l.x(e.x());break;case"bottomLeft":c.x(e.x()),c.y(e.y()),u.y(e.y()),s.x(e.x());break;default:A.logger.error("Unhandled anchor id: "+e.id())}var g=(l.x()-s.x())/2,d=(u.y()-l.y())/2,x={x:s.x()+g,y:l.y()+d};o.position(x);d={x:Math.abs(g),y:Math.abs(d)};o.radius(d);o=new A.math.Point2D(r.x()+x.x,r.y()+x.y),d=new A.math.Ellipse(o,d.x,d.y);i&&(i.destroy(),r.add(A.tool.draw.getShadowEllipse(d,r))),a.position({x:x.x,y:x.y}),A.tool.draw.updateEllipseQuantification(r,n)},A.tool.draw.EllipseFactory.prototype.updateQuantification=function(e,t){A.tool.draw.updateEllipseQuantification(e,t)},A.tool.draw.updateEllipseQuantification=function(e,t){var n=e.getChildren(function(e){return"shape"===e.name()})[0],i=e.getChildren(function(e){return"label"===e.name()})[0],e=new A.math.Point2D(e.x()+n.x(),e.y()+n.y()),n=new A.math.Ellipse(e,n.radius().x,n.radius().y),i=i.getText(),t=n.quantify(t,A.utils.getFlags(i.meta.textExpr));i.setText(A.utils.replaceFlags(i.meta.textExpr,t)),i.meta.quantification=t},A.tool.draw.getShadowEllipse=function(e,t){var n=0,i=0;void 0!==t&&(n=t.x(),i=t.y());var r=new y.Group;r.name("shadow");for(var o=e.getRound(),a=0;a<o.length;++a){var s=o[a],l=s[0][0],u=s[0][1],s=s[1][0],l=new y.Rect({x:l-n,y:u-i,width:s-l,height:1,fill:"grey",strokeWidth:0,strokeScaleEnabled:!1,opacity:.3,name:"shadow-element"});r.add(l)}return r},(A=A||{}).tool=A.tool||{},A.tool.filter=A.tool.filter||{},A.tool.Filter=function(n){this.filterList=null,this.selectedFilter=0;var i=new A.utils.ListenerHandler;function r(e){i.fireEvent(e)}this.activate=function(e){for(var t in this.filterList)e?(this.filterList[t].addEventListener("filterrun",r),this.filterList[t].addEventListener("filter-undo",r)):(this.filterList[t].removeEventListener("filterrun",r),this.filterList[t].removeEventListener("filter-undo",r))},this.setOptions=function(e){for(var t in this.filterList={},e)this.filterList[t]=new e[t](n)},this.init=function(){for(var e in this.filterList)this.filterList[e].init()},this.keydown=function(e){e.context="dwv.tool.Filter",n.onKeydown(e)},this.addEventListener=function(e,t){i.add(e,t)},this.removeEventListener=function(e,t){i.remove(e,t)}},A.tool.Filter.prototype.getHelpKeys=function(){return{title:"tool.Filter.name",brief:"tool.Filter.brief"}},A.tool.Filter.prototype.getSelectedFilter=function(){return this.selectedFilter},A.tool.Filter.prototype.setSelectedFilter=function(e){if(!this.hasFilter(e))throw new Error("Unknown filter: '"+e+"'");this.selectedFilter&&this.selectedFilter.activate(!1),this.selectedFilter=this.filterList[e],this.selectedFilter.activate(!0)},A.tool.Filter.prototype.getFilterList=function(){return this.filterList},A.tool.Filter.prototype.hasFilter=function(e){return this.filterList[e]},A.tool.filter.Threshold=function(t){var n=new A.image.filter.Threshold,i=!0,r=new A.utils.ListenerHandler;function o(e){r.fireEvent(e)}this.activate=function(e){e&&(i=!0)},this.init=function(){},this.run=function(e){n.setMin(e.min),n.setMax(e.max),i&&(n.setOriginalImage(t.getLastImage()),i=!1);e=new A.tool.RunFilterCommand(n,t);e.onExecute=o,e.onUndo=o,e.execute(),t.addToUndoStack(e)},this.addEventListener=function(e,t){r.add(e,t)},this.removeEventListener=function(e,t){r.remove(e,t)}},A.tool.filter.Sharpen=function(n){var i=new A.utils.ListenerHandler;function r(e){i.fireEvent(e)}this.activate=function(e){},this.init=function(){},this.run=function(e){var t=new A.image.filter.Sharpen;t.setOriginalImage(n.getLastImage());t=new A.tool.RunFilterCommand(t,n);t.onExecute=r,t.onUndo=r,t.execute(),n.addToUndoStack(t)},this.addEventListener=function(e,t){i.add(e,t)},this.removeEventListener=function(e,t){i.remove(e,t)}},A.tool.filter.Sobel=function(n){var i=new A.utils.ListenerHandler;function r(e){i.fireEvent(e)}this.activate=function(e){},this.init=function(){},A.tool.filter.Sobel.prototype.run=function(e){var t=new A.image.filter.Sobel;t.setOriginalImage(n.getLastImage());t=new A.tool.RunFilterCommand(t,n);t.onExecute=r,t.onUndo=r,t.execute(),n.addToUndoStack(t)},this.addEventListener=function(e,t){i.add(e,t)},this.removeEventListener=function(e,t){i.remove(e,t)}},A.tool.RunFilterCommand=function(t,n){this.getName=function(){return"Filter-"+t.getName()},this.execute=function(){n.setLastImage(t.update()),n.render(0);var e={type:"filterrun",id:this.getName()};this.onExecute(e)},this.undo=function(){n.setLastImage(t.getOriginalImage()),n.render(0);var e={type:"filterundo",id:this.getName()};this.onUndo(e)}},A.tool.RunFilterCommand.prototype.onExecute=function(e){},A.tool.RunFilterCommand.prototype.onUndo=function(e){},(A=A||{}).tool=A.tool||{};p=p||{};A.tool.Floodfill=function(r){var s,l=null,g=null,o=this;this.started=!1;var d,e,i=null,x=null,a=null,u=[],n=!1;this.style=new A.gui.Style;var c=new A.utils.ListenerHandler;this.setExtend=function(e){n=e},this.getExtend=function(){return n};function S(e){var t=A.gui.getLayerDetailsFromEvent(e);return{x:(e=r.getLayerGroupById(t.groupId).getActiveViewLayer().displayToPlaneIndex(e._x,e._y)).get(0),y:e.get(1)}}function m(e,t,n){u=[];var i={data:l.data,width:l.width,height:l.height,bytes:4};s=p.floodFill(i,e.x,e.y,t),s=p.gaussBlurOnlyBorder(s,5);var r=p.traceContours(s);if(0<(r=p.simplifyContours(r,0,2e3)).length&&r[0].points[0].x){if(n)return r[0].points;for(var o=0,a=r[0].points.length;o<a;o++)u.push(new A.math.Point2D(r[0].points[o].x,r[0].points[o].y));return u}return!1}function h(e,t,n){if(a=m(e,t)){t=new A.tool.draw.RoiFactory;(x=t.create(a,o.style)).id(A.math.guid());n=n.getActiveDrawLayer();return n.getDrawController().getCurrentPosGroup().add(x),(i=new A.tool.DrawGroupCommand(x,"floodfill",n.getKonvaLayer())).onExecute=f,i.onUndo=f,i.execute(),r.addToUndoStack(i),1}}function f(e){c.fireEvent(e)}this.extend=function(e,t,n){if(!d)throw"'initialpoint' not found. User must click before use extend!";x&&x.destroy();for(var i=n.getActiveViewLayer().getViewController(),r=i.getCurrentIndex(),o=i.getImageSize(),a=g||10,s=r.get(2),l=t||o.get(2);s<l&&h(d,a,n);s++)i.incrementIndex(2);i.setCurrentPosition(r);for(var u=r.get(2),c=e||0;c<u&&h(d,a,n);u--)i.decrementIndex(2);i.setCurrentPosition(r)},this.modifyThreshold=function(i,r){if(r||!x)throw"No shape found";r=x.getChildren(function(e){return"shape"===e.name()})[0],clearTimeout(e),e=setTimeout(function(){if(!(a=m(d,i,!0)))return!1;for(var e=[],t=0,n=a.length;t<n;++t)e.push(a[t].x),e.push(a[t].y);r.setPoints(e),r.getLayer().draw(),o.onThresholdChange(i)},100)},this.onThresholdChange=function(e){},this.mousedown=function(e){var t=A.gui.getLayerDetailsFromEvent(e),n=r.getLayerGroupById(t.groupId),i=n.getActiveViewLayer(),t=n.getActiveDrawLayer();(l=i.getImageData())?(o.style.setZoomScale(t.getKonvaLayer().getAbsoluteScale()),o.started=!0,d=S(e),h(d,10,n),o.onThresholdChange(10)):A.logger.error("No image found")},this.mousemove=function(e){o.started&&(e=S(e),g=(g=Math.round(Math.sqrt(Math.pow(d.x-e.x,2)+Math.pow(d.y-e.y,2))/2))<10?10:g-10,o.modifyThreshold(g))},this.mouseup=function(e){var t;o.started=!1,n&&(t=A.gui.getLayerDetailsFromEvent(event),t=r.getLayerGroupById(t.groupId),o.extend(t))},this.mouseout=function(e){o.mouseup(e)},this.touchstart=function(e){o.mousedown(e)},this.touchmove=function(e){o.mousemove(e)},this.touchend=function(e){o.mouseup(e)},this.keydown=function(e){e.context="dwv.tool.Floodfill",r.onKeydown(e)},this.activate=function(e){e&&(this.style.setBaseScale(r.getBaseScale()),this.setLineColour(this.style.getLineColour()))},this.init=function(){},this.addEventListener=function(e,t){c.add(e,t)},this.removeEventListener=function(e,t){c.remove(e,t)}},A.tool.Floodfill.prototype.getHelpKeys=function(){return{title:"tool.Floodfill.name",brief:"tool.Floodfill.brief",mouse:{click:"tool.Floodfill.click"},touch:{tap:"tool.Floodfill.tap"}}},A.tool.Floodfill.prototype.setLineColour=function(e){this.style.setLineColour(e)},(A=A||{}).tool=A.tool||{},A.tool.draw=A.tool.draw||{};y=y||{};A.tool.draw.defaultFreeHandLabelText="",A.tool.draw.FreeHandFactory=function(){this.getGroupName=function(){return"freeHand-group"},this.getNPoints=function(){return 1e3},this.getTimeout=function(){return 25}},A.tool.draw.FreeHandFactory.prototype.isFactoryGroup=function(e){return this.getGroupName()===e.name()},A.tool.draw.FreeHandFactory.prototype.create=function(e,t,n){for(var i=[],r=0;r<e.length;++r)i.push(e[r].getX()),i.push(e[r].getY());var o=new y.Line({points:i,stroke:t.getLineColour(),strokeWidth:t.getStrokeWidth(),strokeScaleEnabled:!1,name:"shape",tension:.5}),a=new y.Text({fontSize:t.getFontSize(),fontFamily:t.getFontFamily(),fill:t.getLineColour(),name:"text"}),s="",s=void 0!==A.tool.draw.freeHandLabelText?A.tool.draw.freeHandLabelText:A.tool.draw.defaultFreeHandLabelText;a.setText(s),a.meta={textExpr:s,quantification:{}};s=new y.Label({x:e[0].getX(),y:e[0].getY()+t.scale(10),scale:t.applyZoomScale(1),visible:0!==s.length,name:"label"});s.add(a),s.add(new y.Tag({fill:t.getLineColour(),opacity:t.getTagOpacity()}));t=new y.Group;return t.name(this.getGroupName()),t.add(s),t.add(o),t.visible(!0),t},A.tool.draw.FreeHandFactory.prototype.getAnchors=function(e,t){for(var n=e.points(),i=[],r=0;r<n.length;r+=2){var o=n[r]+e.x(),a=n[r+1]+e.y();i.push(A.tool.draw.getDefaultAnchor(o,a,r,t))}return i},A.tool.draw.FreeHandFactory.prototype.update=function(t,e,n){var i=t.getParent(),r=i.getChildren(function(e){return"shape"===e.name()})[0],o=i.getChildren(function(e){return"label"===e.name()})[0],a=i.getChildren(function(e){return e.id()===t.id()})[0];a.x(t.x()),a.y(t.y());i=r.points();i[t.id()]=t.x()-r.x(),i[t.id()+1]=t.y()-r.y(),r.points(i.concat());a=o.getText();a.setText(a.meta.textExpr);e={x:i[0]+r.x(),y:i[1]+r.y()+e.scale(10)};o.position(e)},(A=A||{}).tool=A.tool||{},A.tool.Livewire=function(l){var u=this;this.started=!1;var c=null,g=null;this.style=new A.gui.Style;var d=new A.math.Path,x=new A.math.Path,S=[],n=new A.utils.ListenerHandler;function r(e){for(var t=e.get(1),n=0;n<t;++n)S[n]=[]}var m=new A.math.Scissors;function o(e){n.fireEvent(e)}this.mousedown=function(e){var t=A.gui.getLayerDetailsFromEvent(e),n=l.getLayerGroupById(t.groupId),i=n.getActiveViewLayer(),t=i.getViewController().getImageSize(),i=i.displayToPlaneIndex(e._x,e._y);u.started?Math.abs(i.get(0)-u.x0)<5&&Math.abs(i.get(1)-u.y0)<5?(u.mousemove(e),c.onExecute=o,c.onUndo=o,A.logger.debug("[livewire] finialise path."),l.addToUndoStack(c),u.started=!1):(d=x,r(t),e={x:i.get(0),y:i.get(1)},m.doTraining(e),d.addControlPoint(x.getPoint(0))):(u.started=!0,u.x0=i.get(0),u.y0=i.get(1),d=new A.math.Path,x=new A.math.Path,r(t),g=null,n=n.getActiveDrawLayer(),u.style.setZoomScale(n.getKonvaLayer().getAbsoluteScale()),n={x:i.get(0),y:i.get(1)},m.doTraining(n),i=new A.math.Point2D(i.get(0),i.get(1)),d.addPoint(i),d.addControlPoint(i))},this.mousemove=function(e){if(u.started){var t=A.gui.getLayerDetailsFromEvent(e),t=l.getLayerGroupById(t.groupId),e=t.getActiveViewLayer().displayToPlaneIndex(e._x,e._y),n={x:e.get(0),y:e.get(1)};m.setPoint(n);var i,r=!1;for(A.logger.debug("[livewire] getting ready...");!S[n.y][n.x]&&!r;)if(0===(i=m.doWork()).length)r=!0;else for(var o=0;o<i.length-1;o+=2){var a=i[o],s=i[o+1];S[a.y][a.x]=s}for(A.logger.debug("[livewire] ready!"),x=new A.math.Path,r=!1;n&&!r;)x.addPoint(new A.math.Point2D(n.x,n.y)),S[n.y]&&S[n.y][n.x]?n=S[n.y][n.x]:r=!0;x.appenPath(d),g&&g.destroy();e=new A.tool.draw.RoiFactory;(g=e.create(x.pointArray,u.style)).id(A.math.guid());t=t.getActiveDrawLayer();t.getDrawController().getCurrentPosGroup().add(g),(c=new A.tool.DrawGroupCommand(g,"livewire",t.getKonvaLayer())).execute()}},this.mouseup=function(e){},this.mouseout=function(e){u.mouseup(e)},this.dblclick=function(e){A.logger.debug("[livewire] dblclick"),l.addToUndoStack(c),u.started=!1},this.touchstart=function(e){u.mousedown(e)},this.touchmove=function(e){u.mousemove(e)},this.touchend=function(e){u.mouseup(e)},this.keydown=function(e){e.context="dwv.tool.Livewire",l.onKeydown(e)},this.activate=function(e){var t;e&&(e=(t=l.getActiveLayerGroup().getActiveViewLayer()).getViewController().getImageSize(),m.setDimensions(e.get(0),e.get(1)),m.setData(t.getImageData().data),this.style.setBaseScale(l.getBaseScale()),this.setLineColour(this.style.getLineColour()))},this.init=function(){},this.addEventListener=function(e,t){n.add(e,t)},this.removeEventListener=function(e,t){n.remove(e,t)}},A.tool.Livewire.prototype.getHelpKeys=function(){return{title:"tool.Livewire.name",brief:"tool.Livewire.brief"}},A.tool.Livewire.prototype.setLineColour=function(e){this.style.setLineColour(e)},(A=A||{}).tool=A.tool||{},A.tool.Opacity=function(r){var o=this;this.started=!1,this.mousedown=function(e){o.started=!0,o.x0=e._x,o.y0=e._y},this.mousemove=function(e){var t,n,i;o.started&&(t=e._x-o.x0,15<Math.abs(t)&&(i=A.gui.getLayerDetailsFromEvent(e),i=(n=r.getLayerGroupById(i.groupId).getActiveViewLayer()).getOpacity(),n.setOpacity(i+t/200),n.draw(),o.x0=e._x))},this.mouseup=function(e){o.started&&(o.started=!1)},this.mouseout=function(e){o.mouseup(e)},this.touchstart=function(e){o.mousedown(e)},this.touchmove=function(e){o.mousemove(e)},this.touchend=function(e){o.mouseup(e)},this.keydown=function(e){e.context="dwv.tool.Opacity",r.onKeydown(e)},this.activate=function(e){},this.init=function(){}},A.tool.Opacity.prototype.getHelpKeys=function(){return{title:"tool.Opacity.name",brief:"tool.Opacity.brief",mouse:{mouse_drag:"tool.Opacity.mouse_drag"},touch:{touch_drag:"tool.Opacity.touch_drag"}}},(A=A||{}).tool=A.tool||{},A.tool.draw=A.tool.draw||{};y=y||{};A.tool.draw.defaultProtractorLabelText="{angle}",A.tool.draw.ProtractorFactory=function(){this.getGroupName=function(){return"protractor-group"},this.getNPoints=function(){return 3},this.getTimeout=function(){return 500}},A.tool.draw.ProtractorFactory.prototype.isFactoryGroup=function(e){return this.getGroupName()===e.name()},A.tool.draw.ProtractorFactory.prototype.create=function(t,e,n){for(var i=new A.math.Line(t[0],t[1]),r=[],o=0;o<t.length;++o)r.push(t[o].getX()),r.push(t[o].getY());var a,s,l,u,c,g,d,x=new y.Line({points:r,stroke:e.getLineColour(),strokeWidth:e.getStrokeWidth(),strokeScaleEnabled:!1,name:"shape"}),S=new y.Group;return S.name(this.getGroupName()),3===t.length&&(g=new A.math.Line(t[1],t[2]),x.hitFunc(function(e){e.beginPath(),e.moveTo(t[0].getX(),t[0].getY()),e.lineTo(t[1].getX(),t[1].getY()),e.lineTo(t[2].getX(),t[2].getY()),e.closePath(),e.fillStrokeShape(this)}),a=A.math.getAngle(i,g),d=i.getInclination(),180<a&&(d+=a=360-a),s=new y.Text({fontSize:e.getFontSize(),fontFamily:e.getFontFamily(),fill:e.getLineColour(),padding:e.getTextPadding(),shadowColor:e.getShadowLineColour(),shadowOffset:e.getShadowOffset(),name:"text"}),c="",c=void 0!==A.tool.draw.protractorLabelText?A.tool.draw.protractorLabelText:A.tool.draw.defaultProtractorLabelText,u={angle:{value:a,unit:A.i18n("unit.degree")}},s.setText(A.utils.replaceFlags(c,u)),s.meta={textExpr:c,quantification:u},l=(i.getMidpoint().getX()+g.getMidpoint().getX())/2,u=(i.getMidpoint().getY()+g.getMidpoint().getY())/2,(c=new y.Label({x:l,y:u-e.applyZoomScale(15).y,scale:e.applyZoomScale(1),visible:0!==c.length,name:"label"})).add(s),c.add(new y.Tag({fill:e.getLineColour(),opacity:e.getTagOpacity()})),g=33*Math.min(i.getLength(),g.getLength())/100,d=new y.Arc({innerRadius:g,outerRadius:g,stroke:e.getLineColour(),strokeWidth:e.getStrokeWidth(),strokeScaleEnabled:!1,angle:a,rotation:-d,x:t[1].getX(),y:t[1].getY(),name:"shape-arc"}),S.add(c),S.add(d)),S.add(x),S.visible(!0),S},A.tool.draw.ProtractorFactory.prototype.getAnchors=function(e,t){var n=e.points(),i=[];return i.push(A.tool.draw.getDefaultAnchor(n[0]+e.x(),n[1]+e.y(),"begin",t)),i.push(A.tool.draw.getDefaultAnchor(n[2]+e.x(),n[3]+e.y(),"mid",t)),i.push(A.tool.draw.getDefaultAnchor(n[4]+e.x(),n[5]+e.y(),"end",t)),i},A.tool.draw.ProtractorFactory.prototype.update=function(e,t,n){var i=e.getParent(),r=i.getChildren(function(e){return"shape"===e.name()})[0],o=i.getChildren(function(e){return"label"===e.name()})[0],a=i.getChildren(function(e){return"shape-arc"===e.name()})[0],s=i.getChildren(function(e){return"begin"===e.id()})[0],l=i.getChildren(function(e){return"mid"===e.id()})[0],u=i.getChildren(function(e){return"end"===e.id()})[0];switch(e.id()){case"begin":s.x(e.x()),s.y(e.y());break;case"mid":l.x(e.x()),l.y(e.y());break;case"end":u.x(e.x()),u.y(e.y())}var c=s.x()-r.x(),g=s.y()-r.y(),d=l.x()-r.x(),x=l.y()-r.y(),S=u.x()-r.x(),m=u.y()-r.y();r.points([c,g,d,x,S,m]),r.hitFunc(function(e){e.beginPath(),e.moveTo(c,g),e.lineTo(d,x),e.lineTo(S,m),e.closePath(),e.fillStrokeShape(this)});var h=new A.math.Point2D(s.x(),s.y()),f=new A.math.Point2D(l.x(),l.y()),p=new A.math.Point2D(u.x(),u.y()),y=new A.math.Line(h,f),i=new A.math.Line(f,p),r=A.math.getAngle(y,i),h=y.getInclination();180<r&&(h+=r=360-r);f=o.getText(),p={angle:{value:r,unit:A.i18n("unit.degree")}};f.setText(A.utils.replaceFlags(f.meta.textExpr,p)),f.meta.quantification=p;t={x:(y.getMidpoint().getX()+i.getMidpoint().getX())/2,y:(y.getMidpoint().getY()+i.getMidpoint().getY())/2-t.applyZoomScale(15).y};o.position(t);i=33*Math.min(y.getLength(),i.getLength())/100;a.innerRadius(i),a.outerRadius(i),a.angle(r),a.rotation(-h);h={x:l.x(),y:l.y()};a.position(h)},(A=A||{}).tool=A.tool||{},A.tool.draw=A.tool.draw||{};y=y||{};A.tool.draw.defaultRectangleLabelText="{surface}",A.tool.draw.RectangleFactory=function(){this.getGroupName=function(){return"rectangle-group"},this.getNPoints=function(){return 2},this.getTimeout=function(){return 0}},A.tool.draw.RectangleFactory.prototype.isFactoryGroup=function(e){return this.getGroupName()===e.name()},A.tool.draw.RectangleFactory.prototype.create=function(e,t,n){var i=new A.math.Rectangle(e[0],e[1]),r=new y.Rect({x:i.getBegin().getX(),y:i.getBegin().getY(),width:i.getWidth(),height:i.getHeight(),stroke:t.getLineColour(),strokeWidth:t.getStrokeWidth(),strokeScaleEnabled:!1,name:"shape"}),o=new y.Text({fontSize:t.getFontSize(),fontFamily:t.getFontFamily(),fill:t.getLineColour(),padding:t.getTextPadding(),shadowColor:t.getShadowLineColour(),shadowOffset:t.getShadowOffset(),name:"text"}),e="",e=void 0!==A.tool.draw.rectangleLabelText?A.tool.draw.rectangleLabelText:A.tool.draw.defaultRectangleLabelText,n=i.quantify(n,A.utils.getFlags(e));o.setText(A.utils.replaceFlags(e,n)),o.meta={textExpr:e,quantification:n};var a,e=new y.Label({x:i.getBegin().getX(),y:i.getEnd().getY(),scale:t.applyZoomScale(1),visible:0!==e.length,name:"label"});e.add(o),e.add(new y.Tag({fill:t.getLineColour(),opacity:t.getTagOpacity()})),A.tool.draw.debug&&(a=A.tool.draw.getShadowRectangle(i));i=new y.Group;return i.name(this.getGroupName()),a&&i.add(a),i.add(e),i.add(r),i.visible(!0),i},A.tool.draw.RectangleFactory.prototype.getAnchors=function(e,t){var n=e.x(),i=e.y(),r=e.width(),o=e.height(),e=[];return e.push(A.tool.draw.getDefaultAnchor(n,i,"topLeft",t)),e.push(A.tool.draw.getDefaultAnchor(n+r,i,"topRight",t)),e.push(A.tool.draw.getDefaultAnchor(n+r,i+o,"bottomRight",t)),e.push(A.tool.draw.getDefaultAnchor(n,i+o,"bottomLeft",t)),e},A.tool.draw.RectangleFactory.prototype.update=function(e,t,n){var i,r=e.getParent(),o=r.getChildren(function(e){return"shape"===e.name()})[0],a=r.getChildren(function(e){return"label"===e.name()})[0],s=r.getChildren(function(e){return"topLeft"===e.id()})[0],l=r.getChildren(function(e){return"topRight"===e.id()})[0],u=r.getChildren(function(e){return"bottomRight"===e.id()})[0],c=r.getChildren(function(e){return"bottomLeft"===e.id()})[0];switch(A.tool.draw.debug&&(i=r.getChildren(function(e){return"shadow"===e.name()})[0]),e.id()){case"topLeft":s.x(e.x()),s.y(e.y()),l.y(e.y()),c.x(e.x());break;case"topRight":l.x(e.x()),l.y(e.y()),s.y(e.y()),u.x(e.x());break;case"bottomRight":u.x(e.x()),u.y(e.y()),c.y(e.y()),l.x(e.x());break;case"bottomLeft":c.x(e.x()),c.y(e.y()),u.y(e.y()),s.x(e.x());break;default:A.logger.error("Unhandled anchor id: "+e.id())}o.position(s.position());var g=l.x()-s.x(),d=c.y()-s.y();g&&d&&o.size({width:g,height:d});var x=new A.math.Point2D(r.x()+s.x(),r.y()+s.y()),o=new A.math.Point2D(r.x()+u.x(),r.y()+u.y()),g=new A.math.Rectangle(x,o);i&&(x=(d=g.getRound()).max.getX()-d.min.getX(),o=d.max.getY()-d.min.getY(),i.position({x:d.min.getX()-r.x(),y:d.min.getY()-r.y()}),i.size({width:x,height:o}));g={x:g.getBegin().getX()-r.x(),y:g.getEnd().getY()-r.y()};a.position(g),A.tool.draw.updateRectangleQuantification(r,n)},A.tool.draw.RectangleFactory.prototype.updateQuantification=function(e,t){A.tool.draw.updateRectangleQuantification(e,t)},A.tool.draw.updateRectangleQuantification=function(e,t){var n=e.getChildren(function(e){return"shape"===e.name()})[0],i=e.getChildren(function(e){return"label"===e.name()})[0],e=new A.math.Point2D(e.x()+n.x(),e.y()+n.y()),n=new A.math.Point2D(e.getX()+n.width(),e.getY()+n.height()),n=new A.math.Rectangle(e,n),i=i.getText(),t=n.quantify(t,A.utils.getFlags(i.meta.textExpr));i.setText(A.utils.replaceFlags(i.meta.textExpr,t)),i.meta.quantification=t},A.tool.draw.getShadowRectangle=function(e){var t=e.getRound(),n=t.max.getX()-t.min.getX(),e=t.max.getY()-t.min.getY();return new y.Rect({x:t.min.getX(),y:t.min.getY(),width:n,height:e,fill:"grey",strokeWidth:0,strokeScaleEnabled:!1,opacity:.3,name:"shadow"})},(A=A||{}).tool=A.tool||{},A.tool.draw=A.tool.draw||{};y=y||{};A.tool.draw.defaultRoiLabelText="",A.tool.draw.RoiFactory=function(){this.getGroupName=function(){return"roi-group"},this.getNPoints=function(){return 50},this.getTimeout=function(){return 100}},A.tool.draw.RoiFactory.prototype.isFactoryGroup=function(e){return this.getGroupName()===e.name()},A.tool.draw.RoiFactory.prototype.create=function(e,t,n){var i=new A.math.ROI;i.addPoints(e);for(var r=[],o=0;o<i.getLength();++o)r.push(i.getPoint(o).getX()),r.push(i.getPoint(o).getY());var a=new y.Line({points:r,stroke:t.getLineColour(),strokeWidth:t.getStrokeWidth(),strokeScaleEnabled:!1,name:"shape",closed:!0}),s=new y.Text({fontSize:t.getFontSize(),fontFamily:t.getFontFamily(),fill:t.getLineColour(),name:"text"}),e="",e=void 0!==A.tool.draw.roiLabelText?A.tool.draw.roiLabelText:A.tool.draw.defaultRoiLabelText;s.setText(e),s.meta={textExpr:e,quantification:{}};e=new y.Label({x:i.getPoint(0).getX(),y:i.getPoint(0).getY()+t.scale(10),scale:t.applyZoomScale(1),visible:0!==e.length,name:"label"});e.add(s),e.add(new y.Tag({fill:t.getLineColour(),opacity:t.getTagOpacity()}));t=new y.Group;return t.name(this.getGroupName()),t.add(e),t.add(a),t.visible(!0),t},A.tool.draw.RoiFactory.prototype.getAnchors=function(e,t){for(var n=e.points(),i=[],r=0;r<n.length;r+=2){var o=n[r]+e.x(),a=n[r+1]+e.y();i.push(A.tool.draw.getDefaultAnchor(o,a,r,t))}return i},A.tool.draw.RoiFactory.prototype.update=function(t,e,n){var i=t.getParent(),r=i.getChildren(function(e){return"shape"===e.name()})[0],o=i.getChildren(function(e){return"label"===e.name()})[0],a=i.getChildren(function(e){return e.id()===t.id()})[0];a.x(t.x()),a.y(t.y());i=r.points();i[t.id()]=t.x()-r.x(),i[t.id()+1]=t.y()-r.y(),r.points(i);a=o.getText();a.setText(a.meta.textExpr);e={x:i[0]+r.x(),y:i[1]+r.y()+e.scale(10)};o.position(e)},(A=A||{}).tool=A.tool||{},A.tool.draw=A.tool.draw||{};y=y||{};A.tool.draw.defaultRulerLabelText="{length}",A.tool.draw.RulerFactory=function(){this.getGroupName=function(){return"ruler-group"},this.getNPoints=function(){return 2},this.getTimeout=function(){return 0}},A.tool.draw.RulerFactory.prototype.isFactoryGroup=function(e){return this.getGroupName()===e.name()},A.tool.draw.RulerFactory.prototype.create=function(e,t,n){var i=new A.math.Line(e[0],e[1]),r=new y.Line({points:[i.getBegin().getX(),i.getBegin().getY(),i.getEnd().getX(),i.getEnd().getY()],stroke:t.getLineColour(),strokeWidth:t.getStrokeWidth(),strokeScaleEnabled:!1,name:"shape"}),o=t.scale(10),a=A.math.getPerpendicularLine(i,e[0],o),s=new y.Line({points:[a.getBegin().getX(),a.getBegin().getY(),a.getEnd().getX(),a.getEnd().getY()],stroke:t.getLineColour(),strokeWidth:t.getStrokeWidth(),strokeScaleEnabled:!1,name:"shape-tick0"}),l=A.math.getPerpendicularLine(i,e[1],o),u=new y.Line({points:[l.getBegin().getX(),l.getBegin().getY(),l.getEnd().getX(),l.getEnd().getY()],stroke:t.getLineColour(),strokeWidth:t.getStrokeWidth(),strokeScaleEnabled:!1,name:"shape-tick1"});r.hitFunc(function(e){e.beginPath(),e.moveTo(a.getBegin().getX(),a.getBegin().getY()),e.lineTo(a.getEnd().getX(),a.getEnd().getY()),e.lineTo(l.getEnd().getX(),l.getEnd().getY()),e.lineTo(l.getBegin().getX(),l.getBegin().getY()),e.closePath(),e.fillStrokeShape(this)});var c=new y.Text({fontSize:t.getFontSize(),fontFamily:t.getFontFamily(),fill:t.getLineColour(),padding:t.getTextPadding(),shadowColor:t.getShadowLineColour(),shadowOffset:t.getShadowOffset(),name:"text"}),e="",e=void 0!==A.tool.draw.rulerLabelText?A.tool.draw.rulerLabelText:A.tool.draw.defaultRulerLabelText,o=i.quantify(n,A.utils.getFlags(e));c.setText(A.utils.replaceFlags(e,o)),c.meta={textExpr:e,quantification:o};n=i.getBegin().getX()>i.getEnd().getX()?0:-1,o=i.getBegin().getY()>i.getEnd().getY()?-1:0,e=new y.Label({x:i.getEnd().getX()+n*c.width(),y:i.getEnd().getY()+o*t.applyZoomScale(15).y,scale:t.applyZoomScale(1),visible:0!==e.length,name:"label"});e.add(c),e.add(new y.Tag({fill:t.getLineColour(),opacity:t.getTagOpacity()}));t=new y.Group;return t.name(this.getGroupName()),t.add(e),t.add(s),t.add(u),t.add(r),t.visible(!0),t},A.tool.draw.RulerFactory.prototype.getAnchors=function(e,t){var n=e.points(),i=[];return i.push(A.tool.draw.getDefaultAnchor(n[0]+e.x(),n[1]+e.y(),"begin",t)),i.push(A.tool.draw.getDefaultAnchor(n[2]+e.x(),n[3]+e.y(),"end",t)),i},A.tool.draw.RulerFactory.prototype.update=function(e,t,n){var i=e.getParent(),r=i.getChildren(function(e){return"shape"===e.name()})[0],o=i.getChildren(function(e){return"shape-tick0"===e.name()})[0],a=i.getChildren(function(e){return"shape-tick1"===e.name()})[0],s=i.getChildren(function(e){return"label"===e.name()})[0],l=i.getChildren(function(e){return"begin"===e.id()})[0],u=i.getChildren(function(e){return"end"===e.id()})[0];switch(e.id()){case"begin":l.x(e.x()),l.y(e.y());break;case"end":u.x(e.x()),u.y(e.y())}var c=l.x()-r.x(),g=l.y()-r.y(),d=u.x()-r.x(),x=u.y()-r.y();r.points([c,g,d,x]);var S=new A.math.Point2D(l.x(),l.y()),i=new A.math.Point2D(u.x(),u.y()),i=new A.math.Line(S,i),g=new A.math.Point2D(c,g),x=new A.math.Point2D(d,x),m=A.math.getPerpendicularLine(i,g,t.scale(10));o.points([m.getBegin().getX(),m.getBegin().getY(),m.getEnd().getX(),m.getEnd().getY()]);var h=A.math.getPerpendicularLine(i,x,t.scale(10));a.points([h.getBegin().getX(),h.getBegin().getY(),h.getEnd().getX(),h.getEnd().getY()]),r.hitFunc(function(e){e.beginPath(),e.moveTo(m.getBegin().getX(),m.getBegin().getY()),e.lineTo(m.getEnd().getX(),m.getEnd().getY()),e.lineTo(h.getEnd().getX(),h.getEnd().getY()),e.lineTo(h.getBegin().getX(),h.getBegin().getY()),e.closePath(),e.fillStrokeShape(this)});a=s.getText(),r=i.quantify(n,A.utils.getFlags(a.meta.textExpr));a.setText(A.utils.replaceFlags(a.meta.textExpr,r)),a.meta.quantification=r;n=i.getBegin().getX()>i.getEnd().getX()?0:-1,r=i.getBegin().getY()>i.getEnd().getY()?-1:0,t={x:i.getEnd().getX()+n*a.width(),y:i.getEnd().getY()+r*t.applyZoomScale(15).y};s.position(t)},(A=A||{}).tool=A.tool||{},A.tool.Scroll=function(a){var s=this;this.started=!1;var t=null;this.mousedown=function(e){var t=A.gui.getLayerDetailsFromEvent(e),n=a.getLayerGroupById(t.groupId).getActiveViewLayer(),t=n.getViewController();t.isPlaying()&&t.stop(),s.started=!0,s.x0=e._x,s.y0=e._y;e=n.displayToPlanePos(e._x,e._y);t.setCurrentPosition2D(e.x,e.y)},this.mousemove=function(e){var t,n,i,r,o;s.started&&(r=A.gui.getLayerDetailsFromEvent(e),t=a.getLayerGroupById(r.groupId).getActiveViewLayer().getViewController(),o=e._y-s.y0,(n=15<Math.abs(o))&&t.canScroll()&&(0<o?t.decrementScrollIndex():t.incrementScrollIndex()),i=e._x-s.x0,r=15<Math.abs(i),o=t.getImageSize(),r&&o.moreThanOne(3)&&(0<i?t.incrementIndex(3):t.decrementIndex(3)),r&&(s.x0=e._x),n&&(s.y0=e._y))},this.mouseup=function(e){s.started&&(s.started=!1)},this.mouseout=function(e){s.mouseup(e)},this.touchstart=function(e){t=setTimeout(s.dblclick,500),s.mousedown(e)},this.touchmove=function(e){null!==t&&(clearTimeout(t),t=null),s.mousemove(e)},this.touchend=function(e){null!==t&&(clearTimeout(t),t=null),s.mouseup(e)},this.wheel=function(e){var t=!1;e.deltaY<0&&(t=!0);e=A.gui.getLayerDetailsFromEvent(e),e=a.getLayerGroupById(e.groupId).getActiveViewLayer().getViewController();t?e.incrementScrollIndex():e.decrementScrollIndex()},this.keydown=function(e){e.context="dwv.tool.Scroll",a.onKeydown(e)},this.dblclick=function(e){e=A.gui.getLayerDetailsFromEvent(e);a.getLayerGroupById(e.groupId).getActiveViewLayer().getViewController().play()},this.activate=function(e){},this.init=function(){}},A.tool.Scroll.prototype.getHelpKeys=function(){return{title:"tool.Scroll.name",brief:"tool.Scroll.brief",mouse:{mouse_drag:"tool.Scroll.mouse_drag",double_click:"tool.Scroll.double_click"},touch:{touch_drag:"tool.Scroll.touch_drag",tap_and_hold:"tool.Scroll.tap_and_hold"}}},(A=A||{}).tool=A.tool||{},A.tool.UndoStack=function(){var t=[];this.getStack=function(){return t};var n=0,i=new A.utils.ListenerHandler;function r(e){i.fireEvent(e)}this.add=function(e){(t=t.slice(0,n)).push(e),++n,r({type:"undoadd",command:e.getName()})},this.undo=function(){0<n&&(t[--n].undo(),r({type:"undo",command:t[n].getName()}))},this.redo=function(){n<t.length&&(t[n].execute(),r({type:"redo",command:t[n].getName()}),++n)},this.addEventListener=function(e,t){i.add(e,t)},this.removeEventListener=function(e,t){i.remove(e,t)}},(A=A||{}).tool=A.tool||{},A.tool.WindowLevel=function(r){var o=this;this.started=!1,this.mousedown=function(e){o.started=!0,o.x0=e._x,o.y0=e._y},this.mousemove=function(e){var t,n,i;o.started&&(n=A.gui.getLayerDetailsFromEvent(e),t=r.getLayerGroupById(n.groupId).getActiveViewLayer().getViewController(),i=e._x-o.x0,n=o.y0-e._y,n=parseInt(t.getWindowLevel().center,10)+n,i=parseInt(t.getWindowLevel().width,10)+i,i=A.image.validateWindowWidth(i),t.addWindowLevelPresets({manual:{wl:[new A.image.WindowLevel(n,i)],name:"manual"}}),t.setWindowLevelPreset("manual"),o.x0=e._x,o.y0=e._y)},this.mouseup=function(e){o.started&&(o.started=!1)},this.mouseout=function(e){o.mouseup(e)},this.touchstart=function(e){o.mousedown(e)},this.touchmove=function(e){o.mousemove(e)},this.touchend=function(e){o.mouseup(e)},this.dblclick=function(e){var t=A.gui.getLayerDetailsFromEvent(e),n=r.getLayerGroupById(t.groupId).getActiveViewLayer(),t=n.displayToPlaneIndex(e._x,e._y),e=n.getViewController(),n=r.getImage(n.getDataIndex());e.setWindowLevel(parseInt(n.getRescaledValueAtIndex(e.getCurrentIndex().getWithNew2D(t.get(0),t.get(1))),10),parseInt(e.getWindowLevel().width,10))},this.keydown=function(e){e.context="dwv.tool.WindowLevel",r.onKeydown(e)},this.activate=function(e){},this.init=function(){}},A.tool.WindowLevel.prototype.getHelpKeys=function(){return{title:"tool.WindowLevel.name",brief:"tool.WindowLevel.brief",mouse:{mouse_drag:"tool.WindowLevel.mouse_drag",double_click:"tool.WindowLevel.double_click"},touch:{touch_drag:"tool.WindowLevel.touch_drag"}}},(A=A||{}).tool=A.tool||{},A.tool.ZoomAndPan=function(a){var s=this;this.started=!1,this.mousedown=function(e){s.started=!0,s.x0=e._x,s.y0=e._y},this.twotouchdown=function(e){s.started=!0,s.x0=e._x,s.y0=e._y;var t=new A.math.Point2D(e._x,e._y),e=new A.math.Point2D(e._x1,e._y1);s.line0=new A.math.Line(t,e),s.midPoint=s.line0.getMidpoint()},this.mousemove=function(e){var t,n,i,r,o;s.started&&(t=e._x-s.x0,o=e._y-s.y0,r=A.gui.getLayerDetailsFromEvent(e),r=(i=(n=a.getLayerGroupById(r.groupId)).getActiveViewLayer()).getViewController(),o=i.displayToPlaneScale(t,o),o=r.getOffset3DFromPlaneOffset(o),n.addTranslation({x:o.getX(),y:o.getY(),z:o.getZ()}),n.draw(),s.x0=e._x,s.y0=e._y)},this.twotouchmove=function(e){var t,n,i,r;s.started&&(t=new A.math.Point2D(e._x,e._y),r=new A.math.Point2D(e._x1,e._y1),i=new A.math.Line(t,r).getLength()/s.line0.getLength(),n=A.gui.getLayerDetailsFromEvent(e),n=(r=(t=a.getLayerGroupById(n.groupId)).getActiveViewLayer()).getViewController(),1==i?(e=e._y-s.y0,Math.abs(e)<15||n.getImageSize().canScroll(2)&&(0<e?n.incrementIndex(2):n.decrementIndex(2))):(i=(i-1)/2,Math.abs(i)%.1<=.05&&(r=r.displayToMainPlanePos(s.midPoint.getX(),s.midPoint.getY()),r=n.getPlanePositionFromPlanePoint(r),t.addScale(i,r),t.draw())))},this.mouseup=function(e){s.started&&(s.started=!1)},this.mouseout=function(e){s.mouseup(e)},this.touchstart=function(e){var t=e.targetTouches;1===t.length?s.mousedown(e):2===t.length&&s.twotouchdown(e)},this.touchmove=function(e){var t=e.targetTouches;1===t.length?s.mousemove(e):2===t.length&&s.twotouchmove(e)},this.touchend=function(e){s.mouseup(e)},this.wheel=function(e){var t=-e.deltaY/500,n=A.gui.getLayerDetailsFromEvent(e),i=a.getLayerGroupById(n.groupId),r=i.getActiveViewLayer(),n=r.getViewController(),e=r.displayToMainPlanePos(e._x,e._y),e=n.getPlanePositionFromPlanePoint(e);i.addScale(t,e),i.draw()},this.keydown=function(e){e.context="dwv.tool.ZoomAndPan",a.onKeydown(e)},this.activate=function(e){}},A.tool.ZoomAndPan.prototype.getHelpKeys=function(){return{title:"tool.ZoomAndPan.name",brief:"tool.ZoomAndPan.brief",mouse:{mouse_wheel:"tool.ZoomAndPan.mouse_wheel",mouse_drag:"tool.ZoomAndPan.mouse_drag"},touch:{twotouch_pinch:"tool.ZoomAndPan.twotouch_pinch",touch_drag:"tool.ZoomAndPan.touch_drag"}}},A.tool.ZoomAndPan.prototype.init=function(){},(A=A||{}).utils=A.utils||{},A.utils.ybrToRgb=function(e,t,n){return{r:e+1.402*(n-128),g:e-.34414*(t-128)-.71414*(n-128),b:e+1.772*(t-128)}},A.utils.hexToRgb=function(e){return{r:parseInt(e.substr(1,2),16),g:parseInt(e.substr(3,2),16),b:parseInt(e.substr(5,2),16)}},A.utils.getBrightness=function(e){return.001172549*e.r+.002301961*e.g+447059e-9*e.b},A.utils.isDarkColour=function(e){return A.utils.getBrightness(A.utils.hexToRgb(e))<.5},A.utils.getShadowColour=function(e){return A.utils.isDarkColour(e)?"#fff":"#000"},A.utils.uintLabToLab=function(e){return{l:.001525902*e.l,a:.003891051*e.a-128,b:.003891051*e.b-128}},A.utils.labToUintLab=function(e){return{l:655.35*e.l,a:257*e.a+32896,b:257*e.b+32896}},A.utils.d65={x:95.0489,y:100,z:108.884},A.utils.cielabToCiexyz=function(e){function t(e){return.206896552<e?Math.pow(e,3):.128418549*e-.017712903}var n=A.utils.d65,i=(e.l+16)/116;return{x:n.x*t(i+e.a/500),y:n.y*t(i),z:n.z*t(i-e.b/200)}},A.utils.ciexyzToCielab=function(e){function t(e){return.008856452<e?Math.pow(e,.333333333):7.787037037*e+.137931034}var n=A.utils.d65,i=t(e.y/n.y);return{l:116*i-16,a:500*(t(e.x/n.x)-i),b:200*(i-t(e.z/n.z))}},A.utils.ciexyzToSrgb=function(e){function t(e){return e<=.0031308?12.92*e:1.055*Math.pow(e,.416666667)-.055}var n=e.x/100,i=e.y/100,e=e.z/100;return{r:Math.round(255*t(3.2406*n-1.5372*i-.4986*e)),g:Math.round(255*t(-.9689*n+1.8758*i+.0415*e)),b:Math.round(255*t(.0557*n-.204*i+1.057*e))}},A.utils.srgbToCiexyz=function(e){function t(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}var n=t(e.r/255),i=t(e.g/255),e=t(e.b/255);return{x:100*(.4124*n+.3576*i+.1805*e),y:100*(.2126*n+.7152*i+.0722*e),z:100*(.0193*n+.1192*i+.9505*e)}},A.utils.cielabToSrgb=function(e){return A.utils.ciexyzToSrgb(A.utils.cielabToCiexyz(e))},A.utils.srgbToCielab=function(e){return A.utils.ciexyzToCielab(A.utils.srgbToCiexyz(e))},A.utils.colourNameToHex=function(e){var t={Yellow:"#ffff00",Red:"#ff0000",White:"#ffffff",Green:"#008000",Blue:"#0000ff",Lime:"#00ff00",Fuchsia:"#ff00ff",Black:"#000000"};return void 0!==t[e]?t[e]:"#ffff00"},(A=A||{}).env=A.env||{},A.env.askModernizr=function(e){void 0===A.Modernizr&&A.ModernizrInit(s,document);for(var t=e.split("."),n=A.Modernizr,i=0;i<t.length;++i)n=n[t[i]];return n},A.env.hasFileApi=function(){return-1===navigator.appVersion.indexOf("Safari")||-1!==navigator.appVersion.indexOf("Chrome")||-1===navigator.appVersion.indexOf("5.0.")&&-1===navigator.appVersion.indexOf("5.1.")?A.env.askModernizr("filereader"):(A.logger.warn("Assuming FileAPI support for Safari5..."),!0)},A.env.hasXmlHttpRequest=function(){return A.env.askModernizr("xhrresponsetype")&&A.env.askModernizr("xhrresponsetypearraybuffer")&&A.env.askModernizr("xhrresponsetypetext")&&"XMLHttpRequest"in s&&"withCredentials"in new XMLHttpRequest},A.env.hasTypedArray=function(){return A.env.askModernizr("dataview")&&A.env.askModernizr("typedarrays")},A.env.hasInputColor=function(){return A.env.askModernizr("inputtypes.color")},A.env.hasInputDirectory=function(){return A.env.askModernizr("fileinputdirectory")},A.env._hasTypedArraySlice=void 0!==Uint8Array.prototype.slice,A.env.hasTypedArraySlice=function(){return A.env._hasTypedArraySlice},A.env._hasFloat64Array="Float64Array"in s,A.env.hasFloat64Array=function(){return A.env._hasFloat64Array},A.env._hasClampedArray="Uint8ClampedArray"in s,A.env.hasClampedArray=function(){return A.env._hasClampedArray},A.env.check=function(){var e="";if(!A.env.hasFileApi())throw e="The File APIs are not supported in this browser. ",new Error(e);if(!A.env.hasXmlHttpRequest())throw e="The XMLHttpRequest is not supported in this browser. ",new Error(e);if(!A.env.hasTypedArray())throw e="The Typed arrays are not supported in this browser. ",new Error(e);A.env.hasTypedArraySlice()||(A.logger.warn("The TypedArray.slice method is not supported in this browser. This may impair performance. "),Uint16Array.prototype.slice=function(e,t){for(var n=t-e,i=new Uint16Array(n),r=0;r<n;r++)i[r]=this[e+r];return i},Int16Array.prototype.slice=function(e,t){for(var n=t-e,i=new Int16Array(n),r=0;r<n;r++)i[r]=this[e+r];return i},Uint8Array.prototype.slice=function(e,t){for(var n=t-e,i=new Uint8Array(n),r=0;r<n;r++)i[r]=this[e+r];return i},Int8Array.prototype.slice=function(e,t){for(var n=t-e,i=new Int8Array(n),r=0;r<n;r++)i[r]=this[e+r];return i}),A.env.hasClampedArray()||(A.logger.warn("The Uint8ClampedArray is not supported in this browser. This may impair performance. "),s.Uint8ClampedArray=s.Uint8Array),A.env.hasFloat64Array()||(A.logger.warn("The Float64Array is not supported in this browser. This may impair performance. "),s.Float64Array=s.Float32Array),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null===this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],r=0;r<n;){var o=t[r];if(e.call(i,o,r,t))return o;r++}},configurable:!0,writable:!0}),String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return this.substr(!t||t<0?0:+t,e.length)===e})};i=i||{},r=r||{},o=o||{};return(A=A||{}).i18nLocalesPath=null,A.i18nInitialise=function(e,t){var n=void 0===e?"auto":e,e=void 0===t?"../..":t,t={fallbackLng:"en",load:"languageOnly",backend:{loadPath:(A.i18nLocalesPath=e)+"/locales/{{lng}}/{{ns}}.json"}},e=i.use(r);"auto"===n?e.use(o):t.lng=n,e.init(t)},A.i18nInitialiseWithResources=function(e,t){e=void 0===e?"auto":e,t={fallbackLng:"en",load:"languageOnly",resources:t};"auto"===e?i.use(o).init(t):(t.lng=e,i.init(t))},A.i18nOnInitialised=function(e){i.on("initialized",e)},A.i18nOffInitialised=function(){i.off("initialized")},A.i18nOnFailedLoad=function(e){i.on("failedLoading",e)},A.i18nOffFailedLoad=function(){i.off("failedLoading")},A.i18n=function(e,t){return i.t(e,t)},A.i18nExists=function(e,t){return i.exists(e,t)},A.i18nPage=function(){for(var e=document.getElementsByTagName("*"),t=0;t<e.length;++t)void 0!==e[t].dataset.i18n&&(e[t].innerHTML=A.i18n(e[t].dataset.i18n))},A.i18nGetLocalePath=function(e){var t=i.language.substr(0,2);return A.i18nLocalesPath+"/locales/"+t+"/"+e},A.i18nGetFallbackLocalePath=function(e){var t=i.languages[i.languages.length-1].substr(0,2);return A.i18nLocalesPath+"/locales/"+t+"/"+e},(A=A||{}).utils=A.utils||{},A.utils.ListenerHandler=function(){var i={};this.add=function(e,t){void 0===i[e]&&(i[e]=[]),i[e].push(t)},this.remove=function(e,t){if(void 0!==i[e])for(var n=0;n<i[e].length;++n)i[e][n]===t&&i[e].splice(n,1)},this.fireEvent=function(e){if(void 0!==i[e.type])for(var t=i[e.type].slice(),n=0;n<t.length;++n)t[n](e)}},(A=A||{}).utils=A.utils||{},A.utils.logger=A.utils.logger||{},A.utils.logger.console=A.utils.logger.console||{},A.logger=A.utils.logger.console,A.utils.logger.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4},A.utils.logger.console.level=A.utils.logger.levels.WARN,A.utils.logger.console.trace=function(e){A.logger.level<=A.utils.logger.levels.TRACE&&console.trace(e)},A.utils.logger.console.debug=function(e){A.logger.level<=A.utils.logger.levels.DEBUG&&console.debug(e)},A.utils.logger.console.info=function(e){A.logger.level<=A.utils.logger.levels.INFO&&console.info(e)},A.utils.logger.console.warn=function(e){A.logger.level<=A.utils.logger.levels.WARN&&console.warn(e)},A.utils.logger.console.error=function(e){A.logger.level<=A.utils.logger.levels.ERROR&&console.error(e)},(A=A||{}).ModernizrInit=function(e,a,s){var l=[],t={_version:"3.6.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){l.push({name:e,fn:t,options:n})},addAsyncTest:function(e){l.push({name:null,fn:e})}},u=function(){};u.prototype=t,(u=new u).addTest("dataview","undefined"!=typeof DataView&&"getFloat64"in DataView.prototype),u.addTest("typedarrays","ArrayBuffer"in e),u.addTest("filereader",!!(e.File&&e.FileList&&e.FileReader)),u.addTest("xhrresponsetype",function(){if("undefined"==typeof XMLHttpRequest)return!1;var e=new XMLHttpRequest;return e.open("get","/",!0),"response"in e}()),u.addTest("urlparser",function(){try{return"http://modernizr.com/"===new URL("http://modernizr.com/").href}catch(e){return!1}}),u.addTest("urlsearchparams","URLSearchParams"in e);var c=[];var g=a.documentElement,e=function(e){if("undefined"==typeof XMLHttpRequest)return!1;var t=new XMLHttpRequest;t.open("get","/",!0);try{t.responseType=e}catch(e){return!1}return"response"in t&&t.responseType==e};u.addTest("xhrresponsetypearraybuffer",e("arraybuffer")),u.addTest("xhrresponsetypejson",e("json")),u.addTest("xhrresponsetypetext",e("text"));var n="svg"===g.nodeName.toLowerCase();function i(e){return"function"!=typeof a.createElement?a.createElement(e):n?a.createElementNS.call(a,"http://www.w3.org/2000/svg",e):a.createElement.apply(a,arguments)}var d=i("input"),e="search tel url email datetime date month week time datetime-local number range color".split(" "),x={};u.inputtypes=function(e){for(var t,n,i,r=e.length,o=0;o<r;o++)d.setAttribute("type",t=e[o]),(i="text"!==d.type&&"style"in d)&&(d.value="1)",d.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(t)&&d.style.WebkitAppearance!==s?(g.appendChild(d),i=(n=a.defaultView).getComputedStyle&&"textfield"!==n.getComputedStyle(d,null).WebkitAppearance&&0!==d.offsetHeight,g.removeChild(d)):/^(search|tel)$/.test(t)||(i=/^(url|email)$/.test(t)?d.checkValidity&&!1===d.checkValidity():"1)"!=d.value)),x[e[o]]=!!i;return x}(e);var r=t._config.usePrefixes?"Moz O ms Webkit".toLowerCase().split(" "):[];t._domPrefixes=r,u.addTest("fileinputdirectory",function(){var e=i("input");if(e.type="file","directory"in e)return!0;for(var t=0,n=r.length;t<n;t++)if(r[t]+"directory"in e)return!0;return!1}),function(){var e,t,n,i,r,o,a;for(a in l)if(l.hasOwnProperty(a)){if(e=[],(t=l[a]).name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(i="function"==typeof t.fn?t.fn():t.fn,r=0;r<e.length;r++)1===(o=e[r].split(".")).length?u[o[0]]=i:(!u[o[0]]||u[o[0]]instanceof Boolean||(u[o[0]]=new Boolean(u[o[0]])),u[o[0]][o[1]]=i),c.push((i?"":"no-")+o.join("-"))}}(),delete t.addTest,delete t.addAsyncTest;for(var o=0;o<u._q.length;o++)u._q[o]();A.Modernizr=u},(A=A||{}).utils=A.utils||{},A.utils.isObject=function(e){var t=typeof e;return"function"==t||"object"==t&&!!e},A.utils.isArray=function(e){return Array.isArray(e)},A.utils.objectToArray=function(e){for(var t=[],n=Object.keys(e),i=0;i<n.length;++i){for(var r=n[i],o={name:r},a=Object.keys(e[r]),s=0;s<a.length;++s){var l=a[s],u=e[r][l];if(A.utils.isArray(u)){for(var c=[],g=0;g<u.length;++g)A.utils.isObject(u[g])?c.push(A.utils.objectToArray(u[g])):c.push(u[g]);u=c}else A.utils.isObject(u)&&(u=A.utils.objectToArray(u));o[l]=u}t.push(o)}return t},A.utils.mergeObjects=function(e,t,n,i){var r={};if(!n)throw new Error("Cannot merge object with an undefined id key: "+n);if(!Object.prototype.hasOwnProperty.call(e,n))throw new Error("Id key not found in first object while merging: "+n+", obj: "+e);if(!Object.prototype.hasOwnProperty.call(t,n))throw new Error("Id key not found in second object while merging: "+n+", obj: "+t);if(!i)throw new Error("Cannot merge object with an undefined value key: "+i);var o=!1;if(Object.prototype.hasOwnProperty.call(e[n],"merged")&&e[n].merged&&(o=!0),!Object.prototype.hasOwnProperty.call(e[n],i))throw new Error("Id value not found in first object while merging: "+n+", valueKey: "+i+", ojb: "+e);if(!Object.prototype.hasOwnProperty.call(t[n],i))throw new Error("Id value not found in second object while merging: "+n+", valueKey: "+i+", ojb: "+t);var a=e[n][i],s=t[n][i];if(o){for(var l=0;l<a.length;++l)if(a[l]===s)throw new Error("The first object already contains id2: "+s+", id1: "+a);r[n]=e[n],r[n][i].push(s)}else{if(a===s)throw new Error("Cannot merge object with same ids: "+a+", id2: "+s);r[n]={value:[a,s],merged:!0}}for(var u=Object.keys(e),c=Object.keys(t).filter(function(e){return u.indexOf(e)<0}),g=u.concat(c),d=0,x=g.length;d<x;++d){var S=g[d];if(S!==n){var m=null,h=null;Object.prototype.hasOwnProperty.call(e,S)&&(m=e[S],Object.prototype.hasOwnProperty.call(m,i)&&(h=m[i]));var f,p=null,y=null;if(Object.prototype.hasOwnProperty.call(t,S)&&(p=t[S],Object.prototype.hasOwnProperty.call(p,i)&&(y=p[i])),y!==h)if(f={},o){if(A.utils.isObject(h))f[i]=h;else{f[i]={};for(var D=0;D<a.length;D++)f[i][a[D]]=m}f[i][s]=p}else{h={};h[a]=m,h[s]=p,f[i]=h}else f=m;r[S]=f}}return r},(A=A||{}).utils=A.utils||{},A.utils.MultiProgressHandler=function(n){var i=this,r=[],o=2;function a(e){for(var t=0,n=0;n<o;++n)t+=r[e][n];return t/o}this.setNumberOfDimensions=function(e){o=e},this.setNToLoad=function(e){for(var t=0;t<e;++t){r[t]=[];for(var n=0;n<o;++n)r[t][n]=0}},this.onprogress=function(e){var t;e.lengthComputable&&void 0!==e.subindex&&void 0!==e.index&&(t=100*e.loaded/e.total,r[e.index][e.subindex]=t,t=null,t=void 0!==e.item?e.item:{loaded:a(e.index),total:100,source:e.source},n({lengthComputable:!0,loaded:function(){for(var e=0,t=r.length,n=0;n<t;++n)e+=a(n);return Math.round(e/t)}(),total:100,item:t}))},this.getMonoProgressHandler=function(t,n){return function(e){e.index=t,e.subindex=n,i.onprogress(e)}},this.getUndefinedMonoProgressHandler=function(t){return function(e){e.subindex=t,i.onprogress(e)}}},(A=A||{}).utils=A.utils||{},A.utils.capitaliseFirstLetter=function(e){var t=e;return t=e?e.charAt(0).toUpperCase()+e.slice(1):t},A.utils.endsWith=function(e,t){return null!=e&&null!=t&&e.substr(e.length-t.length)===t},A.utils.splitKeyValueString=function(e){var t={};if(e)for(var n=e.split("&"),i=0;i<n.length;++i){var r=n[i].split("=");t[r[0]]?(t[r[0]]instanceof Array||(t[r[0]]=[t[r[0]]]),t[r[0]].push(r[1])):t[r[0]]=r[1]}return t},A.utils.getFlags=function(e){var t=[];if(null==e)return t;for(var n=/{(\w+)}/g,i=n.exec(e);i;)t.push(i[1]),i=n.exec(e);return t},A.utils.replaceFlags=function(e,t){var n="";if(null==e)return n;if(n=e,null==t)return n;for(var i=A.utils.getFlags(e),r=0;r<i.length;++r){var o,a=t[i[r]];null!=a&&null!==a.value&&void 0!==a.value&&(o=a.value.toPrecision(4),null!==a.unit&&void 0!==a.unit&&0!==a.unit.length&&("degree"!==a.unit&&(o+=" "),o+=a.unit),a="{"+i[r]+"}",n=n.replace(a,o))}return n},A.utils.replaceFlags2=function(e,t){for(var n=e,i=0;i<t.length;++i)n=n.replace("{v"+i+"}",t[i]);return n},A.utils.createDefaultReplaceFormat=function(e){for(var t="",n=0;n<e.length;++n)0!==n&&(t+=", "),t+="{v"+n+"}";return t},A.utils.getRootPath=function(e){return e.split("/").slice(0,-1).join("/")},A.utils.getFileExtension=function(e){var t=null;return null==e||"."===e[0]||1!==(e=e.toLowerCase().split(".")).length&&(t=e.pop(),/[a-z]/.test(t)&&!t.includes("/")||(t=null)),t},(A=A||{}).utils=A.utils||{},A.utils.ThreadPool=function(i){for(var r=[],o=[],e=0;e<i;++e)o.push(new A.utils.WorkerThread(this));var a=[];function t(){r=[];for(var e=0;e<a.length;++e)a[e].stop();a=[]}this.addWorkerTask=function(e){var t;o.length===i&&this.onworkstart({type:"work-start"}),0<o.length?(t=o.shift(),a.push(t),t.run(e)):r.push(e)},this.abort=function(){t(),this.onabort({type:"work-abort"}),this.onworkend({type:"work-end"})},this.onTaskEnd=function(e){if(0<r.length){var t=r.shift();e.run(t)}else{e.stop(),o.push(e);for(var n=0;n<a.length;++n)a[n].getId()===e.getId()&&a.splice(n,1);o.length===i&&(this.onwork({type:"work"}),this.onworkend({type:"work-end"}))}},this.handleWorkerError=function(e){t(),this.onerror({error:e}),this.onworkend({type:"work-end"})}},A.utils.ThreadPool.prototype.onworkstart=function(e){},A.utils.ThreadPool.prototype.onworkitem=function(e){},A.utils.ThreadPool.prototype.onwork=function(e){},A.utils.ThreadPool.prototype.onworkend=function(e){},A.utils.ThreadPool.prototype.onerror=function(e){},A.utils.ThreadPool.prototype.onabort=function(e){},A.utils.WorkerThread=function(t){var n,i=this,e=Math.random().toString(36).substring(2,15),r=null;function o(e){e.itemNumber=r.info.itemNumber,e.numberOfItems=r.info.numberOfItems,e.dataIndex=r.info.dataIndex,t.onworkitem(e),t.onTaskEnd(i)}function a(e){e.itemNumber=r.info.itemNumber,e.numberOfItems=r.info.numberOfItems,e.dataIndex=r.info.dataIndex,t.handleWorkerError(e),i.stop()}this.getId=function(){return e},this.run=function(e){r=e,void 0===n&&((n=new Worker(r.script)).onmessage=o,n.onerror=a),n.postMessage(r.startMessage)},this.stop=function(){n.terminate()}},A.utils.WorkerTask=function(e,t,n){this.script=e,this.startMessage=t,this.info=n},(A=A||{}).utils=A.utils||{},A.utils.getUrlFromUriFull=function(e){return new URL(e,s.location.origin)},A.utils.getUrlFromUriSimple=function(e){var t={},n=e.split("?"),e=n[0].split("//").pop().split("/");e.splice(0,1),t.pathname="/"+e.join("/");var i=[];2===n.length&&(i=n[1].split("&"));for(var r={},o=0;o<i.length;++o){var a=i[o].split("=");r[a[0]]=a[1]}return t.searchParams={get:function(e){return r[e]}},t},A.utils.getUrlFromUri=function(e){return A.env.askModernizr("urlparser")&&A.env.askModernizr("urlsearchparams")?A.utils.getUrlFromUriFull(e):A.utils.getUrlFromUriSimple(e)},A.utils.splitUri=function(e){var t,n={},i=null;return e&&-1!==(i=e.indexOf("?"))&&(n.base=e.substr(0,i),-1===(t=e.indexOf("#"))&&(t=e.length),i=e.substr(i+1,t-1-i),n.query=A.utils.splitKeyValueString(i)),n},A.utils.getUriQuery=function(e){e=A.utils.splitUri(e);return 0===Object.keys(e).length?null:e.query},A.utils.decodeQuery=function(e,t){e.type&&"manifest"===e.type?A.utils.decodeManifestQuery(e,t):t(A.utils.decodeKeyValueUri(e.input,e.dwvReplaceMode))},A.utils.decodeKeyValueUri=function(e,t){var n=[],i="key";t&&(i=t);var e=decodeURIComponent(e),r=A.utils.splitUri(e);if(0===Object.keys(r).length)n.push(e);else{for(var o=Object.keys(r.query),a=null,s=0;s<o.length;++s)if(r.query[o[s]]instanceof Array){a=o[s];break}if(a){var l=r.query[a],u=r.base;""!==u&&"file"!==a&&(u+="?");for(var c,g=!1,d=0;d<o.length;++d)o[d]!==a&&(g&&(u+="&"),u+=o[d]+"="+r.query[o[d]],g=!0);for(var x=0;x<l.length;++x)c=u,g&&(c+="&"),"key"===i&&(c+=a+"="),c+=l[x],n.push(c)}else n.push(e)}return n},A.utils.decodeManifestQuery=function(e,t){var n="";"/"===e.input[0]&&(n=s.location.protocol+"//"+s.location.host),n+=e.input;var i=new XMLHttpRequest;i.open("GET",decodeURIComponent(n),!0),i.responseType="document",i.onload=function(){t(A.utils.decodeManifest(this.responseXML,e.nslices))},i.onerror=function(){A.logger.warn("RequestError while receiving manifest: "+this.status)},i.send(null)},A.utils.decodeManifest=function(e,t){var n=[],i=e.getElementsByTagName("wado_query")[0].getAttribute("wadoURL")+"?requestType=WADO&contentType=application/dicom&",e=e.getElementsByTagName("Patient");1<e.length&&A.logger.warn("More than one patient, loading first one.");e=e[0].getElementsByTagName("Study");1<e.length&&A.logger.warn("More than one study, loading first one.");var r=e[0].getAttribute("StudyInstanceUID"),e=e[0].getElementsByTagName("Series");1<e.length&&A.logger.warn("More than one series, loading first one.");var o=e[0].getAttribute("SeriesInstanceUID"),a=e[0].getElementsByTagName("Instance"),s=a.length;t<s&&(s=t);for(var l=0;l<s;++l){var u=a[l].getAttribute("SOPInstanceUID");n.push(i+"&studyUID="+r+"&seriesUID="+o+"&objectUID="+u)}return n},A.utils.loadFromUri=function(e,t){e=A.utils.getUriQuery(e);e&&void 0!==e.input&&A.utils.loadFromQuery(e,t)},A.utils.loadFromQuery=function(e,t){A.utils.decodeQuery(e,t.loadURLs),void 0!==e.state&&t.addEventListener("loadend",function(){t.loadURLs(e.state)})},A});