@ohif/mode-test 3.8.0-beta.5 → 3.8.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(o,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@ohif/core"),require("@ohif/ui"),require("@cornerstonejs/core")):"function"==typeof define&&define.amd?define(["@ohif/core","@ohif/ui","@cornerstonejs/core"],e):"object"==typeof exports?exports["ohif-mode-basic-test"]=e(require("@ohif/core"),require("@ohif/ui"),require("@cornerstonejs/core")):o["ohif-mode-basic-test"]=e(o["@ohif/core"],o["@ohif/ui"],o["@cornerstonejs/core"])}(self,((o,e,t)=>(()=>{"use strict";var n={464:o=>{o.exports=t},762:e=>{e.exports=o},369:o=>{o.exports=e}},i={};function a(o){var e=i[o];if(void 0!==e)return e.exports;var t=i[o]={exports:{}};return n[o](t,t.exports,a),t.exports}a.d=(o,e)=>{for(var t in e)a.o(e,t)&&!a.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:e[t]})},a.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e);var l={};return(()=>{a.d(l,{default:()=>w});var o=a(762),e=a(369),t=a(464);const{windowLevelPresets:n}=o.defaults,i=o.ToolbarService._createButton.bind(null,"action"),s=o.ToolbarService._createButton.bind(null,"toggle"),c=o.ToolbarService._createButton.bind(null,"tool");function r(o,e,t){return{id:o.toString(),title:e,subtitle:t,type:"action",commands:[{commandName:"setWindowLevel",commandOptions:{...n[o]},context:"CORNERSTONE"}]}}const m=[{commandName:"setSourceViewportForReferenceLinesTool",context:"CORNERSTONE"},{commandName:"setToolActive",commandOptions:{toolName:"ReferenceLines"},context:"CORNERSTONE"}],d=[{id:"MeasurementTools",type:"ohif.splitButton",props:{groupId:"MeasurementTools",isRadio:!0,primary:c("Length","tool-length","Length",[{commandName:"setToolActive",commandOptions:{toolName:"Length"},context:"CORNERSTONE"},{commandName:"setToolActive",commandOptions:{toolName:"SRLength",toolGroupId:"SRToolGroup"},context:"CORNERSTONE"}],"Length"),secondary:{icon:"chevron-down",label:"",isActive:!0,tooltip:"More Measure Tools"},items:[c("Length","tool-length","Length",[{commandName:"setToolActive",commandOptions:{toolName:"Length"},context:"CORNERSTONE"},{commandName:"setToolActive",commandOptions:{toolName:"SRLength",toolGroupId:"SRToolGroup"},context:"CORNERSTONE"}],"Length Tool"),c("Bidirectional","tool-bidirectional","Bidirectional",[{commandName:"setToolActive",commandOptions:{toolName:"Bidirectional"},context:"CORNERSTONE"},{commandName:"setToolActive",commandOptions:{toolName:"SRBidirectional",toolGroupId:"SRToolGroup"},context:"CORNERSTONE"}],"Bidirectional Tool"),c("ArrowAnnotate","tool-annotate","Annotation",[{commandName:"setToolActive",commandOptions:{toolName:"ArrowAnnotate"},context:"CORNERSTONE"},{commandName:"setToolActive",commandOptions:{toolName:"SRArrowAnnotate",toolGroupId:"SRToolGroup"},context:"CORNERSTONE"}],"Arrow Annotate"),c("EllipticalROI","tool-elipse","Ellipse",[{commandName:"setToolActive",commandOptions:{toolName:"EllipticalROI"},context:"CORNERSTONE"},{commandName:"setToolActive",commandOptions:{toolName:"SREllipticalROI",toolGroupId:"SRToolGroup"},context:"CORNERSTONE"}],"Ellipse Tool"),c("CircleROI","tool-circle","Circle",[{commandName:"setToolActive",commandOptions:{toolName:"CircleROI"},context:"CORNERSTONE"},{commandName:"setToolActive",commandOptions:{toolName:"SRCircleROI",toolGroupId:"SRToolGroup"},context:"CORNERSTONE"}],"Circle Tool")]}},{id:"Zoom",type:"ohif.radioGroup",props:{type:"tool",icon:"tool-zoom",label:"Zoom",commands:[{commandName:"setToolActive",commandOptions:{toolName:"Zoom"},context:"CORNERSTONE"}]}},{id:"WindowLevel",type:"ohif.splitButton",props:{groupId:"WindowLevel",primary:c("WindowLevel","tool-window-level","Window Level",[{commandName:"setToolActive",commandOptions:{toolName:"WindowLevel"},context:"CORNERSTONE"}],"Window Level"),secondary:{icon:"chevron-down",label:"W/L Manual",isActive:!0,tooltip:"W/L Presets"},isAction:!0,renderer:e.WindowLevelMenuItem,items:[r(1,"Soft tissue","400 / 40"),r(2,"Lung","1500 / -600"),r(3,"Liver","150 / 90"),r(4,"Bone","2500 / 480"),r(5,"Brain","80 / 40")]}},{id:"Pan",type:"ohif.radioGroup",props:{type:"tool",icon:"tool-move",label:"Pan",commands:[{commandName:"setToolActive",commandOptions:{toolName:"Pan"},context:"CORNERSTONE"}]}},{id:"Capture",type:"ohif.action",props:{icon:"tool-capture",label:"Capture",type:"action",commands:[{commandName:"showDownloadViewportModal",commandOptions:{},context:"CORNERSTONE"}]}},{id:"Layout",type:"ohif.splitButton",props:{groupId:"LayoutTools",isRadio:!1,primary:{id:"Layout",type:"action",uiType:"ohif.layoutSelector",icon:"tool-layout",label:"Grid Layout",props:{rows:4,columns:4,commands:[{commandName:"setLayout",commandOptions:{},context:"CORNERSTONE"}]}},secondary:{icon:"chevron-down",label:"",isActive:!0,tooltip:"Hanging Protocols"},items:[{id:"2x2",type:"action",label:"2x2",commands:[{commandName:"setHangingProtocol",commandOptions:{protocolId:"@ohif/mnGrid",stageId:"2x2"},context:"DEFAULT"}]},{id:"3x1",type:"action",label:"3x1",commands:[{commandName:"setHangingProtocol",commandOptions:{protocolId:"@ohif/mnGrid",stageId:"3x1"},context:"DEFAULT"}]},{id:"2x1",type:"action",label:"2x1",commands:[{commandName:"setHangingProtocol",commandOptions:{protocolId:"@ohif/mnGrid",stageId:"2x1"},context:"DEFAULT"}]},{id:"1x1",type:"action",label:"1x1",commands:[{commandName:"setHangingProtocol",commandOptions:{protocolId:"@ohif/mnGrid",stageId:"1x1"},context:"DEFAULT"}]}]}},{id:"MPR",type:"ohif.action",props:{type:"toggle",icon:"icon-mpr",label:"MPR",commands:[{commandName:"toggleHangingProtocol",commandOptions:{protocolId:"mpr"},context:"DEFAULT"}]}},{id:"Crosshairs",type:"ohif.radioGroup",props:{type:"tool",icon:"tool-crosshair",label:"Crosshairs",commands:[{commandName:"setToolActive",commandOptions:{toolGroupId:"mpr",toolName:"Crosshairs"},context:"CORNERSTONE"}]}},{id:"MoreTools",type:"ohif.splitButton",props:{isRadio:!0,groupId:"MoreTools",primary:i("Reset","tool-reset","Reset View",[{commandName:"resetViewport",commandOptions:{},context:"CORNERSTONE"}],"Reset"),secondary:{icon:"chevron-down",label:"",isActive:!0,tooltip:"More Tools"},items:[i("Reset","tool-reset","Reset View",[{commandName:"resetViewport",commandOptions:{},context:"CORNERSTONE"}],"Reset"),i("rotate-right","tool-rotate-right","Rotate Right",[{commandName:"rotateViewportCW",commandOptions:{},context:"CORNERSTONE"}],"Rotate +90"),i("flip-horizontal","tool-flip-horizontal","Flip Horizontally",[{commandName:"flipViewportHorizontal",commandOptions:{},context:"CORNERSTONE"}],"Flip Horizontally"),s("StackImageSync","link","Stack Image Sync",[{commandName:"toggleStackImageSync"}],"Enable position synchronization on stack viewports",{listeners:{[t.EVENTS.STACK_VIEWPORT_NEW_STACK]:{commandName:"toggleStackImageSync",commandOptions:{toggledState:!0}}}}),s("ReferenceLines","tool-referenceLines","Reference Lines",m,"Show Reference Lines",{listeners:{[t.EVENTS.STACK_VIEWPORT_NEW_STACK]:m,[t.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]:m}}),c("StackScroll","tool-stack-scroll","Stack Scroll",[{commandName:"setToolActive",commandOptions:{toolName:"StackScroll"},context:"CORNERSTONE"}],"Stack Scroll"),i("invert","tool-invert","Invert",[{commandName:"invertViewport",commandOptions:{},context:"CORNERSTONE"}],"Invert Colors"),c("Probe","tool-probe","Probe",[{commandName:"setToolActive",commandOptions:{toolName:"DragProbe"},context:"CORNERSTONE"}],"Probe"),s("cine","tool-cine","Cine",[{commandName:"toggleCine",context:"CORNERSTONE"}],"Cine"),c("Angle","tool-angle","Angle",[{commandName:"setToolActive",commandOptions:{toolName:"Angle"},context:"CORNERSTONE"}],"Angle"),c("Magnify","tool-magnify","Magnify",[{commandName:"setToolActive",commandOptions:{toolName:"Magnify"},context:"CORNERSTONE"}],"Magnify"),c("Rectangle","tool-rectangle","Rectangle",[{commandName:"setToolActive",commandOptions:{toolName:"RectangleROI"},context:"CORNERSTONE"}],"Rectangle"),i("TagBrowser","list-bullets","Dicom Tag Browser",[{commandName:"openDICOMTagViewer",commandOptions:{},context:"DEFAULT"}],"Dicom Tag Browser")]}}],p=JSON.parse('{"u2":"@ohif/mode-test"}').u2;const u=function(o,e,t){!function(o,e,t,n){const i=o.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),{toolNames:a,Enums:l}=i.exports,s={active:[{toolName:a.WindowLevel,bindings:[{mouseButton:l.MouseBindings.Primary}]},{toolName:a.Pan,bindings:[{mouseButton:l.MouseBindings.Auxiliary}]},{toolName:a.Zoom,bindings:[{mouseButton:l.MouseBindings.Secondary}]},{toolName:a.StackScrollMouseWheel,bindings:[]}],passive:[{toolName:a.Length},{toolName:a.ArrowAnnotate,configuration:{getTextCallback:(o,e)=>t.runCommand("arrowTextCallback",{callback:o,eventDetails:e}),changeTextCallback:(o,e,n)=>t.runCommand("arrowTextCallback",{callback:n,data:o,eventDetails:e})}},{toolName:a.Bidirectional},{toolName:a.DragProbe},{toolName:a.EllipticalROI},{toolName:a.CircleROI},{toolName:a.RectangleROI},{toolName:a.StackScroll},{toolName:a.Angle},{toolName:a.Magnify},{toolName:a.SegmentationDisplay}],disabled:[{toolName:a.ReferenceLines}]};e.createToolGroupAndAddTools(n,s)}(o,e,t,"default"),function(o,e,t){const n=o.getModuleEntry("@ohif/extension-cornerstone-dicom-sr.utilityModule.tools"),i=o.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),{toolNames:a}=n.exports,{toolNames:l,Enums:s}=i.exports,c={active:[{toolName:l.WindowLevel,bindings:[{mouseButton:s.MouseBindings.Primary}]},{toolName:l.Pan,bindings:[{mouseButton:s.MouseBindings.Auxiliary}]},{toolName:l.Zoom,bindings:[{mouseButton:s.MouseBindings.Secondary}]},{toolName:l.StackScrollMouseWheel,bindings:[]}],passive:[{toolName:a.SRLength},{toolName:a.SRArrowAnnotate},{toolName:a.SRBidirectional},{toolName:a.SREllipticalROI},{toolName:a.SRCircleROI}],enabled:[{toolName:a.DICOMSRDisplay,bindings:[]}]};e.createToolGroupAndAddTools("SRToolGroup",c)}(o,e),function(o,e,t){const n=o.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),{toolNames:i,Enums:a}=n.exports,l={active:[{toolName:i.WindowLevel,bindings:[{mouseButton:a.MouseBindings.Primary}]},{toolName:i.Pan,bindings:[{mouseButton:a.MouseBindings.Auxiliary}]},{toolName:i.Zoom,bindings:[{mouseButton:a.MouseBindings.Secondary}]},{toolName:i.StackScrollMouseWheel,bindings:[]}],passive:[{toolName:i.Length},{toolName:i.ArrowAnnotate,configuration:{getTextCallback:(o,e)=>t.runCommand("arrowTextCallback",{callback:o,eventDetails:e}),changeTextCallback:(o,e,n)=>t.runCommand("arrowTextCallback",{callback:n,data:o,eventDetails:e})}},{toolName:i.Bidirectional},{toolName:i.DragProbe},{toolName:i.EllipticalROI},{toolName:i.CircleROI},{toolName:i.RectangleROI},{toolName:i.StackScroll},{toolName:i.Angle},{toolName:i.SegmentationDisplay}],disabled:[{toolName:i.Crosshairs,configuration:{viewportIndicators:!1,autoPan:{enabled:!1,panSize:10}}},{toolName:i.ReferenceLines}]};e.createToolGroupAndAddTools("mpr",l)}(o,e,t)},N=["SM","ECG","SR","SEG"],g="@ohif/extension-default.layoutTemplateModule.viewerLayout",R="@ohif/extension-default.sopClassHandlerModule.stack",O="@ohif/extension-measurement-tracking.panelModule.trackedMeasurements",T="@ohif/extension-measurement-tracking.panelModule.seriesList",S="@ohif/extension-measurement-tracking.viewportModule.cornerstone-tracked",f="@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr",x="@ohif/extension-cornerstone-dicom-sr.viewportModule.dicom-sr",E="@ohif/extension-dicom-video.sopClassHandlerModule.dicom-video",y="@ohif/extension-dicom-video.viewportModule.dicom-video",v="@ohif/extension-dicom-pdf.sopClassHandlerModule.dicom-pdf",h="@ohif/extension-dicom-pdf.viewportModule.dicom-pdf",C="@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg",b="@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg",A="@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentation",M={"@ohif/extension-default":"^3.0.0","@ohif/extension-cornerstone":"^3.0.0","@ohif/extension-measurement-tracking":"^3.0.0","@ohif/extension-cornerstone-dicom-sr":"^3.0.0","@ohif/extension-cornerstone-dicom-seg":"^3.0.0","@ohif/extension-dicom-pdf":"^3.0.1","@ohif/extension-dicom-video":"^3.0.1","@ohif/extension-test":"^0.0.1"};const w={id:p,modeFactory:function(){return{id:p,routeName:"basic-test",displayName:"Basic Test Mode",onModeEnter:o=>{let{servicesManager:e,extensionManager:t,commandsManager:n}=o;const{measurementService:i,toolbarService:a,toolGroupService:l,customizationService:s}=e.services;let c;i.clearMeasurements(),u(t,l,n),s.addModeCustomizations(["@ohif/extension-test.customizationModule.custom-context-menu"]);({unsubscribe:c}=l.subscribe(l.EVENTS.VIEWPORT_ADDED,(()=>{a.recordInteraction({groupId:"WindowLevel",interactionType:"tool",commands:[{commandName:"setToolActive",commandOptions:{toolName:"WindowLevel"},context:"CORNERSTONE"}]}),c()}))),a.init(t),a.addButtons(d),a.createButtonSection("primary",["MeasurementTools","Zoom","WindowLevel","Pan","Capture","Layout","MPR","Crosshairs","MoreTools"])},onModeExit:o=>{let{servicesManager:e}=o;const{toolGroupService:t,syncGroupService:n,segmentationService:i,cornerstoneViewportService:a}=e.services;t.destroy(),n.destroy(),i.destroy(),a.destroy()},validationTags:{study:[],series:[]},isValidMode:function(o){let{modalities:e}=o;return!!e.split("\\").filter((o=>-1===N.indexOf(o))).length},routes:[{path:"basic-test",layoutTemplate:()=>({id:g,props:{leftPanels:[T],rightPanels:[A,O],viewports:[{namespace:S,displaySetsToDisplay:[R]},{namespace:x,displaySetsToDisplay:[f]},{namespace:y,displaySetsToDisplay:[E]},{namespace:h,displaySetsToDisplay:[v]},{namespace:b,displaySetsToDisplay:[C]}]}})}],extensions:M,hangingProtocol:"default",sopClassHandlers:[E,C,R,v,f],hotkeys:{name:"basic-test-hotkeys",hotkeys:[...o.hotkeys.defaults.hotkeyBindings]}}},extensionDependencies:M}})(),l=l.default})()));
1
+ !function(o,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@ohif/core"),require("@ohif/ui"),require("@cornerstonejs/core")):"function"==typeof define&&define.amd?define(["@ohif/core","@ohif/ui","@cornerstonejs/core"],e):"object"==typeof exports?exports["ohif-mode-basic-test"]=e(require("@ohif/core"),require("@ohif/ui"),require("@cornerstonejs/core")):o["ohif-mode-basic-test"]=e(o["@ohif/core"],o["@ohif/ui"],o["@cornerstonejs/core"])}(self,((o,e,t)=>(()=>{"use strict";var n={464:o=>{o.exports=t},762:e=>{e.exports=o},369:o=>{o.exports=e}},a={};function i(o){var e=a[o];if(void 0!==e)return e.exports;var t=a[o]={exports:{}};return n[o](t,t.exports,i),t.exports}i.d=(o,e)=>{for(var t in e)i.o(e,t)&&!i.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:e[t]})},i.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e);var l={};return(()=>{i.d(l,{default:()=>M});var o=i(762),e=i(369);const{windowLevelPresets:t}=o.defaults;function n(o,e,n){return{id:o.toString(),title:e,subtitle:n,type:"action",commands:[{commandName:"setWindowLevel",commandOptions:{...t[o]},context:"CORNERSTONE"}]}}const a=[{id:"MeasurementTools",type:"ohif.splitButton",props:{groupId:"MeasurementTools",isRadio:!0,primary:o.ToolbarService._createToolButton("Length","tool-length","Length",[{commandName:"setToolActive",commandOptions:{toolName:"Length"},context:"CORNERSTONE"},{commandName:"setToolActive",commandOptions:{toolName:"SRLength",toolGroupId:"SRToolGroup"},context:"CORNERSTONE"}],"Length"),secondary:{icon:"chevron-down",label:"",isActive:!0,tooltip:"More Measure Tools"},items:[o.ToolbarService._createToolButton("Length","tool-length","Length",[{commandName:"setToolActive",commandOptions:{toolName:"Length"},context:"CORNERSTONE"},{commandName:"setToolActive",commandOptions:{toolName:"SRLength",toolGroupId:"SRToolGroup"},context:"CORNERSTONE"}],"Length Tool"),o.ToolbarService._createToolButton("Bidirectional","tool-bidirectional","Bidirectional",[{commandName:"setToolActive",commandOptions:{toolName:"Bidirectional"},context:"CORNERSTONE"},{commandName:"setToolActive",commandOptions:{toolName:"SRBidirectional",toolGroupId:"SRToolGroup"},context:"CORNERSTONE"}],"Bidirectional Tool"),o.ToolbarService._createToolButton("ArrowAnnotate","tool-annotate","Annotation",[{commandName:"setToolActive",commandOptions:{toolName:"ArrowAnnotate"},context:"CORNERSTONE"},{commandName:"setToolActive",commandOptions:{toolName:"SRArrowAnnotate",toolGroupId:"SRToolGroup"},context:"CORNERSTONE"}],"Arrow Annotate"),o.ToolbarService._createToolButton("EllipticalROI","tool-elipse","Ellipse",[{commandName:"setToolActive",commandOptions:{toolName:"EllipticalROI"},context:"CORNERSTONE"},{commandName:"setToolActive",commandOptions:{toolName:"SREllipticalROI",toolGroupId:"SRToolGroup"},context:"CORNERSTONE"}],"Ellipse Tool"),o.ToolbarService._createToolButton("CircleROI","tool-circle","Circle",[{commandName:"setToolActive",commandOptions:{toolName:"CircleROI"},context:"CORNERSTONE"},{commandName:"setToolActive",commandOptions:{toolName:"SRCircleROI",toolGroupId:"SRToolGroup"},context:"CORNERSTONE"}],"Circle Tool")]}},{id:"Zoom",type:"ohif.radioGroup",props:{type:"tool",icon:"tool-zoom",label:"Zoom",commands:[{commandName:"setToolActive",commandOptions:{toolName:"Zoom"},context:"CORNERSTONE"}]}},{id:"WindowLevel",type:"ohif.splitButton",props:{groupId:"WindowLevel",primary:o.ToolbarService._createToolButton("WindowLevel","tool-window-level","Window Level",[{commandName:"setToolActive",commandOptions:{toolName:"WindowLevel"},context:"CORNERSTONE"}],"Window Level"),secondary:{icon:"chevron-down",label:"W/L Manual",isActive:!0,tooltip:"W/L Presets"},isAction:!0,renderer:e.WindowLevelMenuItem,items:[n(1,"Soft tissue","400 / 40"),n(2,"Lung","1500 / -600"),n(3,"Liver","150 / 90"),n(4,"Bone","2500 / 480"),n(5,"Brain","80 / 40")]}},{id:"Pan",type:"ohif.radioGroup",props:{type:"tool",icon:"tool-move",label:"Pan",commands:[{commandName:"setToolActive",commandOptions:{toolName:"Pan"},context:"CORNERSTONE"}]}},{id:"Capture",type:"ohif.action",props:{icon:"tool-capture",label:"Capture",type:"action",commands:[{commandName:"showDownloadViewportModal",commandOptions:{},context:"CORNERSTONE"}]}},{id:"Layout",type:"ohif.splitButton",props:{groupId:"LayoutTools",isRadio:!1,primary:{id:"Layout",type:"action",uiType:"ohif.layoutSelector",icon:"tool-layout",label:"Grid Layout",props:{rows:4,columns:4,commands:[{commandName:"setLayout",commandOptions:{},context:"CORNERSTONE"}]}},secondary:{icon:"chevron-down",label:"",isActive:!0,tooltip:"Hanging Protocols"},items:[{id:"2x2",type:"action",label:"2x2",commands:[{commandName:"setHangingProtocol",commandOptions:{protocolId:"@ohif/mnGrid",stageId:"2x2"},context:"DEFAULT"}]},{id:"3x1",type:"action",label:"3x1",commands:[{commandName:"setHangingProtocol",commandOptions:{protocolId:"@ohif/mnGrid",stageId:"3x1"},context:"DEFAULT"}]},{id:"2x1",type:"action",label:"2x1",commands:[{commandName:"setHangingProtocol",commandOptions:{protocolId:"@ohif/mnGrid",stageId:"2x1"},context:"DEFAULT"}]},{id:"1x1",type:"action",label:"1x1",commands:[{commandName:"setHangingProtocol",commandOptions:{protocolId:"@ohif/mnGrid",stageId:"1x1"},context:"DEFAULT"}]}]}},{id:"MPR",type:"ohif.action",props:{type:"toggle",icon:"icon-mpr",label:"MPR",commands:[{commandName:"toggleHangingProtocol",commandOptions:{protocolId:"mpr"}}]}},{id:"Crosshairs",type:"ohif.radioGroup",props:{type:"tool",icon:"tool-crosshair",label:"Crosshairs",commands:[{commandName:"setToolActive",commandOptions:{toolGroupId:"mpr",toolName:"Crosshairs"}}]}}],r=JSON.parse('{"u2":"@ohif/mode-test"}').u2;const c=function(o,e,t){!function(o,e,t,n){const a=o.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),{toolNames:i,Enums:l}=a.exports,r={active:[{toolName:i.WindowLevel,bindings:[{mouseButton:l.MouseBindings.Primary}]},{toolName:i.Pan,bindings:[{mouseButton:l.MouseBindings.Auxiliary}]},{toolName:i.Zoom,bindings:[{mouseButton:l.MouseBindings.Secondary}]},{toolName:i.StackScrollMouseWheel,bindings:[]}],passive:[{toolName:i.Length},{toolName:i.ArrowAnnotate,configuration:{getTextCallback:(o,e)=>t.runCommand("arrowTextCallback",{callback:o,eventDetails:e}),changeTextCallback:(o,e,n)=>t.runCommand("arrowTextCallback",{callback:n,data:o,eventDetails:e})}},{toolName:i.Bidirectional},{toolName:i.DragProbe},{toolName:i.EllipticalROI},{toolName:i.CircleROI},{toolName:i.RectangleROI},{toolName:i.StackScroll},{toolName:i.Angle},{toolName:i.Magnify},{toolName:i.SegmentationDisplay}],disabled:[{toolName:i.ReferenceLines}]};e.createToolGroupAndAddTools(n,r)}(o,e,t,"default"),function(o,e,t){const n=o.getModuleEntry("@ohif/extension-cornerstone-dicom-sr.utilityModule.tools"),a=o.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),{toolNames:i}=n.exports,{toolNames:l,Enums:r}=a.exports,c={active:[{toolName:l.WindowLevel,bindings:[{mouseButton:r.MouseBindings.Primary}]},{toolName:l.Pan,bindings:[{mouseButton:r.MouseBindings.Auxiliary}]},{toolName:l.Zoom,bindings:[{mouseButton:r.MouseBindings.Secondary}]},{toolName:l.StackScrollMouseWheel,bindings:[]}],passive:[{toolName:i.SRLength},{toolName:i.SRArrowAnnotate},{toolName:i.SRBidirectional},{toolName:i.SREllipticalROI},{toolName:i.SRCircleROI}],enabled:[{toolName:i.DICOMSRDisplay,bindings:[]}]};e.createToolGroupAndAddTools("SRToolGroup",c)}(o,e),function(o,e,t){const n=o.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),{toolNames:a,Enums:i}=n.exports,l={active:[{toolName:a.WindowLevel,bindings:[{mouseButton:i.MouseBindings.Primary}]},{toolName:a.Pan,bindings:[{mouseButton:i.MouseBindings.Auxiliary}]},{toolName:a.Zoom,bindings:[{mouseButton:i.MouseBindings.Secondary}]},{toolName:a.StackScrollMouseWheel,bindings:[]}],passive:[{toolName:a.Length},{toolName:a.ArrowAnnotate,configuration:{getTextCallback:(o,e)=>t.runCommand("arrowTextCallback",{callback:o,eventDetails:e}),changeTextCallback:(o,e,n)=>t.runCommand("arrowTextCallback",{callback:n,data:o,eventDetails:e})}},{toolName:a.Bidirectional},{toolName:a.DragProbe},{toolName:a.EllipticalROI},{toolName:a.CircleROI},{toolName:a.RectangleROI},{toolName:a.StackScroll},{toolName:a.Angle},{toolName:a.SegmentationDisplay}],disabled:[{toolName:a.Crosshairs,configuration:{viewportIndicators:!1,autoPan:{enabled:!1,panSize:10}}},{toolName:a.ReferenceLines}]};e.createToolGroupAndAddTools("mpr",l)}(o,e,t)};var s=i(464);const m=[{commandName:"setSourceViewportForReferenceLinesTool",context:"CORNERSTONE"},{commandName:"setToolActive",commandOptions:{toolName:"ReferenceLines"},context:"CORNERSTONE"}],d=[{id:"MoreTools",type:"ohif.splitButton",props:{isRadio:!0,groupId:"MoreTools",primary:o.ToolbarService._createActionButton("Reset","tool-reset","Reset View",[{commandName:"resetViewport"}],"Reset"),secondary:{icon:"chevron-down",label:"",isActive:!0,tooltip:"More Tools"},items:[o.ToolbarService._createActionButton("Reset","tool-reset","Reset View",[{commandName:"resetViewport"}],"Reset"),o.ToolbarService._createActionButton("rotate-right","tool-rotate-right","Rotate Right",[{commandName:"rotateViewportCW",commandOptions:{},context:"CORNERSTONE"}],"Rotate +90"),o.ToolbarService._createActionButton("flip-horizontal","tool-flip-horizontal","Flip Horizontally",[{commandName:"flipViewportHorizontal",commandOptions:{},context:"CORNERSTONE"}],"Flip Horizontally"),o.ToolbarService._createToggleButton("StackImageSync","link","Stack Image Sync",[{commandName:"toggleStackImageSync"}],"Enable position synchronization on stack viewports",{listeners:{[s.EVENTS.STACK_VIEWPORT_NEW_STACK]:{commandName:"toggleStackImageSync",commandOptions:{toggledState:!0}}}}),o.ToolbarService._createToggleButton("ReferenceLines","tool-referenceLines","Reference Lines",m,"Show Reference Lines",{listeners:{[s.EVENTS.STACK_VIEWPORT_NEW_STACK]:m,[s.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]:m}}),o.ToolbarService._createToolButton("StackScroll","tool-stack-scroll","Stack Scroll",[{commandName:"setToolActive",commandOptions:{toolName:"StackScroll"},context:"CORNERSTONE"}],"Stack Scroll"),o.ToolbarService._createActionButton("invert","tool-invert","Invert",[{commandName:"invertViewport",commandOptions:{},context:"CORNERSTONE"}],"Invert Colors"),o.ToolbarService._createToolButton("Probe","tool-probe","Probe",[{commandName:"setToolActive",commandOptions:{toolName:"DragProbe"},context:"CORNERSTONE"}],"Probe"),o.ToolbarService._createToggleButton("cine","tool-cine","Cine",[{commandName:"toggleCine",context:"CORNERSTONE"}],"Cine"),o.ToolbarService._createToolButton("Angle","tool-angle","Angle",[{commandName:"setToolActive",commandOptions:{toolName:"Angle"},context:"CORNERSTONE"}],"Angle"),o.ToolbarService._createToolButton("Magnify","tool-magnify","Magnify",[{commandName:"setToolActive",commandOptions:{toolName:"Magnify"},context:"CORNERSTONE"}],"Magnify"),o.ToolbarService._createToolButton("Rectangle","tool-rectangle","Rectangle",[{commandName:"setToolActive",commandOptions:{toolName:"RectangleROI"},context:"CORNERSTONE"}],"Rectangle"),o.ToolbarService._createActionButton("TagBrowser","list-bullets","Dicom Tag Browser",[{commandName:"openDICOMTagViewer",commandOptions:{},context:"DEFAULT"}],"Dicom Tag Browser")]}}],p=[{id:"MoreToolsMpr",type:"ohif.splitButton",props:{isRadio:!0,groupId:"MoreTools",primary:o.ToolbarService._createActionButton("Reset","tool-reset","Reset View",[{commandName:"resetViewport"}],"Reset"),secondary:{icon:"chevron-down",label:"",isActive:!0,tooltip:"More Tools"},items:[o.ToolbarService._createActionButton("Reset","tool-reset","Reset View",[{commandName:"resetViewport"}],"Reset"),o.ToolbarService._createToolButton("StackScroll","tool-stack-scroll","Stack Scroll",[{commandName:"setToolActive",commandOptions:{toolName:"StackScroll"},context:"CORNERSTONE"}],"Stack Scroll"),o.ToolbarService._createActionButton("invert","tool-invert","Invert",[{commandName:"invertViewport",commandOptions:{},context:"CORNERSTONE"}],"Invert Colors"),o.ToolbarService._createToolButton("Probe","tool-probe","Probe",[{commandName:"setToolActive",commandOptions:{toolName:"DragProbe"},context:"CORNERSTONE"}],"Probe"),o.ToolbarService._createToggleButton("cine","tool-cine","Cine",[{commandName:"toggleCine",context:"CORNERSTONE"}],"Cine"),o.ToolbarService._createToolButton("Angle","tool-angle","Angle",[{commandName:"setToolActive",commandOptions:{toolName:"Angle"},context:"CORNERSTONE"}],"Angle"),o.ToolbarService._createToolButton("Rectangle","tool-rectangle","Rectangle",[{commandName:"setToolActive",commandOptions:{toolName:"RectangleROI"},context:"CORNERSTONE"}],"Rectangle"),o.ToolbarService._createActionButton("TagBrowser","list-bullets","Dicom Tag Browser",[{commandName:"openDICOMTagViewer",commandOptions:{},context:"DEFAULT"}],"Dicom Tag Browser")]}}],u=["SM","ECG","SR","SEG"],N="@ohif/extension-default.layoutTemplateModule.viewerLayout",T="@ohif/extension-default.sopClassHandlerModule.stack",g="@ohif/extension-measurement-tracking.panelModule.trackedMeasurements",S="@ohif/extension-measurement-tracking.panelModule.seriesList",R="@ohif/extension-measurement-tracking.viewportModule.cornerstone-tracked",v="@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr",O="@ohif/extension-cornerstone-dicom-sr.viewportModule.dicom-sr",f="@ohif/extension-dicom-video.sopClassHandlerModule.dicom-video",E="@ohif/extension-dicom-video.viewportModule.dicom-video",x="@ohif/extension-dicom-pdf.sopClassHandlerModule.dicom-pdf",y="@ohif/extension-dicom-pdf.viewportModule.dicom-pdf",b="@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg",h="@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg",C="@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentation",A={"@ohif/extension-default":"^3.0.0","@ohif/extension-cornerstone":"^3.0.0","@ohif/extension-measurement-tracking":"^3.0.0","@ohif/extension-cornerstone-dicom-sr":"^3.0.0","@ohif/extension-cornerstone-dicom-seg":"^3.0.0","@ohif/extension-dicom-pdf":"^3.0.1","@ohif/extension-dicom-video":"^3.0.1","@ohif/extension-test":"^0.0.1"};const M={id:r,modeFactory:function(){return{id:r,routeName:"basic-test",displayName:"Basic Test Mode",onModeEnter:o=>{let{servicesManager:e,extensionManager:t,commandsManager:n}=o;const{measurementService:i,toolbarService:l,toolGroupService:r,customizationService:s}=e.services;let m;i.clearMeasurements(),c(t,r,n),s.addModeCustomizations(["@ohif/extension-test.customizationModule.custom-context-menu"]),l.setDefaultTool({groupId:"WindowLevel",itemId:"WindowLevel",interactionType:"tool",commands:[{commandName:"setToolActive",commandOptions:{toolName:"WindowLevel"},context:"CORNERSTONE"}]});({unsubscribe:m}=r.subscribe(r.EVENTS.VIEWPORT_ADDED,(()=>{l.recordInteraction(l.getDefaultTool()),m()}))),l.init(t),l.addButtons([...a,...d,...p]),l.createButtonSection("default",["MeasurementTools","Zoom","WindowLevel","Pan","Capture","Layout","MPR","MoreTools"]),l.createButtonSection("mpr",["MeasurementTools","Zoom","WindowLevel","Pan","Capture","Layout","MPR","Crosshairs","MoreToolsMpr"])},onModeExit:o=>{let{servicesManager:e}=o;const{toolGroupService:t,syncGroupService:n,segmentationService:a,cornerstoneViewportService:i}=e.services;t.destroy(),n.destroy(),a.destroy(),i.destroy()},validationTags:{study:[],series:[]},isValidMode:function(o){let{modalities:e}=o;return!!e.split("\\").filter((o=>-1===u.indexOf(o))).length},routes:[{path:"basic-test",layoutTemplate:()=>({id:N,props:{leftPanels:[S],rightPanels:[C,g],viewports:[{namespace:R,displaySetsToDisplay:[T]},{namespace:O,displaySetsToDisplay:[v]},{namespace:E,displaySetsToDisplay:[f]},{namespace:y,displaySetsToDisplay:[x]},{namespace:h,displaySetsToDisplay:[b]}]}})}],extensions:A,hangingProtocol:"default",sopClassHandlers:[f,b,T,x,v],hotkeys:{name:"basic-test-hotkeys",hotkeys:[...o.hotkeys.defaults.hotkeyBindings]}}},extensionDependencies:A}})(),l=l.default})()));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ohif/mode-test",
3
- "version": "3.8.0-beta.5",
3
+ "version": "3.8.0-beta.7",
4
4
  "description": "Basic mode for testing",
5
5
  "author": "OHIF",
6
6
  "license": "MIT",
@@ -32,14 +32,14 @@
32
32
  "test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
33
33
  },
34
34
  "peerDependencies": {
35
- "@ohif/core": "3.8.0-beta.5",
36
- "@ohif/extension-cornerstone": "3.8.0-beta.5",
37
- "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.5",
38
- "@ohif/extension-default": "3.8.0-beta.5",
39
- "@ohif/extension-dicom-pdf": "3.8.0-beta.5",
40
- "@ohif/extension-dicom-video": "3.8.0-beta.5",
41
- "@ohif/extension-measurement-tracking": "3.8.0-beta.5",
42
- "@ohif/extension-test": "3.8.0-beta.5"
35
+ "@ohif/core": "3.8.0-beta.7",
36
+ "@ohif/extension-cornerstone": "3.8.0-beta.7",
37
+ "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.7",
38
+ "@ohif/extension-default": "3.8.0-beta.7",
39
+ "@ohif/extension-dicom-pdf": "3.8.0-beta.7",
40
+ "@ohif/extension-dicom-video": "3.8.0-beta.7",
41
+ "@ohif/extension-measurement-tracking": "3.8.0-beta.7",
42
+ "@ohif/extension-test": "3.8.0-beta.7"
43
43
  },
44
44
  "dependencies": {
45
45
  "@babel/runtime": "^7.20.13"