Files
dicom-proxy/public/613.bundle.5804a80c89dddd4251d0.js
2025-03-11 13:16:07 +07:00

2 lines
7.1 KiB
JavaScript

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[613],{32613:(o,e,t)=>{t.r(e),t.d(e,{default:()=>M});var n=t(71771);const i=JSON.parse('{"u2":"@ohif/mode-segmentation"}').u2;var r=t(71783);const{windowLevelPresets:s}=n.defaults;function a(o,e,t,n,i,r,s){return{id:e,icon:t,label:n,type:o,commands:i,tooltip:r,uiType:s}}const l=a.bind(null,"action"),c=a.bind(null,"toggle"),m=a.bind(null,"tool");function d(o,e,t){return{id:o.toString(),title:e,subtitle:t,type:"action",commands:[{commandName:"setWindowLevel",commandOptions:{...s[o]},context:"CORNERSTONE"}]}}const p=["default","mpr","SRToolGroup"];function u(o){return p.map((e=>({commandName:"setToolActive",commandOptions:{toolGroupId:e,toolName:o},context:"CORNERSTONE"})))}const N=[{id:"Zoom",type:"ohif.radioGroup",props:{type:"tool",icon:"tool-zoom",label:"Zoom",commands:u("Zoom")}},{id:"WindowLevel",type:"ohif.splitButton",props:{groupId:"WindowLevel",primary:m("WindowLevel","tool-window-level","Window Level",[{commandName:"setToolActive",commandOptions:{toolName:"WindowLevel"},context:"CORNERSTONE"}],"Window Level"),secondary:{icon:"chevron-down",label:"W/L Manual",isActive:!0,tooltip:"W/L Presets"},isAction:!0,renderer:r.eJ,items:[d(1,"Soft tissue","400 / 40"),d(2,"Lung","1500 / -600"),d(3,"Liver","150 / 90"),d(4,"Bone","2500 / 480"),d(5,"Brain","80 / 40")]}},{id:"Pan",type:"ohif.radioGroup",props:{type:"tool",icon:"tool-move",label:"Pan",commands:u("Pan")}},{id:"Capture",type:"ohif.action",props:{icon:"tool-capture",label:"Capture",type:"action",commands:[{commandName:"showDownloadViewportModal",commandOptions:{},context:"CORNERSTONE"}]}},{id:"Layout",type:"ohif.layoutSelector",props:{rows:3,columns:3}},{id:"MPR",type:"ohif.action",props:{type:"toggle",icon:"icon-mpr",label:"MPR",commands:[{commandName:"toggleHangingProtocol",commandOptions:{protocolId:"mpr"},context:"DEFAULT"}]}},{id:"Crosshairs",type:"ohif.radioGroup",props:{type:"tool",icon:"tool-crosshair",label:"Crosshairs",commands:[{commandName:"setToolActive",commandOptions:{toolName:"Crosshairs",toolGroupId:"mpr"},context:"CORNERSTONE"}]}},{id:"MoreTools",type:"ohif.splitButton",props:{isRadio:!0,groupId:"MoreTools",primary:l("Reset","tool-reset","Reset View",[{commandName:"resetViewport",commandOptions:{},context:"CORNERSTONE"}],"Reset"),secondary:{icon:"chevron-down",label:"",isActive:!0,tooltip:"More Tools"},items:[l("Reset","tool-reset","Reset View",[{commandName:"resetViewport",commandOptions:{},context:"CORNERSTONE"}],"Reset"),l("rotate-right","tool-rotate-right","Rotate Right",[{commandName:"rotateViewportCW",commandOptions:{},context:"CORNERSTONE"}],"Rotate +90"),l("flip-horizontal","tool-flip-horizontal","Flip Horizontally",[{commandName:"flipViewportHorizontal",commandOptions:{},context:"CORNERSTONE"}],"Flip Horizontal"),c("StackImageSync","link","Stack Image Sync",[{commandName:"toggleStackImageSync",commandOptions:{},context:"CORNERSTONE"}]),c("ReferenceLines","tool-referenceLines","Reference Lines",[{commandName:"toggleReferenceLines",commandOptions:{},context:"CORNERSTONE"}]),m("StackScroll","tool-stack-scroll","Stack Scroll",[{commandName:"setToolActive",commandOptions:{toolName:"StackScroll"},context:"CORNERSTONE"}],"Stack Scroll"),l("invert","tool-invert","Invert",[{commandName:"invertViewport",commandOptions:{},context:"CORNERSTONE"}],"Invert Colors"),c("cine","tool-cine","Cine",[{commandName:"toggleCine",context:"CORNERSTONE"}],"Cine"),m("Magnify","tool-magnify","Magnify",[{commandName:"setToolActive",commandOptions:{toolName:"Magnify"},context:"CORNERSTONE"}],"Magnify"),l("TagBrowser","list-bullets","Dicom Tag Browser",[{commandName:"openDICOMTagViewer",commandOptions:{},context:"DEFAULT"}],"Dicom Tag Browser")]}}],S={CircularBrush:"CircularBrush",CircularEraser:"CircularEraser",SphereBrush:"SphereBrush",SphereEraser:"SphereEraser",ThresholdCircularBrush:"ThresholdCircularBrush",ThresholdSphereBrush:"ThresholdSphereBrush"},h={CircularBrush:"FILL_INSIDE_CIRCLE",CircularEraser:"ERASE_INSIDE_CIRCLE",SphereBrush:"FILL_INSIDE_SPHERE",SphereEraser:"ERASE_INSIDE_SPHERE",ThresholdCircularBrush:"THRESHOLD_INSIDE_CIRCLE",ThresholdSphereBrush:"THRESHOLD_INSIDE_SPHERE"};function E(o){const{toolNames:e,Enums:t}=o.exports;return{active:[{toolName:e.WindowLevel,bindings:[{mouseButton:t.MouseBindings.Primary}]},{toolName:e.Pan,bindings:[{mouseButton:t.MouseBindings.Auxiliary}]},{toolName:e.Zoom,bindings:[{mouseButton:t.MouseBindings.Secondary}]},{toolName:e.StackScrollMouseWheel,bindings:[]}],passive:Object.keys(S).map((o=>({toolName:o,parentTool:"Brush",configuration:{activeStrategy:h[o]}}))).concat([{toolName:e.CircleScissors},{toolName:e.RectangleScissors},{toolName:e.SphereScissors},{toolName:e.StackScroll},{toolName:e.Magnify},{toolName:e.SegmentationDisplay}]),disabled:[{toolName:e.ReferenceLines}]}}const g=function(o,e,t){!function(o,e,t,n){const i=E(o.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"));e.createToolGroupAndAddTools(n,i)}(o,e,0,"default"),function(o,e,t){const n=o.getModuleEntry("@ohif/extension-cornerstone.utilityModule.tools"),i=E(n);i.disabled.push({toolName:n.exports.toolNames.Crosshairs,configuration:{viewportIndicators:!1,autoPan:{enabled:!1,panSize:10}}},{toolName:n.exports.toolNames.ReferenceLines}),e.createToolGroupAndAddTools("mpr",i)}(o,e)},R="@ohif/extension-default.layoutTemplateModule.viewerLayout",y="@ohif/extension-default.sopClassHandlerModule.stack",f="@ohif/extension-default.panelModule.seriesList",T="@ohif/extension-cornerstone.viewportModule.cornerstone",O="@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentationWithTools",v="@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg",C="@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg",w={"@ohif/extension-default":"^3.0.0","@ohif/extension-cornerstone":"^3.0.0","@ohif/extension-cornerstone-dicom-seg":"^3.0.0"};const M={id:i,modeFactory:function(o){let{modeConfiguration:e}=o;return{id:i,routeName:"segmentation",displayName:"Segmentation",onModeEnter:o=>{let{servicesManager:e,extensionManager:t,commandsManager:n}=o;const{measurementService:i,toolbarService:r,toolGroupService:s}=e.services;let a;i.clearMeasurements(),g(t,s,n);({unsubscribe:a}=s.subscribe(s.EVENTS.VIEWPORT_ADDED,(()=>{r.recordInteraction({groupId:"WindowLevel",interactionType:"tool",commands:[{commandName:"setToolActive",commandOptions:{toolName:"WindowLevel"},context:"CORNERSTONE"}]}),a()}))),r.init(t),r.addButtons(N),r.createButtonSection("primary",["Zoom","WindowLevel","Pan","Capture","Layout","MPR","Crosshairs","MoreTools"])},onModeExit:o=>{let{servicesManager:e}=o;const{toolGroupService:t,syncGroupService:n,toolbarService:i,segmentationService:r,cornerstoneViewportService:s}=e.services;t.destroy(),n.destroy(),r.destroy(),s.destroy()},validationTags:{study:[],series:[]},isValidMode:o=>{let{modalities:e}=o;return!0},routes:[{path:"template",layoutTemplate:o=>{let{location:e,servicesManager:t}=o;return{id:R,props:{leftPanels:[f],rightPanels:[O],viewports:[{namespace:T,displaySetsToDisplay:[y]},{namespace:C,displaySetsToDisplay:[v]}]}}}}],extensions:w,sopClassHandlers:[y,v],hotkeys:[...n.dD.defaults.hotkeyBindings]}},extensionDependencies:w}}}]);
//# sourceMappingURL=613.bundle.5804a80c89dddd4251d0.js.map