@ohif/mode-segmentation 3.10.0-beta.98 → 3.10.0

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(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o(require("@ohif/core")):"function"==typeof define&&define.amd?define("@ohif/mode-segmentation",["@ohif/core"],o):"object"==typeof exports?exports["@ohif/mode-segmentation"]=o(require("@ohif/core")):e["@ohif/mode-segmentation"]=o(e["@ohif/core"])}("undefined"!=typeof self?self:this,(e=>(()=>{"use strict";var o={498:o=>{o.exports=e}},t={};function a(e){var r=t[e];if(void 0!==r)return r.exports;var i=t[e]={exports:{}};return o[e](i,i.exports,a),i.exports}a.d=(e,o)=>{for(var t in o)a.o(o,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},a.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};a.r(r),a.d(r,{default:()=>S});var i=a(498);const l=JSON.parse('{"UU":"@ohif/mode-segmentation"}').UU,{createButton:n}=i.ToolbarService,s=[{commandName:"setSourceViewportForReferenceLinesTool",context:"CORNERSTONE"}],d={commandName:"setToolActiveToolbar",commandOptions:{toolGroupIds:["default","mpr","SRToolGroup","volume3d"]}},u=[{id:"Zoom",uiType:"ohif.toolButton",props:{icon:"tool-zoom",label:"Zoom",commands:d,evaluate:"evaluate.cornerstoneTool"}},{id:"WindowLevel",uiType:"ohif.toolButton",props:{icon:"tool-window-level",label:"Window Level",commands:d,evaluate:"evaluate.cornerstoneTool"}},{id:"Pan",uiType:"ohif.toolButton",props:{icon:"tool-move",label:"Pan",commands:d,evaluate:"evaluate.cornerstoneTool"}},{id:"TrackballRotate",uiType:"ohif.toolButton",props:{type:"tool",icon:"tool-3d-rotate",label:"3D Rotate",commands:d,evaluate:{name:"evaluate.cornerstoneTool",disabledText:"Select a 3D viewport to enable this tool"}}},{id:"Capture",uiType:"ohif.toolButton",props:{icon:"tool-capture",label:"Capture",commands:"showDownloadViewportModal",evaluate:["evaluate.action",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video","wholeSlide"]}]}},{id:"Layout",uiType:"ohif.layoutSelector",props:{rows:3,columns:4,evaluate:"evaluate.action",commands:"setViewportGridLayout"}},{id:"Crosshairs",uiType:"ohif.toolButton",props:{icon:"tool-crosshair",label:"Crosshairs",commands:{commandName:"setToolActiveToolbar",commandOptions:{toolGroupIds:["mpr"]}},evaluate:{name:"evaluate.cornerstoneTool",disabledText:"Select an MPR viewport to enable this tool"}}},{id:"MoreTools",uiType:"ohif.toolButtonList",props:{groupId:"MoreTools",evaluate:"evaluate.group.promoteToPrimaryIfCornerstoneToolNotActiveInTheList",primary:n({id:"Reset",icon:"tool-reset",tooltip:"Reset View",label:"Reset",commands:"resetViewport",evaluate:"evaluate.action"}),secondary:{icon:"chevron-down",label:"",tooltip:"More Tools"},items:[n({id:"Reset",icon:"tool-reset",label:"Reset View",tooltip:"Reset View",commands:"resetViewport",evaluate:"evaluate.action"}),n({id:"rotate-right",icon:"tool-rotate-right",label:"Rotate Right",tooltip:"Rotate +90",commands:"rotateViewportCW",evaluate:"evaluate.action"}),n({id:"flipHorizontal",icon:"tool-flip-horizontal",label:"Flip Horizontal",tooltip:"Flip Horizontally",commands:"flipViewportHorizontal",evaluate:["evaluate.viewportProperties.toggle",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["volume3d"]}]}),n({id:"ReferenceLines",icon:"tool-referenceLines",label:"Reference Lines",tooltip:"Show Reference Lines",commands:"toggleEnabledDisabledToolbar",listeners:{[i.ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]:s,[i.ViewportGridService.EVENTS.VIEWPORTS_READY]:s},evaluate:"evaluate.cornerstoneTool.toggle"}),n({id:"ImageOverlayViewer",icon:"toggle-dicom-overlay",label:"Image Overlay",tooltip:"Toggle Image Overlay",commands:"toggleEnabledDisabledToolbar",evaluate:"evaluate.cornerstoneTool.toggle"}),n({id:"StackScroll",icon:"tool-stack-scroll",label:"Stack Scroll",tooltip:"Stack Scroll",commands:d,evaluate:"evaluate.cornerstoneTool"}),n({id:"invert",icon:"tool-invert",label:"Invert",tooltip:"Invert Colors",commands:"invertViewport",evaluate:"evaluate.viewportProperties.toggle"}),n({id:"Cine",icon:"tool-cine",label:"Cine",tooltip:"Cine",commands:"toggleCine",evaluate:["evaluate.cine",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["volume3d"]}]}),n({id:"Magnify",icon:"tool-magnify",label:"Zoom-in",tooltip:"Zoom-in",commands:d,evaluate:"evaluate.cornerstoneTool"}),n({id:"TagBrowser",icon:"dicom-tag-browser",label:"Dicom Tag Browser",tooltip:"Dicom Tag Browser",commands:"openDICOMTagViewer"}),n({id:"AdvancedMagnify",icon:"icon-tool-loupe",label:"Magnify Probe",tooltip:"Magnify Probe",commands:"toggleActiveDisabledToolbar",evaluate:"evaluate.cornerstoneTool.toggle.ifStrictlyDisabled"}),n({id:"UltrasoundDirectionalTool",icon:"icon-tool-ultrasound-bidirectional",label:"Ultrasound Directional",tooltip:"Ultrasound Directional",commands:d,evaluate:["evaluate.cornerstoneTool",{name:"evaluate.modality.supported",supportedModalities:["US"]}]}),n({id:"WindowLevelRegion",icon:"icon-tool-window-region",label:"Window Level Region",tooltip:"Window Level Region",commands:d,evaluate:"evaluate.cornerstoneTool"})]}}],c=[{id:"BrushTools",uiType:"ohif.toolBoxButtonGroup",props:{groupId:"BrushTools",evaluate:"evaluate.cornerstone.hasSegmentation",items:[{id:"Brush",icon:"icon-tool-brush",label:"Brush",evaluate:{name:"evaluate.cornerstone.segmentation",toolNames:["CircularBrush","SphereBrush"],disabledText:"Create new segmentation to enable this tool."},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",toolNames:["CircularEraser","SphereEraser"]},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:"Threshold Tool",evaluate:{name:"evaluate.cornerstone.segmentation",toolNames:["ThresholdCircularBrush","ThresholdSphereBrush"]},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","ThresholdCircularBrushDynamic"]}}},{name:"Threshold",type:"radio",id:"dynamic-mode",value:"ThresholdRange",values:[{value:"ThresholdDynamic",label:"Dynamic"},{value:"ThresholdRange",label:"Range"}],commands:({value:e,commandsManager:o,options:t})=>{if("ThresholdDynamic"===e)return void o.run("setToolActive",{toolName:"ThresholdCircularBrushDynamic"});const a=t.find((e=>"threshold-shape"===e.id));o.run("setToolActiveToolbar",{toolName:a.value})}},{name:"Shape",type:"radio",id:"threshold-shape",value:"ThresholdCircularBrush",values:[{value:"ThresholdCircularBrush",label:"Circle"},{value:"ThresholdSphereBrush",label:"Sphere"}],condition:({options:e})=>"ThresholdRange"===e.find((e=>"dynamic-mode"===e.id)).value,commands:"setToolActiveToolbar"},{name:"ThresholdRange",type:"double-range",id:"threshold-range",min:-1e3,max:1e3,step:1,value:[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.toolBoxButton",props:{id:"Shapes",icon:"icon-tool-shape",label:"Shapes",evaluate:{name:"evaluate.cornerstone.segmentation",toolNames:["CircleScissor","SphereScissor","RectangleScissor"],disabledText:"Create new segmentation to enable shapes tool."},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"}]}}],m={"viewport-0":"rgb(200, 0, 0)","viewport-1":"rgb(200, 200, 0)","viewport-2":"rgb(0, 200, 0)"},p={axial:"rgb(200, 0, 0)",sagittal:"rgb(200, 200, 0)",coronal:"rgb(0, 200, 0)"};function h(e){const{toolNames:o,Enums:t}=e.exports;return{active:[{toolName:o.WindowLevel,bindings:[{mouseButton:t.MouseBindings.Primary}]},{toolName:o.Pan,bindings:[{mouseButton:t.MouseBindings.Auxiliary}]},{toolName:o.Zoom,bindings:[{mouseButton:t.MouseBindings.Secondary}]},{toolName:o.StackScroll,bindings:[{mouseButton:t.MouseBindings.Wheel}]}],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"}},{toolName:"ThresholdSphereBrush",parentTool:"Brush",configuration:{activeStrategy:"THRESHOLD_INSIDE_SPHERE"}},{toolName:"ThresholdCircularBrushDynamic",parentTool:"Brush",configuration:{activeStrategy:"THRESHOLD_INSIDE_CIRCLE",strategySpecificConfiguration:{THRESHOLD:{isDynamic:!0,dynamicRadius:3}}}},{toolName:o.CircleScissors},{toolName:o.RectangleScissors},{toolName:o.SphereScissors},{toolName:o.StackScroll},{toolName:o.Magnify},{toolName:o.WindowLevelRegion},{toolName:o.UltrasoundDirectional}],disabled:[{toolName:o.ReferenceLines},{toolName:o.AdvancedMagnify}]}}const v="@ohif/extension-default.sopClassHandlerModule.stack",g="@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg",T={"@ohif/extension-default":"^3.0.0","@ohif/extension-cornerstone":"^3.0.0","@ohif/extension-cornerstone-dicom-seg":"^3.0.0"},S={id:l,modeFactory:function({modeConfiguration:e}){return{id:l,routeName:"segmentation",displayName:"Segmentation",onModeEnter:({servicesManager:e,extensionManager:o,commandsManager:t})=>{const{measurementService:a,toolbarService:r,toolGroupService:i}=e.services;a.clearMeasurements(),function(e,o){!function(e,o){const t=h(e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"));o.createToolGroupAndAddTools("default",t)}(e,o),function(e,o){const t=e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),a=e._servicesManager,{cornerstoneViewportService:r}=a.services,i=h(t);i.disabled.push({toolName:t.exports.toolNames.Crosshairs,configuration:{viewportIndicators:!0,viewportIndicatorsConfig:{circleRadius:5,xOffset:.95,yOffset:.05},disableOnPassive:!0,autoPan:{enabled:!1,panSize:10},getReferenceLineColor:e=>{const o=r.getViewportInfo(e),t=o?.viewportOptions;return t?m[t.id]||p[t.orientation]||"#0c0":(console.warn("missing viewport?",e),"#0c0")}}},{toolName:t.exports.toolNames.ReferenceLines}),o.createToolGroupAndAddTools("mpr",i)}(e,o),function(e,o){const t=e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),{toolNames:a,Enums:r}=t.exports,i={active:[{toolName:a.TrackballRotateTool,bindings:[{mouseButton:r.MouseBindings.Primary}]},{toolName:a.Zoom,bindings:[{mouseButton:r.MouseBindings.Secondary}]},{toolName:a.Pan,bindings:[{mouseButton:r.MouseBindings.Auxiliary}]}]};o.createToolGroupAndAddTools("volume3d",i)}(e,o)}(o,i),r.addButtons(u),r.addButtons(c),r.createButtonSection("primary",["WindowLevel","Pan","Zoom","TrackballRotate","Capture","Layout","Crosshairs","MoreTools"]),r.createButtonSection("segmentationToolbox",["BrushTools","Shapes"])},onModeExit:({servicesManager:e})=>{const{toolGroupService:o,syncGroupService:t,segmentationService:a,cornerstoneViewportService:r,uiDialogService:i,uiModalService:l}=e.services;i.dismissAll(),l.hide(),o.destroy(),t.destroy(),a.destroy(),r.destroy()},validationTags:{study:[],series:[]},isValidMode:({modalities:e})=>{const o=e.split("\\");return{valid:1!==o.length||!["SM","ECG","OT","DOC"].includes(o[0]),description:"The mode does not support studies that ONLY include the following modalities: SM, OT, DOC"}},routes:[{path:"template",layoutTemplate:({location:e,servicesManager:o})=>({id:"@ohif/extension-default.layoutTemplateModule.viewerLayout",props:{leftPanels:["@ohif/extension-default.panelModule.seriesList"],leftPanelResizable:!0,rightPanels:["@ohif/extension-cornerstone.panelModule.panelSegmentationWithTools"],rightPanelResizable:!0,viewports:[{namespace:"@ohif/extension-cornerstone.viewportModule.cornerstone",displaySetsToDisplay:[v]},{namespace:"@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg",displaySetsToDisplay:[g]}]}})}],extensions:T,sopClassHandlers:[v,g],hotkeys:[...i.hotkeys.defaults.hotkeyBindings]}},extensionDependencies:T};return r})()));
1
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o(require("@ohif/core")):"function"==typeof define&&define.amd?define("@ohif/mode-segmentation",["@ohif/core"],o):"object"==typeof exports?exports["@ohif/mode-segmentation"]=o(require("@ohif/core")):e["@ohif/mode-segmentation"]=o(e["@ohif/core"])}("undefined"!=typeof self?self:this,(e=>(()=>{"use strict";var o={498:o=>{o.exports=e}},t={};function a(e){var r=t[e];if(void 0!==r)return r.exports;var i=t[e]={exports:{}};return o[e](i,i.exports,a),i.exports}a.d=(e,o)=>{for(var t in o)a.o(o,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},a.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};a.r(r),a.d(r,{default:()=>T});const i=JSON.parse('{"UU":"@ohif/mode-segmentation"}').UU;var n=a(498);const l={commandName:"setToolActiveToolbar",commandOptions:{toolGroupIds:["default","mpr","SRToolGroup","volume3d"]}},s=e=>[{commandName:"setViewportForToolConfiguration",commandOptions:{toolName:e}}],c=[{id:"MoreTools",uiType:"ohif.toolButtonList",props:{buttonSection:"moreToolsSection",groupId:"MoreTools"}},{id:"BrushTools",uiType:"ohif.toolBoxButtonGroup",props:{groupId:"BrushTools",buttonSection:"brushToolsSection"}},{id:"SegmentationUtilities",uiType:"ohif.toolBoxButton",props:{groupId:"SegmentationUtilities",buttonSection:"segmentationToolboxUtilitySection"}},{id:"SegmentationTools",uiType:"ohif.toolBoxButton",props:{groupId:"SegmentationTools",buttonSection:"segmentationToolboxToolsSection"}},{id:"Zoom",uiType:"ohif.toolButton",props:{icon:"tool-zoom",label:"Zoom",commands:l,evaluate:"evaluate.cornerstoneTool"}},{id:"WindowLevel",uiType:"ohif.toolButton",props:{icon:"tool-window-level",label:"Window Level",commands:l,evaluate:"evaluate.cornerstoneTool"}},{id:"Pan",uiType:"ohif.toolButton",props:{icon:"tool-move",label:"Pan",commands:l,evaluate:"evaluate.cornerstoneTool"}},{id:"TrackballRotate",uiType:"ohif.toolButton",props:{type:"tool",icon:"tool-3d-rotate",label:"3D Rotate",commands:l,evaluate:{name:"evaluate.cornerstoneTool",disabledText:"Select a 3D viewport to enable this tool"}}},{id:"Capture",uiType:"ohif.toolButton",props:{icon:"tool-capture",label:"Capture",commands:"showDownloadViewportModal",evaluate:["evaluate.action",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["video","wholeSlide"]}]}},{id:"Layout",uiType:"ohif.layoutSelector",props:{rows:3,columns:4,evaluate:"evaluate.action",commands:"setViewportGridLayout"}},{id:"Crosshairs",uiType:"ohif.toolButton",props:{icon:"tool-crosshair",label:"Crosshairs",commands:{commandName:"setToolActiveToolbar",commandOptions:{toolGroupIds:["mpr"]}},evaluate:{name:"evaluate.cornerstoneTool",disabledText:"Select an MPR viewport to enable this tool"}}},{id:"Reset",uiType:"ohif.toolButton",props:{icon:"tool-reset",label:"Reset View",tooltip:"Reset View",commands:"resetViewport",evaluate:"evaluate.action"}},{id:"rotate-right",uiType:"ohif.toolButton",props:{icon:"tool-rotate-right",label:"Rotate Right",tooltip:"Rotate +90",commands:"rotateViewportCW",evaluate:"evaluate.action"}},{id:"flipHorizontal",uiType:"ohif.toolButton",props:{icon:"tool-flip-horizontal",label:"Flip Horizontal",tooltip:"Flip Horizontally",commands:"flipViewportHorizontal",evaluate:["evaluate.viewportProperties.toggle",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["volume3d"]}]}},{id:"ReferenceLines",uiType:"ohif.toolButton",props:{icon:"tool-referenceLines",label:"Reference Lines",tooltip:"Show Reference Lines",commands:"toggleEnabledDisabledToolbar",evaluate:"evaluate.cornerstoneTool.toggle"}},{id:"ImageOverlayViewer",uiType:"ohif.toolButton",props:{icon:"toggle-dicom-overlay",label:"Image Overlay",tooltip:"Toggle Image Overlay",commands:"toggleEnabledDisabledToolbar",evaluate:"evaluate.cornerstoneTool.toggle"}},{id:"StackScroll",uiType:"ohif.toolButton",props:{icon:"tool-stack-scroll",label:"Stack Scroll",tooltip:"Stack Scroll",commands:l,evaluate:"evaluate.cornerstoneTool"}},{id:"invert",uiType:"ohif.toolButton",props:{icon:"tool-invert",label:"Invert",tooltip:"Invert Colors",commands:"invertViewport",evaluate:"evaluate.viewportProperties.toggle"}},{id:"Cine",uiType:"ohif.toolButton",props:{icon:"tool-cine",label:"Cine",tooltip:"Cine",commands:"toggleCine",evaluate:["evaluate.cine",{name:"evaluate.viewport.supported",unsupportedViewportTypes:["volume3d"]}]}},{id:"Magnify",uiType:"ohif.toolButton",props:{icon:"tool-magnify",label:"Zoom-in",tooltip:"Zoom-in",commands:l,evaluate:"evaluate.cornerstoneTool"}},{id:"TagBrowser",uiType:"ohif.toolButton",props:{icon:"dicom-tag-browser",label:"Dicom Tag Browser",tooltip:"Dicom Tag Browser",commands:"openDICOMTagViewer"}},{id:"Brush",uiType:"ohif.toolBoxButton",props:{icon:"icon-tool-brush",label:"Brush",evaluate:{name:"evaluate.cornerstone.segmentation",toolNames:["CircularBrush","SphereBrush"],disabledText:"Create new segmentation to enable this tool."},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:"InterpolateLabelmap",uiType:"ohif.toolBoxButton",props:{icon:"icon-tool-interpolation",label:"Interpolate Labelmap",tooltip:"Automatically fill in missing slices between drawn segments. Use brush or threshold tools on at least two slices, then click to interpolate across slices. Works in any direction. Volume must be reconstructable.",evaluate:["evaluate.cornerstone.segmentation",{name:"evaluate.displaySetIsReconstructable",disabledText:"The current viewport cannot handle interpolation."}],commands:"interpolateLabelmap"}},{id:"SegmentBidirectional",uiType:"ohif.toolBoxButton",props:{icon:"icon-tool-bidirectional-segment",label:"Segment Bidirectional",tooltip:"Automatically detects the largest length and width across slices for the selected segment and displays a bidirectional measurement.",evaluate:{name:"evaluate.cornerstone.segmentation",disabledText:"Create new segmentation to enable this tool."},commands:"runSegmentBidirectional"}},{id:"RegionSegmentPlus",uiType:"ohif.toolBoxButton",props:{icon:"icon-tool-click-segment",label:"One Click Segment",tooltip:"Detects segmentable regions with one click. Hover for visual feedback—click when a plus sign appears to auto-segment the lesion.",evaluate:{name:"evaluate.cornerstone.segmentation",toolNames:["RegionSegmentPlus"],disabledText:"Create new segmentation to enable this tool."},commands:"setToolActiveToolbar"}},{id:"LabelmapSlicePropagation",uiType:"ohif.toolBoxButton",props:{icon:"icon-labelmap-slice-propagation",label:"Labelmap Assist",tooltip:"Toggle AI assistance for segmenting nearby slices. After drawing on a slice, scroll to preview predictions. Press Enter to accept or Esc to skip.",evaluate:["evaluate.cornerstoneTool.toggle",{name:"evaluate.cornerstone.hasSegmentation"}],listeners:{[n.ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]:s("LabelmapSlicePropagation"),[n.ViewportGridService.EVENTS.VIEWPORTS_READY]:s("LabelmapSlicePropagation")},commands:"toggleEnabledDisabledToolbar"}},{id:"MarkerLabelmap",uiType:"ohif.toolBoxButton",props:{icon:"icon-marker-labelmap",label:"Marker Guided Labelmap",tooltip:"Use include/exclude markers to guide AI (SAM) segmentation. Click to place markers, Enter to accept results, Esc to reject, and N to go to the next slice while keeping markers.",evaluate:[{name:"evaluate.cornerstone.segmentation",toolNames:["MarkerLabelmap","MarkerInclude","MarkerExclude"]}],commands:"setToolActiveToolbar",listeners:{[n.ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]:s("MarkerLabelmap"),[n.ViewportGridService.EVENTS.VIEWPORTS_READY]:s("MarkerLabelmap")},options:[{name:"Marker Mode",type:"radio",id:"marker-mode",value:"markerInclude",values:[{value:"markerInclude",label:"Include"},{value:"markerExclude",label:"Exclude"}],commands:({commandsManager:e,options:o})=>{"markerInclude"===o.find((e=>"marker-mode"===e.id)).value?e.run("setToolActive",{toolName:"MarkerInclude"}):e.run("setToolActive",{toolName:"MarkerExclude"})}},{name:"Clear Markers",type:"button",id:"clear-markers",commands:"clearMarkersForMarkerLabelmap"}]}},{id:"Eraser",uiType:"ohif.toolBoxButton",props:{icon:"icon-tool-eraser",label:"Eraser",evaluate:{name:"evaluate.cornerstone.segmentation",toolNames:["CircularEraser","SphereEraser"]},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",uiType:"ohif.toolBoxButton",props:{icon:"icon-tool-threshold",label:"Threshold Tool",evaluate:{name:"evaluate.cornerstone.segmentation",toolNames:["ThresholdCircularBrush","ThresholdSphereBrush","ThresholdCircularBrushDynamic","ThresholdSphereBrushDynamic"]},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","ThresholdCircularBrushDynamic","ThresholdSphereBrushDynamic"]}}},{name:"Shape",type:"radio",id:"threshold-shape",value:"ThresholdCircularBrush",values:[{value:"ThresholdCircularBrush",label:"Circle"},{value:"ThresholdSphereBrush",label:"Sphere"}],commands:({value:e,commandsManager:o,options:t})=>{"ThresholdDynamic"===t.find((e=>"dynamic-mode"===e.id)).value?o.run("setToolActive",{toolName:"ThresholdCircularBrush"===e?"ThresholdCircularBrushDynamic":"ThresholdSphereBrushDynamic"}):o.run("setToolActive",{toolName:e})}},{name:"Threshold",type:"radio",id:"dynamic-mode",value:"ThresholdDynamic",values:[{value:"ThresholdDynamic",label:"Dynamic"},{value:"ThresholdRange",label:"Range"}],commands:({value:e,commandsManager:o,options:t})=>{const a=t.find((e=>"threshold-shape"===e.id));if("ThresholdDynamic"===e)o.run("setToolActiveToolbar",{toolName:"ThresholdCircularBrush"===a.value?"ThresholdCircularBrushDynamic":"ThresholdSphereBrushDynamic"});else{o.run("setToolActiveToolbar",{toolName:a.value});const e=t.find((e=>"threshold-range"===e.id)).value;o.run("setThresholdRange",{toolNames:["ThresholdCircularBrush","ThresholdSphereBrush"],value:e})}}},{name:"ThresholdRange",type:"double-range",id:"threshold-range",min:-1e3,max:1e3,step:1,value:[50,600],condition:({options:e})=>"ThresholdRange"===e.find((e=>"dynamic-mode"===e.id)).value,commands:{commandName:"setThresholdRange",commandOptions:{toolNames:["ThresholdCircularBrush","ThresholdSphereBrush"]}}}]}},{id:"Shapes",uiType:"ohif.toolBoxButton",props:{icon:"icon-tool-shape",label:"Shapes",evaluate:{name:"evaluate.cornerstone.segmentation",toolNames:["CircleScissor","SphereScissor","RectangleScissor"],disabledText:"Create new segmentation to enable shapes tool."},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"}]}}],u={"viewport-0":"rgb(200, 0, 0)","viewport-1":"rgb(200, 200, 0)","viewport-2":"rgb(0, 200, 0)"},d={axial:"rgb(200, 0, 0)",sagittal:"rgb(200, 200, 0)",coronal:"rgb(0, 200, 0)"};function m(e){const{toolNames:o,Enums:t}=e.exports;return{active:[{toolName:o.WindowLevel,bindings:[{mouseButton:t.MouseBindings.Primary}]},{toolName:o.Pan,bindings:[{mouseButton:t.MouseBindings.Auxiliary}]},{toolName:o.Zoom,bindings:[{mouseButton:t.MouseBindings.Secondary}]},{toolName:o.StackScroll,bindings:[{mouseButton:t.MouseBindings.Wheel}]}],passive:[{toolName:"CircularBrush",parentTool:"Brush",configuration:{activeStrategy:"FILL_INSIDE_CIRCLE"}},{toolName:o.LabelmapSlicePropagation},{toolName:o.MarkerLabelmap},{toolName:o.RegionSegmentPlus},{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"}},{toolName:"ThresholdSphereBrush",parentTool:"Brush",configuration:{activeStrategy:"THRESHOLD_INSIDE_SPHERE"}},{toolName:"ThresholdCircularBrushDynamic",parentTool:"Brush",configuration:{activeStrategy:"THRESHOLD_INSIDE_CIRCLE",threshold:{isDynamic:!0,dynamicRadius:3}}},{toolName:o.SegmentBidirectional},{toolName:o.SegmentSelect},{toolName:"ThresholdSphereBrushDynamic",parentTool:"Brush",configuration:{activeStrategy:"THRESHOLD_INSIDE_SPHERE",threshold:{isDynamic:!0,dynamicRadius:3}}},{toolName:o.CircleScissors},{toolName:o.RectangleScissors},{toolName:o.SphereScissors},{toolName:o.StackScroll},{toolName:o.Magnify},{toolName:o.WindowLevelRegion},{toolName:o.UltrasoundDirectional}],disabled:[{toolName:o.ReferenceLines},{toolName:o.AdvancedMagnify}]}}const p="@ohif/extension-default.sopClassHandlerModule.stack",h="@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg",g="@ohif/extension-cornerstone-dicom-rt.sopClassHandlerModule.dicom-rt",v={"@ohif/extension-default":"^3.0.0","@ohif/extension-cornerstone":"^3.0.0","@ohif/extension-cornerstone-dicom-seg":"^3.0.0","@ohif/extension-cornerstone-dicom-rt":"^3.0.0"},T={id:i,modeFactory:function({modeConfiguration:e}){return{id:i,routeName:"segmentation",displayName:"Segmentation",onModeEnter:({servicesManager:e,extensionManager:o,commandsManager:t})=>{const{measurementService:a,toolbarService:r,toolGroupService:i,customizationService:n}=e.services;a.clearMeasurements(),function(e,o){!function(e,o){const t=m(e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"));o.createToolGroupAndAddTools("default",t)}(e,o),function(e,o){const t=e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),a=e._servicesManager,{cornerstoneViewportService:r}=a.services,i=m(t);i.disabled.push({toolName:t.exports.toolNames.Crosshairs,configuration:{viewportIndicators:!0,viewportIndicatorsConfig:{circleRadius:5,xOffset:.95,yOffset:.05},disableOnPassive:!0,autoPan:{enabled:!1,panSize:10},getReferenceLineColor:e=>{const o=r.getViewportInfo(e),t=o?.viewportOptions;return t?u[t.id]||d[t.orientation]||"#0c0":(console.warn("missing viewport?",e),"#0c0")}}},{toolName:t.exports.toolNames.ReferenceLines}),o.createToolGroupAndAddTools("mpr",i)}(e,o),function(e,o){const t=e.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),{toolNames:a,Enums:r}=t.exports,i={active:[{toolName:a.TrackballRotateTool,bindings:[{mouseButton:r.MouseBindings.Primary}]},{toolName:a.Zoom,bindings:[{mouseButton:r.MouseBindings.Secondary}]},{toolName:a.Pan,bindings:[{mouseButton:r.MouseBindings.Auxiliary}]}]};o.createToolGroupAndAddTools("volume3d",i)}(e,o)}(o,i),r.addButtons(c),r.createButtonSection("primary",["WindowLevel","Pan","Zoom","TrackballRotate","Capture","Layout","Crosshairs","MoreTools"]),r.createButtonSection("moreToolsSection",["Reset","rotate-right","flipHorizontal","ReferenceLines","ImageOverlayViewer","StackScroll","invert","Cine","Magnify","TagBrowser"]),r.createButtonSection("segmentationToolbox",["SegmentationUtilities","SegmentationTools"]),r.createButtonSection("segmentationToolboxUtilitySection",["LabelmapSlicePropagation","InterpolateLabelmap","SegmentBidirectional"]),r.createButtonSection("segmentationToolboxToolsSection",["BrushTools","MarkerLabelmap","RegionSegmentPlus","Shapes"]),r.createButtonSection("brushToolsSection",["Brush","Eraser","Threshold"])},onModeExit:({servicesManager:e})=>{const{toolGroupService:o,syncGroupService:t,segmentationService:a,cornerstoneViewportService:r,uiDialogService:i,uiModalService:n}=e.services;i.hideAll(),n.hide(),o.destroy(),t.destroy(),a.destroy(),r.destroy()},validationTags:{study:[],series:[]},isValidMode:({modalities:e})=>{const o=e.split("\\");return{valid:1!==o.length||!["SM","ECG","OT","DOC"].includes(o[0]),description:"The mode does not support studies that ONLY include the following modalities: SM, OT, DOC"}},routes:[{path:"template",layoutTemplate:({location:e,servicesManager:o})=>({id:"@ohif/extension-default.layoutTemplateModule.viewerLayout",props:{leftPanels:["@ohif/extension-default.panelModule.seriesList"],leftPanelResizable:!0,rightPanels:["@ohif/extension-cornerstone.panelModule.panelSegmentationWithTools","@ohif/extension-cornerstone.panelModule.panelMeasurement"],rightPanelResizable:!0,viewports:[{namespace:"@ohif/extension-cornerstone.viewportModule.cornerstone",displaySetsToDisplay:[p]},{namespace:"@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg",displaySetsToDisplay:[h]},{namespace:"@ohif/extension-cornerstone-dicom-rt.viewportModule.dicom-rt",displaySetsToDisplay:[g]}]}})}],extensions:v,hangingProtocol:["@ohif/mnGrid"],sopClassHandlers:[p,h,g]}},extensionDependencies:v};return r})()));
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,eACR,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,0BAA2B,CAAC,cAAeJ,GACxB,iBAAZC,QACdA,QAAQ,2BAA6BD,EAAQG,QAAQ,eAErDJ,EAAK,2BAA6BC,EAAQD,EAAK,cAChD,CATD,CASmB,oBAATO,KAAuBA,KAAOC,MAAOC,G,kCCT/CN,EAAOD,QAAUO,C,GCCbC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaX,QAGrB,IAAIC,EAASO,EAAyBE,GAAY,CAGjDV,QAAS,CAAC,GAOX,OAHAa,EAAoBH,GAAUT,EAAQA,EAAOD,QAASS,GA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EjCD,EAAeiC,WAAWC,GAC1BlC,EAAeiC,WAAWE,GAE1BnC,EAAeoC,oBAAoB,UAAW,CAC5C,cACA,MACA,OACA,kBACA,UACA,SACA,aACA,cAEFpC,EAAeoC,oBAAoB,sBAAuB,CAAC,aAAc,UAAU,EAErFC,WAAYA,EAAGxC,sBACb,MAAM,iBACJI,EAAgB,iBAChBqC,EAAgB,oBAChBC,EAAmB,2BACnB9B,EAA0B,gBAC1B+B,EAAe,eACfC,GACE5C,EAAgBK,SAEpBsC,EAAgBE,aAChBD,EAAeE,OACf1C,EAAiB2C,UACjBN,EAAiBM,UACjBL,EAAoBK,UACpBnC,EAA2BmC,SAAS,EAGtCC,eAAgB,CACdC,MAAO,GACPC,OAAQ,IAOVC,YAAaA,EAAGC,iBAGd,MAAMC,EAAkBD,EAAWE,MAAM,MACzC,MAAO,CACLC,MAC6B,IAA3BF,EAAgBG,SACX,CAAC,KAAM,MAAO,KAAM,OAAOC,SAASJ,EAAgB,IAE3DK,YACE,4FACH,EAcHC,OAAQ,CACN,CACEC,KAAM,WACNC,eAAgBA,EAAGC,WAAU9D,sBACpB,CACL3F,GA3HF,4DA4HEW,MAAO,CACL+I,WAAY,CA1Hb,kDA2HCC,oBAAoB,EACpBC,YAAa,CAvHd,sEAwHCC,qBAAqB,EAErBC,UAAW,CACT,CACEC,UA7HN,yDA8HMC,qBAAsB,CAAC7E,IAEzB,CACE4E,UA3HN,iEA4HMC,qBAAsB,CAAC5E,UASrC6E,WAAY5E,EAMZ6E,iBAAkB,CAAC/E,EAAsBC,GAEzC+E,QAAS,IAAIA,EAAAA,QAAQC,SAASC,gBAElC,EAKEhF,yB","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/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\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"@ohif/mode-segmentation\", [\"@ohif/core\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@ohif/mode-segmentation\"] = factory(require(\"@ohif/core\"));\n\telse\n\t\troot[\"@ohif/mode-segmentation\"] = factory(root[\"@ohif/core\"]);\n})(typeof self !== 'undefined' ? self : this, (__WEBPACK_EXTERNAL_MODULE__498__) => {\nreturn ","module.exports = __WEBPACK_EXTERNAL_MODULE__498__;","// 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 type { Button } from '@ohif/core/types';\nimport { ToolbarService, ViewportGridService } from '@ohif/core';\n\nconst { createButton } = ToolbarService;\n\nconst ReferenceLinesListeners: RunCommand = [\n {\n commandName: 'setSourceViewportForReferenceLinesTool',\n context: 'CORNERSTONE',\n },\n];\n\nexport const setToolActiveToolbar = {\n commandName: 'setToolActiveToolbar',\n commandOptions: {\n toolGroupIds: ['default', 'mpr', 'SRToolGroup', 'volume3d'],\n },\n};\n\nconst toolbarButtons: Button[] = [\n {\n id: 'Zoom',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-zoom',\n label: 'Zoom',\n commands: setToolActiveToolbar,\n evaluate: 'evaluate.cornerstoneTool',\n },\n },\n {\n id: 'WindowLevel',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-window-level',\n label: 'Window Level',\n commands: setToolActiveToolbar,\n evaluate: 'evaluate.cornerstoneTool',\n },\n },\n {\n id: 'Pan',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-move',\n label: 'Pan',\n commands: setToolActiveToolbar,\n evaluate: 'evaluate.cornerstoneTool',\n },\n },\n {\n id: 'TrackballRotate',\n uiType: 'ohif.toolButton',\n props: {\n type: 'tool',\n icon: 'tool-3d-rotate',\n label: '3D Rotate',\n commands: setToolActiveToolbar,\n evaluate: {\n name: 'evaluate.cornerstoneTool',\n disabledText: 'Select a 3D viewport to enable this tool',\n },\n },\n },\n {\n id: 'Capture',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-capture',\n label: 'Capture',\n commands: 'showDownloadViewportModal',\n evaluate: [\n 'evaluate.action',\n {\n name: 'evaluate.viewport.supported',\n unsupportedViewportTypes: ['video', 'wholeSlide'],\n },\n ],\n },\n },\n {\n id: 'Layout',\n uiType: 'ohif.layoutSelector',\n props: {\n rows: 3,\n columns: 4,\n evaluate: 'evaluate.action',\n commands: 'setViewportGridLayout',\n },\n },\n {\n id: 'Crosshairs',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-crosshair',\n label: 'Crosshairs',\n commands: {\n commandName: 'setToolActiveToolbar',\n commandOptions: {\n toolGroupIds: ['mpr'],\n },\n },\n evaluate: {\n name: 'evaluate.cornerstoneTool',\n disabledText: 'Select an MPR viewport to enable this tool',\n },\n },\n },\n {\n id: 'MoreTools',\n uiType: 'ohif.toolButtonList',\n props: {\n groupId: 'MoreTools',\n evaluate: 'evaluate.group.promoteToPrimaryIfCornerstoneToolNotActiveInTheList',\n primary: createButton({\n id: 'Reset',\n icon: 'tool-reset',\n tooltip: 'Reset View',\n label: 'Reset',\n commands: 'resetViewport',\n evaluate: 'evaluate.action',\n }),\n secondary: {\n icon: 'chevron-down',\n label: '',\n tooltip: 'More Tools',\n },\n items: [\n createButton({\n id: 'Reset',\n icon: 'tool-reset',\n label: 'Reset View',\n tooltip: 'Reset View',\n commands: 'resetViewport',\n evaluate: 'evaluate.action',\n }),\n createButton({\n id: 'rotate-right',\n icon: 'tool-rotate-right',\n label: 'Rotate Right',\n tooltip: 'Rotate +90',\n commands: 'rotateViewportCW',\n evaluate: 'evaluate.action',\n }),\n createButton({\n id: 'flipHorizontal',\n icon: 'tool-flip-horizontal',\n label: 'Flip Horizontal',\n tooltip: 'Flip Horizontally',\n commands: 'flipViewportHorizontal',\n evaluate: [\n 'evaluate.viewportProperties.toggle',\n {\n name: 'evaluate.viewport.supported',\n unsupportedViewportTypes: ['volume3d'],\n },\n ],\n }),\n createButton({\n id: 'ReferenceLines',\n icon: 'tool-referenceLines',\n label: 'Reference Lines',\n tooltip: 'Show Reference Lines',\n commands: 'toggleEnabledDisabledToolbar',\n listeners: {\n [ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: ReferenceLinesListeners,\n [ViewportGridService.EVENTS.VIEWPORTS_READY]: ReferenceLinesListeners,\n },\n evaluate: 'evaluate.cornerstoneTool.toggle',\n }),\n createButton({\n id: 'ImageOverlayViewer',\n icon: 'toggle-dicom-overlay',\n label: 'Image Overlay',\n tooltip: 'Toggle Image Overlay',\n commands: 'toggleEnabledDisabledToolbar',\n evaluate: 'evaluate.cornerstoneTool.toggle',\n }),\n createButton({\n id: 'StackScroll',\n icon: 'tool-stack-scroll',\n label: 'Stack Scroll',\n tooltip: 'Stack Scroll',\n commands: setToolActiveToolbar,\n evaluate: 'evaluate.cornerstoneTool',\n }),\n createButton({\n id: 'invert',\n icon: 'tool-invert',\n label: 'Invert',\n tooltip: 'Invert Colors',\n commands: 'invertViewport',\n evaluate: 'evaluate.viewportProperties.toggle',\n }),\n createButton({\n id: 'Cine',\n icon: 'tool-cine',\n label: 'Cine',\n tooltip: 'Cine',\n commands: 'toggleCine',\n evaluate: [\n 'evaluate.cine',\n {\n name: 'evaluate.viewport.supported',\n unsupportedViewportTypes: ['volume3d'],\n },\n ],\n }),\n createButton({\n id: 'Magnify',\n icon: 'tool-magnify',\n label: 'Zoom-in',\n tooltip: 'Zoom-in',\n commands: setToolActiveToolbar,\n evaluate: 'evaluate.cornerstoneTool',\n }),\n createButton({\n id: 'TagBrowser',\n icon: 'dicom-tag-browser',\n label: 'Dicom Tag Browser',\n tooltip: 'Dicom Tag Browser',\n commands: 'openDICOMTagViewer',\n }),\n createButton({\n id: 'AdvancedMagnify',\n icon: 'icon-tool-loupe',\n label: 'Magnify Probe',\n tooltip: 'Magnify Probe',\n commands: 'toggleActiveDisabledToolbar',\n evaluate: 'evaluate.cornerstoneTool.toggle.ifStrictlyDisabled',\n }),\n createButton({\n id: 'UltrasoundDirectionalTool',\n icon: 'icon-tool-ultrasound-bidirectional',\n label: 'Ultrasound Directional',\n tooltip: 'Ultrasound Directional',\n commands: setToolActiveToolbar,\n evaluate: [\n 'evaluate.cornerstoneTool',\n {\n name: 'evaluate.modality.supported',\n supportedModalities: ['US'],\n },\n ],\n }),\n createButton({\n id: 'WindowLevelRegion',\n icon: 'icon-tool-window-region',\n label: 'Window Level Region',\n tooltip: 'Window Level Region',\n commands: setToolActiveToolbar,\n evaluate: 'evaluate.cornerstoneTool',\n }),\n ],\n },\n },\n];\n\nexport default toolbarButtons;\n","import type { Button } from '@ohif/core/types';\n\nconst toolbarButtons: Button[] = [\n {\n id: 'BrushTools',\n uiType: 'ohif.toolBoxButtonGroup',\n props: {\n groupId: 'BrushTools',\n evaluate: 'evaluate.cornerstone.hasSegmentation',\n items: [\n {\n id: 'Brush',\n icon: 'icon-tool-brush',\n label: 'Brush',\n evaluate: {\n name: 'evaluate.cornerstone.segmentation',\n toolNames: ['CircularBrush', 'SphereBrush'],\n disabledText: 'Create new segmentation to enable this tool.',\n },\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 toolNames: ['CircularEraser', 'SphereEraser'],\n },\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: 'Threshold Tool',\n evaluate: {\n name: 'evaluate.cornerstone.segmentation',\n toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush'],\n },\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: [\n 'ThresholdCircularBrush',\n 'ThresholdSphereBrush',\n 'ThresholdCircularBrushDynamic',\n ],\n },\n },\n },\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: ({ value, commandsManager, options }) => {\n if (value === 'ThresholdDynamic') {\n commandsManager.run('setToolActive', {\n toolName: 'ThresholdCircularBrushDynamic',\n });\n\n return;\n }\n\n // check the condition of the threshold-range option\n const thresholdRangeOption = options.find(\n option => option.id === 'threshold-shape'\n );\n\n commandsManager.run('setToolActiveToolbar', {\n toolName: thresholdRangeOption.value,\n });\n },\n },\n {\n name: 'Shape',\n type: 'radio',\n id: 'threshold-shape',\n value: 'ThresholdCircularBrush',\n values: [\n { value: 'ThresholdCircularBrush', label: 'Circle' },\n { value: 'ThresholdSphereBrush', label: 'Sphere' },\n ],\n condition: ({ options }) =>\n options.find(option => option.id === 'dynamic-mode').value === 'ThresholdRange',\n commands: 'setToolActiveToolbar',\n },\n {\n name: 'ThresholdRange',\n type: 'double-range',\n id: 'threshold-range',\n min: -1000,\n max: 1000,\n step: 1,\n value: [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.toolBoxButton',\n props: {\n id: 'Shapes',\n icon: 'icon-tool-shape',\n label: 'Shapes',\n evaluate: {\n name: 'evaluate.cornerstone.segmentation',\n toolNames: ['CircleScissor', 'SphereScissor', 'RectangleScissor'],\n disabledText: 'Create new segmentation to enable shapes tool.',\n },\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","const colours = {\n 'viewport-0': 'rgb(200, 0, 0)',\n 'viewport-1': 'rgb(200, 200, 0)',\n 'viewport-2': 'rgb(0, 200, 0)',\n};\n\nconst colorsByOrientation = {\n axial: 'rgb(200, 0, 0)',\n sagittal: 'rgb(200, 200, 0)',\n coronal: 'rgb(0, 200, 0)',\n};\n\nfunction 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.StackScroll, bindings: [{ mouseButton: Enums.MouseBindings.Wheel }] },\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 },\n },\n {\n toolName: 'ThresholdSphereBrush',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'THRESHOLD_INSIDE_SPHERE',\n },\n },\n {\n toolName: 'ThresholdCircularBrushDynamic',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'THRESHOLD_INSIDE_CIRCLE',\n // preview: {\n // enabled: true,\n // },\n strategySpecificConfiguration: {\n // to use the use the center segment index to determine\n // if inside -> same segment, if outside -> eraser\n // useCenterSegmentIndex: true,\n THRESHOLD: {\n isDynamic: true,\n dynamicRadius: 3,\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.WindowLevelRegion },\n\n { toolName: toolNames.UltrasoundDirectional },\n ],\n disabled: [{ toolName: toolNames.ReferenceLines }, { toolName: toolNames.AdvancedMagnify }],\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 servicesManager = extensionManager._servicesManager;\n const { cornerstoneViewportService } = servicesManager.services;\n const tools = createTools(utilityModule);\n tools.disabled.push(\n {\n toolName: utilityModule.exports.toolNames.Crosshairs,\n configuration: {\n viewportIndicators: true,\n viewportIndicatorsConfig: {\n circleRadius: 5,\n xOffset: 0.95,\n yOffset: 0.05,\n },\n disableOnPassive: true,\n autoPan: {\n enabled: false,\n panSize: 10,\n },\n getReferenceLineColor: viewportId => {\n const viewportInfo = cornerstoneViewportService.getViewportInfo(viewportId);\n const viewportOptions = viewportInfo?.viewportOptions;\n if (viewportOptions) {\n return (\n colours[viewportOptions.id] ||\n colorsByOrientation[viewportOptions.orientation] ||\n '#0c0'\n );\n } else {\n console.warn('missing viewport?', viewportId);\n return '#0c0';\n }\n },\n },\n },\n { toolName: utilityModule.exports.toolNames.ReferenceLines }\n );\n toolGroupService.createToolGroupAndAddTools('mpr', tools);\n}\n\nfunction initVolume3DToolGroup(extensionManager, toolGroupService) {\n const utilityModule = extensionManager.getModuleEntry(\n '@ohif/extension-cornerstone.utilityModule.tools'\n );\n\n const { toolNames, Enums } = utilityModule.exports;\n\n const tools = {\n active: [\n {\n toolName: toolNames.TrackballRotateTool,\n bindings: [{ mouseButton: Enums.MouseBindings.Primary }],\n },\n {\n toolName: toolNames.Zoom,\n bindings: [{ mouseButton: Enums.MouseBindings.Secondary }],\n },\n {\n toolName: toolNames.Pan,\n bindings: [{ mouseButton: Enums.MouseBindings.Auxiliary }],\n },\n ],\n };\n\n toolGroupService.createToolGroupAndAddTools('volume3d', tools);\n}\n\nfunction initToolGroups(extensionManager, toolGroupService, commandsManager) {\n initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, 'default');\n initMPRToolGroup(extensionManager, toolGroupService, commandsManager);\n initVolume3DToolGroup(extensionManager, toolGroupService);\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};\n\nconst cornerstone = {\n viewport: '@ohif/extension-cornerstone.viewportModule.cornerstone',\n panelTool: '@ohif/extension-cornerstone.panelModule.panelSegmentationWithTools',\n};\n\nconst segmentation = {\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 }: withAppTypes) => {\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 'WindowLevel',\n 'Pan',\n 'Zoom',\n 'TrackballRotate',\n 'Capture',\n 'Layout',\n 'Crosshairs',\n 'MoreTools',\n ]);\n toolbarService.createButtonSection('segmentationToolbox', ['BrushTools', 'Shapes']);\n },\n onModeExit: ({ servicesManager }: withAppTypes) => {\n const {\n toolGroupService,\n syncGroupService,\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:\n modalitiesArray.length === 1\n ? !['SM', 'ECG', 'OT', 'DOC'].includes(modalitiesArray[0])\n : true,\n description:\n 'The mode does not support studies that ONLY include the following modalities: SM, OT, DOC',\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 leftPanelResizable: true,\n rightPanels: [cornerstone.panelTool],\n rightPanelResizable: true,\n // leftPanelClosed: true,\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 // Commented out to just use the most applicable registered hanging protocol\n // The example is used for a grid layout to specify that as a preferred layout\n // hangingProtocol: ['@ohif/mnGrid'],\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_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","createButton","ToolbarService","ReferenceLinesListeners","commandName","context","setToolActiveToolbar","commandOptions","toolGroupIds","uiType","props","icon","label","commands","evaluate","type","name","disabledText","unsupportedViewportTypes","rows","columns","groupId","primary","tooltip","secondary","items","listeners","ViewportGridService","EVENTS","ACTIVE_VIEWPORT_ID_CHANGED","VIEWPORTS_READY","supportedModalities","toolNames","options","min","max","step","values","commandsManager","run","toolName","thresholdRangeOption","find","option","condition","colours","colorsByOrientation","axial","sagittal","coronal","createTools","utilityModule","Enums","active","WindowLevel","bindings","mouseButton","MouseBindings","Primary","Pan","Auxiliary","Zoom","Secondary","StackScroll","Wheel","passive","parentTool","configuration","activeStrategy","strategySpecificConfiguration","THRESHOLD","isDynamic","dynamicRadius","CircleScissors","RectangleScissors","SphereScissors","Magnify","WindowLevelRegion","UltrasoundDirectional","disabled","ReferenceLines","AdvancedMagnify","ohif","segmentation","extensionDependencies","modeFactory","modeConfiguration","routeName","displayName","onModeEnter","servicesManager","extensionManager","measurementService","toolbarService","toolGroupService","services","clearMeasurements","tools","getModuleEntry","createToolGroupAndAddTools","initDefaultToolGroup","_servicesManager","cornerstoneViewportService","push","Crosshairs","viewportIndicators","viewportIndicatorsConfig","circleRadius","xOffset","yOffset","disableOnPassive","autoPan","enabled","panSize","getReferenceLineColor","viewportId","viewportInfo","getViewportInfo","viewportOptions","orientation","console","warn","initMPRToolGroup","TrackballRotateTool","initVolume3DToolGroup","initToolGroups","addButtons","toolbarButtons","segmentationButtons","createButtonSection","onModeExit","syncGroupService","segmentationService","uiDialogService","uiModalService","dismissAll","hide","destroy","validationTags","study","series","isValidMode","modalities","modalitiesArray","split","valid","length","includes","description","routes","path","layoutTemplate","location","leftPanels","leftPanelResizable","rightPanels","rightPanelResizable","viewports","namespace","displaySetsToDisplay","extensions","sopClassHandlers","hotkeys","defaults","hotkeyBindings"],"sourceRoot":""}
1
+ {"version":3,"file":"index.umd.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,eACR,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,0BAA2B,CAAC,cAAeJ,GACxB,iBAAZC,QACdA,QAAQ,2BAA6BD,EAAQG,QAAQ,eAErDJ,EAAK,2BAA6BC,EAAQD,EAAK,cAChD,CATD,CASmB,oBAATO,KAAuBA,KAAOC,MAAOC,G,kCCT/CN,EAAOD,QAAUO,C,GCCbC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaX,QAGrB,IAAIC,EAASO,EAAyBE,GAAY,CAGjDV,QAAS,CAAC,GAOX,OAHAa,EAAoBH,GAAUT,EAAQA,EAAOD,QAASS,GAG/CR,EAAOD,OACf,CCrBAS,EAAoBK,EAAI,CAACd,EAASe,KACjC,IAAI,IAAIC,KAAOD,EACXN,EAAoBQ,EAAEF,EAAYC,KAASP,EAAoBQ,EAAEjB,EAASgB,IAC5EE,OAAOC,eAAenB,EAASgB,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDP,EAAoBQ,EAAI,CAACK,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFd,EAAoBkB,EAAK3B,IACH,oBAAX4B,QAA0BA,OAAOC,aAC1CX,OAAOC,eAAenB,EAAS4B,OA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qB,EAErBC,UAAW,CACT,CACEC,UAhKN,yDAiKMC,qBAAsB,CAAC9E,IAEzB,CACE6E,UA7JN,iEA8JMC,qBAAsB,CAAC7E,IAEzB,CACE4E,UA7JN,+DA8JMC,qBAAsB,CAAC5E,UASrC6E,WAAY5E,EAIZ6E,gBAAiB,CAAC,gBAElBC,iBAAkB,CAACjF,EAAsBC,EAA8BC,GAE3E,EAKEC,yB","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/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\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"@ohif/mode-segmentation\", [\"@ohif/core\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"@ohif/mode-segmentation\"] = factory(require(\"@ohif/core\"));\n\telse\n\t\troot[\"@ohif/mode-segmentation\"] = factory(root[\"@ohif/core\"]);\n})(typeof self !== 'undefined' ? self : this, (__WEBPACK_EXTERNAL_MODULE__498__) => {\nreturn ","module.exports = __WEBPACK_EXTERNAL_MODULE__498__;","// 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 type { Button } from '@ohif/core/types';\nimport { ViewportGridService } from '@ohif/core';\n\nconst setToolActiveToolbar = {\n commandName: 'setToolActiveToolbar',\n commandOptions: {\n toolGroupIds: ['default', 'mpr', 'SRToolGroup', 'volume3d'],\n },\n};\n\nconst callbacks = (toolName: string) => [\n {\n commandName: 'setViewportForToolConfiguration',\n commandOptions: {\n toolName,\n },\n },\n];\n\nconst toolbarButtons: Button[] = [\n // sections\n {\n id: 'MoreTools',\n uiType: 'ohif.toolButtonList',\n props: {\n buttonSection: 'moreToolsSection',\n groupId: 'MoreTools',\n },\n },\n {\n id: 'BrushTools',\n uiType: 'ohif.toolBoxButtonGroup',\n props: {\n groupId: 'BrushTools',\n buttonSection: 'brushToolsSection',\n },\n },\n // Section containers for the nested toolbox\n {\n id: 'SegmentationUtilities',\n uiType: 'ohif.toolBoxButton',\n props: {\n groupId: 'SegmentationUtilities',\n buttonSection: 'segmentationToolboxUtilitySection',\n },\n },\n {\n id: 'SegmentationTools',\n uiType: 'ohif.toolBoxButton',\n props: {\n groupId: 'SegmentationTools',\n buttonSection: 'segmentationToolboxToolsSection',\n },\n },\n // tool defs\n {\n id: 'Zoom',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-zoom',\n label: 'Zoom',\n commands: setToolActiveToolbar,\n evaluate: 'evaluate.cornerstoneTool',\n },\n },\n {\n id: 'WindowLevel',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-window-level',\n label: 'Window Level',\n commands: setToolActiveToolbar,\n evaluate: 'evaluate.cornerstoneTool',\n },\n },\n {\n id: 'Pan',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-move',\n label: 'Pan',\n commands: setToolActiveToolbar,\n evaluate: 'evaluate.cornerstoneTool',\n },\n },\n {\n id: 'TrackballRotate',\n uiType: 'ohif.toolButton',\n props: {\n type: 'tool',\n icon: 'tool-3d-rotate',\n label: '3D Rotate',\n commands: setToolActiveToolbar,\n evaluate: {\n name: 'evaluate.cornerstoneTool',\n disabledText: 'Select a 3D viewport to enable this tool',\n },\n },\n },\n {\n id: 'Capture',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-capture',\n label: 'Capture',\n commands: 'showDownloadViewportModal',\n evaluate: [\n 'evaluate.action',\n {\n name: 'evaluate.viewport.supported',\n unsupportedViewportTypes: ['video', 'wholeSlide'],\n },\n ],\n },\n },\n {\n id: 'Layout',\n uiType: 'ohif.layoutSelector',\n props: {\n rows: 3,\n columns: 4,\n evaluate: 'evaluate.action',\n commands: 'setViewportGridLayout',\n },\n },\n {\n id: 'Crosshairs',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-crosshair',\n label: 'Crosshairs',\n commands: {\n commandName: 'setToolActiveToolbar',\n commandOptions: {\n toolGroupIds: ['mpr'],\n },\n },\n evaluate: {\n name: 'evaluate.cornerstoneTool',\n disabledText: 'Select an MPR viewport to enable this tool',\n },\n },\n },\n {\n id: 'Reset',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-reset',\n label: 'Reset View',\n tooltip: 'Reset View',\n commands: 'resetViewport',\n evaluate: 'evaluate.action',\n },\n },\n {\n id: 'rotate-right',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-rotate-right',\n label: 'Rotate Right',\n tooltip: 'Rotate +90',\n commands: 'rotateViewportCW',\n evaluate: 'evaluate.action',\n },\n },\n {\n id: 'flipHorizontal',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-flip-horizontal',\n label: 'Flip Horizontal',\n tooltip: 'Flip Horizontally',\n commands: 'flipViewportHorizontal',\n evaluate: [\n 'evaluate.viewportProperties.toggle',\n {\n name: 'evaluate.viewport.supported',\n unsupportedViewportTypes: ['volume3d'],\n },\n ],\n },\n },\n {\n id: 'ReferenceLines',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-referenceLines',\n label: 'Reference Lines',\n tooltip: 'Show Reference Lines',\n commands: 'toggleEnabledDisabledToolbar',\n evaluate: 'evaluate.cornerstoneTool.toggle',\n },\n },\n {\n id: 'ImageOverlayViewer',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'toggle-dicom-overlay',\n label: 'Image Overlay',\n tooltip: 'Toggle Image Overlay',\n commands: 'toggleEnabledDisabledToolbar',\n evaluate: 'evaluate.cornerstoneTool.toggle',\n },\n },\n {\n id: 'StackScroll',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-stack-scroll',\n label: 'Stack Scroll',\n tooltip: 'Stack Scroll',\n commands: setToolActiveToolbar,\n evaluate: 'evaluate.cornerstoneTool',\n },\n },\n {\n id: 'invert',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-invert',\n label: 'Invert',\n tooltip: 'Invert Colors',\n commands: 'invertViewport',\n evaluate: 'evaluate.viewportProperties.toggle',\n },\n },\n {\n id: 'Cine',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-cine',\n label: 'Cine',\n tooltip: 'Cine',\n commands: 'toggleCine',\n evaluate: [\n 'evaluate.cine',\n {\n name: 'evaluate.viewport.supported',\n unsupportedViewportTypes: ['volume3d'],\n },\n ],\n },\n },\n {\n id: 'Magnify',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'tool-magnify',\n label: 'Zoom-in',\n tooltip: 'Zoom-in',\n commands: setToolActiveToolbar,\n evaluate: 'evaluate.cornerstoneTool',\n },\n },\n {\n id: 'TagBrowser',\n uiType: 'ohif.toolButton',\n props: {\n icon: 'dicom-tag-browser',\n label: 'Dicom Tag Browser',\n tooltip: 'Dicom Tag Browser',\n commands: 'openDICOMTagViewer',\n },\n },\n\n {\n id: 'Brush',\n uiType: 'ohif.toolBoxButton',\n props: {\n icon: 'icon-tool-brush',\n label: 'Brush',\n evaluate: {\n name: 'evaluate.cornerstone.segmentation',\n toolNames: ['CircularBrush', 'SphereBrush'],\n disabledText: 'Create new segmentation to enable this tool.',\n },\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 {\n id: 'InterpolateLabelmap',\n uiType: 'ohif.toolBoxButton',\n props: {\n icon: 'icon-tool-interpolation',\n label: 'Interpolate Labelmap',\n tooltip:\n 'Automatically fill in missing slices between drawn segments. Use brush or threshold tools on at least two slices, then click to interpolate across slices. Works in any direction. Volume must be reconstructable.',\n evaluate: [\n 'evaluate.cornerstone.segmentation',\n {\n name: 'evaluate.displaySetIsReconstructable',\n disabledText: 'The current viewport cannot handle interpolation.',\n },\n ],\n commands: 'interpolateLabelmap',\n },\n },\n {\n id: 'SegmentBidirectional',\n uiType: 'ohif.toolBoxButton',\n props: {\n icon: 'icon-tool-bidirectional-segment',\n label: 'Segment Bidirectional',\n tooltip:\n 'Automatically detects the largest length and width across slices for the selected segment and displays a bidirectional measurement.',\n evaluate: {\n name: 'evaluate.cornerstone.segmentation',\n disabledText: 'Create new segmentation to enable this tool.',\n },\n commands: 'runSegmentBidirectional',\n },\n },\n {\n id: 'RegionSegmentPlus',\n uiType: 'ohif.toolBoxButton',\n props: {\n icon: 'icon-tool-click-segment',\n label: 'One Click Segment',\n tooltip:\n 'Detects segmentable regions with one click. Hover for visual feedback—click when a plus sign appears to auto-segment the lesion.',\n evaluate: {\n name: 'evaluate.cornerstone.segmentation',\n toolNames: ['RegionSegmentPlus'],\n disabledText: 'Create new segmentation to enable this tool.',\n },\n commands: 'setToolActiveToolbar',\n },\n },\n {\n id: 'LabelmapSlicePropagation',\n uiType: 'ohif.toolBoxButton',\n props: {\n icon: 'icon-labelmap-slice-propagation',\n label: 'Labelmap Assist',\n tooltip:\n 'Toggle AI assistance for segmenting nearby slices. After drawing on a slice, scroll to preview predictions. Press Enter to accept or Esc to skip.',\n evaluate: [\n 'evaluate.cornerstoneTool.toggle',\n {\n name: 'evaluate.cornerstone.hasSegmentation',\n },\n ],\n listeners: {\n [ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: callbacks(\n 'LabelmapSlicePropagation'\n ),\n [ViewportGridService.EVENTS.VIEWPORTS_READY]: callbacks('LabelmapSlicePropagation'),\n },\n commands: 'toggleEnabledDisabledToolbar',\n },\n },\n {\n id: 'MarkerLabelmap',\n uiType: 'ohif.toolBoxButton',\n props: {\n icon: 'icon-marker-labelmap',\n label: 'Marker Guided Labelmap',\n tooltip:\n 'Use include/exclude markers to guide AI (SAM) segmentation. Click to place markers, Enter to accept results, Esc to reject, and N to go to the next slice while keeping markers.',\n evaluate: [\n {\n name: 'evaluate.cornerstone.segmentation',\n toolNames: ['MarkerLabelmap', 'MarkerInclude', 'MarkerExclude'],\n },\n ],\n commands: 'setToolActiveToolbar',\n listeners: {\n [ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: callbacks('MarkerLabelmap'),\n [ViewportGridService.EVENTS.VIEWPORTS_READY]: callbacks('MarkerLabelmap'),\n },\n options: [\n {\n name: 'Marker Mode',\n type: 'radio',\n id: 'marker-mode',\n value: 'markerInclude',\n values: [\n { value: 'markerInclude', label: 'Include' },\n { value: 'markerExclude', label: 'Exclude' },\n ],\n commands: ({ commandsManager, options }) => {\n const markerModeOption = options.find(option => option.id === 'marker-mode');\n if (markerModeOption.value === 'markerInclude') {\n commandsManager.run('setToolActive', {\n toolName: 'MarkerInclude',\n });\n } else {\n commandsManager.run('setToolActive', {\n toolName: 'MarkerExclude',\n });\n }\n },\n },\n {\n name: 'Clear Markers',\n type: 'button',\n id: 'clear-markers',\n commands: 'clearMarkersForMarkerLabelmap',\n },\n ],\n },\n },\n {\n id: 'Eraser',\n uiType: 'ohif.toolBoxButton',\n props: {\n icon: 'icon-tool-eraser',\n label: 'Eraser',\n evaluate: {\n name: 'evaluate.cornerstone.segmentation',\n toolNames: ['CircularEraser', 'SphereEraser'],\n },\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 {\n id: 'Threshold',\n uiType: 'ohif.toolBoxButton',\n props: {\n icon: 'icon-tool-threshold',\n label: 'Threshold Tool',\n evaluate: {\n name: 'evaluate.cornerstone.segmentation',\n toolNames: [\n 'ThresholdCircularBrush',\n 'ThresholdSphereBrush',\n 'ThresholdCircularBrushDynamic',\n 'ThresholdSphereBrushDynamic',\n ],\n },\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: [\n 'ThresholdCircularBrush',\n 'ThresholdSphereBrush',\n 'ThresholdCircularBrushDynamic',\n 'ThresholdSphereBrushDynamic',\n ],\n },\n },\n },\n {\n name: 'Shape',\n type: 'radio',\n id: 'threshold-shape',\n value: 'ThresholdCircularBrush',\n values: [\n { value: 'ThresholdCircularBrush', label: 'Circle' },\n { value: 'ThresholdSphereBrush', label: 'Sphere' },\n ],\n commands: ({ value, commandsManager, options }) => {\n const optionsDynamic = options.find(option => option.id === 'dynamic-mode');\n\n if (optionsDynamic.value === 'ThresholdDynamic') {\n commandsManager.run('setToolActive', {\n toolName:\n value === 'ThresholdCircularBrush'\n ? 'ThresholdCircularBrushDynamic'\n : 'ThresholdSphereBrushDynamic',\n });\n } else {\n commandsManager.run('setToolActive', {\n toolName: value,\n });\n }\n },\n },\n {\n name: 'Threshold',\n type: 'radio',\n id: 'dynamic-mode',\n value: 'ThresholdDynamic',\n values: [\n { value: 'ThresholdDynamic', label: 'Dynamic' },\n { value: 'ThresholdRange', label: 'Range' },\n ],\n commands: ({ value, commandsManager, options }) => {\n const thresholdRangeOption = options.find(option => option.id === 'threshold-shape');\n\n if (value === 'ThresholdDynamic') {\n commandsManager.run('setToolActiveToolbar', {\n toolName:\n thresholdRangeOption.value === 'ThresholdCircularBrush'\n ? 'ThresholdCircularBrushDynamic'\n : 'ThresholdSphereBrushDynamic',\n });\n } else {\n commandsManager.run('setToolActiveToolbar', {\n toolName: thresholdRangeOption.value,\n });\n\n const thresholdRangeValue = options.find(\n option => option.id === 'threshold-range'\n ).value;\n\n commandsManager.run('setThresholdRange', {\n toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush'],\n value: thresholdRangeValue,\n });\n }\n },\n },\n {\n name: 'ThresholdRange',\n type: 'double-range',\n id: 'threshold-range',\n min: -1000,\n max: 1000,\n step: 1,\n value: [50, 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 id: 'Shapes',\n uiType: 'ohif.toolBoxButton',\n props: {\n icon: 'icon-tool-shape',\n label: 'Shapes',\n evaluate: {\n name: 'evaluate.cornerstone.segmentation',\n toolNames: ['CircleScissor', 'SphereScissor', 'RectangleScissor'],\n disabledText: 'Create new segmentation to enable shapes tool.',\n },\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","const colours = {\n 'viewport-0': 'rgb(200, 0, 0)',\n 'viewport-1': 'rgb(200, 200, 0)',\n 'viewport-2': 'rgb(0, 200, 0)',\n};\n\nconst colorsByOrientation = {\n axial: 'rgb(200, 0, 0)',\n sagittal: 'rgb(200, 200, 0)',\n coronal: 'rgb(0, 200, 0)',\n};\n\nfunction 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.StackScroll, bindings: [{ mouseButton: Enums.MouseBindings.Wheel }] },\n ],\n passive: [\n {\n toolName: 'CircularBrush',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'FILL_INSIDE_CIRCLE',\n },\n },\n {\n toolName: toolNames.LabelmapSlicePropagation,\n },\n {\n toolName: toolNames.MarkerLabelmap,\n },\n {\n toolName: toolNames.RegionSegmentPlus,\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 },\n },\n {\n toolName: 'ThresholdSphereBrush',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'THRESHOLD_INSIDE_SPHERE',\n },\n },\n {\n toolName: 'ThresholdCircularBrushDynamic',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'THRESHOLD_INSIDE_CIRCLE',\n threshold: {\n isDynamic: true,\n dynamicRadius: 3,\n },\n },\n },\n {\n toolName: toolNames.SegmentBidirectional,\n },\n {\n toolName: toolNames.SegmentSelect,\n },\n {\n toolName: 'ThresholdSphereBrushDynamic',\n parentTool: 'Brush',\n configuration: {\n activeStrategy: 'THRESHOLD_INSIDE_SPHERE',\n threshold: {\n isDynamic: true,\n dynamicRadius: 3,\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.WindowLevelRegion },\n\n { toolName: toolNames.UltrasoundDirectional },\n ],\n disabled: [{ toolName: toolNames.ReferenceLines }, { toolName: toolNames.AdvancedMagnify }],\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 servicesManager = extensionManager._servicesManager;\n const { cornerstoneViewportService } = servicesManager.services;\n const tools = createTools(utilityModule);\n tools.disabled.push(\n {\n toolName: utilityModule.exports.toolNames.Crosshairs,\n configuration: {\n viewportIndicators: true,\n viewportIndicatorsConfig: {\n circleRadius: 5,\n xOffset: 0.95,\n yOffset: 0.05,\n },\n disableOnPassive: true,\n autoPan: {\n enabled: false,\n panSize: 10,\n },\n getReferenceLineColor: viewportId => {\n const viewportInfo = cornerstoneViewportService.getViewportInfo(viewportId);\n const viewportOptions = viewportInfo?.viewportOptions;\n if (viewportOptions) {\n return (\n colours[viewportOptions.id] ||\n colorsByOrientation[viewportOptions.orientation] ||\n '#0c0'\n );\n } else {\n console.warn('missing viewport?', viewportId);\n return '#0c0';\n }\n },\n },\n },\n { toolName: utilityModule.exports.toolNames.ReferenceLines }\n );\n toolGroupService.createToolGroupAndAddTools('mpr', tools);\n}\n\nfunction initVolume3DToolGroup(extensionManager, toolGroupService) {\n const utilityModule = extensionManager.getModuleEntry(\n '@ohif/extension-cornerstone.utilityModule.tools'\n );\n\n const { toolNames, Enums } = utilityModule.exports;\n\n const tools = {\n active: [\n {\n toolName: toolNames.TrackballRotateTool,\n bindings: [{ mouseButton: Enums.MouseBindings.Primary }],\n },\n {\n toolName: toolNames.Zoom,\n bindings: [{ mouseButton: Enums.MouseBindings.Secondary }],\n },\n {\n toolName: toolNames.Pan,\n bindings: [{ mouseButton: Enums.MouseBindings.Auxiliary }],\n },\n ],\n };\n\n toolGroupService.createToolGroupAndAddTools('volume3d', tools);\n}\n\nfunction initToolGroups(extensionManager, toolGroupService, commandsManager) {\n initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, 'default');\n initMPRToolGroup(extensionManager, toolGroupService, commandsManager);\n initVolume3DToolGroup(extensionManager, toolGroupService);\n}\n\nexport default initToolGroups;\n","import { 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};\n\nconst cornerstone = {\n viewport: '@ohif/extension-cornerstone.viewportModule.cornerstone',\n panelTool: '@ohif/extension-cornerstone.panelModule.panelSegmentationWithTools',\n measurements: '@ohif/extension-cornerstone.panelModule.panelMeasurement',\n};\n\nconst segmentation = {\n sopClassHandler: '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',\n viewport: '@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg',\n};\n\nconst dicomRT = {\n viewport: '@ohif/extension-cornerstone-dicom-rt.viewportModule.dicom-rt',\n sopClassHandler: '@ohif/extension-cornerstone-dicom-rt.sopClassHandlerModule.dicom-rt',\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 '@ohif/extension-cornerstone-dicom-rt': '^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 }: withAppTypes) => {\n const { measurementService, toolbarService, toolGroupService, customizationService } =\n servicesManager.services;\n\n measurementService.clearMeasurements();\n\n // Init Default and SR ToolGroups\n initToolGroups(extensionManager, toolGroupService, commandsManager);\n\n toolbarService.addButtons(toolbarButtons);\n\n toolbarService.createButtonSection('primary', [\n 'WindowLevel',\n 'Pan',\n 'Zoom',\n 'TrackballRotate',\n 'Capture',\n 'Layout',\n 'Crosshairs',\n 'MoreTools',\n ]);\n\n toolbarService.createButtonSection('moreToolsSection', [\n 'Reset',\n 'rotate-right',\n 'flipHorizontal',\n 'ReferenceLines',\n 'ImageOverlayViewer',\n 'StackScroll',\n 'invert',\n 'Cine',\n 'Magnify',\n 'TagBrowser',\n ]);\n\n toolbarService.createButtonSection('segmentationToolbox', [\n 'SegmentationUtilities',\n 'SegmentationTools',\n ]);\n toolbarService.createButtonSection('segmentationToolboxUtilitySection', [\n 'LabelmapSlicePropagation',\n 'InterpolateLabelmap',\n 'SegmentBidirectional',\n ]);\n toolbarService.createButtonSection('segmentationToolboxToolsSection', [\n 'BrushTools',\n 'MarkerLabelmap',\n 'RegionSegmentPlus',\n 'Shapes',\n ]);\n toolbarService.createButtonSection('brushToolsSection', ['Brush', 'Eraser', 'Threshold']);\n },\n onModeExit: ({ servicesManager }: withAppTypes) => {\n const {\n toolGroupService,\n syncGroupService,\n segmentationService,\n cornerstoneViewportService,\n uiDialogService,\n uiModalService,\n } = servicesManager.services;\n\n uiDialogService.hideAll();\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:\n modalitiesArray.length === 1\n ? !['SM', 'ECG', 'OT', 'DOC'].includes(modalitiesArray[0])\n : true,\n description:\n 'The mode does not support studies that ONLY include the following modalities: SM, OT, DOC',\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 leftPanelResizable: true,\n rightPanels: [cornerstone.panelTool, cornerstone.measurements],\n rightPanelResizable: true,\n // leftPanelClosed: true,\n viewports: [\n {\n namespace: cornerstone.viewport,\n displaySetsToDisplay: [ohif.sopClassHandler],\n },\n {\n namespace: segmentation.viewport,\n displaySetsToDisplay: [segmentation.sopClassHandler],\n },\n {\n namespace: dicomRT.viewport,\n displaySetsToDisplay: [dicomRT.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 // Commented out to just use the most applicable registered hanging protocol\n // The example is used for a grid layout to specify that as a preferred layout\n hangingProtocol: ['@ohif/mnGrid'],\n /** SopClassHandlers used by the mode */\n sopClassHandlers: [ohif.sopClassHandler, segmentation.sopClassHandler, dicomRT.sopClassHandler],\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_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","setToolActiveToolbar","commandName","commandOptions","toolGroupIds","callbacks","toolName","uiType","props","buttonSection","groupId","icon","label","commands","evaluate","type","name","disabledText","unsupportedViewportTypes","rows","columns","tooltip","toolNames","options","min","max","step","values","listeners","ViewportGridService","EVENTS","ACTIVE_VIEWPORT_ID_CHANGED","VIEWPORTS_READY","commandsManager","find","option","run","thresholdRangeOption","thresholdRangeValue","condition","colours","colorsByOrientation","axial","sagittal","coronal","createTools","utilityModule","Enums","active","WindowLevel","bindings","mouseButton","MouseBindings","Primary","Pan","Auxiliary","Zoom","Secondary","StackScroll","Wheel","passive","parentTool","configuration","activeStrategy","LabelmapSlicePropagation","MarkerLabelmap","RegionSegmentPlus","threshold","isDynamic","dynamicRadius","SegmentBidirectional","SegmentSelect","CircleScissors","RectangleScissors","SphereScissors","Magnify","WindowLevelRegion","UltrasoundDirectional","disabled","ReferenceLines","AdvancedMagnify","ohif","segmentation","dicomRT","extensionDependencies","modeFactory","modeConfiguration","routeName","displayName","onModeEnter","servicesManager","extensionManager","measurementService","toolbarService","toolGroupService","customizationService","services","clearMeasurements","tools","getModuleEntry","createToolGroupAndAddTools","initDefaultToolGroup","_servicesManager","cornerstoneViewportService","push","Crosshairs","viewportIndicators","viewportIndicatorsConfig","circleRadius","xOffset","yOffset","disableOnPassive","autoPan","enabled","panSize","getReferenceLineColor","viewportId","viewportInfo","getViewportInfo","viewportOptions","orientation","console","warn","initMPRToolGroup","TrackballRotateTool","initVolume3DToolGroup","initToolGroups","addButtons","toolbarButtons","createButtonSection","onModeExit","syncGroupService","segmentationService","uiDialogService","uiModalService","hideAll","hide","destroy","validationTags","study","series","isValidMode","modalities","modalitiesArray","split","valid","length","includes","description","routes","path","layoutTemplate","location","leftPanels","leftPanelResizable","rightPanels","rightPanelResizable","viewports","namespace","displaySetsToDisplay","extensions","hangingProtocol","sopClassHandlers"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ohif/mode-segmentation",
3
- "version": "3.10.0-beta.98",
3
+ "version": "3.10.0",
4
4
  "description": "OHIF segmentation mode which enables labelmap segmentation read/edit/export",
5
5
  "author": "@ohif",
6
6
  "license": "MIT",
@@ -35,14 +35,14 @@
35
35
  "test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
36
36
  },
37
37
  "peerDependencies": {
38
- "@ohif/core": "3.10.0-beta.98",
39
- "@ohif/extension-cornerstone": "3.10.0-beta.98",
40
- "@ohif/extension-cornerstone-dicom-rt": "3.10.0-beta.98",
41
- "@ohif/extension-cornerstone-dicom-seg": "3.10.0-beta.98",
42
- "@ohif/extension-cornerstone-dicom-sr": "3.10.0-beta.98",
43
- "@ohif/extension-default": "3.10.0-beta.98",
44
- "@ohif/extension-dicom-pdf": "3.10.0-beta.98",
45
- "@ohif/extension-dicom-video": "3.10.0-beta.98"
38
+ "@ohif/core": "3.10.0",
39
+ "@ohif/extension-cornerstone": "3.10.0",
40
+ "@ohif/extension-cornerstone-dicom-rt": "3.10.0",
41
+ "@ohif/extension-cornerstone-dicom-seg": "3.10.0",
42
+ "@ohif/extension-cornerstone-dicom-sr": "3.10.0",
43
+ "@ohif/extension-default": "3.10.0",
44
+ "@ohif/extension-dicom-pdf": "3.10.0",
45
+ "@ohif/extension-dicom-video": "3.10.0"
46
46
  },
47
47
  "dependencies": {
48
48
  "@babel/runtime": "^7.20.13",