@ohif/mode-segmentation 3.8.0-beta.63 → 3.8.0-beta.64
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,2 +1,2 @@
|
|
|
1
|
-
!function(o,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@ohif/core"),require("@ohif/ui")):"function"==typeof define&&define.amd?define("@ohif/mode-segmentation",["@ohif/core","@ohif/ui"],e):"object"==typeof exports?exports["@ohif/mode-segmentation"]=e(require("@ohif/core"),require("@ohif/ui")):o["@ohif/mode-segmentation"]=e(o["@ohif/core"],o["@ohif/ui"])}("undefined"!=typeof self?self:this,((o,e)=>(()=>{"use strict";var t={498:e=>{e.exports=o},610:o=>{o.exports=e}},n={};function i(o){var e=n[o];if(void 0!==e)return e.exports;var r=n[o]={exports:{}};return t[o](r,r.exports,i),r.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),i.r=o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})};var r={};return(()=>{i.r(r),i.d(r,{default:()=>h});var o=i(498);const e=JSON.parse('{"UU":"@ohif/mode-segmentation"}').UU;var t=i(610);const{windowLevelPresets:n}=o.defaults;function a(o,e,t,n,i,r,a){return{id:e,icon:t,label:n,type:o,commands:i,tooltip:r,uiType:a}}const s=a.bind(null,"action"),l=a.bind(null,"toggle"),c=a.bind(null,"tool");function m(o,e,t){return{id:o.toString(),title:e,subtitle:t,type:"action",commands:[{commandName:"setWindowLevel",commandOptions:{...n[o]},context:"CORNERSTONE"}]}}const d=["default","mpr","SRToolGroup"];function p(o){return d.map((e=>({commandName:"setToolActive",commandOptions:{toolGroupId:e,toolName:o},context:"CORNERSTONE"})))}const u=[{id:"Zoom",type:"ohif.radioGroup",props:{type:"tool",icon:"tool-zoom",label:"Zoom",commands:p("Zoom")}},{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:t.WindowLevelMenuItem,items:[m(1,"Soft tissue","400 / 40"),m(2,"Lung","1500 / -600"),m(3,"Liver","150 / 90"),m(4,"Bone","2500 / 480"),m(5,"Brain","80 / 40")]}},{id:"Pan",type:"ohif.radioGroup",props:{type:"tool",icon:"tool-move",label:"Pan",commands:p("Pan")}},{id:"Capture",type:"ohif.action",props:{icon:"tool-capture",label:"Capture",type:"action",commands:[{commandName:"showDownloadViewportModal",commandOptions:{},context:"CORNERSTONE"}]}},{id:"Layout",type:"ohif.layoutSelector",props:{rows:3,columns:3}},{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:{toolName:"Crosshairs",toolGroupId:"mpr"},context:"CORNERSTONE"}]}},{id:"MoreTools",type:"ohif.splitButton",props:{isRadio:!0,groupId:"MoreTools",primary:s("Reset","tool-reset","Reset View",[{commandName:"resetViewport",commandOptions:{},context:"CORNERSTONE"}],"Reset"),secondary:{icon:"chevron-down",label:"",isActive:!0,tooltip:"More Tools"},items:[s("Reset","tool-reset","Reset View",[{commandName:"resetViewport",commandOptions:{},context:"CORNERSTONE"}],"Reset"),s("rotate-right","tool-rotate-right","Rotate Right",[{commandName:"rotateViewportCW",commandOptions:{},context:"CORNERSTONE"}],"Rotate +90"),s("flip-horizontal","tool-flip-horizontal","Flip Horizontally",[{commandName:"flipViewportHorizontal",commandOptions:{},context:"CORNERSTONE"}],"Flip Horizontal"),l("ImageSliceSync","link","Stack Image Sync",[{commandName:"toggleImageSliceSync",commandOptions:{},context:"CORNERSTONE"}]),l("ReferenceLines","tool-referenceLines","Reference Lines",[{commandName:"toggleReferenceLines",commandOptions:{},context:"CORNERSTONE"}]),c("StackScroll","tool-stack-scroll","Stack Scroll",[{commandName:"setToolActive",commandOptions:{toolName:"StackScroll"},context:"CORNERSTONE"}],"Stack Scroll"),s("invert","tool-invert","Invert",[{commandName:"invertViewport",commandOptions:{},context:"CORNERSTONE"}],"Invert Colors"),l("cine","tool-cine","Cine",[{commandName:"toggleCine",context:"CORNERSTONE"}],"Cine"),c("Magnify","tool-magnify","Magnify",[{commandName:"setToolActive",commandOptions:{toolName:"Magnify"},context:"CORNERSTONE"}],"Magnify"),s("TagBrowser","list-bullets","Dicom Tag Browser",[{commandName:"openDICOMTagViewer",commandOptions:{},context:"DEFAULT"}],"Dicom Tag Browser")]}}];function f(o){const{toolNames:e,Enums:t}=o.exports;return{active:[{toolName:e.WindowLevel,bindings:[{mouseButton:t.MouseBindings.Primary}]},{toolName:e.Pan,bindings:[{mouseButton:t.MouseBindings.Auxiliary}]},{toolName:e.Zoom,bindings:[{mouseButton:t.MouseBindings.Secondary}]},{toolName:e.StackScrollMouseWheel,bindings:[]}],passive:[{toolName:"CircularBrush",parentTool:"Brush",configuration:{activeStrategy:"FILL_INSIDE_CIRCLE"}},{toolName:"CircularEraser",parentTool:"Brush",configuration:{activeStrategy:"ERASE_INSIDE_CIRCLE"}},{toolName:"SphereBrush",parentTool:"Brush",configuration:{activeStrategy:"FILL_INSIDE_SPHERE"}},{toolName:"SphereEraser",parentTool:"Brush",configuration:{activeStrategy:"ERASE_INSIDE_SPHERE"}},{toolName:"ThresholdCircularBrush",parentTool:"Brush",configuration:{activeStrategy:"THRESHOLD_INSIDE_CIRCLE",strategySpecificConfiguration:{THRESHOLD:{threshold:[-500,500]}}}},{toolName:"ThresholdSphereBrush",parentTool:"Brush",configuration:{activeStrategy:"THRESHOLD_INSIDE_SPHERE",strategySpecificConfiguration:{THRESHOLD:{threshold:[-500,500]}}}},{toolName:e.CircleScissors},{toolName:e.RectangleScissors},{toolName:e.SphereScissors},{toolName:e.StackScroll},{toolName:e.Magnify},{toolName:e.SegmentationDisplay}],disabled:[{toolName:e.ReferenceLines}]}}const S="@ohif/extension-default.sopClassHandlerModule.stack",g="@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg",N={"@ohif/extension-default":"^3.0.0","@ohif/extension-cornerstone":"^3.0.0","@ohif/extension-cornerstone-dicom-seg":"^3.0.0"},h={id:e,modeFactory:function({modeConfiguration:t}){return{id:e,routeName:"segmentation",displayName:"Segmentation",onModeEnter:({servicesManager:o,extensionManager:e,commandsManager:t})=>{const{measurementService:n,toolbarService:i,toolGroupService:r}=o.services;let a;n.clearMeasurements(),function(o,e,t){!function(o,e,t,n){const i=f(o.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"));e.createToolGroupAndAddTools("default",i)}(o,e),function(o,e,t){const n=o.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),i=f(n);i.disabled.push({toolName:n.exports.toolNames.Crosshairs,configuration:{viewportIndicators:!1,autoPan:{enabled:!1,panSize:10}}},{toolName:n.exports.toolNames.ReferenceLines}),e.createToolGroupAndAddTools("mpr",i)}(o,e)}(e,r),({unsubscribe:a}=r.subscribe(r.EVENTS.VIEWPORT_ADDED,(()=>{i.recordInteraction({groupId:"WindowLevel",interactionType:"tool",commands:[{commandName:"setToolActive",commandOptions:{toolName:"WindowLevel"},context:"CORNERSTONE"}]}),a()}))),i.init(e),i.addButtons(u),i.createButtonSection("primary",["Zoom","WindowLevel","Pan","Capture","Layout","MPR","Crosshairs","MoreTools"])},onModeExit:({servicesManager:o})=>{const{toolGroupService:e,syncGroupService:t,toolbarService:n,segmentationService:i,cornerstoneViewportService:r,uiDialogService:a,uiModalService:s}=o.services;a.dismissAll(),s.hide(),e.destroy(),t.destroy(),i.destroy(),r.destroy()},validationTags:{study:[],series:[]},isValidMode:({modalities:o})=>{const e=o.split("\\");return{valid:1!==e.length||!["SM","US","MG","OT","DOC","CR"].includes(e[0]),description:"The mode does not support studies that ONLY include the following modalities: SM, US, MG, OT, DOC, CR"}},routes:[{path:"template",layoutTemplate:({location:o,servicesManager:e})=>({id:"@ohif/extension-default.layoutTemplateModule.viewerLayout",props:{leftPanels:["@ohif/extension-default.panelModule.seriesList"],rightPanels:["@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentationWithTools"],viewports:[{namespace:"@ohif/extension-cornerstone.viewportModule.cornerstone",displaySetsToDisplay:[S]},{namespace:"@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg",displaySetsToDisplay:[g]}]}})}],extensions:N,sopClassHandlers:[S,g],hotkeys:[...o.hotkeys.defaults.hotkeyBindings]}},extensionDependencies:N}})(),r})()));
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o(require("@ohif/core"),require("@ohif/ui")):"function"==typeof define&&define.amd?define("@ohif/mode-segmentation",["@ohif/core","@ohif/ui"],o):"object"==typeof exports?exports["@ohif/mode-segmentation"]=o(require("@ohif/core"),require("@ohif/ui")):e["@ohif/mode-segmentation"]=o(e["@ohif/core"],e["@ohif/ui"])}("undefined"!=typeof self?self:this,((e,o)=>(()=>{"use strict";var a={498:o=>{o.exports=e},610:e=>{e.exports=o}},t={};function r(e){var o=t[e];if(void 0!==o)return o.exports;var i=t[e]={exports:{}};return a[e](i,i.exports,r),i.exports}r.d=(e,o)=>{for(var a in o)r.o(o,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:o[a]})},r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{r.r(i),r.d(i,{default:()=>v});var e=r(498);const o=JSON.parse('{"UU":"@ohif/mode-segmentation"}').UU;var a=r(610);const{windowLevelPresets:t}=e.defaults;function n(e,o,a){return{id:e.toString(),title:o,subtitle:a,commands:[{commandName:"setWindowLevel",commandOptions:{...t[e]},context:"CORNERSTONE"}]}}function s(e,o=["default","mpr","SRToolGroup"]){return o.map((o=>({commandName:"setToolActive",commandOptions:{toolGroupId:o,toolName:e},context:"CORNERSTONE"})))}const l=[{id:"Zoom",uiType:"ohif.radioGroup",props:{icon:"tool-zoom",label:"Zoom",commands:s("Zoom"),evaluate:"evaluate.cornerstoneTool"}},{id:"WindowLevel",uiType:"ohif.splitButton",props:{groupId:"WindowLevel",primary:e.ToolbarService.createButton({id:"WindowLevel",icon:"tool-window-level",label:"Window Level",tooltip:"Window Level",commands:s("WindowLevel"),evaluate:"evaluate.cornerstoneTool"}),secondary:{icon:"chevron-down",tooltip:"W/L Presets"},renderer:a.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",uiType:"ohif.radioGroup",props:{icon:"tool-move",label:"Pan",commands:s("Pan"),evaluate:"evaluate.cornerstoneTool"}},{id:"Capture",uiType:"ohif.radioGroup",props:{icon:"tool-capture",label:"Capture",commands:[{commandName:"showDownloadViewportModal",context:"CORNERSTONE"}],evaluate:"evaluate.action"}},{id:"Layout",uiType:"ohif.layoutSelector",props:{rows:3,columns:3,evaluate:"evaluate.action",commands:[{commandName:"setViewportGridLayout"}]}},{id:"MPR",uiType:"ohif.radioGroup",props:{icon:"icon-mpr",label:"MPR",commands:[{commandName:"toggleHangingProtocol",commandOptions:{protocolId:"mpr"},context:"DEFAULT"}],evaluate:"evaluate.mpr"}},{id:"Crosshairs",uiType:"ohif.radioGroup",props:{icon:"tool-crosshair",label:"Crosshairs",commands:s("Crosshairs",["mpr"]),evaluate:"evaluate.cornerstoneTool"}},{id:"MoreTools",uiType:"ohif.splitButton",props:{groupId:"MoreTools",evaluate:"evaluate.group.promoteToPrimaryIfCornerstoneToolNotActiveInTheList",primary:e.ToolbarService.createButton({id:"Reset",icon:"tool-reset",label:"Reset View",tooltip:"Reset",commands:[{commandName:"resetViewport",context:"CORNERSTONE"}],evaluate:"evaluate.action"}),secondary:{icon:"chevron-down",tooltip:"More Tools"},items:[e.ToolbarService.createButton({id:"RotateRight",icon:"tool-rotate-right",label:"Rotate Right",tooltip:"Rotate +90",commands:[{commandName:"rotateViewportCW",context:"CORNERSTONE"}],evaluate:"evaluate.action"}),e.ToolbarService.createButton({id:"FlipHorizontal",icon:"tool-flip-horizontal",label:"Flip Horizontally",tooltip:"Flip Horizontal",commands:[{commandName:"flipViewportHorizontal",context:"CORNERSTONE"}],evaluate:"evaluate.action"}),e.ToolbarService.createButton({id:"StackScroll",icon:"tool-stack-scroll",label:"Stack Scroll",tooltip:"Stack Scroll",commands:s("StackScroll"),evaluate:"evaluate.cornerstoneTool"}),e.ToolbarService.createButton({id:"Magnify",icon:"tool-magnify",label:"Magnify",tooltip:"Magnify",commands:s("Magnify"),evaluate:"evaluate.cornerstoneTool"}),e.ToolbarService.createButton({id:"Invert",icon:"tool-invert",label:"Invert",tooltip:"Invert Colors",commands:[{commandName:"invertViewport",context:"CORNERSTONE"}],evaluate:"evaluate.action"}),e.ToolbarService.createButton({id:"Cine",icon:"tool-cine",label:"Cine",tooltip:"Cine",commands:[{commandName:"toggleCine",context:"CORNERSTONE"}],evaluate:"evaluate.action"}),e.ToolbarService.createButton({id:"DicomTagBrowser",icon:"list-bullets",label:"Dicom Tag Browser",tooltip:"Dicom Tag Browser",commands:[{commandName:"openDICOMTagViewer",context:"DEFAULT"}],evaluate:"evaluate.action"})]}}];function c(e){return[{commandName:"setToolActive",commandOptions:{toolName:e}}]}const u=[{id:"BrushTools",uiType:"ohif.buttonGroup",props:{groupId:"BrushTools",items:[{id:"Brush",icon:"icon-tool-brush",label:"Brush",evaluate:{name:"evaluate.cornerstone.segmentation",options:{toolNames:["CircularBrush","SphereBrush"]}},commands:c("CircularBrush"),options:[{name:"Radius (mm)",id:"brush-radius",type:"range",min:.5,max:99.5,step:.5,value:25,commands:{commandName:"setBrushSize",commandOptions:{toolNames:["CircularBrush","SphereBrush"]}}},{name:"Shape",type:"radio",id:"brush-mode",value:"CircularBrush",values:[{value:"CircularBrush",label:"Circle"},{value:"SphereBrush",label:"Sphere"}],commands:"setToolActiveToolbar"}]},{id:"Eraser",icon:"icon-tool-eraser",label:"Eraser",evaluate:{name:"evaluate.cornerstone.segmentation",options:{toolNames:["CircularEraser","SphereEraser"]}},commands:c("CircularEraser"),options:[{name:"Radius (mm)",id:"eraser-radius",type:"range",min:.5,max:99.5,step:.5,value:25,commands:{commandName:"setBrushSize",commandOptions:{toolNames:["CircularEraser","SphereEraser"]}}},{name:"Shape",type:"radio",id:"eraser-mode",value:"CircularEraser",values:[{value:"CircularEraser",label:"Circle"},{value:"SphereEraser",label:"Sphere"}],commands:"setToolActiveToolbar"}]},{id:"Threshold",icon:"icon-tool-threshold",label:"Eraser",evaluate:{name:"evaluate.cornerstone.segmentation",options:{toolNames:["ThresholdCircularBrush","ThresholdSphereBrush"]}},commands:c("ThresholdCircularBrush"),options:[{name:"Radius (mm)",id:"threshold-radius",type:"range",min:.5,max:99.5,step:.5,value:25,commands:{commandName:"setBrushSize",commandOptions:{toolNames:["ThresholdCircularBrush","ThresholdSphereBrush"]}}},{name:"Shape",type:"radio",id:"eraser-mode",value:"ThresholdCircularBrush",values:[{value:"ThresholdCircularBrush",label:"Circle"},{value:"ThresholdSphereBrush",label:"Sphere"}],commands:"setToolActiveToolbar"},{name:"Threshold",type:"radio",id:"dynamic-mode",value:"ThresholdRange",values:[{value:"ThresholdDynamic",label:"Dynamic"},{value:"ThresholdRange",label:"Range"}],commands:{commandName:"toggleThresholdRangeAndDynamic"}},{name:"ThresholdRange",type:"double-range",id:"threshold-range",min:-1e3,max:1e3,step:1,values:[100,600],condition:({options:e})=>"ThresholdRange"===e.find((e=>"dynamic-mode"===e.id)).value,commands:{commandName:"setThresholdRange",commandOptions:{toolNames:["ThresholdCircularBrush","ThresholdSphereBrush"]}}}]}]}},{id:"Shapes",uiType:"ohif.radioGroup",props:{label:"Shapes",evaluate:{name:"evaluate.cornerstone.segmentation",options:{toolNames:["CircleScissor","SphereScissor","RectangleScissor"]}},icon:"icon-tool-shape",commands:c("CircleScissor"),options:[{name:"Shape",type:"radio",value:"CircleScissor",id:"shape-mode",values:[{value:"CircleScissor",label:"Circle"},{value:"SphereScissor",label:"Sphere"},{value:"RectangleScissor",label:"Rectangle"}],commands:"setToolActiveToolbar"}]}}];function m(e){const{toolNames:o,Enums:a}=e.exports;return{active:[{toolName:o.WindowLevel,bindings:[{mouseButton:a.MouseBindings.Primary}]},{toolName:o.Pan,bindings:[{mouseButton:a.MouseBindings.Auxiliary}]},{toolName:o.Zoom,bindings:[{mouseButton:a.MouseBindings.Secondary}]},{toolName:o.StackScrollMouseWheel,bindings:[]}],passive:[{toolName:"CircularBrush",parentTool:"Brush",configuration:{activeStrategy:"FILL_INSIDE_CIRCLE"}},{toolName:"CircularEraser",parentTool:"Brush",configuration:{activeStrategy:"ERASE_INSIDE_CIRCLE"}},{toolName:"SphereBrush",parentTool:"Brush",configuration:{activeStrategy:"FILL_INSIDE_SPHERE"}},{toolName:"SphereEraser",parentTool:"Brush",configuration:{activeStrategy:"ERASE_INSIDE_SPHERE"}},{toolName:"ThresholdCircularBrush",parentTool:"Brush",configuration:{activeStrategy:"THRESHOLD_INSIDE_CIRCLE",dynamicRadius:3}},{toolName:"ThresholdSphereBrush",parentTool:"Brush",configuration:{activeStrategy:"THRESHOLD_INSIDE_SPHERE",dynamicRadius:3}},{toolName:o.CircleScissors},{toolName:o.RectangleScissors},{toolName:o.SphereScissors},{toolName:o.StackScroll},{toolName:o.Magnify},{toolName:o.SegmentationDisplay}],disabled:[{toolName:o.ReferenceLines}]}}const d="@ohif/extension-default.sopClassHandlerModule.stack",p="@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg",h={"@ohif/extension-default":"^3.0.0","@ohif/extension-cornerstone":"^3.0.0","@ohif/extension-cornerstone-dicom-seg":"^3.0.0"},v={id:o,modeFactory:function({modeConfiguration:a}){return{id:o,routeName:"segmentation",displayName:"Segmentation",onModeEnter:({servicesManager:e,extensionManager:o,commandsManager:a})=>{const{measurementService:t,toolbarService:r,toolGroupService:i}=e.services;t.clearMeasurements(),function(e,o,a){!function(e,o,a,t){const r=m(e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"));o.createToolGroupAndAddTools("default",r)}(e,o),function(e,o,a){const t=e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),r=m(t);r.disabled.push({toolName:t.exports.toolNames.Crosshairs,configuration:{viewportIndicators:!1,autoPan:{enabled:!1,panSize:10}}},{toolName:t.exports.toolNames.ReferenceLines}),o.createToolGroupAndAddTools("mpr",r)}(e,o)}(o,i),r.addButtons(l),r.addButtons(u),r.createButtonSection("primary",["Pan","Capture","Layout","MPR","Crosshairs","Zoom","MoreTools"]),r.createButtonSection("segmentationToolbox",["BrushTools","Shapes"])},onModeExit:({servicesManager:e})=>{const{toolGroupService:o,syncGroupService:a,toolbarService:t,segmentationService:r,cornerstoneViewportService:i,uiDialogService:n,uiModalService:s}=e.services;n.dismissAll(),s.hide(),o.destroy(),a.destroy(),r.destroy(),i.destroy()},validationTags:{study:[],series:[]},isValidMode:({modalities:e})=>{const o=e.split("\\");return{valid:1!==o.length||!["SM","US","MG","OT","DOC","CR"].includes(o[0]),description:"The mode does not support studies that ONLY include the following modalities: SM, US, MG, OT, DOC, CR"}},routes:[{path:"template",layoutTemplate:({location:e,servicesManager:o})=>({id:"@ohif/extension-default.layoutTemplateModule.viewerLayout",props:{leftPanels:["@ohif/extension-default.panelModule.seriesList"],rightPanels:["@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentationWithTools"],viewports:[{namespace:"@ohif/extension-cornerstone.viewportModule.cornerstone",displaySetsToDisplay:[d]},{namespace:"@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg",displaySetsToDisplay:[p]}]}})}],extensions:h,sopClassHandlers:[d,p],hotkeys:[...e.hotkeys.defaults.hotkeyBindings]}},extensionDependencies:h}})(),i})()));
|
|
2
2
|
//# sourceMappingURL=index.umd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,cAAeA,QAAQ,aAC/B,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,0BAA2B,CAAC,aAAc,YAAaJ,GACpC,iBAAZC,QACdA,QAAQ,2BAA6BD,EAAQG,QAAQ,cAAeA,QAAQ,aAE5EJ,EAAK,2BAA6BC,EAAQD,EAAK,cAAeA,EAAK,YACpE,CATD,CASmB,oBAATO,KAAuBA,KAAOC,MAAM,CAACC,EAAkCC,I,kCCTjFP,EAAOD,QAAUO,C,UCAjBN,EAAOD,QAAUQ,C,GCCbC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaZ,QAGrB,IAAIC,EAASQ,EAAyBE,GAAY,CAGjDX,QAAS,CAAC,GAOX,OAHAc,EAAoBH,GAAUV,EAAQA,EAAOD,QAASU,GAG/CT,EAAOD,OACf,CCrBAU,EAAoBK,EAAI,CAACf,EAASgB,KACjC,IAAI,IAAIC,KAAOD,EACXN,EAAoBQ,EAAEF,EAAYC,KAASP,EAAoBQ,EAAElB,EAASiB,IAC5EE,OAAOC,eAAepB,EAASiB,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDP,EAAoBQ,EAAI,CAACK,EAAKC,IAAUL,O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AsB,CAAClE,UASrCmE,WAAYlE,EAIZmE,iBAAkB,CAACrE,EAAsBC,GAEzCqE,QAAS,IAAIA,EAAAA,QAAQ1I,SAAS2I,gBAElC,EAKErE,wB","sources":["webpack://@ohif/mode-segmentation/webpack/universalModuleDefinition","webpack://@ohif/mode-segmentation/external umd {\"commonjs2\":\"@ohif/core\",\"commonjs\":\"@ohif/core\",\"amd\":\"@ohif/core\",\"root\":\"@ohif/core\"}","webpack://@ohif/mode-segmentation/external umd {\"commonjs2\":\"@ohif/ui\",\"commonjs\":\"@ohif/ui\",\"amd\":\"@ohif/ui\",\"root\":\"@ohif/ui\"}","webpack://@ohif/mode-segmentation/webpack/bootstrap","webpack://@ohif/mode-segmentation/webpack/runtime/define property getters","webpack://@ohif/mode-segmentation/webpack/runtime/hasOwnProperty shorthand","webpack://@ohif/mode-segmentation/webpack/runtime/make namespace object","webpack://@ohif/mode-segmentation/./src/id.js","webpack://@ohif/mode-segmentation/./src/toolbarButtons.ts","webpack://@ohif/mode-segmentation/./src/initToolGroups.ts","webpack://@ohif/mode-segmentation/./src/index.tsx"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@ohif/core\"), require(\"@ohif/ui\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"@ohif/mode-segmentation\", [\"@ohif/core\", \"@ohif/ui\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@ohif/mode-segmentation\"] = factory(require(\"@ohif/core\"), require(\"@ohif/ui\"));\n\telse\n\t\troot[\"@ohif/mode-segmentation\"] = factory(root[\"@ohif/core\"], root[\"@ohif/ui\"]);\n})(typeof self !== 'undefined' ? self : this, (__WEBPACK_EXTERNAL_MODULE__498__, __WEBPACK_EXTERNAL_MODULE__610__) => {\nreturn ","module.exports = __WEBPACK_EXTERNAL_MODULE__498__;","module.exports = __WEBPACK_EXTERNAL_MODULE__610__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import packageJson from '../package.json';\n\nconst id = packageJson.name;\n\nexport { id };\n","import {\n // ExpandableToolbarButton,\n // ListMenu,\n WindowLevelMenuItem,\n} from '@ohif/ui';\nimport { defaults } from '@ohif/core';\n\nconst { windowLevelPresets } = defaults;\n/**\n *\n * @param {*} type - 'tool' | 'action' | 'toggle'\n * @param {*} id\n * @param {*} icon\n * @param {*} label\n */\nfunction _createButton(type, id, icon, label, commands, tooltip, uiType) {\n return {\n id,\n icon,\n label,\n type,\n commands,\n tooltip,\n uiType,\n };\n}\n\nconst _createActionButton = _createButton.bind(null, 'action');\nconst _createToggleButton = _createButton.bind(null, 'toggle');\nconst _createToolButton = _createButton.bind(null, 'tool');\n\n/**\n *\n * @param {*} preset - preset number (from above import)\n * @param {*} title\n * @param {*} subtitle\n */\nfunction _createWwwcPreset(preset, title, subtitle) {\n return {\n id: preset.toString(),\n title,\n subtitle,\n type: 'action',\n commands: [\n {\n commandName: 'setWindowLevel',\n commandOptions: {\n ...windowLevelPresets[preset],\n },\n context: 'CORNERSTONE',\n },\n ],\n };\n}\n\nconst toolGroupIds = ['default', 'mpr', 'SRToolGroup'];\n\n/**\n * Creates an array of 'setToolActive' commands for the given toolName - one for\n * each toolGroupId specified in toolGroupIds.\n * @param {string} toolName\n * @returns {Array} an array of 'setToolActive' commands\n */\nfunction _createSetToolActiveCommands(toolName) {\n const temp = toolGroupIds.map(toolGroupId => ({\n commandName: 'setToolActive',\n commandOptions: {\n toolGroupId,\n toolName,\n },\n context: 'CORNERSTONE',\n }));\n return temp;\n}\n\nconst toolbarButtons = [\n // Zoom..\n {\n id: 'Zoom',\n type: 'ohif.radioGroup',\n props: {\n type: 'tool',\n icon: 'tool-zoom',\n label: 'Zoom',\n commands: _createSetToolActiveCommands('Zoom'),\n },\n },\n // Window Level + Presets...\n {\n id: 'WindowLevel',\n type: 'ohif.splitButton',\n props: {\n groupId: 'WindowLevel',\n primary: _createToolButton(\n 'WindowLevel',\n 'tool-window-level',\n 'Window Level',\n [\n {\n commandName: 'setToolActive',\n commandOptions: {\n toolName: 'WindowLevel',\n },\n context: 'CORNERSTONE',\n },\n ],\n 'Window Level'\n ),\n secondary: {\n icon: 'chevron-down',\n label: 'W/L Manual',\n isActive: true,\n tooltip: 'W/L Presets',\n },\n isAction: true, // ?\n renderer: WindowLevelMenuItem,\n items: [\n _createWwwcPreset(1, 'Soft tissue', '400 / 40'),\n _createWwwcPreset(2, 'Lung', '1500 / -600'),\n _createWwwcPreset(3, 'Liver', '150 / 90'),\n _createWwwcPreset(4, 'Bone', '2500 / 480'),\n _createWwwcPreset(5, 'Brain', '80 / 40'),\n ],\n },\n },\n // Pan...\n {\n id: 'Pan',\n type: 'ohif.radioGroup',\n props: {\n type: 'tool',\n icon: 'tool-move',\n label: 'Pan',\n commands: _createSetToolActiveCommands('Pan'),\n },\n },\n {\n id: 'Capture',\n type: 'ohif.action',\n props: {\n icon: 'tool-capture',\n label: 'Capture',\n type: 'action',\n commands: [\n {\n commandName: 'showDownloadViewportModal',\n commandOptions: {},\n context: 'CORNERSTONE',\n },\n ],\n },\n },\n {\n id: 'Layout',\n type: 'ohif.layoutSelector',\n props: {\n rows: 3,\n columns: 3,\n },\n },\n {\n id: 'MPR',\n type: 'ohif.action',\n props: {\n type: 'toggle',\n icon: 'icon-mpr',\n label: 'MPR',\n commands: [\n {\n commandName: 'toggleHangingProtocol',\n commandOptions: {\n protocolId: 'mpr',\n },\n context: 'DEFAULT',\n },\n ],\n },\n },\n {\n id: 'Crosshairs',\n type: 'ohif.radioGroup',\n props: {\n type: 'tool',\n icon: 'tool-crosshair',\n label: 'Crosshairs',\n commands: [\n {\n commandName: 'setToolActive',\n commandOptions: {\n toolName: 'Crosshairs',\n toolGroupId: 'mpr',\n },\n context: 'CORNERSTONE',\n },\n ],\n },\n },\n // More...\n {\n id: 'MoreTools',\n type: 'ohif.splitButton',\n props: {\n isRadio: true, // ?\n groupId: 'MoreTools',\n primary: _createActionButton(\n 'Reset',\n 'tool-reset',\n 'Reset View',\n [\n {\n commandName: 'resetViewport',\n commandOptions: {},\n context: 'CORNERSTONE',\n },\n ],\n 'Reset'\n ),\n secondary: {\n icon: 'chevron-down',\n label: '',\n isActive: true,\n tooltip: 'More Tools',\n },\n items: [\n _createActionButton(\n 'Reset',\n 'tool-reset',\n 'Reset View',\n [\n {\n commandName: 'resetViewport',\n commandOptions: {},\n context: 'CORNERSTONE',\n },\n ],\n 'Reset'\n ),\n _createActionButton(\n 'rotate-right',\n 'tool-rotate-right',\n 'Rotate Right',\n [\n {\n commandName: 'rotateViewportCW',\n commandOptions: {},\n context: 'CORNERSTONE',\n },\n ],\n 'Rotate +90'\n ),\n _createActionButton(\n 'flip-horizontal',\n 'tool-flip-horizontal',\n 'Flip Horizontally',\n [\n {\n commandName: 'flipViewportHorizontal',\n commandOptions: {},\n context: 'CORNERSTONE',\n },\n ],\n 'Flip Horizontal'\n ),\n _createToggleButton('ImageSliceSync', 'link', 'Stack Image Sync', [\n {\n commandName: 'toggleImageSliceSync',\n commandOptions: {},\n context: 'CORNERSTONE',\n },\n ]),\n _createToggleButton(\n 'ReferenceLines',\n 'tool-referenceLines', // change this with the new icon\n 'Reference Lines',\n [\n {\n commandName: 'toggleReferenceLines',\n commandOptions: {},\n context: 'CORNERSTONE',\n },\n ]\n ),\n _createToolButton(\n 'StackScroll',\n 'tool-stack-scroll',\n 'Stack Scroll',\n [\n {\n commandName: 'setToolActive',\n commandOptions: {\n toolName: 'StackScroll',\n },\n context: 'CORNERSTONE',\n },\n ],\n 'Stack Scroll'\n ),\n _createActionButton(\n 'invert',\n 'tool-invert',\n 'Invert',\n [\n {\n commandName: 'invertViewport',\n commandOptions: {},\n context: 'CORNERSTONE',\n },\n ],\n 'Invert Colors'\n ),\n _createToggleButton(\n 'cine',\n 'tool-cine',\n 'Cine',\n [\n {\n commandName: 'toggleCine',\n context: 'CORNERSTONE',\n },\n ],\n 'Cine'\n ),\n _createToolButton(\n 'Magnify',\n 'tool-magnify',\n 'Magnify',\n [\n {\n commandName: 'setToolActive',\n commandOptions: {\n toolName: 'Magnify',\n },\n context: 'CORNERSTONE',\n },\n ],\n 'Magnify'\n ),\n _createActionButton(\n 'TagBrowser',\n 'list-bullets',\n 'Dicom Tag Browser',\n [\n {\n commandName: 'openDICOMTagViewer',\n commandOptions: {},\n context: 'DEFAULT',\n },\n ],\n 'Dicom Tag Browser'\n ),\n ],\n },\n },\n];\n\nexport default toolbarButtons;\n","function createTools(utilityModule) {\n const { toolNames, Enums } = utilityModule.exports;\n return {\n active: [\n { toolName: toolNames.WindowLevel, bindings: [{ mouseButton: Enums.MouseBindings.Primary }] },\n { toolName: toolNames.Pan, bindings: [{ mouseButton: Enums.MouseBindings.Auxiliary }] },\n { toolName: toolNames.Zoom, bindings: [{ mouseButton: Enums.MouseBindings.Secondary }] },\n { toolName: toolNames.StackScrollMouseWheel, bindings: [] },\n ],\n passive: [\n {\n toolName: 'CircularBrush',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'FILL_INSIDE_CIRCLE',\n },\n },\n {\n toolName: 'CircularEraser',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'ERASE_INSIDE_CIRCLE',\n },\n },\n {\n toolName: 'SphereBrush',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'FILL_INSIDE_SPHERE',\n },\n },\n {\n toolName: 'SphereEraser',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'ERASE_INSIDE_SPHERE',\n },\n },\n {\n toolName: 'ThresholdCircularBrush',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'THRESHOLD_INSIDE_CIRCLE',\n strategySpecificConfiguration: {\n THRESHOLD: {\n threshold: [-500, 500],\n },\n },\n },\n },\n {\n toolName: 'ThresholdSphereBrush',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'THRESHOLD_INSIDE_SPHERE',\n strategySpecificConfiguration: {\n THRESHOLD: {\n threshold: [-500, 500],\n },\n },\n },\n },\n { toolName: toolNames.CircleScissors },\n { toolName: toolNames.RectangleScissors },\n { toolName: toolNames.SphereScissors },\n { toolName: toolNames.StackScroll },\n { toolName: toolNames.Magnify },\n { toolName: toolNames.SegmentationDisplay },\n ],\n disabled: [{ toolName: toolNames.ReferenceLines }],\n };\n}\n\nfunction initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, toolGroupId) {\n const utilityModule = extensionManager.getModuleEntry(\n '@ohif/extension-cornerstone.utilityModule.tools'\n );\n const tools = createTools(utilityModule);\n toolGroupService.createToolGroupAndAddTools(toolGroupId, tools);\n}\n\nfunction initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {\n const utilityModule = extensionManager.getModuleEntry(\n '@ohif/extension-cornerstone.utilityModule.tools'\n );\n const tools = createTools(utilityModule);\n tools.disabled.push(\n {\n toolName: utilityModule.exports.toolNames.Crosshairs,\n configuration: {\n viewportIndicators: false,\n autoPan: {\n enabled: false,\n panSize: 10,\n },\n },\n },\n { toolName: utilityModule.exports.toolNames.ReferenceLines }\n );\n toolGroupService.createToolGroupAndAddTools('mpr', tools);\n}\n\nfunction initToolGroups(extensionManager, toolGroupService, commandsManager) {\n initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, 'default');\n initMPRToolGroup(extensionManager, toolGroupService, commandsManager);\n}\n\nexport default initToolGroups;\n","import { hotkeys } from '@ohif/core';\nimport { id } from './id';\nimport toolbarButtons from './toolbarButtons';\nimport initToolGroups from './initToolGroups';\n\nconst ohif = {\n layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',\n sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',\n hangingProtocol: '@ohif/extension-default.hangingProtocolModule.default',\n leftPanel: '@ohif/extension-default.panelModule.seriesList',\n rightPanel: '@ohif/extension-default.panelModule.measure',\n};\n\nconst cornerstone = {\n viewport: '@ohif/extension-cornerstone.viewportModule.cornerstone',\n};\n\nconst segmentation = {\n panel: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentation',\n panelTool: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentationWithTools',\n sopClassHandler: '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',\n viewport: '@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg',\n};\n\n/**\n * Just two dependencies to be able to render a viewport with panels in order\n * to make sure that the mode is working.\n */\nconst extensionDependencies = {\n '@ohif/extension-default': '^3.0.0',\n '@ohif/extension-cornerstone': '^3.0.0',\n '@ohif/extension-cornerstone-dicom-seg': '^3.0.0',\n};\n\nfunction modeFactory({ modeConfiguration }) {\n return {\n /**\n * Mode ID, which should be unique among modes used by the viewer. This ID\n * is used to identify the mode in the viewer's state.\n */\n id,\n routeName: 'segmentation',\n /**\n * Mode name, which is displayed in the viewer's UI in the workList, for the\n * user to select the mode.\n */\n displayName: 'Segmentation',\n /**\n * Runs when the Mode Route is mounted to the DOM. Usually used to initialize\n * Services and other resources.\n */\n onModeEnter: ({ servicesManager, extensionManager, commandsManager }) => {\n const { measurementService, toolbarService, toolGroupService } = servicesManager.services;\n\n measurementService.clearMeasurements();\n\n // Init Default and SR ToolGroups\n initToolGroups(extensionManager, toolGroupService, commandsManager);\n\n let unsubscribe;\n\n const activateTool = () => {\n toolbarService.recordInteraction({\n groupId: 'WindowLevel',\n interactionType: 'tool',\n commands: [\n {\n commandName: 'setToolActive',\n commandOptions: {\n toolName: 'WindowLevel',\n },\n context: 'CORNERSTONE',\n },\n ],\n });\n\n // We don't need to reset the active tool whenever a viewport is getting\n // added to the toolGroup.\n unsubscribe();\n };\n\n // Since we only have one viewport for the basic cs3d mode and it has\n // only one hanging protocol, we can just use the first viewport\n ({ unsubscribe } = toolGroupService.subscribe(\n toolGroupService.EVENTS.VIEWPORT_ADDED,\n activateTool\n ));\n\n toolbarService.init(extensionManager);\n toolbarService.addButtons(toolbarButtons);\n toolbarService.createButtonSection('primary', [\n 'Zoom',\n 'WindowLevel',\n 'Pan',\n 'Capture',\n 'Layout',\n 'MPR',\n 'Crosshairs',\n 'MoreTools',\n ]);\n },\n onModeExit: ({ servicesManager }) => {\n const {\n toolGroupService,\n syncGroupService,\n toolbarService,\n segmentationService,\n cornerstoneViewportService,\n uiDialogService,\n uiModalService,\n } = servicesManager.services;\n\n uiDialogService.dismissAll();\n uiModalService.hide();\n toolGroupService.destroy();\n syncGroupService.destroy();\n segmentationService.destroy();\n cornerstoneViewportService.destroy();\n },\n /** */\n validationTags: {\n study: [],\n series: [],\n },\n /**\n * A boolean return value that indicates whether the mode is valid for the\n * modalities of the selected studies. Currently we don't have stack viewport\n * segmentations and we should exclude them\n */\n isValidMode: ({ modalities }) => {\n // Don't show the mode if the selected studies have only one modality\n // that is not supported by the mode\n const modalitiesArray = modalities.split('\\\\');\n return {\n valid: modalitiesArray.length === 1 ? !['SM', 'US', 'MG', 'OT', 'DOC', 'CR'].includes(modalitiesArray[0]) : true,\n description: 'The mode does not support studies that ONLY include the following modalities: SM, US, MG, OT, DOC, CR',\n }\n },\n /**\n * Mode Routes are used to define the mode's behavior. A list of Mode Route\n * that includes the mode's path and the layout to be used. The layout will\n * include the components that are used in the layout. For instance, if the\n * default layoutTemplate is used (id: '@ohif/extension-default.layoutTemplateModule.viewerLayout')\n * it will include the leftPanels, rightPanels, and viewports. However, if\n * you define another layoutTemplate that includes a Footer for instance,\n * you should provide the Footer component here too. Note: We use Strings\n * to reference the component's ID as they are registered in the internal\n * ExtensionManager. The template for the string is:\n * `${extensionId}.{moduleType}.${componentId}`.\n */\n routes: [\n {\n path: 'template',\n layoutTemplate: ({ location, servicesManager }) => {\n return {\n id: ohif.layout,\n props: {\n leftPanels: [ohif.leftPanel],\n rightPanels: [segmentation.panelTool],\n viewports: [\n {\n namespace: cornerstone.viewport,\n displaySetsToDisplay: [ohif.sopClassHandler],\n },\n {\n namespace: segmentation.viewport,\n displaySetsToDisplay: [segmentation.sopClassHandler],\n },\n ],\n },\n };\n },\n },\n ],\n /** List of extensions that are used by the mode */\n extensions: extensionDependencies,\n /** HangingProtocol used by the mode */\n // hangingProtocol: [''],\n /** SopClassHandlers used by the mode */\n sopClassHandlers: [ohif.sopClassHandler, segmentation.sopClassHandler],\n /** hotkeys for mode */\n hotkeys: [...hotkeys.defaults.hotkeyBindings],\n };\n}\n\nconst mode = {\n id,\n modeFactory,\n extensionDependencies,\n};\n\nexport default mode;\n"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE__498__","__WEBPACK_EXTERNAL_MODULE__610__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","id","packageJson","windowLevelPresets","defaults","_createButton","type","icon","label","commands","tooltip","uiType","_createActionButton","bind","_createToggleButton","_createToolButton","_createWwwcPreset","preset","title","subtitle","toString","commandName","commandOptions","context","toolGroupIds","_createSetToolActiveCommands","toolName","map","toolGroupId","props","groupId","primary","secondary","isActive","isAction","renderer","WindowLevelMenuItem","items","rows","columns","protocolId","isRadio","createTools","utilityModule","toolNames","Enums","active","WindowLevel","bindings","mouseButton","MouseBindings","Primary","Pan","Auxiliary","Zoom","Secondary","StackScrollMouseWheel","passive","parentTool","configuration","activeStrategy","strategySpecificConfiguration","THRESHOLD","threshold","CircleScissors","RectangleScissors","SphereScissors","StackScroll","Magnify","SegmentationDisplay","disabled","ReferenceLines","ohif","segmentation","extensionDependencies","modeFactory","modeConfiguration","routeName","displayName","onModeEnter","servicesManager","extensionManager","commandsManager","measurementService","toolbarService","toolGroupService","services","unsubscribe","clearMeasurements","tools","getModuleEntry","createToolGroupAndAddTools","initDefaultToolGroup","push","Crosshairs","viewportIndicators","autoPan","enabled","panSize","initMPRToolGroup","initToolGroups","subscribe","EVENTS","VIEWPORT_ADDED","activateTool","recordInteraction","interactionType","init","addButtons","toolbarButtons","createButtonSection","onModeExit","syncGroupService","segmentationService","cornerstoneViewportService","uiDialogService","uiModalService","dismissAll","hide","destroy","validationTags","study","series","isValidMode","modalities","modalitiesArray","split","valid","length","includes","description","routes","path","layoutTemplate","location","leftPanels","rightPanels","viewports","namespace","displaySetsToDisplay","extensions","sopClassHandlers","hotkeys","hotkeyBindings"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"index.umd.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,cAAeA,QAAQ,aAC/B,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,0BAA2B,CAAC,aAAc,YAAaJ,GACpC,iBAAZC,QACdA,QAAQ,2BAA6BD,EAAQG,QAAQ,cAAeA,QAAQ,aAE5EJ,EAAK,2BAA6BC,EAAQD,EAAK,cAAeA,EAAK,YACpE,CATD,CASmB,oBAATO,KAAuBA,KAAO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gd,gFAgHCC,UAAW,CACT,CACEC,UAvHN,yDAwHMC,qBAAsB,CAAC5D,IAEzB,CACE2D,UApHN,iEAqHMC,qBAAsB,CAAC3D,UASrC4D,WAAY3D,EAIZ4D,iBAAkB,CAAC9D,EAAsBC,GAEzC8D,QAAS,IAAIA,EAAAA,QAAQrI,SAASsI,gBAElC,EAKE9D,wB","sources":["webpack://@ohif/mode-segmentation/webpack/universalModuleDefinition","webpack://@ohif/mode-segmentation/external umd {\"commonjs2\":\"@ohif/core\",\"commonjs\":\"@ohif/core\",\"amd\":\"@ohif/core\",\"root\":\"@ohif/core\"}","webpack://@ohif/mode-segmentation/external umd {\"commonjs2\":\"@ohif/ui\",\"commonjs\":\"@ohif/ui\",\"amd\":\"@ohif/ui\",\"root\":\"@ohif/ui\"}","webpack://@ohif/mode-segmentation/webpack/bootstrap","webpack://@ohif/mode-segmentation/webpack/runtime/define property getters","webpack://@ohif/mode-segmentation/webpack/runtime/hasOwnProperty shorthand","webpack://@ohif/mode-segmentation/webpack/runtime/make namespace object","webpack://@ohif/mode-segmentation/./src/id.js","webpack://@ohif/mode-segmentation/./src/toolbarButtons.ts","webpack://@ohif/mode-segmentation/./src/segmentationButtons.ts","webpack://@ohif/mode-segmentation/./src/initToolGroups.ts","webpack://@ohif/mode-segmentation/./src/index.tsx"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"@ohif/core\"), require(\"@ohif/ui\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"@ohif/mode-segmentation\", [\"@ohif/core\", \"@ohif/ui\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@ohif/mode-segmentation\"] = factory(require(\"@ohif/core\"), require(\"@ohif/ui\"));\n\telse\n\t\troot[\"@ohif/mode-segmentation\"] = factory(root[\"@ohif/core\"], root[\"@ohif/ui\"]);\n})(typeof self !== 'undefined' ? self : this, (__WEBPACK_EXTERNAL_MODULE__498__, __WEBPACK_EXTERNAL_MODULE__610__) => {\nreturn ","module.exports = __WEBPACK_EXTERNAL_MODULE__498__;","module.exports = __WEBPACK_EXTERNAL_MODULE__610__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import packageJson from '../package.json';\n\nconst id = packageJson.name;\n\nexport { id };\n","import { defaults, ToolbarService } from '@ohif/core';\nimport type { Button } from '@ohif/core/types';\nimport { WindowLevelMenuItem } from '@ohif/ui';\n\nconst { windowLevelPresets } = defaults;\n\nfunction _createWwwcPreset(preset, title, subtitle) {\n return {\n id: preset.toString(),\n title,\n subtitle,\n commands: [\n {\n commandName: 'setWindowLevel',\n commandOptions: {\n ...windowLevelPresets[preset],\n },\n context: 'CORNERSTONE',\n },\n ],\n };\n}\n\nfunction _createSetToolActiveCommands(toolName, toolGroupIds = ['default', 'mpr', 'SRToolGroup']) {\n return toolGroupIds.map(toolGroupId => ({\n commandName: 'setToolActive',\n commandOptions: {\n toolGroupId,\n toolName,\n },\n context: 'CORNERSTONE',\n }));\n}\n\nconst toolbarButtons: Button[] = [\n {\n id: 'Zoom',\n uiType: 'ohif.radioGroup',\n props: {\n icon: 'tool-zoom',\n label: 'Zoom',\n commands: _createSetToolActiveCommands('Zoom'),\n evaluate: 'evaluate.cornerstoneTool',\n },\n },\n {\n id: 'WindowLevel',\n uiType: 'ohif.splitButton',\n props: {\n groupId: 'WindowLevel',\n primary: ToolbarService.createButton({\n id: 'WindowLevel',\n icon: 'tool-window-level',\n label: 'Window Level',\n tooltip: 'Window Level',\n commands: _createSetToolActiveCommands('WindowLevel'),\n evaluate: 'evaluate.cornerstoneTool',\n }),\n secondary: {\n icon: 'chevron-down',\n tooltip: 'W/L Presets',\n },\n renderer: WindowLevelMenuItem,\n items: [\n _createWwwcPreset(1, 'Soft tissue', '400 / 40'),\n _createWwwcPreset(2, 'Lung', '1500 / -600'),\n _createWwwcPreset(3, 'Liver', '150 / 90'),\n _createWwwcPreset(4, 'Bone', '2500 / 480'),\n _createWwwcPreset(5, 'Brain', '80 / 40'),\n ],\n },\n },\n {\n id: 'Pan',\n uiType: 'ohif.radioGroup',\n props: {\n icon: 'tool-move',\n label: 'Pan',\n commands: _createSetToolActiveCommands('Pan'),\n evaluate: 'evaluate.cornerstoneTool',\n },\n },\n {\n id: 'Capture',\n uiType: 'ohif.radioGroup',\n props: {\n icon: 'tool-capture',\n label: 'Capture',\n commands: [\n {\n commandName: 'showDownloadViewportModal',\n context: 'CORNERSTONE',\n },\n ],\n evaluate: 'evaluate.action',\n },\n },\n {\n id: 'Layout',\n uiType: 'ohif.layoutSelector',\n props: {\n rows: 3,\n columns: 3,\n evaluate: 'evaluate.action',\n commands: [\n {\n commandName: 'setViewportGridLayout',\n },\n ],\n },\n },\n {\n id: 'MPR',\n uiType: 'ohif.radioGroup',\n props: {\n icon: 'icon-mpr',\n label: 'MPR',\n commands: [\n {\n commandName: 'toggleHangingProtocol',\n commandOptions: {\n protocolId: 'mpr',\n },\n context: 'DEFAULT',\n },\n ],\n evaluate: 'evaluate.mpr',\n },\n },\n {\n id: 'Crosshairs',\n uiType: 'ohif.radioGroup',\n props: {\n icon: 'tool-crosshair',\n label: 'Crosshairs',\n commands: _createSetToolActiveCommands('Crosshairs', ['mpr']),\n evaluate: 'evaluate.cornerstoneTool',\n },\n },\n {\n id: 'MoreTools',\n uiType: 'ohif.splitButton',\n props: {\n groupId: 'MoreTools',\n evaluate: 'evaluate.group.promoteToPrimaryIfCornerstoneToolNotActiveInTheList',\n primary: ToolbarService.createButton({\n id: 'Reset',\n icon: 'tool-reset',\n label: 'Reset View',\n tooltip: 'Reset',\n commands: [\n {\n commandName: 'resetViewport',\n context: 'CORNERSTONE',\n },\n ],\n evaluate: 'evaluate.action',\n }),\n secondary: {\n icon: 'chevron-down',\n tooltip: 'More Tools',\n },\n items: [\n ToolbarService.createButton({\n id: 'RotateRight',\n icon: 'tool-rotate-right',\n label: 'Rotate Right',\n tooltip: 'Rotate +90',\n commands: [\n {\n commandName: 'rotateViewportCW',\n context: 'CORNERSTONE',\n },\n ],\n evaluate: 'evaluate.action',\n }),\n ToolbarService.createButton({\n id: 'FlipHorizontal',\n icon: 'tool-flip-horizontal',\n label: 'Flip Horizontally',\n tooltip: 'Flip Horizontal',\n commands: [\n {\n commandName: 'flipViewportHorizontal',\n context: 'CORNERSTONE',\n },\n ],\n evaluate: 'evaluate.action',\n }),\n ToolbarService.createButton({\n id: 'StackScroll',\n icon: 'tool-stack-scroll',\n label: 'Stack Scroll',\n tooltip: 'Stack Scroll',\n commands: _createSetToolActiveCommands('StackScroll'),\n evaluate: 'evaluate.cornerstoneTool',\n }),\n ToolbarService.createButton({\n id: 'Magnify',\n icon: 'tool-magnify',\n label: 'Magnify',\n tooltip: 'Magnify',\n commands: _createSetToolActiveCommands('Magnify'),\n evaluate: 'evaluate.cornerstoneTool',\n }),\n ToolbarService.createButton({\n id: 'Invert',\n icon: 'tool-invert',\n label: 'Invert',\n tooltip: 'Invert Colors',\n commands: [\n {\n commandName: 'invertViewport',\n context: 'CORNERSTONE',\n },\n ],\n evaluate: 'evaluate.action',\n }),\n ToolbarService.createButton({\n id: 'Cine',\n icon: 'tool-cine',\n label: 'Cine',\n tooltip: 'Cine',\n commands: [\n {\n commandName: 'toggleCine',\n context: 'CORNERSTONE',\n },\n ],\n evaluate: 'evaluate.action',\n }),\n ToolbarService.createButton({\n id: 'DicomTagBrowser',\n icon: 'list-bullets',\n label: 'Dicom Tag Browser',\n tooltip: 'Dicom Tag Browser',\n commands: [\n {\n commandName: 'openDICOMTagViewer',\n context: 'DEFAULT',\n },\n ],\n evaluate: 'evaluate.action',\n }),\n ],\n },\n },\n];\n\nexport default toolbarButtons;\n","import type { Button } from '@ohif/core/types';\n\nfunction _createSetToolActiveCommands(toolName) {\n return [\n {\n commandName: 'setToolActive',\n commandOptions: {\n toolName,\n },\n },\n ];\n}\n\nconst toolbarButtons: Button[] = [\n {\n id: 'BrushTools',\n uiType: 'ohif.buttonGroup',\n props: {\n groupId: 'BrushTools',\n items: [\n {\n id: 'Brush',\n icon: 'icon-tool-brush',\n label: 'Brush',\n evaluate: {\n name: 'evaluate.cornerstone.segmentation',\n options: { toolNames: ['CircularBrush', 'SphereBrush'] },\n },\n commands: _createSetToolActiveCommands('CircularBrush'),\n options: [\n {\n name: 'Radius (mm)',\n id: 'brush-radius',\n type: 'range',\n min: 0.5,\n max: 99.5,\n step: 0.5,\n value: 25,\n commands: {\n commandName: 'setBrushSize',\n commandOptions: { toolNames: ['CircularBrush', 'SphereBrush'] },\n },\n },\n {\n name: 'Shape',\n type: 'radio',\n id: 'brush-mode',\n value: 'CircularBrush',\n values: [\n { value: 'CircularBrush', label: 'Circle' },\n { value: 'SphereBrush', label: 'Sphere' },\n ],\n commands: 'setToolActiveToolbar',\n },\n ],\n },\n {\n id: 'Eraser',\n icon: 'icon-tool-eraser',\n label: 'Eraser',\n evaluate: {\n name: 'evaluate.cornerstone.segmentation',\n options: {\n toolNames: ['CircularEraser', 'SphereEraser'],\n },\n },\n commands: _createSetToolActiveCommands('CircularEraser'),\n options: [\n {\n name: 'Radius (mm)',\n id: 'eraser-radius',\n type: 'range',\n min: 0.5,\n max: 99.5,\n step: 0.5,\n value: 25,\n commands: {\n commandName: 'setBrushSize',\n commandOptions: { toolNames: ['CircularEraser', 'SphereEraser'] },\n },\n },\n {\n name: 'Shape',\n type: 'radio',\n id: 'eraser-mode',\n value: 'CircularEraser',\n values: [\n { value: 'CircularEraser', label: 'Circle' },\n { value: 'SphereEraser', label: 'Sphere' },\n ],\n commands: 'setToolActiveToolbar',\n },\n ],\n },\n {\n id: 'Threshold',\n icon: 'icon-tool-threshold',\n label: 'Eraser',\n evaluate: {\n name: 'evaluate.cornerstone.segmentation',\n options: { toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush'] },\n },\n commands: _createSetToolActiveCommands('ThresholdCircularBrush'),\n options: [\n {\n name: 'Radius (mm)',\n id: 'threshold-radius',\n type: 'range',\n min: 0.5,\n max: 99.5,\n step: 0.5,\n value: 25,\n commands: {\n commandName: 'setBrushSize',\n commandOptions: {\n toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush'],\n },\n },\n },\n {\n name: 'Shape',\n type: 'radio',\n id: 'eraser-mode',\n value: 'ThresholdCircularBrush',\n values: [\n { value: 'ThresholdCircularBrush', label: 'Circle' },\n { value: 'ThresholdSphereBrush', label: 'Sphere' },\n ],\n commands: 'setToolActiveToolbar',\n },\n {\n name: 'Threshold',\n type: 'radio',\n id: 'dynamic-mode',\n value: 'ThresholdRange',\n values: [\n { value: 'ThresholdDynamic', label: 'Dynamic' },\n { value: 'ThresholdRange', label: 'Range' },\n ],\n commands: {\n commandName: 'toggleThresholdRangeAndDynamic',\n },\n },\n {\n name: 'ThresholdRange',\n type: 'double-range',\n id: 'threshold-range',\n min: -1000,\n max: 1000,\n step: 1,\n values: [100, 600],\n condition: ({ options }) =>\n options.find(option => option.id === 'dynamic-mode').value === 'ThresholdRange',\n commands: {\n commandName: 'setThresholdRange',\n commandOptions: {\n toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush'],\n },\n },\n },\n ],\n },\n ],\n },\n },\n {\n id: 'Shapes',\n uiType: 'ohif.radioGroup',\n props: {\n label: 'Shapes',\n evaluate: {\n name: 'evaluate.cornerstone.segmentation',\n options: { toolNames: ['CircleScissor', 'SphereScissor', 'RectangleScissor'] },\n },\n icon: 'icon-tool-shape',\n commands: _createSetToolActiveCommands('CircleScissor'),\n options: [\n {\n name: 'Shape',\n type: 'radio',\n value: 'CircleScissor',\n id: 'shape-mode',\n values: [\n { value: 'CircleScissor', label: 'Circle' },\n { value: 'SphereScissor', label: 'Sphere' },\n { value: 'RectangleScissor', label: 'Rectangle' },\n ],\n commands: 'setToolActiveToolbar',\n },\n ],\n },\n },\n];\n\nexport default toolbarButtons;\n","function createTools(utilityModule) {\n const { toolNames, Enums } = utilityModule.exports;\n return {\n active: [\n { toolName: toolNames.WindowLevel, bindings: [{ mouseButton: Enums.MouseBindings.Primary }] },\n { toolName: toolNames.Pan, bindings: [{ mouseButton: Enums.MouseBindings.Auxiliary }] },\n { toolName: toolNames.Zoom, bindings: [{ mouseButton: Enums.MouseBindings.Secondary }] },\n { toolName: toolNames.StackScrollMouseWheel, bindings: [] },\n ],\n passive: [\n {\n toolName: 'CircularBrush',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'FILL_INSIDE_CIRCLE',\n },\n },\n {\n toolName: 'CircularEraser',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'ERASE_INSIDE_CIRCLE',\n },\n },\n {\n toolName: 'SphereBrush',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'FILL_INSIDE_SPHERE',\n },\n },\n {\n toolName: 'SphereEraser',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'ERASE_INSIDE_SPHERE',\n },\n },\n {\n toolName: 'ThresholdCircularBrush',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'THRESHOLD_INSIDE_CIRCLE',\n dynamicRadius: 3,\n },\n },\n {\n toolName: 'ThresholdSphereBrush',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'THRESHOLD_INSIDE_SPHERE',\n dynamicRadius: 3,\n },\n },\n { toolName: toolNames.CircleScissors },\n { toolName: toolNames.RectangleScissors },\n { toolName: toolNames.SphereScissors },\n { toolName: toolNames.StackScroll },\n { toolName: toolNames.Magnify },\n { toolName: toolNames.SegmentationDisplay },\n ],\n disabled: [{ toolName: toolNames.ReferenceLines }],\n };\n}\n\nfunction initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, toolGroupId) {\n const utilityModule = extensionManager.getModuleEntry(\n '@ohif/extension-cornerstone.utilityModule.tools'\n );\n const tools = createTools(utilityModule);\n toolGroupService.createToolGroupAndAddTools(toolGroupId, tools);\n}\n\nfunction initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {\n const utilityModule = extensionManager.getModuleEntry(\n '@ohif/extension-cornerstone.utilityModule.tools'\n );\n const tools = createTools(utilityModule);\n tools.disabled.push(\n {\n toolName: utilityModule.exports.toolNames.Crosshairs,\n configuration: {\n viewportIndicators: false,\n autoPan: {\n enabled: false,\n panSize: 10,\n },\n },\n },\n { toolName: utilityModule.exports.toolNames.ReferenceLines }\n );\n toolGroupService.createToolGroupAndAddTools('mpr', tools);\n}\n\nfunction initToolGroups(extensionManager, toolGroupService, commandsManager) {\n initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, 'default');\n initMPRToolGroup(extensionManager, toolGroupService, commandsManager);\n}\n\nexport default initToolGroups;\n","import { hotkeys } from '@ohif/core';\nimport { id } from './id';\nimport toolbarButtons from './toolbarButtons';\nimport segmentationButtons from './segmentationButtons';\nimport initToolGroups from './initToolGroups';\n\nconst ohif = {\n layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',\n sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',\n hangingProtocol: '@ohif/extension-default.hangingProtocolModule.default',\n leftPanel: '@ohif/extension-default.panelModule.seriesList',\n rightPanel: '@ohif/extension-default.panelModule.measure',\n};\n\nconst cornerstone = {\n viewport: '@ohif/extension-cornerstone.viewportModule.cornerstone',\n};\n\nconst segmentation = {\n panel: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentation',\n panelTool: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentationWithTools',\n sopClassHandler: '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',\n viewport: '@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg',\n};\n\n/**\n * Just two dependencies to be able to render a viewport with panels in order\n * to make sure that the mode is working.\n */\nconst extensionDependencies = {\n '@ohif/extension-default': '^3.0.0',\n '@ohif/extension-cornerstone': '^3.0.0',\n '@ohif/extension-cornerstone-dicom-seg': '^3.0.0',\n};\n\nfunction modeFactory({ modeConfiguration }) {\n return {\n /**\n * Mode ID, which should be unique among modes used by the viewer. This ID\n * is used to identify the mode in the viewer's state.\n */\n id,\n routeName: 'segmentation',\n /**\n * Mode name, which is displayed in the viewer's UI in the workList, for the\n * user to select the mode.\n */\n displayName: 'Segmentation',\n /**\n * Runs when the Mode Route is mounted to the DOM. Usually used to initialize\n * Services and other resources.\n */\n onModeEnter: ({ servicesManager, extensionManager, commandsManager }) => {\n const { measurementService, toolbarService, toolGroupService } = servicesManager.services;\n\n measurementService.clearMeasurements();\n\n // Init Default and SR ToolGroups\n initToolGroups(extensionManager, toolGroupService, commandsManager);\n\n toolbarService.addButtons(toolbarButtons);\n toolbarService.addButtons(segmentationButtons);\n\n toolbarService.createButtonSection('primary', [\n 'Pan',\n 'Capture',\n 'Layout',\n 'MPR',\n 'Crosshairs',\n 'Zoom',\n 'MoreTools',\n ]);\n toolbarService.createButtonSection('segmentationToolbox', ['BrushTools', 'Shapes']);\n },\n onModeExit: ({ servicesManager }) => {\n const {\n toolGroupService,\n syncGroupService,\n toolbarService,\n segmentationService,\n cornerstoneViewportService,\n uiDialogService,\n uiModalService,\n } = servicesManager.services;\n\n uiDialogService.dismissAll();\n uiModalService.hide();\n toolGroupService.destroy();\n syncGroupService.destroy();\n segmentationService.destroy();\n cornerstoneViewportService.destroy();\n },\n /** */\n validationTags: {\n study: [],\n series: [],\n },\n /**\n * A boolean return value that indicates whether the mode is valid for the\n * modalities of the selected studies. Currently we don't have stack viewport\n * segmentations and we should exclude them\n */\n isValidMode: ({ modalities }) => {\n // Don't show the mode if the selected studies have only one modality\n // that is not supported by the mode\n const modalitiesArray = modalities.split('\\\\');\n return {\n valid: modalitiesArray.length === 1 ? !['SM', 'US', 'MG', 'OT', 'DOC', 'CR'].includes(modalitiesArray[0]) : true,\n description: 'The mode does not support studies that ONLY include the following modalities: SM, US, MG, OT, DOC, CR',\n }\n },\n /**\n * Mode Routes are used to define the mode's behavior. A list of Mode Route\n * that includes the mode's path and the layout to be used. The layout will\n * include the components that are used in the layout. For instance, if the\n * default layoutTemplate is used (id: '@ohif/extension-default.layoutTemplateModule.viewerLayout')\n * it will include the leftPanels, rightPanels, and viewports. However, if\n * you define another layoutTemplate that includes a Footer for instance,\n * you should provide the Footer component here too. Note: We use Strings\n * to reference the component's ID as they are registered in the internal\n * ExtensionManager. The template for the string is:\n * `${extensionId}.{moduleType}.${componentId}`.\n */\n routes: [\n {\n path: 'template',\n layoutTemplate: ({ location, servicesManager }) => {\n return {\n id: ohif.layout,\n props: {\n leftPanels: [ohif.leftPanel],\n rightPanels: [segmentation.panelTool],\n viewports: [\n {\n namespace: cornerstone.viewport,\n displaySetsToDisplay: [ohif.sopClassHandler],\n },\n {\n namespace: segmentation.viewport,\n displaySetsToDisplay: [segmentation.sopClassHandler],\n },\n ],\n },\n };\n },\n },\n ],\n /** List of extensions that are used by the mode */\n extensions: extensionDependencies,\n /** HangingProtocol used by the mode */\n // hangingProtocol: [''],\n /** SopClassHandlers used by the mode */\n sopClassHandlers: [ohif.sopClassHandler, segmentation.sopClassHandler],\n /** hotkeys for mode */\n hotkeys: [...hotkeys.defaults.hotkeyBindings],\n };\n}\n\nconst mode = {\n id,\n modeFactory,\n extensionDependencies,\n};\n\nexport default mode;\n"],"names":["root","factory","exports","module","require","define","amd","self","this","__WEBPACK_EXTERNAL_MODULE__498__","__WEBPACK_EXTERNAL_MODULE__610__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","id","packageJson","windowLevelPresets","defaults","_createWwwcPreset","preset","title","subtitle","toString","commands","commandName","commandOptions","context","_createSetToolActiveCommands","toolName","toolGroupIds","map","toolGroupId","uiType","props","icon","label","evaluate","groupId","primary","ToolbarService","createButton","tooltip","secondary","renderer","WindowLevelMenuItem","items","rows","columns","protocolId","name","options","toolNames","type","min","max","step","values","condition","find","option","createTools","utilityModule","Enums","active","WindowLevel","bindings","mouseButton","MouseBindings","Primary","Pan","Auxiliary","Zoom","Secondary","StackScrollMouseWheel","passive","parentTool","configuration","activeStrategy","dynamicRadius","CircleScissors","RectangleScissors","SphereScissors","StackScroll","Magnify","SegmentationDisplay","disabled","ReferenceLines","ohif","segmentation","extensionDependencies","modeFactory","modeConfiguration","routeName","displayName","onModeEnter","servicesManager","extensionManager","commandsManager","measurementService","toolbarService","toolGroupService","services","clearMeasurements","tools","getModuleEntry","createToolGroupAndAddTools","initDefaultToolGroup","push","Crosshairs","viewportIndicators","autoPan","enabled","panSize","initMPRToolGroup","initToolGroups","addButtons","toolbarButtons","segmentationButtons","createButtonSection","onModeExit","syncGroupService","segmentationService","cornerstoneViewportService","uiDialogService","uiModalService","dismissAll","hide","destroy","validationTags","study","series","isValidMode","modalities","modalitiesArray","split","valid","length","includes","description","routes","path","layoutTemplate","location","leftPanels","rightPanels","viewports","namespace","displaySetsToDisplay","extensions","sopClassHandlers","hotkeys","hotkeyBindings"],"sourceRoot":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ohif/mode-segmentation",
|
|
3
|
-
"version": "3.8.0-beta.
|
|
3
|
+
"version": "3.8.0-beta.64",
|
|
4
4
|
"description": "OHIF segmentation mode which enables labelmap segmentation read/edit/export",
|
|
5
5
|
"author": "@ohif",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@ohif/core": "3.8.0-beta.
|
|
38
|
+
"@ohif/core": "3.8.0-beta.64"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@babel/runtime": "^7.20.13",
|