@ohif/app 3.8.0-beta.7 → 3.8.0-beta.70

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.
Files changed (93) hide show
  1. package/dist/{220.bundle.f7e1c96c94245e70f2be.js → 109.bundle.b4fee2a22b622839baf5.js} +4466 -3715
  2. package/dist/{471.bundle.49c8d281adbae4a2c4df.js → 121.bundle.21827fec690c01ee9ab3.js} +85 -112
  3. package/dist/{19.bundle.e5579df6d7b74af50b1d.js → 155.bundle.0dabe8513b605b01ac3d.js} +334 -287
  4. package/dist/{687.bundle.9d0330ea5d61fe3117da.js → 164.bundle.0b1a2be351543c1433e8.js} +22 -38
  5. package/dist/17dd54813d5acc10bf8f.wasm +0 -0
  6. package/dist/{506.bundle.ab8226d3d81abe874544.js → 188.bundle.81e83b073b6fd4ae0058.js} +23 -28
  7. package/dist/191.bundle.7d89c921abefd1140d50.js +30360 -0
  8. package/dist/{221.bundle.c2dc03d8fa4235dc1285.js → 2.bundle.04dbbf67a52fe109749c.js} +351 -546
  9. package/dist/20fc4c659b85ccd2a9c0.wasm +0 -0
  10. package/dist/290.bundle.952de53057f98e2c5ef0.js +8883 -0
  11. package/dist/{451.bundle.57c21db5d003c75e9d61.js → 295.bundle.3a0d5062d65296c4bf5d.js} +102 -127
  12. package/dist/{125.bundle.253395f320b72180da63.js → 297.bundle.194d8985ab974839b5b6.js} +7 -8
  13. package/dist/{202.bundle.d3490836f71e001dd30f.js → 342.bundle.6e49f63ea7cea4645c0a.js} +544 -860
  14. package/dist/41.bundle.6ec0794a483e9a30eb94.js +831 -0
  15. package/dist/425.bundle.ffcdde2143a5757926b9.js +2957 -0
  16. package/dist/425.css +2 -0
  17. package/dist/{126.bundle.42df2dafc9c0310da188.js → 448.bundle.9177b9d909654efbc8d5.js} +316 -427
  18. package/dist/{957.bundle.9ea4506963ef8b2d84ba.js → 504.bundle.993d7e2dec36257d4ce4.js} +14338 -27291
  19. package/dist/{886.bundle.c8dd3ecc42a4253de278.js → 530.bundle.566bfd08dccb4cf6d98b.js} +75 -105
  20. package/dist/{250.bundle.aea3335667054bdefe36.js → 544.bundle.1110b24e96863d719a95.js} +39 -56
  21. package/dist/{663.bundle.9f359963019cd8ccf8f9.js → 559.bundle.4f111410af43324629ca.js} +151 -147
  22. package/dist/{181.bundle.a62b9f0ec692299acb35.js → 574.bundle.83afbc7922736fc6846d.js} +1246 -289
  23. package/dist/{181.css → 574.css} +1 -1
  24. package/dist/{410.bundle.38c9d3820e152e89288e.js → 594.bundle.ffeebda1bb9a81182a80.js} +183 -221
  25. package/dist/{776.bundle.004382036bdbd8ee2b95.js → 595.bundle.1c1a50c4ff87763b786a.js} +3128 -1028
  26. package/dist/{774.bundle.4b2dc46a35012b898e1a.js → 644.bundle.1e77691d2eeb96a423b0.js} +1852 -8945
  27. package/dist/699.bundle.db05df7b8e2ad605e928.js +767 -0
  28. package/dist/{359.bundle.8abe0036a7bf6b5fd115.js → 724.bundle.eada9d6c23678a5a2947.js} +130 -254
  29. package/dist/{757.bundle.ec8301d8e70d2b990f65.js → 726.bundle.c8de818cf1a3ff0cf7d2.js} +512 -879
  30. package/dist/{530.bundle.a03b6f942ace3e1baa1e.js → 835.bundle.15aff0b7433bb0dd6d6d.js} +37 -30
  31. package/dist/{822.bundle.82cdc418f8f56da6060b.js → 862.bundle.959ef65b18c1d3b5e2b4.js} +77 -96
  32. package/dist/{236.bundle.c9e70d55e7b2574c1ecd.js → 889.bundle.67c6e5f988c9b1d289ef.js} +198 -197
  33. package/dist/{342.bundle.d9668551811e3a88aaa4.js → 90.bundle.f41c8c4fc78cdfd4de30.js} +1430 -1055
  34. package/dist/{281.bundle.16a2933086a57e60c96c.js → 905.bundle.eb821474b36b96b897f9.js} +155 -122
  35. package/dist/{814.bundle.a1aba9c1e3d336008351.js → 907.bundle.ca904d9747480a0e4bf1.js} +16 -30
  36. package/dist/{417.bundle.af0a207c29b109f84159.js → 931.bundle.d270a1fda9a2836c3cc5.js} +26 -26
  37. package/dist/{686.bundle.dccef1f36e4bc79bcc48.js → 939.bundle.9d93b2e47c52338747a2.js} +7 -8
  38. package/dist/{12.bundle.37a8b47d2ae587cb9226.js → 961.bundle.65967b1a4af002af1d1d.js} +16 -31
  39. package/dist/987.bundle.6bdfb3cd8762b8889632.js +122950 -0
  40. package/dist/app-config.js +1 -0
  41. package/dist/app.bundle.css +15 -13
  42. package/dist/{app.bundle.437d085e13599d1e1ced.js → app.bundle.e21e5afd46fb064cb5de.js} +147713 -61638
  43. package/dist/assets/images/CT-AAA.png +0 -0
  44. package/dist/assets/images/CT-AAA2.png +0 -0
  45. package/dist/assets/images/CT-Air.png +0 -0
  46. package/dist/assets/images/CT-Bone.png +0 -0
  47. package/dist/assets/images/CT-Bones.png +0 -0
  48. package/dist/assets/images/CT-Cardiac.png +0 -0
  49. package/dist/assets/images/CT-Cardiac2.png +0 -0
  50. package/dist/assets/images/CT-Cardiac3.png +0 -0
  51. package/dist/assets/images/CT-Chest-Contrast-Enhanced.png +0 -0
  52. package/dist/assets/images/CT-Chest-Vessels.png +0 -0
  53. package/dist/assets/images/CT-Coronary-Arteries-2.png +0 -0
  54. package/dist/assets/images/CT-Coronary-Arteries-3.png +0 -0
  55. package/dist/assets/images/CT-Coronary-Arteries.png +0 -0
  56. package/dist/assets/images/CT-Cropped-Volume-Bone.png +0 -0
  57. package/dist/assets/images/CT-Fat.png +0 -0
  58. package/dist/assets/images/CT-Liver-Vasculature.png +0 -0
  59. package/dist/assets/images/CT-Lung.png +0 -0
  60. package/dist/assets/images/CT-MIP.png +0 -0
  61. package/dist/assets/images/CT-Muscle.png +0 -0
  62. package/dist/assets/images/CT-Pulmonary-Arteries.png +0 -0
  63. package/dist/assets/images/CT-Soft-Tissue.png +0 -0
  64. package/dist/assets/images/DTI-FA-Brain.png +0 -0
  65. package/dist/assets/images/MR-Angio.png +0 -0
  66. package/dist/assets/images/MR-Default.png +0 -0
  67. package/dist/assets/images/MR-MIP.png +0 -0
  68. package/dist/assets/images/MR-T2-Brain.png +0 -0
  69. package/dist/assets/images/VolumeRendering.png +0 -0
  70. package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
  71. package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
  72. package/dist/{dicom-microscopy-viewer.bundle.2c146384eb9466d02ff8.js → dicom-microscopy-viewer.bundle.d3a56dc9f62df5e11019.js} +3 -3
  73. package/dist/index.html +1 -1
  74. package/dist/{index.worker.e62ecca63f1a2e124230.worker.js → index.worker.64c896c4316fcd506666.worker.js} +2 -2
  75. package/dist/index.worker.64c896c4316fcd506666.worker.js.map +1 -0
  76. package/dist/polySeg.bundle.e7b4c29fb9173e8567b8.js +252 -0
  77. package/dist/serve.json +12 -0
  78. package/dist/sw.js +1 -1
  79. package/package.json +25 -22
  80. package/dist/23.bundle.e008ad788170f2ed5569.js +0 -900
  81. package/dist/604.bundle.a51f83e64004bca5f497.js +0 -1848
  82. package/dist/613.bundle.aed640a7900dbcb688f5.js +0 -532
  83. package/dist/743.bundle.489f7df3a089d4d374e1.js +0 -78007
  84. package/dist/75788f12450d4c5ed494.wasm +0 -0
  85. package/dist/775.bundle.2285e7e0e67878948c0d.js +0 -1009
  86. package/dist/788.bundle.dcd53828d1bb2ac64d04.js +0 -2682
  87. package/dist/82.bundle.5a94dd7645e5c5476f59.js +0 -1049
  88. package/dist/index.worker.e62ecca63f1a2e124230.worker.js.map +0 -1
  89. /package/dist/{19.css → 155.css} +0 -0
  90. /package/dist/{221.css → 2.css} +0 -0
  91. /package/dist/{579.css → 481.css} +0 -0
  92. /package/dist/{250.css → 544.css} +0 -0
  93. /package/dist/{776.css → 595.css} +0 -0
@@ -1,532 +0,0 @@
1
- "use strict";
2
- (self["webpackChunk"] = self["webpackChunk"] || []).push([[613],{
3
-
4
- /***/ 32613:
5
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
-
7
- // ESM COMPAT FLAG
8
- __webpack_require__.r(__webpack_exports__);
9
-
10
- // EXPORTS
11
- __webpack_require__.d(__webpack_exports__, {
12
- "default": () => (/* binding */ segmentation_src)
13
- });
14
-
15
- // EXTERNAL MODULE: ../../core/src/index.ts + 65 modules
16
- var src = __webpack_require__(71771);
17
- ;// CONCATENATED MODULE: ../../../modes/segmentation/package.json
18
- const package_namespaceObject = JSON.parse('{"u2":"@ohif/mode-segmentation"}');
19
- ;// CONCATENATED MODULE: ../../../modes/segmentation/src/id.js
20
-
21
- const id = package_namespaceObject.u2;
22
-
23
- // EXTERNAL MODULE: ../../ui/src/index.js + 486 modules
24
- var ui_src = __webpack_require__(22582);
25
- ;// CONCATENATED MODULE: ../../../modes/segmentation/src/toolbarButtons.ts
26
-
27
-
28
- const {
29
- windowLevelPresets
30
- } = src.defaults;
31
- /**
32
- *
33
- * @param {*} type - 'tool' | 'action' | 'toggle'
34
- * @param {*} id
35
- * @param {*} icon
36
- * @param {*} label
37
- */
38
- function _createButton(type, id, icon, label, commands, tooltip, uiType) {
39
- return {
40
- id,
41
- icon,
42
- label,
43
- type,
44
- commands,
45
- tooltip,
46
- uiType
47
- };
48
- }
49
- const _createActionButton = _createButton.bind(null, 'action');
50
- const _createToggleButton = _createButton.bind(null, 'toggle');
51
- const _createToolButton = _createButton.bind(null, 'tool');
52
-
53
- /**
54
- *
55
- * @param {*} preset - preset number (from above import)
56
- * @param {*} title
57
- * @param {*} subtitle
58
- */
59
- function _createWwwcPreset(preset, title, subtitle) {
60
- return {
61
- id: preset.toString(),
62
- title,
63
- subtitle,
64
- type: 'action',
65
- commands: [{
66
- commandName: 'setWindowLevel',
67
- commandOptions: {
68
- ...windowLevelPresets[preset]
69
- },
70
- context: 'CORNERSTONE'
71
- }]
72
- };
73
- }
74
- const toolGroupIds = ['default', 'mpr', 'SRToolGroup'];
75
-
76
- /**
77
- * Creates an array of 'setToolActive' commands for the given toolName - one for
78
- * each toolGroupId specified in toolGroupIds.
79
- * @param {string} toolName
80
- * @returns {Array} an array of 'setToolActive' commands
81
- */
82
- function _createSetToolActiveCommands(toolName) {
83
- const temp = toolGroupIds.map(toolGroupId => ({
84
- commandName: 'setToolActive',
85
- commandOptions: {
86
- toolGroupId,
87
- toolName
88
- },
89
- context: 'CORNERSTONE'
90
- }));
91
- return temp;
92
- }
93
- const toolbarButtons = [
94
- // Zoom..
95
- {
96
- id: 'Zoom',
97
- type: 'ohif.radioGroup',
98
- props: {
99
- type: 'tool',
100
- icon: 'tool-zoom',
101
- label: 'Zoom',
102
- commands: _createSetToolActiveCommands('Zoom')
103
- }
104
- },
105
- // Window Level + Presets...
106
- {
107
- id: 'WindowLevel',
108
- type: 'ohif.splitButton',
109
- props: {
110
- groupId: 'WindowLevel',
111
- primary: _createToolButton('WindowLevel', 'tool-window-level', 'Window Level', [{
112
- commandName: 'setToolActive',
113
- commandOptions: {
114
- toolName: 'WindowLevel'
115
- },
116
- context: 'CORNERSTONE'
117
- }], 'Window Level'),
118
- secondary: {
119
- icon: 'chevron-down',
120
- label: 'W/L Manual',
121
- isActive: true,
122
- tooltip: 'W/L Presets'
123
- },
124
- isAction: true,
125
- // ?
126
- renderer: ui_src/* WindowLevelMenuItem */.eJ,
127
- items: [_createWwwcPreset(1, 'Soft tissue', '400 / 40'), _createWwwcPreset(2, 'Lung', '1500 / -600'), _createWwwcPreset(3, 'Liver', '150 / 90'), _createWwwcPreset(4, 'Bone', '2500 / 480'), _createWwwcPreset(5, 'Brain', '80 / 40')]
128
- }
129
- },
130
- // Pan...
131
- {
132
- id: 'Pan',
133
- type: 'ohif.radioGroup',
134
- props: {
135
- type: 'tool',
136
- icon: 'tool-move',
137
- label: 'Pan',
138
- commands: _createSetToolActiveCommands('Pan')
139
- }
140
- }, {
141
- id: 'Capture',
142
- type: 'ohif.action',
143
- props: {
144
- icon: 'tool-capture',
145
- label: 'Capture',
146
- type: 'action',
147
- commands: [{
148
- commandName: 'showDownloadViewportModal',
149
- commandOptions: {},
150
- context: 'CORNERSTONE'
151
- }]
152
- }
153
- }, {
154
- id: 'Layout',
155
- type: 'ohif.layoutSelector',
156
- props: {
157
- rows: 3,
158
- columns: 3
159
- }
160
- }, {
161
- id: 'MPR',
162
- type: 'ohif.action',
163
- props: {
164
- type: 'toggle',
165
- icon: 'icon-mpr',
166
- label: 'MPR',
167
- commands: [{
168
- commandName: 'toggleHangingProtocol',
169
- commandOptions: {
170
- protocolId: 'mpr'
171
- },
172
- context: 'DEFAULT'
173
- }]
174
- }
175
- }, {
176
- id: 'Crosshairs',
177
- type: 'ohif.radioGroup',
178
- props: {
179
- type: 'tool',
180
- icon: 'tool-crosshair',
181
- label: 'Crosshairs',
182
- commands: [{
183
- commandName: 'setToolActive',
184
- commandOptions: {
185
- toolName: 'Crosshairs',
186
- toolGroupId: 'mpr'
187
- },
188
- context: 'CORNERSTONE'
189
- }]
190
- }
191
- },
192
- // More...
193
- {
194
- id: 'MoreTools',
195
- type: 'ohif.splitButton',
196
- props: {
197
- isRadio: true,
198
- // ?
199
- groupId: 'MoreTools',
200
- primary: _createActionButton('Reset', 'tool-reset', 'Reset View', [{
201
- commandName: 'resetViewport',
202
- commandOptions: {},
203
- context: 'CORNERSTONE'
204
- }], 'Reset'),
205
- secondary: {
206
- icon: 'chevron-down',
207
- label: '',
208
- isActive: true,
209
- tooltip: 'More Tools'
210
- },
211
- items: [_createActionButton('Reset', 'tool-reset', 'Reset View', [{
212
- commandName: 'resetViewport',
213
- commandOptions: {},
214
- context: 'CORNERSTONE'
215
- }], 'Reset'), _createActionButton('rotate-right', 'tool-rotate-right', 'Rotate Right', [{
216
- commandName: 'rotateViewportCW',
217
- commandOptions: {},
218
- context: 'CORNERSTONE'
219
- }], 'Rotate +90'), _createActionButton('flip-horizontal', 'tool-flip-horizontal', 'Flip Horizontally', [{
220
- commandName: 'flipViewportHorizontal',
221
- commandOptions: {},
222
- context: 'CORNERSTONE'
223
- }], 'Flip Horizontal'), _createToggleButton('StackImageSync', 'link', 'Stack Image Sync', [{
224
- commandName: 'toggleStackImageSync',
225
- commandOptions: {},
226
- context: 'CORNERSTONE'
227
- }]), _createToggleButton('ReferenceLines', 'tool-referenceLines',
228
- // change this with the new icon
229
- 'Reference Lines', [{
230
- commandName: 'toggleReferenceLines',
231
- commandOptions: {},
232
- context: 'CORNERSTONE'
233
- }]), _createToolButton('StackScroll', 'tool-stack-scroll', 'Stack Scroll', [{
234
- commandName: 'setToolActive',
235
- commandOptions: {
236
- toolName: 'StackScroll'
237
- },
238
- context: 'CORNERSTONE'
239
- }], 'Stack Scroll'), _createActionButton('invert', 'tool-invert', 'Invert', [{
240
- commandName: 'invertViewport',
241
- commandOptions: {},
242
- context: 'CORNERSTONE'
243
- }], 'Invert Colors'), _createToggleButton('cine', 'tool-cine', 'Cine', [{
244
- commandName: 'toggleCine',
245
- context: 'CORNERSTONE'
246
- }], 'Cine'), _createToolButton('Magnify', 'tool-magnify', 'Magnify', [{
247
- commandName: 'setToolActive',
248
- commandOptions: {
249
- toolName: 'Magnify'
250
- },
251
- context: 'CORNERSTONE'
252
- }], 'Magnify'), _createActionButton('TagBrowser', 'list-bullets', 'Dicom Tag Browser', [{
253
- commandName: 'openDICOMTagViewer',
254
- commandOptions: {},
255
- context: 'DEFAULT'
256
- }], 'Dicom Tag Browser')]
257
- }
258
- }];
259
- /* harmony default export */ const src_toolbarButtons = (toolbarButtons);
260
- ;// CONCATENATED MODULE: ../../../modes/segmentation/src/initToolGroups.ts
261
- const brushInstanceNames = {
262
- CircularBrush: 'CircularBrush',
263
- CircularEraser: 'CircularEraser',
264
- SphereBrush: 'SphereBrush',
265
- SphereEraser: 'SphereEraser',
266
- ThresholdCircularBrush: 'ThresholdCircularBrush',
267
- ThresholdSphereBrush: 'ThresholdSphereBrush'
268
- };
269
- const brushStrategies = {
270
- CircularBrush: 'FILL_INSIDE_CIRCLE',
271
- CircularEraser: 'ERASE_INSIDE_CIRCLE',
272
- SphereBrush: 'FILL_INSIDE_SPHERE',
273
- SphereEraser: 'ERASE_INSIDE_SPHERE',
274
- ThresholdCircularBrush: 'THRESHOLD_INSIDE_CIRCLE',
275
- ThresholdSphereBrush: 'THRESHOLD_INSIDE_SPHERE'
276
- };
277
- function createTools(utilityModule) {
278
- const {
279
- toolNames,
280
- Enums
281
- } = utilityModule.exports;
282
- return {
283
- active: [{
284
- toolName: toolNames.WindowLevel,
285
- bindings: [{
286
- mouseButton: Enums.MouseBindings.Primary
287
- }]
288
- }, {
289
- toolName: toolNames.Pan,
290
- bindings: [{
291
- mouseButton: Enums.MouseBindings.Auxiliary
292
- }]
293
- }, {
294
- toolName: toolNames.Zoom,
295
- bindings: [{
296
- mouseButton: Enums.MouseBindings.Secondary
297
- }]
298
- }, {
299
- toolName: toolNames.StackScrollMouseWheel,
300
- bindings: []
301
- }],
302
- passive: Object.keys(brushInstanceNames).map(brushName => ({
303
- toolName: brushName,
304
- parentTool: 'Brush',
305
- configuration: {
306
- activeStrategy: brushStrategies[brushName]
307
- }
308
- })).concat([{
309
- toolName: toolNames.CircleScissors
310
- }, {
311
- toolName: toolNames.RectangleScissors
312
- }, {
313
- toolName: toolNames.SphereScissors
314
- }, {
315
- toolName: toolNames.StackScroll
316
- }, {
317
- toolName: toolNames.Magnify
318
- }, {
319
- toolName: toolNames.SegmentationDisplay
320
- }]),
321
- disabled: [{
322
- toolName: toolNames.ReferenceLines
323
- }]
324
- };
325
- }
326
- function initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, toolGroupId) {
327
- const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
328
- const tools = createTools(utilityModule);
329
- toolGroupService.createToolGroupAndAddTools(toolGroupId, tools);
330
- }
331
- function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
332
- const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
333
- const tools = createTools(utilityModule);
334
- tools.disabled.push({
335
- toolName: utilityModule.exports.toolNames.Crosshairs,
336
- configuration: {
337
- viewportIndicators: false,
338
- autoPan: {
339
- enabled: false,
340
- panSize: 10
341
- }
342
- }
343
- }, {
344
- toolName: utilityModule.exports.toolNames.ReferenceLines
345
- });
346
- toolGroupService.createToolGroupAndAddTools('mpr', tools);
347
- }
348
- function initToolGroups(extensionManager, toolGroupService, commandsManager) {
349
- initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, 'default');
350
- initMPRToolGroup(extensionManager, toolGroupService, commandsManager);
351
- }
352
- /* harmony default export */ const src_initToolGroups = (initToolGroups);
353
- ;// CONCATENATED MODULE: ../../../modes/segmentation/src/index.tsx
354
-
355
-
356
-
357
-
358
- const ohif = {
359
- layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',
360
- sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',
361
- hangingProtocol: '@ohif/extension-default.hangingProtocolModule.default',
362
- leftPanel: '@ohif/extension-default.panelModule.seriesList',
363
- rightPanel: '@ohif/extension-default.panelModule.measure'
364
- };
365
- const cornerstone = {
366
- viewport: '@ohif/extension-cornerstone.viewportModule.cornerstone'
367
- };
368
- const segmentation = {
369
- panel: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentation',
370
- panelTool: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentationWithTools',
371
- sopClassHandler: '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',
372
- viewport: '@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg'
373
- };
374
-
375
- /**
376
- * Just two dependencies to be able to render a viewport with panels in order
377
- * to make sure that the mode is working.
378
- */
379
- const extensionDependencies = {
380
- '@ohif/extension-default': '^3.0.0',
381
- '@ohif/extension-cornerstone': '^3.0.0',
382
- '@ohif/extension-cornerstone-dicom-seg': '^3.0.0'
383
- };
384
- function modeFactory(_ref) {
385
- let {
386
- modeConfiguration
387
- } = _ref;
388
- return {
389
- /**
390
- * Mode ID, which should be unique among modes used by the viewer. This ID
391
- * is used to identify the mode in the viewer's state.
392
- */
393
- id: id,
394
- routeName: 'segmentation',
395
- /**
396
- * Mode name, which is displayed in the viewer's UI in the workList, for the
397
- * user to select the mode.
398
- */
399
- displayName: 'Segmentation',
400
- /**
401
- * Runs when the Mode Route is mounted to the DOM. Usually used to initialize
402
- * Services and other resources.
403
- */
404
- onModeEnter: _ref2 => {
405
- let {
406
- servicesManager,
407
- extensionManager,
408
- commandsManager
409
- } = _ref2;
410
- const {
411
- measurementService,
412
- toolbarService,
413
- toolGroupService
414
- } = servicesManager.services;
415
- measurementService.clearMeasurements();
416
-
417
- // Init Default and SR ToolGroups
418
- src_initToolGroups(extensionManager, toolGroupService, commandsManager);
419
- let unsubscribe;
420
- const activateTool = () => {
421
- toolbarService.recordInteraction({
422
- groupId: 'WindowLevel',
423
- interactionType: 'tool',
424
- commands: [{
425
- commandName: 'setToolActive',
426
- commandOptions: {
427
- toolName: 'WindowLevel'
428
- },
429
- context: 'CORNERSTONE'
430
- }]
431
- });
432
-
433
- // We don't need to reset the active tool whenever a viewport is getting
434
- // added to the toolGroup.
435
- unsubscribe();
436
- };
437
-
438
- // Since we only have one viewport for the basic cs3d mode and it has
439
- // only one hanging protocol, we can just use the first viewport
440
- ({
441
- unsubscribe
442
- } = toolGroupService.subscribe(toolGroupService.EVENTS.VIEWPORT_ADDED, activateTool));
443
- toolbarService.init(extensionManager);
444
- toolbarService.addButtons(src_toolbarButtons);
445
- toolbarService.createButtonSection('primary', ['Zoom', 'WindowLevel', 'Pan', 'Capture', 'Layout', 'MPR', 'Crosshairs', 'MoreTools']);
446
- },
447
- onModeExit: _ref3 => {
448
- let {
449
- servicesManager
450
- } = _ref3;
451
- const {
452
- toolGroupService,
453
- syncGroupService,
454
- toolbarService,
455
- segmentationService,
456
- cornerstoneViewportService
457
- } = servicesManager.services;
458
- toolGroupService.destroy();
459
- syncGroupService.destroy();
460
- segmentationService.destroy();
461
- cornerstoneViewportService.destroy();
462
- },
463
- /** */
464
- validationTags: {
465
- study: [],
466
- series: []
467
- },
468
- /**
469
- * A boolean return value that indicates whether the mode is valid for the
470
- * modalities of the selected studies. For instance a PET/CT mode should be
471
- */
472
- isValidMode: _ref4 => {
473
- let {
474
- modalities
475
- } = _ref4;
476
- return true;
477
- },
478
- /**
479
- * Mode Routes are used to define the mode's behavior. A list of Mode Route
480
- * that includes the mode's path and the layout to be used. The layout will
481
- * include the components that are used in the layout. For instance, if the
482
- * default layoutTemplate is used (id: '@ohif/extension-default.layoutTemplateModule.viewerLayout')
483
- * it will include the leftPanels, rightPanels, and viewports. However, if
484
- * you define another layoutTemplate that includes a Footer for instance,
485
- * you should provide the Footer component here too. Note: We use Strings
486
- * to reference the component's ID as they are registered in the internal
487
- * ExtensionManager. The template for the string is:
488
- * `${extensionId}.{moduleType}.${componentId}`.
489
- */
490
- routes: [{
491
- path: 'template',
492
- layoutTemplate: _ref5 => {
493
- let {
494
- location,
495
- servicesManager
496
- } = _ref5;
497
- return {
498
- id: ohif.layout,
499
- props: {
500
- leftPanels: [ohif.leftPanel],
501
- rightPanels: [segmentation.panelTool],
502
- viewports: [{
503
- namespace: cornerstone.viewport,
504
- displaySetsToDisplay: [ohif.sopClassHandler]
505
- }, {
506
- namespace: segmentation.viewport,
507
- displaySetsToDisplay: [segmentation.sopClassHandler]
508
- }]
509
- }
510
- };
511
- }
512
- }],
513
- /** List of extensions that are used by the mode */
514
- extensions: extensionDependencies,
515
- /** HangingProtocol used by the mode */
516
- // hangingProtocol: [''],
517
- /** SopClassHandlers used by the mode */
518
- sopClassHandlers: [ohif.sopClassHandler, segmentation.sopClassHandler],
519
- /** hotkeys for mode */
520
- hotkeys: [...src/* hotkeys */.dD.defaults.hotkeyBindings]
521
- };
522
- }
523
- const mode = {
524
- id: id,
525
- modeFactory,
526
- extensionDependencies
527
- };
528
- /* harmony default export */ const segmentation_src = (mode);
529
-
530
- /***/ })
531
-
532
- }]);