@ohif/mode-microscopy 3.0.0 → 3.5.0-beta.1
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 @@
|
|
|
1
|
-
!function(o,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@ohif/core")):"function"==typeof define&&define.amd?define(["@ohif/core"],e):"object"==typeof exports?exports["ohif-mode-microscopy"]=e(require("@ohif/core")):o["ohif-mode-microscopy"]=e(o["@ohif/core"])}(globalThis,(o=>(()=>{"use strict";var e={762:e=>{e.exports=o}},n={};function i(o){var t=n[o];if(void 0!==t)return t.exports;var s=n[o]={exports:{}};return e[o](s,s.exports,i),s.exports}i.d=(o,e)=>{for(var n in e)i.o(e,n)&&!i.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:e[n]})},i.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e);var t={};return(()=>{i.d(t,{default:()=>y});var o=i(762);const e=JSON.parse('{"u2":"@ohif/mode-microscopy"}').u2;function n(o,e,n,i,t,s){return{id:e,icon:n,label:i,type:o,commands:t,tooltip:s}}n.bind(null,"action"),n.bind(null,"toggle");const s=n.bind(null,"tool"),l=[{id:"MeasurementTools",type:"ohif.splitButton",props:{groupId:"MeasurementTools",isRadio:!0,primary:s("line","tool-length","Line",[{commandName:"setToolActive",commandOptions:{toolName:"line"},context:"MICROSCOPY"}],"Line"),secondary:{icon:"chevron-down",label:"",isActive:!0,tooltip:"More Measure Tools"},items:[s("line","tool-length","Line",[{commandName:"setToolActive",commandOptions:{toolName:"line"},context:"MICROSCOPY"}],"Line Tool"),s("point","tool-point","Point",[{commandName:"setToolActive",commandOptions:{toolName:"point"},context:"MICROSCOPY"}],"Point Tool"),s("polygon","tool-polygon","Polygon",[{commandName:"setToolActive",commandOptions:{toolName:"polygon"},context:"MICROSCOPY"}],"Polygon Tool"),s("circle","tool-circle","Circle",[{commandName:"setToolActive",commandOptions:{toolName:"circle"},context:"MICROSCOPY"}],"Circle Tool"),s("box","tool-rectangle","Box",[{commandName:"setToolActive",commandOptions:{toolName:"box"},context:"MICROSCOPY"}],"Box Tool"),s("freehandpolygon","tool-freehand-polygon","Freehand Polygon",[{commandName:"setToolActive",commandOptions:{toolName:"freehandpolygon"},context:"MICROSCOPY"}],"Freehand Polygon Tool"),s("freehandline","tool-freehand-line","Freehand Line",[{commandName:"setToolActive",commandOptions:{toolName:"freehandline"},context:"MICROSCOPY"}],"Freehand Line Tool")]}},{id:"dragPan",type:"ohif.radioGroup",props:{type:"tool",icon:"tool-move",label:"Pan",commands:[{commandName:"setToolActive",commandOptions:{toolName:"dragPan"},context:"MICROSCOPY"}]}}],a="@ohif/extension-default.layoutTemplateModule.viewerLayout",c="@ohif/extension-default.hangingProtocolModule.default",r="@ohif/extension-default.panelModule.seriesList",d="@ohif/extension-dicom-video.sopClassHandlerModule.dicom-video",m="@ohif/extension-dicom-video.viewportModule.dicom-video",p="@ohif/extension-dicom-pdf.sopClassHandlerModule.dicom-pdf",f="@ohif/extension-dicom-pdf.viewportModule.dicom-pdf",u={"@ohif/extension-default":"^3.0.0","@ohif/extension-cornerstone":"^3.0.0","@ohif/extension-cornerstone-dicom-sr":"^3.0.0","@ohif/extension-dicom-pdf":"^3.0.1","@ohif/extension-dicom-video":"^3.0.1","@ohif/extension-dicom-microscopy":"^3.0.0"};const y={id:e,modeFactory:function(){return{id:e,routeName:"microscopy",displayName:"Microscopy",onModeEnter:o=>{let{servicesManager:e,extensionManager:n,commandsManager:i}=o;const{toolbarService:t}=e.services;t.init(n),t.addButtons(l),t.createButtonSection("primary",["MeasurementTools","dragPan"])},onModeExit:o=>{let{servicesManager:e}=o;const{toolbarService:n}=e.services;n.reset()},validationTags:{study:[],series:[]},isValidMode:o=>{let{modalities:e}=o;return e.split("\\").includes("SM")},routes:[{path:"microscopy",layoutTemplate:o=>{let{location:e,servicesManager:n}=o;return{id:a,props:{leftPanels:[r],leftPanelDefaultClosed:!0,rightPanelDefaultClosed:!0,rightPanels:["@ohif/extension-dicom-microscopy.panelModule.measure"],viewports:[{namespace:"@ohif/extension-dicom-microscopy.viewportModule.microscopy-dicom",displaySetsToDisplay:["@ohif/extension-dicom-microscopy.sopClassHandlerModule.DicomMicroscopySopClassHandler","@ohif/extension-dicom-microscopy.sopClassHandlerModule.DicomMicroscopySRSopClassHandler"]},{namespace:m,displaySetsToDisplay:[d]},{namespace:f,displaySetsToDisplay:[p]}]}}}}],extensions:u,hangingProtocols:[c],hangingProtocol:["default"],sopClassHandlers:["@ohif/extension-dicom-microscopy.sopClassHandlerModule.DicomMicroscopySopClassHandler","@ohif/extension-dicom-microscopy.sopClassHandlerModule.DicomMicroscopySRSopClassHandler",d,p],hotkeys:[...o.hotkeys.defaults.hotkeyBindings]}},extensionDependencies:u}})(),t=t.default})()));
|
|
2
|
-
//# sourceMappingURL=ohif-mode-microscopy.umd.js.map
|
|
1
|
+
!function(o,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@ohif/core")):"function"==typeof define&&define.amd?define(["@ohif/core"],e):"object"==typeof exports?exports["ohif-mode-microscopy"]=e(require("@ohif/core")):o["ohif-mode-microscopy"]=e(o["@ohif/core"])}(globalThis,(o=>(()=>{"use strict";var e={762:e=>{e.exports=o}},n={};function i(o){var t=n[o];if(void 0!==t)return t.exports;var s=n[o]={exports:{}};return e[o](s,s.exports,i),s.exports}i.d=(o,e)=>{for(var n in e)i.o(e,n)&&!i.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:e[n]})},i.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e);var t={};return(()=>{i.d(t,{default:()=>y});var o=i(762);const e=JSON.parse('{"u2":"@ohif/mode-microscopy"}').u2;function n(o,e,n,i,t,s){return{id:e,icon:n,label:i,type:o,commands:t,tooltip:s}}n.bind(null,"action"),n.bind(null,"toggle");const s=n.bind(null,"tool"),l=[{id:"MeasurementTools",type:"ohif.splitButton",props:{groupId:"MeasurementTools",isRadio:!0,primary:s("line","tool-length","Line",[{commandName:"setToolActive",commandOptions:{toolName:"line"},context:"MICROSCOPY"}],"Line"),secondary:{icon:"chevron-down",label:"",isActive:!0,tooltip:"More Measure Tools"},items:[s("line","tool-length","Line",[{commandName:"setToolActive",commandOptions:{toolName:"line"},context:"MICROSCOPY"}],"Line Tool"),s("point","tool-point","Point",[{commandName:"setToolActive",commandOptions:{toolName:"point"},context:"MICROSCOPY"}],"Point Tool"),s("polygon","tool-polygon","Polygon",[{commandName:"setToolActive",commandOptions:{toolName:"polygon"},context:"MICROSCOPY"}],"Polygon Tool"),s("circle","tool-circle","Circle",[{commandName:"setToolActive",commandOptions:{toolName:"circle"},context:"MICROSCOPY"}],"Circle Tool"),s("box","tool-rectangle","Box",[{commandName:"setToolActive",commandOptions:{toolName:"box"},context:"MICROSCOPY"}],"Box Tool"),s("freehandpolygon","tool-freehand-polygon","Freehand Polygon",[{commandName:"setToolActive",commandOptions:{toolName:"freehandpolygon"},context:"MICROSCOPY"}],"Freehand Polygon Tool"),s("freehandline","tool-freehand-line","Freehand Line",[{commandName:"setToolActive",commandOptions:{toolName:"freehandline"},context:"MICROSCOPY"}],"Freehand Line Tool")]}},{id:"dragPan",type:"ohif.radioGroup",props:{type:"tool",icon:"tool-move",label:"Pan",commands:[{commandName:"setToolActive",commandOptions:{toolName:"dragPan"},context:"MICROSCOPY"}]}}],a="@ohif/extension-default.layoutTemplateModule.viewerLayout",c="@ohif/extension-default.hangingProtocolModule.default",r="@ohif/extension-default.panelModule.seriesList",d="@ohif/extension-dicom-video.sopClassHandlerModule.dicom-video",m="@ohif/extension-dicom-video.viewportModule.dicom-video",p="@ohif/extension-dicom-pdf.sopClassHandlerModule.dicom-pdf",f="@ohif/extension-dicom-pdf.viewportModule.dicom-pdf",u={"@ohif/extension-default":"^3.0.0","@ohif/extension-cornerstone":"^3.0.0","@ohif/extension-cornerstone-dicom-sr":"^3.0.0","@ohif/extension-dicom-pdf":"^3.0.1","@ohif/extension-dicom-video":"^3.0.1","@ohif/extension-dicom-microscopy":"^3.0.0"};const y={id:e,modeFactory:function(){return{id:e,routeName:"microscopy",displayName:"Microscopy",onModeEnter:o=>{let{servicesManager:e,extensionManager:n,commandsManager:i}=o;const{toolbarService:t}=e.services;t.init(n),t.addButtons(l),t.createButtonSection("primary",["MeasurementTools","dragPan"])},onModeExit:o=>{let{servicesManager:e}=o;const{toolbarService:n}=e.services;n.reset()},validationTags:{study:[],series:[]},isValidMode:o=>{let{modalities:e}=o;return e.split("\\").includes("SM")},routes:[{path:"microscopy",layoutTemplate:o=>{let{location:e,servicesManager:n}=o;return{id:a,props:{leftPanels:[r],leftPanelDefaultClosed:!0,rightPanelDefaultClosed:!0,rightPanels:["@ohif/extension-dicom-microscopy.panelModule.measure"],viewports:[{namespace:"@ohif/extension-dicom-microscopy.viewportModule.microscopy-dicom",displaySetsToDisplay:["@ohif/extension-dicom-microscopy.sopClassHandlerModule.DicomMicroscopySopClassHandler","@ohif/extension-dicom-microscopy.sopClassHandlerModule.DicomMicroscopySRSopClassHandler"]},{namespace:m,displaySetsToDisplay:[d]},{namespace:f,displaySetsToDisplay:[p]}]}}}}],extensions:u,hangingProtocols:[c],hangingProtocol:["default"],sopClassHandlers:["@ohif/extension-dicom-microscopy.sopClassHandlerModule.DicomMicroscopySopClassHandler","@ohif/extension-dicom-microscopy.sopClassHandlerModule.DicomMicroscopySRSopClassHandler",d,p],hotkeys:[...o.hotkeys.defaults.hotkeyBindings]}},extensionDependencies:u}})(),t=t.default})()));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ohif/mode-microscopy",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.5.0-beta.1",
|
|
4
4
|
"description": "OHIF mode for DICOM microscopy",
|
|
5
5
|
"author": "OHIF",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"keywords": [
|
|
15
15
|
"ohif-mode"
|
|
16
16
|
],
|
|
17
|
-
|
|
17
|
+
"publishConfig": {
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"module": "src/index.tsx",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@ohif/core": "
|
|
37
|
-
"@ohif/extension-dicom-microscopy": "
|
|
36
|
+
"@ohif/core": "3.5.0-beta.1",
|
|
37
|
+
"@ohif/extension-dicom-microscopy": "3.5.0-beta.1"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@babel/runtime": "^7.20.13"
|
|
@@ -62,7 +62,8 @@
|
|
|
62
62
|
"eslint": "^5.0.1",
|
|
63
63
|
"eslint-loader": "^2.0.0",
|
|
64
64
|
"webpack": "^5.50.0",
|
|
65
|
-
"webpack-
|
|
66
|
-
"webpack-
|
|
67
|
-
}
|
|
65
|
+
"webpack-cli": "^4.7.2",
|
|
66
|
+
"webpack-merge": "^5.7.3"
|
|
67
|
+
},
|
|
68
|
+
"gitHead": "6d7561946b02ce49fbaa9a0f47df5818eb3d7983"
|
|
68
69
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dist/ohif-mode-microscopy.umd.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,eACR,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,cAAeJ,GACG,iBAAZC,QACdA,QAAQ,wBAA0BD,EAAQG,QAAQ,eAElDJ,EAAK,wBAA0BC,EAAQD,EAAK,cAC7C,CATD,CASGO,YAAaC,G,kCCThBL,EAAOD,QAAUM,C,GCCbC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAO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AAM,aAINC,eAAgBC,IAAmC,IAAlC,SAAEC,EAAQ,gBAAExB,GAAiBuB,EAC5C,MAAO,CACLrD,GAAIqB,EACJX,MAAO,CACL6C,WAAY,CAAClC,GACbmC,wBAAwB,EACxBC,yBAAyB,EACzBC,YAAa,CACX,wDAEFC,UAAW,CACT,CACEC,UACE,mEACFC,qBAAsB,CACpB,wFACA,4FAGJ,CACED,UAAWtC,EACXuC,qBAAsB,CAACvC,IAEzB,CACEsC,UAAWrC,EACXsC,qBAAsB,CAACtC,MAI9B,IAIPuC,WAAYtC,EACZuC,iBAAkB,CAAC1C,GACnB2C,gBAAiB,CAAC,WAMlBC,iBAAkB,CAChB,wFACA,0FACA3C,EACAC,GAEF2C,QAAS,IAAIA,EAAAA,QAAAA,SAAAA,gBAEjB,EAKE1C,wB","sources":["webpack://ohif-mode-microscopy/webpack/universalModuleDefinition","webpack://ohif-mode-microscopy/external umd \"@ohif/core\"","webpack://ohif-mode-microscopy/webpack/bootstrap","webpack://ohif-mode-microscopy/webpack/runtime/define property getters","webpack://ohif-mode-microscopy/webpack/runtime/hasOwnProperty shorthand","webpack://ohif-mode-microscopy/./id.js","webpack://ohif-mode-microscopy/./toolbarButtons.js","webpack://ohif-mode-microscopy/./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/core\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ohif-mode-microscopy\"] = factory(require(\"@ohif/core\"));\n\telse\n\t\troot[\"ohif-mode-microscopy\"] = factory(root[\"@ohif/core\"]);\n})(globalThis, (__WEBPACK_EXTERNAL_MODULE__762__) => {\nreturn ","module.exports = __WEBPACK_EXTERNAL_MODULE__762__;","// 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))","import packageJson from '../package.json';\n\nconst id = packageJson.name;\n\nexport { id };\n","// TODO: torn, can either bake this here; or have to create a whole new button type\n/**\n *\n * @param {*} type - 'tool' | 'action' | 'toggle'\n * @param {*} id\n * @param {*} icon\n * @param {*} label\n */\nfunction _createButton(type, id, icon, label, commands, tooltip) {\n return {\n id,\n icon,\n label,\n type,\n commands,\n tooltip,\n };\n}\n\nconst _createActionButton = _createButton.bind(null, 'action');\nconst _createToggleButton = _createButton.bind(null, 'toggle');\nconst _createToolButton = _createButton.bind(null, 'tool');\n\nconst toolbarButtons = [\n // Measurement\n {\n id: 'MeasurementTools',\n type: 'ohif.splitButton',\n props: {\n groupId: 'MeasurementTools',\n isRadio: true, // ?\n // Switch?\n primary: _createToolButton(\n 'line',\n 'tool-length',\n 'Line',\n [\n {\n commandName: 'setToolActive',\n commandOptions: {\n toolName: 'line',\n },\n context: 'MICROSCOPY',\n },\n ],\n 'Line'\n ),\n secondary: {\n icon: 'chevron-down',\n label: '',\n isActive: true,\n tooltip: 'More Measure Tools',\n },\n items: [\n _createToolButton(\n 'line',\n 'tool-length',\n 'Line',\n [\n {\n commandName: 'setToolActive',\n commandOptions: {\n toolName: 'line',\n },\n context: 'MICROSCOPY',\n },\n ],\n 'Line Tool'\n ),\n _createToolButton(\n 'point',\n 'tool-point',\n 'Point',\n [\n {\n commandName: 'setToolActive',\n commandOptions: {\n toolName: 'point',\n },\n context: 'MICROSCOPY',\n },\n ],\n 'Point Tool'\n ),\n _createToolButton(\n 'polygon',\n 'tool-polygon',\n 'Polygon',\n [\n {\n commandName: 'setToolActive',\n commandOptions: {\n toolName: 'polygon',\n },\n context: 'MICROSCOPY',\n },\n ],\n 'Polygon Tool'\n ),\n _createToolButton(\n 'circle',\n 'tool-circle',\n 'Circle',\n [\n {\n commandName: 'setToolActive',\n commandOptions: {\n toolName: 'circle',\n },\n context: 'MICROSCOPY',\n },\n ],\n 'Circle Tool'\n ),\n _createToolButton(\n 'box',\n 'tool-rectangle',\n 'Box',\n [\n {\n commandName: 'setToolActive',\n commandOptions: {\n toolName: 'box',\n },\n context: 'MICROSCOPY',\n },\n ],\n 'Box Tool'\n ),\n _createToolButton(\n 'freehandpolygon',\n 'tool-freehand-polygon',\n 'Freehand Polygon',\n [\n {\n commandName: 'setToolActive',\n commandOptions: {\n toolName: 'freehandpolygon',\n },\n context: 'MICROSCOPY',\n },\n ],\n 'Freehand Polygon Tool'\n ),\n _createToolButton(\n 'freehandline',\n 'tool-freehand-line',\n 'Freehand Line',\n [\n {\n commandName: 'setToolActive',\n commandOptions: {\n toolName: 'freehandline',\n },\n context: 'MICROSCOPY',\n },\n ],\n 'Freehand Line Tool'\n ),\n ],\n },\n },\n // Pan...\n {\n id: 'dragPan',\n type: 'ohif.radioGroup',\n props: {\n type: 'tool',\n icon: 'tool-move',\n label: 'Pan',\n commands: [\n {\n commandName: 'setToolActive',\n commandOptions: {\n toolName: 'dragPan',\n },\n context: 'MICROSCOPY',\n },\n ],\n },\n },\n];\n\nexport default toolbarButtons;\n","import { hotkeys } from '@ohif/core';\n\nimport { id } from './id';\nimport toolbarButtons from './toolbarButtons';\n\nconst ohif = {\n layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',\n sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',\n hangingProtocols: '@ohif/extension-default.hangingProtocolModule.default',\n leftPanel: '@ohif/extension-default.panelModule.seriesList',\n rightPanel: '@ohif/extension-default.panelModule.measure',\n};\n\nexport const cornerstone = {\n viewport: '@ohif/extension-cornerstone.viewportModule.cornerstone',\n};\n\nconst dicomvideo = {\n sopClassHandler:\n '@ohif/extension-dicom-video.sopClassHandlerModule.dicom-video',\n viewport: '@ohif/extension-dicom-video.viewportModule.dicom-video',\n};\n\nconst dicompdf = {\n sopClassHandler: '@ohif/extension-dicom-pdf.sopClassHandlerModule.dicom-pdf',\n viewport: '@ohif/extension-dicom-pdf.viewportModule.dicom-pdf',\n};\n\nconst extensionDependencies = {\n // Can derive the versions at least process.env.from npm_package_version\n '@ohif/extension-default': '^3.0.0',\n '@ohif/extension-cornerstone': '^3.0.0',\n '@ohif/extension-cornerstone-dicom-sr': '^3.0.0',\n '@ohif/extension-dicom-pdf': '^3.0.1',\n '@ohif/extension-dicom-video': '^3.0.1',\n '@ohif/extension-dicom-microscopy': '^3.0.0',\n};\n\nfunction modeFactory() {\n return {\n // TODO: We're using this as a route segment\n // We should not be.\n id,\n routeName: 'microscopy',\n displayName: 'Microscopy',\n\n /**\n * Lifecycle hooks\n */\n onModeEnter: ({ servicesManager, extensionManager, commandsManager }) => {\n const { toolbarService } = servicesManager.services;\n\n toolbarService.init(extensionManager);\n toolbarService.addButtons(toolbarButtons);\n toolbarService.createButtonSection('primary', [\n 'MeasurementTools',\n 'dragPan',\n ]);\n },\n\n onModeExit: ({ servicesManager }) => {\n const { toolbarService } = servicesManager.services;\n\n toolbarService.reset();\n },\n\n validationTags: {\n study: [],\n series: [],\n },\n\n isValidMode: ({ modalities }) => {\n const modalities_list = modalities.split('\\\\');\n\n // Slide Microscopy and ECG modality not supported by basic mode yet\n return modalities_list.includes('SM');\n },\n\n routes: [\n {\n path: 'microscopy',\n /*init: ({ servicesManager, extensionManager }) => {\n //defaultViewerRouteInit\n },*/\n layoutTemplate: ({ location, servicesManager }) => {\n return {\n id: ohif.layout,\n props: {\n leftPanels: [ohif.leftPanel],\n leftPanelDefaultClosed: true, // we have problem with rendering thumbnails for microscopy images\n rightPanelDefaultClosed: true, // we do not have the save microscopy measurements yet\n rightPanels: [\n '@ohif/extension-dicom-microscopy.panelModule.measure',\n ],\n viewports: [\n {\n namespace:\n '@ohif/extension-dicom-microscopy.viewportModule.microscopy-dicom',\n displaySetsToDisplay: [\n '@ohif/extension-dicom-microscopy.sopClassHandlerModule.DicomMicroscopySopClassHandler',\n '@ohif/extension-dicom-microscopy.sopClassHandlerModule.DicomMicroscopySRSopClassHandler',\n ],\n },\n {\n namespace: dicomvideo.viewport,\n displaySetsToDisplay: [dicomvideo.sopClassHandler],\n },\n {\n namespace: dicompdf.viewport,\n displaySetsToDisplay: [dicompdf.sopClassHandler],\n },\n ],\n },\n };\n },\n },\n ],\n extensions: extensionDependencies,\n hangingProtocols: [ohif.hangingProtocols],\n hangingProtocol: ['default'],\n\n // Order is important in sop class handlers when two handlers both use\n // the same sop class under different situations. In that case, the more\n // general handler needs to come last. For this case, the dicomvideo must\n // come first to remove video transfer syntax before ohif uses images\n sopClassHandlers: [\n '@ohif/extension-dicom-microscopy.sopClassHandlerModule.DicomMicroscopySopClassHandler',\n '@ohif/extension-dicom-microscopy.sopClassHandlerModule.DicomMicroscopySRSopClassHandler',\n dicomvideo.sopClassHandler,\n dicompdf.sopClassHandler,\n ],\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","globalThis","__WEBPACK_EXTERNAL_MODULE__762__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","id","packageJson","_createButton","type","icon","label","commands","tooltip","bind","_createToolButton","props","groupId","isRadio","primary","commandName","commandOptions","toolName","context","secondary","isActive","items","ohif","dicomvideo","dicompdf","extensionDependencies","modeFactory","routeName","displayName","onModeEnter","_ref","servicesManager","extensionManager","commandsManager","toolbarService","services","init","addButtons","toolbarButtons","createButtonSection","onModeExit","_ref2","reset","validationTags","study","series","isValidMode","_ref3","modalities","split","includes","routes","path","layoutTemplate","_ref4","location","leftPanels","leftPanelDefaultClosed","rightPanelDefaultClosed","rightPanels","viewports","namespace","displaySetsToDisplay","extensions","hangingProtocols","hangingProtocol","sopClassHandlers","hotkeys"],"sourceRoot":""}
|