@ohif/app 3.8.0-beta.8 → 3.8.0-beta.80

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 (99) hide show
  1. package/dist/{220.bundle.f7e1c96c94245e70f2be.js → 109.bundle.b4fee2a22b622839baf5.js} +4466 -3715
  2. package/dist/{471.bundle.49c8d281adbae4a2c4df.js → 121.bundle.787f5a848ed632a4d5fc.js} +90 -112
  3. package/dist/141.bundle.556b4c1e4cab770417ac.js +8620 -0
  4. package/dist/{687.bundle.9065db35c01823286f08.js → 164.bundle.d4598e491783753a8b6b.js} +22 -38
  5. package/dist/17dd54813d5acc10bf8f.wasm +0 -0
  6. package/dist/183.bundle.72bf18ad23ee6624986d.js +30394 -0
  7. package/dist/{506.bundle.5731bb4349e266491225.js → 188.bundle.b80554ec7df7dcd435a5.js} +23 -28
  8. package/dist/{342.bundle.e7c3d500f86fdfcc62b5.js → 206.bundle.f957e0d1cdff66dbac69.js} +1963 -1142
  9. package/dist/20fc4c659b85ccd2a9c0.wasm +0 -0
  10. package/dist/217.bundle.be1cc412f8e26be87d21.js +115079 -0
  11. package/dist/{451.bundle.57c21db5d003c75e9d61.js → 295.bundle.6f734abf8fa85b1a310d.js} +107 -127
  12. package/dist/{125.bundle.253395f320b72180da63.js → 297.bundle.194d8985ab974839b5b6.js} +7 -8
  13. package/dist/{19.bundle.f77c5787b6d8ac0b638b.js → 325.bundle.84909a08305556e9f924.js} +479 -371
  14. package/dist/335.bundle.c39d4aefe33aecab958f.js +2590 -0
  15. package/dist/{202.bundle.d3490836f71e001dd30f.js → 342.bundle.e6d0bba29351b5650a8c.js} +566 -868
  16. package/dist/{776.bundle.a2dedb405a12ffd7699b.js → 41.bundle.7c943bb857ed37831905.js} +7295 -3536
  17. package/dist/422.bundle.bd6529c536f59807fbee.js +881 -0
  18. package/dist/{957.bundle.9ea4506963ef8b2d84ba.js → 433.bundle.4c77c1fe8fc90ac14218.js} +14737 -27555
  19. package/dist/445.bundle.38c6d2af64e41cd7c614.js +7835 -0
  20. package/dist/{126.bundle.6e7111d58bcc937ffd80.js → 448.bundle.deedeff5744e77510734.js} +362 -430
  21. package/dist/487.bundle.7890ca42826941ebcd60.js +1875 -0
  22. package/dist/{886.bundle.c8dd3ecc42a4253de278.js → 530.bundle.7c94543955552475c56a.js} +98 -127
  23. package/dist/{663.bundle.d7be28450db14266cdd0.js → 540.bundle.079d43a6717e95c24392.js} +225 -188
  24. package/dist/{250.bundle.aea3335667054bdefe36.js → 544.bundle.1c1f57118560046649c1.js} +37 -62
  25. package/dist/574.bundle.be075ac52fb52b442a8b.js +2641 -0
  26. package/dist/{181.css → 574.css} +1 -1
  27. package/dist/{410.bundle.15c855b0ff4a1a674fb8.js → 594.bundle.0b1165661dd638820082.js} +183 -221
  28. package/dist/{221.bundle.aef554202c58483cb34e.js → 633.bundle.c1658e76f104cbd14cab.js} +349 -552
  29. package/dist/{774.bundle.4b2dc46a35012b898e1a.js → 644.bundle.1e77691d2eeb96a423b0.js} +1852 -8945
  30. package/dist/699.bundle.4f01772e7ce6637de339.js +768 -0
  31. package/dist/702.bundle.963481fbf871984b646f.js +8426 -0
  32. package/dist/722.bundle.afab1fe6bfcd569130ac.js +1083 -0
  33. package/dist/{359.bundle.45ecb3d28e8c22142606.js → 724.bundle.e5794460c391ee9cba2c.js} +164 -259
  34. package/dist/{757.bundle.ec8301d8e70d2b990f65.js → 726.bundle.0b3d9277d22fe7e15b89.js} +512 -879
  35. package/dist/{530.bundle.a03b6f942ace3e1baa1e.js → 835.bundle.15aff0b7433bb0dd6d6d.js} +37 -30
  36. package/dist/{822.bundle.82cdc418f8f56da6060b.js → 862.bundle.c0ee6e1d4d97e1353213.js} +77 -96
  37. package/dist/{236.bundle.4e9924934a747afac132.js → 889.bundle.7858e4b7ca1a2b12b64f.js} +207 -199
  38. package/dist/{281.bundle.deb7492d143e7768d8bf.js → 905.bundle.170908fe660fc6b40649.js} +157 -124
  39. package/dist/{814.bundle.c8c951d20039b63b865a.js → 907.bundle.dee4e30420caf07caea6.js} +16 -30
  40. package/dist/{417.bundle.af0a207c29b109f84159.js → 931.bundle.d270a1fda9a2836c3cc5.js} +26 -26
  41. package/dist/{686.bundle.dccef1f36e4bc79bcc48.js → 939.bundle.9d93b2e47c52338747a2.js} +7 -8
  42. package/dist/94.bundle.c452d9b0645277c2cf4e.js +784 -0
  43. package/dist/{12.bundle.b5ca13e5363f170ecb3b.js → 961.bundle.aaaaaba0ec015a3b85d8.js} +20 -33
  44. package/dist/app-config.js +1 -0
  45. package/dist/{app.bundle.a978edc59b9d82f2eb22.js → app.bundle.6c090a2d6d3ccc97a81d.js} +183240 -87650
  46. package/dist/app.bundle.css +16 -13
  47. package/dist/assets/images/CT-AAA.png +0 -0
  48. package/dist/assets/images/CT-AAA2.png +0 -0
  49. package/dist/assets/images/CT-Air.png +0 -0
  50. package/dist/assets/images/CT-Bone.png +0 -0
  51. package/dist/assets/images/CT-Bones.png +0 -0
  52. package/dist/assets/images/CT-Cardiac.png +0 -0
  53. package/dist/assets/images/CT-Cardiac2.png +0 -0
  54. package/dist/assets/images/CT-Cardiac3.png +0 -0
  55. package/dist/assets/images/CT-Chest-Contrast-Enhanced.png +0 -0
  56. package/dist/assets/images/CT-Chest-Vessels.png +0 -0
  57. package/dist/assets/images/CT-Coronary-Arteries-2.png +0 -0
  58. package/dist/assets/images/CT-Coronary-Arteries-3.png +0 -0
  59. package/dist/assets/images/CT-Coronary-Arteries.png +0 -0
  60. package/dist/assets/images/CT-Cropped-Volume-Bone.png +0 -0
  61. package/dist/assets/images/CT-Fat.png +0 -0
  62. package/dist/assets/images/CT-Liver-Vasculature.png +0 -0
  63. package/dist/assets/images/CT-Lung.png +0 -0
  64. package/dist/assets/images/CT-MIP.png +0 -0
  65. package/dist/assets/images/CT-Muscle.png +0 -0
  66. package/dist/assets/images/CT-Pulmonary-Arteries.png +0 -0
  67. package/dist/assets/images/CT-Soft-Tissue.png +0 -0
  68. package/dist/assets/images/DTI-FA-Brain.png +0 -0
  69. package/dist/assets/images/MR-Angio.png +0 -0
  70. package/dist/assets/images/MR-Default.png +0 -0
  71. package/dist/assets/images/MR-MIP.png +0 -0
  72. package/dist/assets/images/MR-T2-Brain.png +0 -0
  73. package/dist/assets/images/VolumeRendering.png +0 -0
  74. package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
  75. package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
  76. package/dist/{dicom-microscopy-viewer.bundle.2c146384eb9466d02ff8.js → dicom-microscopy-viewer.bundle.d3a56dc9f62df5e11019.js} +3 -3
  77. package/dist/histogram-worker.bundle.829e14ec12c2b41a4323.js +359 -0
  78. package/dist/index.html +1 -1
  79. package/dist/{index.worker.e62ecca63f1a2e124230.worker.js → index.worker.64c896c4316fcd506666.worker.js} +2 -2
  80. package/dist/index.worker.64c896c4316fcd506666.worker.js.map +1 -0
  81. package/dist/polySeg.bundle.63011312c3c79e717ea9.js +249 -0
  82. package/dist/serve.json +12 -0
  83. package/dist/sw.js +1 -1
  84. package/package.json +26 -22
  85. package/dist/181.bundle.a62b9f0ec692299acb35.js +0 -1527
  86. package/dist/23.bundle.e008ad788170f2ed5569.js +0 -900
  87. package/dist/604.bundle.a51f83e64004bca5f497.js +0 -1848
  88. package/dist/613.bundle.9e7072e5b575354fe51e.js +0 -532
  89. package/dist/743.bundle.489f7df3a089d4d374e1.js +0 -78007
  90. package/dist/75788f12450d4c5ed494.wasm +0 -0
  91. package/dist/775.bundle.2285e7e0e67878948c0d.js +0 -1009
  92. package/dist/788.bundle.207ac23c0dfa70cbe3fb.js +0 -2682
  93. package/dist/82.bundle.d6fdcca0f67540bb226a.js +0 -1049
  94. package/dist/index.worker.e62ecca63f1a2e124230.worker.js.map +0 -1
  95. /package/dist/{19.css → 325.css} +0 -0
  96. /package/dist/{776.css → 41.css} +0 -0
  97. /package/dist/{579.css → 481.css} +0 -0
  98. /package/dist/{250.css → 544.css} +0 -0
  99. /package/dist/{221.css → 633.css} +0 -0
@@ -0,0 +1,768 @@
1
+ "use strict";
2
+ (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[699],{
3
+
4
+ /***/ 40080:
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 + 70 modules
16
+ var src = __webpack_require__(55411);
17
+ ;// CONCATENATED MODULE: ../../../modes/segmentation/package.json
18
+ const package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@ohif/mode-segmentation"}');
19
+ ;// CONCATENATED MODULE: ../../../modes/segmentation/src/id.js
20
+
21
+ const id = package_namespaceObject.UU;
22
+
23
+ ;// CONCATENATED MODULE: ../../../modes/segmentation/src/toolbarButtons.ts
24
+
25
+ const {
26
+ createButton
27
+ } = src.ToolbarService;
28
+ const ReferenceLinesListeners = [{
29
+ commandName: 'setSourceViewportForReferenceLinesTool',
30
+ context: 'CORNERSTONE'
31
+ }];
32
+ const setToolActiveToolbar = {
33
+ commandName: 'setToolActiveToolbar',
34
+ commandOptions: {
35
+ toolGroupIds: ['default', 'mpr', 'SRToolGroup']
36
+ }
37
+ };
38
+ const toggleEnabledDisabledToolbar = {
39
+ commandName: 'toggleEnabledDisabledToolbar',
40
+ commandOptions: {
41
+ toolGroupIds: ['default', 'mpr', 'SRToolGroup']
42
+ }
43
+ };
44
+ const toggleActiveDisabledToolbar = {
45
+ commandName: 'toggleActiveDisabledToolbar',
46
+ commandOptions: {
47
+ toolGroupIds: ['default', 'mpr', 'SRToolGroup']
48
+ }
49
+ };
50
+ const toolbarButtons = [{
51
+ id: 'Zoom',
52
+ uiType: 'ohif.radioGroup',
53
+ props: {
54
+ icon: 'tool-zoom',
55
+ label: 'Zoom',
56
+ commands: setToolActiveToolbar,
57
+ evaluate: 'evaluate.cornerstoneTool'
58
+ }
59
+ }, {
60
+ id: 'WindowLevel',
61
+ uiType: 'ohif.radioGroup',
62
+ props: {
63
+ icon: 'tool-window-level',
64
+ label: 'Window Level',
65
+ commands: setToolActiveToolbar,
66
+ evaluate: 'evaluate.cornerstoneTool'
67
+ }
68
+ }, {
69
+ id: 'Pan',
70
+ uiType: 'ohif.radioGroup',
71
+ props: {
72
+ icon: 'tool-move',
73
+ label: 'Pan',
74
+ commands: setToolActiveToolbar,
75
+ evaluate: 'evaluate.cornerstoneTool'
76
+ }
77
+ }, {
78
+ id: 'TrackballRotate',
79
+ uiType: 'ohif.radioGroup',
80
+ props: {
81
+ type: 'tool',
82
+ icon: 'tool-3d-rotate',
83
+ label: '3D Rotate',
84
+ commands: setToolActiveToolbar,
85
+ evaluate: {
86
+ name: 'evaluate.cornerstoneTool',
87
+ disabledText: 'Select a 3D viewport to enable this tool'
88
+ }
89
+ }
90
+ }, {
91
+ id: 'Capture',
92
+ uiType: 'ohif.radioGroup',
93
+ props: {
94
+ icon: 'tool-capture',
95
+ label: 'Capture',
96
+ commands: 'showDownloadViewportModal',
97
+ evaluate: 'evaluate.action'
98
+ }
99
+ }, {
100
+ id: 'Layout',
101
+ uiType: 'ohif.layoutSelector',
102
+ props: {
103
+ rows: 3,
104
+ columns: 4,
105
+ evaluate: 'evaluate.action',
106
+ commands: 'setViewportGridLayout'
107
+ }
108
+ }, {
109
+ id: 'Crosshairs',
110
+ uiType: 'ohif.radioGroup',
111
+ props: {
112
+ icon: 'tool-crosshair',
113
+ label: 'Crosshairs',
114
+ commands: {
115
+ commandName: 'setToolActiveToolbar',
116
+ commandOptions: {
117
+ toolGroupIds: ['mpr']
118
+ }
119
+ },
120
+ evaluate: {
121
+ name: 'evaluate.cornerstoneTool',
122
+ disabledText: 'Select an MPR viewport to enable this tool'
123
+ }
124
+ }
125
+ }, {
126
+ id: 'MoreTools',
127
+ uiType: 'ohif.splitButton',
128
+ props: {
129
+ groupId: 'MoreTools',
130
+ evaluate: 'evaluate.group.promoteToPrimaryIfCornerstoneToolNotActiveInTheList',
131
+ primary: createButton({
132
+ id: 'Reset',
133
+ icon: 'tool-reset',
134
+ tooltip: 'Reset View',
135
+ label: 'Reset',
136
+ commands: 'resetViewport',
137
+ evaluate: 'evaluate.action'
138
+ }),
139
+ secondary: {
140
+ icon: 'chevron-down',
141
+ label: '',
142
+ tooltip: 'More Tools'
143
+ },
144
+ items: [createButton({
145
+ id: 'Reset',
146
+ icon: 'tool-reset',
147
+ label: 'Reset View',
148
+ tooltip: 'Reset View',
149
+ commands: 'resetViewport',
150
+ evaluate: 'evaluate.action'
151
+ }), createButton({
152
+ id: 'rotate-right',
153
+ icon: 'tool-rotate-right',
154
+ label: 'Rotate Right',
155
+ tooltip: 'Rotate +90',
156
+ commands: 'rotateViewportCW',
157
+ evaluate: 'evaluate.action'
158
+ }), createButton({
159
+ id: 'flipHorizontal',
160
+ icon: 'tool-flip-horizontal',
161
+ label: 'Flip Horizontal',
162
+ tooltip: 'Flip Horizontally',
163
+ commands: 'flipViewportHorizontal',
164
+ evaluate: ['evaluate.viewportProperties.toggle', 'evaluate.not3D']
165
+ }), createButton({
166
+ id: 'ReferenceLines',
167
+ icon: 'tool-referenceLines',
168
+ label: 'Reference Lines',
169
+ tooltip: 'Show Reference Lines',
170
+ commands: toggleEnabledDisabledToolbar,
171
+ listeners: {
172
+ [src/* ViewportGridService */.sI.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: ReferenceLinesListeners,
173
+ [src/* ViewportGridService */.sI.EVENTS.VIEWPORTS_READY]: ReferenceLinesListeners
174
+ },
175
+ evaluate: 'evaluate.cornerstoneTool.toggle'
176
+ }), createButton({
177
+ id: 'ImageOverlayViewer',
178
+ icon: 'toggle-dicom-overlay',
179
+ label: 'Image Overlay',
180
+ tooltip: 'Toggle Image Overlay',
181
+ commands: toggleEnabledDisabledToolbar,
182
+ evaluate: 'evaluate.cornerstoneTool.toggle'
183
+ }), createButton({
184
+ id: 'StackScroll',
185
+ icon: 'tool-stack-scroll',
186
+ label: 'Stack Scroll',
187
+ tooltip: 'Stack Scroll',
188
+ commands: setToolActiveToolbar,
189
+ evaluate: 'evaluate.cornerstoneTool'
190
+ }), createButton({
191
+ id: 'invert',
192
+ icon: 'tool-invert',
193
+ label: 'Invert',
194
+ tooltip: 'Invert Colors',
195
+ commands: 'invertViewport',
196
+ evaluate: 'evaluate.viewportProperties.toggle'
197
+ }), createButton({
198
+ id: 'Probe',
199
+ icon: 'tool-probe',
200
+ label: 'Probe',
201
+ tooltip: 'Probe',
202
+ commands: setToolActiveToolbar,
203
+ evaluate: 'evaluate.cornerstoneTool'
204
+ }), createButton({
205
+ id: 'Cine',
206
+ icon: 'tool-cine',
207
+ label: 'Cine',
208
+ tooltip: 'Cine',
209
+ commands: 'toggleCine',
210
+ evaluate: ['evaluate.cine', 'evaluate.not3D']
211
+ }), createButton({
212
+ id: 'Angle',
213
+ icon: 'tool-angle',
214
+ label: 'Angle',
215
+ tooltip: 'Angle',
216
+ commands: setToolActiveToolbar,
217
+ evaluate: 'evaluate.cornerstoneTool'
218
+ }), createButton({
219
+ id: 'Magnify',
220
+ icon: 'tool-magnify',
221
+ label: 'Magnify',
222
+ tooltip: 'Magnify',
223
+ commands: setToolActiveToolbar,
224
+ evaluate: 'evaluate.cornerstoneTool'
225
+ }), createButton({
226
+ id: 'RectangleROI',
227
+ icon: 'tool-rectangle',
228
+ label: 'Rectangle',
229
+ tooltip: 'Rectangle',
230
+ commands: setToolActiveToolbar,
231
+ evaluate: 'evaluate.cornerstoneTool'
232
+ }), createButton({
233
+ id: 'CalibrationLine',
234
+ icon: 'tool-calibration',
235
+ label: 'Calibration',
236
+ tooltip: 'Calibration Line',
237
+ commands: setToolActiveToolbar,
238
+ evaluate: 'evaluate.cornerstoneTool'
239
+ }), createButton({
240
+ id: 'TagBrowser',
241
+ icon: 'dicom-tag-browser',
242
+ label: 'Dicom Tag Browser',
243
+ tooltip: 'Dicom Tag Browser',
244
+ commands: 'openDICOMTagViewer'
245
+ }), createButton({
246
+ id: 'AdvancedMagnify',
247
+ icon: 'icon-tool-loupe',
248
+ label: 'Loupe',
249
+ tooltip: 'Loupe',
250
+ commands: toggleActiveDisabledToolbar,
251
+ evaluate: 'evaluate.cornerstoneTool'
252
+ }), createButton({
253
+ id: 'UltrasoundDirectionalTool',
254
+ icon: 'icon-tool-ultrasound-bidirectional',
255
+ label: 'Ultrasound Directional',
256
+ tooltip: 'Ultrasound Directional',
257
+ commands: setToolActiveToolbar,
258
+ evaluate: ['evaluate.cornerstoneTool', 'evaluate.isUS']
259
+ })]
260
+ }
261
+ }];
262
+ /* harmony default export */ const src_toolbarButtons = (toolbarButtons);
263
+ ;// CONCATENATED MODULE: ../../../modes/segmentation/src/segmentationButtons.ts
264
+ function _createSetToolActiveCommands(toolName) {
265
+ return [{
266
+ commandName: 'setToolActive',
267
+ commandOptions: {
268
+ toolName
269
+ }
270
+ }];
271
+ }
272
+ const segmentationButtons_toolbarButtons = [{
273
+ id: 'BrushTools',
274
+ uiType: 'ohif.buttonGroup',
275
+ props: {
276
+ groupId: 'BrushTools',
277
+ items: [{
278
+ id: 'Brush',
279
+ icon: 'icon-tool-brush',
280
+ label: 'Brush',
281
+ evaluate: {
282
+ name: 'evaluate.cornerstone.segmentation',
283
+ options: {
284
+ toolNames: ['CircularBrush', 'SphereBrush']
285
+ },
286
+ disabledText: 'Create new segmentation to enable this tool.'
287
+ },
288
+ commands: _createSetToolActiveCommands('CircularBrush'),
289
+ options: [{
290
+ name: 'Radius (mm)',
291
+ id: 'brush-radius',
292
+ type: 'range',
293
+ min: 0.5,
294
+ max: 99.5,
295
+ step: 0.5,
296
+ value: 25,
297
+ commands: {
298
+ commandName: 'setBrushSize',
299
+ commandOptions: {
300
+ toolNames: ['CircularBrush', 'SphereBrush']
301
+ }
302
+ }
303
+ }, {
304
+ name: 'Shape',
305
+ type: 'radio',
306
+ id: 'brush-mode',
307
+ value: 'CircularBrush',
308
+ values: [{
309
+ value: 'CircularBrush',
310
+ label: 'Circle'
311
+ }, {
312
+ value: 'SphereBrush',
313
+ label: 'Sphere'
314
+ }],
315
+ commands: 'setToolActiveToolbar'
316
+ }]
317
+ }, {
318
+ id: 'Eraser',
319
+ icon: 'icon-tool-eraser',
320
+ label: 'Eraser',
321
+ evaluate: {
322
+ name: 'evaluate.cornerstone.segmentation',
323
+ options: {
324
+ toolNames: ['CircularEraser', 'SphereEraser']
325
+ }
326
+ },
327
+ commands: _createSetToolActiveCommands('CircularEraser'),
328
+ options: [{
329
+ name: 'Radius (mm)',
330
+ id: 'eraser-radius',
331
+ type: 'range',
332
+ min: 0.5,
333
+ max: 99.5,
334
+ step: 0.5,
335
+ value: 25,
336
+ commands: {
337
+ commandName: 'setBrushSize',
338
+ commandOptions: {
339
+ toolNames: ['CircularEraser', 'SphereEraser']
340
+ }
341
+ }
342
+ }, {
343
+ name: 'Shape',
344
+ type: 'radio',
345
+ id: 'eraser-mode',
346
+ value: 'CircularEraser',
347
+ values: [{
348
+ value: 'CircularEraser',
349
+ label: 'Circle'
350
+ }, {
351
+ value: 'SphereEraser',
352
+ label: 'Sphere'
353
+ }],
354
+ commands: 'setToolActiveToolbar'
355
+ }]
356
+ }, {
357
+ id: 'Threshold',
358
+ icon: 'icon-tool-threshold',
359
+ label: 'Threshold Tool',
360
+ evaluate: {
361
+ name: 'evaluate.cornerstone.segmentation',
362
+ options: {
363
+ toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush']
364
+ }
365
+ },
366
+ commands: _createSetToolActiveCommands('ThresholdCircularBrush'),
367
+ options: [{
368
+ name: 'Radius (mm)',
369
+ id: 'threshold-radius',
370
+ type: 'range',
371
+ min: 0.5,
372
+ max: 99.5,
373
+ step: 0.5,
374
+ value: 25,
375
+ commands: {
376
+ commandName: 'setBrushSize',
377
+ commandOptions: {
378
+ toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush']
379
+ }
380
+ }
381
+ }, {
382
+ name: 'Shape',
383
+ type: 'radio',
384
+ id: 'eraser-mode',
385
+ value: 'ThresholdCircularBrush',
386
+ values: [{
387
+ value: 'ThresholdCircularBrush',
388
+ label: 'Circle'
389
+ }, {
390
+ value: 'ThresholdSphereBrush',
391
+ label: 'Sphere'
392
+ }],
393
+ commands: 'setToolActiveToolbar'
394
+ }, {
395
+ name: 'Threshold',
396
+ type: 'radio',
397
+ id: 'dynamic-mode',
398
+ value: 'ThresholdRange',
399
+ values: [{
400
+ value: 'ThresholdDynamic',
401
+ label: 'Dynamic'
402
+ }, {
403
+ value: 'ThresholdRange',
404
+ label: 'Range'
405
+ }],
406
+ commands: {
407
+ commandName: 'toggleThresholdRangeAndDynamic'
408
+ }
409
+ }, {
410
+ name: 'ThresholdRange',
411
+ type: 'double-range',
412
+ id: 'threshold-range',
413
+ min: -1000,
414
+ max: 1000,
415
+ step: 1,
416
+ values: [100, 600],
417
+ condition: ({
418
+ options
419
+ }) => options.find(option => option.id === 'dynamic-mode').value === 'ThresholdRange',
420
+ commands: {
421
+ commandName: 'setThresholdRange',
422
+ commandOptions: {
423
+ toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush']
424
+ }
425
+ }
426
+ }]
427
+ }]
428
+ }
429
+ }, {
430
+ id: 'Shapes',
431
+ uiType: 'ohif.radioGroup',
432
+ props: {
433
+ label: 'Shapes',
434
+ evaluate: {
435
+ name: 'evaluate.cornerstone.segmentation',
436
+ options: {
437
+ toolNames: ['CircleScissor', 'SphereScissor', 'RectangleScissor']
438
+ }
439
+ },
440
+ icon: 'icon-tool-shape',
441
+ commands: _createSetToolActiveCommands('CircleScissor'),
442
+ options: [{
443
+ name: 'Shape',
444
+ type: 'radio',
445
+ value: 'CircleScissor',
446
+ id: 'shape-mode',
447
+ values: [{
448
+ value: 'CircleScissor',
449
+ label: 'Circle'
450
+ }, {
451
+ value: 'SphereScissor',
452
+ label: 'Sphere'
453
+ }, {
454
+ value: 'RectangleScissor',
455
+ label: 'Rectangle'
456
+ }],
457
+ commands: 'setToolActiveToolbar'
458
+ }]
459
+ }
460
+ }];
461
+ /* harmony default export */ const segmentationButtons = (segmentationButtons_toolbarButtons);
462
+ ;// CONCATENATED MODULE: ../../../modes/segmentation/src/initToolGroups.ts
463
+ function createTools(utilityModule) {
464
+ const {
465
+ toolNames,
466
+ Enums
467
+ } = utilityModule.exports;
468
+ return {
469
+ active: [{
470
+ toolName: toolNames.WindowLevel,
471
+ bindings: [{
472
+ mouseButton: Enums.MouseBindings.Primary
473
+ }]
474
+ }, {
475
+ toolName: toolNames.Pan,
476
+ bindings: [{
477
+ mouseButton: Enums.MouseBindings.Auxiliary
478
+ }]
479
+ }, {
480
+ toolName: toolNames.Zoom,
481
+ bindings: [{
482
+ mouseButton: Enums.MouseBindings.Secondary
483
+ }]
484
+ }, {
485
+ toolName: toolNames.StackScrollMouseWheel,
486
+ bindings: []
487
+ }],
488
+ passive: [{
489
+ toolName: 'CircularBrush',
490
+ parentTool: 'Brush',
491
+ configuration: {
492
+ activeStrategy: 'FILL_INSIDE_CIRCLE'
493
+ }
494
+ }, {
495
+ toolName: 'CircularEraser',
496
+ parentTool: 'Brush',
497
+ configuration: {
498
+ activeStrategy: 'ERASE_INSIDE_CIRCLE'
499
+ }
500
+ }, {
501
+ toolName: 'SphereBrush',
502
+ parentTool: 'Brush',
503
+ configuration: {
504
+ activeStrategy: 'FILL_INSIDE_SPHERE'
505
+ }
506
+ }, {
507
+ toolName: 'SphereEraser',
508
+ parentTool: 'Brush',
509
+ configuration: {
510
+ activeStrategy: 'ERASE_INSIDE_SPHERE'
511
+ }
512
+ }, {
513
+ toolName: 'ThresholdCircularBrush',
514
+ parentTool: 'Brush',
515
+ configuration: {
516
+ activeStrategy: 'THRESHOLD_INSIDE_CIRCLE',
517
+ dynamicRadius: 3
518
+ }
519
+ }, {
520
+ toolName: 'ThresholdSphereBrush',
521
+ parentTool: 'Brush',
522
+ configuration: {
523
+ activeStrategy: 'THRESHOLD_INSIDE_SPHERE',
524
+ dynamicRadius: 3
525
+ }
526
+ }, {
527
+ toolName: toolNames.CircleScissors
528
+ }, {
529
+ toolName: toolNames.RectangleScissors
530
+ }, {
531
+ toolName: toolNames.SphereScissors
532
+ }, {
533
+ toolName: toolNames.StackScroll
534
+ }, {
535
+ toolName: toolNames.Magnify
536
+ }, {
537
+ toolName: toolNames.SegmentationDisplay
538
+ }, {
539
+ toolName: toolNames.AdvancedMagnify
540
+ }, {
541
+ toolName: toolNames.UltrasoundDirectional
542
+ }],
543
+ disabled: [{
544
+ toolName: toolNames.ReferenceLines
545
+ }]
546
+ };
547
+ }
548
+ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, toolGroupId) {
549
+ const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
550
+ const tools = createTools(utilityModule);
551
+ toolGroupService.createToolGroupAndAddTools(toolGroupId, tools);
552
+ }
553
+ function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
554
+ const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
555
+ const tools = createTools(utilityModule);
556
+ tools.disabled.push({
557
+ toolName: utilityModule.exports.toolNames.Crosshairs,
558
+ configuration: {
559
+ viewportIndicators: false,
560
+ disableOnPassive: true,
561
+ autoPan: {
562
+ enabled: false,
563
+ panSize: 10
564
+ }
565
+ }
566
+ }, {
567
+ toolName: utilityModule.exports.toolNames.ReferenceLines
568
+ });
569
+ toolGroupService.createToolGroupAndAddTools('mpr', tools);
570
+ }
571
+ function initVolume3DToolGroup(extensionManager, toolGroupService) {
572
+ const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
573
+ const {
574
+ toolNames,
575
+ Enums
576
+ } = utilityModule.exports;
577
+ const tools = {
578
+ active: [{
579
+ toolName: toolNames.TrackballRotateTool,
580
+ bindings: [{
581
+ mouseButton: Enums.MouseBindings.Primary
582
+ }]
583
+ }, {
584
+ toolName: toolNames.Zoom,
585
+ bindings: [{
586
+ mouseButton: Enums.MouseBindings.Secondary
587
+ }]
588
+ }, {
589
+ toolName: toolNames.Pan,
590
+ bindings: [{
591
+ mouseButton: Enums.MouseBindings.Auxiliary
592
+ }]
593
+ }]
594
+ };
595
+ toolGroupService.createToolGroupAndAddTools('volume3d', tools);
596
+ }
597
+ function initToolGroups(extensionManager, toolGroupService, commandsManager) {
598
+ initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, 'default');
599
+ initMPRToolGroup(extensionManager, toolGroupService, commandsManager);
600
+ initVolume3DToolGroup(extensionManager, toolGroupService);
601
+ }
602
+ /* harmony default export */ const src_initToolGroups = (initToolGroups);
603
+ ;// CONCATENATED MODULE: ../../../modes/segmentation/src/index.tsx
604
+
605
+
606
+
607
+
608
+
609
+ const DEFAULT_TOOL_GROUP_ID = 'default';
610
+ const VOLUME3D_TOOL_GROUP_ID = 'volume3d';
611
+ const ohif = {
612
+ layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',
613
+ sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',
614
+ hangingProtocol: '@ohif/extension-default.hangingProtocolModule.default',
615
+ leftPanel: '@ohif/extension-default.panelModule.seriesList',
616
+ rightPanel: '@ohif/extension-default.panelModule.measure'
617
+ };
618
+ const cornerstone = {
619
+ viewport: '@ohif/extension-cornerstone.viewportModule.cornerstone'
620
+ };
621
+ const segmentation = {
622
+ panel: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentation',
623
+ panelTool: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentationWithTools',
624
+ sopClassHandler: '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',
625
+ viewport: '@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg'
626
+ };
627
+
628
+ /**
629
+ * Just two dependencies to be able to render a viewport with panels in order
630
+ * to make sure that the mode is working.
631
+ */
632
+ const extensionDependencies = {
633
+ '@ohif/extension-default': '^3.0.0',
634
+ '@ohif/extension-cornerstone': '^3.0.0',
635
+ '@ohif/extension-cornerstone-dicom-seg': '^3.0.0'
636
+ };
637
+ function modeFactory({
638
+ modeConfiguration
639
+ }) {
640
+ return {
641
+ /**
642
+ * Mode ID, which should be unique among modes used by the viewer. This ID
643
+ * is used to identify the mode in the viewer's state.
644
+ */
645
+ id: id,
646
+ routeName: 'segmentation',
647
+ /**
648
+ * Mode name, which is displayed in the viewer's UI in the workList, for the
649
+ * user to select the mode.
650
+ */
651
+ displayName: 'Segmentation',
652
+ /**
653
+ * Runs when the Mode Route is mounted to the DOM. Usually used to initialize
654
+ * Services and other resources.
655
+ */
656
+ onModeEnter: ({
657
+ servicesManager,
658
+ extensionManager,
659
+ commandsManager
660
+ }) => {
661
+ const {
662
+ measurementService,
663
+ toolbarService,
664
+ toolGroupService
665
+ } = servicesManager.services;
666
+ measurementService.clearMeasurements();
667
+
668
+ // Init Default and SR ToolGroups
669
+ src_initToolGroups(extensionManager, toolGroupService, commandsManager);
670
+ toolbarService.addButtons(src_toolbarButtons);
671
+ toolbarService.addButtons(segmentationButtons);
672
+ toolbarService.createButtonSection('primary', ['WindowLevel', 'Pan', 'Zoom', 'TrackballRotate', 'Capture', 'Layout', 'Crosshairs', 'MoreTools']);
673
+ toolbarService.createButtonSection('segmentationToolbox', ['BrushTools', 'Shapes']);
674
+ },
675
+ onModeExit: ({
676
+ servicesManager
677
+ }) => {
678
+ const {
679
+ toolGroupService,
680
+ syncGroupService,
681
+ toolbarService,
682
+ segmentationService,
683
+ cornerstoneViewportService,
684
+ uiDialogService,
685
+ uiModalService
686
+ } = servicesManager.services;
687
+ uiDialogService.dismissAll();
688
+ uiModalService.hide();
689
+ toolGroupService.destroy();
690
+ syncGroupService.destroy();
691
+ segmentationService.destroy();
692
+ cornerstoneViewportService.destroy();
693
+ },
694
+ /** */
695
+ validationTags: {
696
+ study: [],
697
+ series: []
698
+ },
699
+ /**
700
+ * A boolean return value that indicates whether the mode is valid for the
701
+ * modalities of the selected studies. Currently we don't have stack viewport
702
+ * segmentations and we should exclude them
703
+ */
704
+ isValidMode: ({
705
+ modalities
706
+ }) => {
707
+ // Don't show the mode if the selected studies have only one modality
708
+ // that is not supported by the mode
709
+ const modalitiesArray = modalities.split('\\');
710
+ return {
711
+ valid: modalitiesArray.length === 1 ? !['SM', 'US', 'MG', 'OT', 'DOC', 'CR'].includes(modalitiesArray[0]) : true,
712
+ description: 'The mode does not support studies that ONLY include the following modalities: SM, US, MG, OT, DOC, CR'
713
+ };
714
+ },
715
+ /**
716
+ * Mode Routes are used to define the mode's behavior. A list of Mode Route
717
+ * that includes the mode's path and the layout to be used. The layout will
718
+ * include the components that are used in the layout. For instance, if the
719
+ * default layoutTemplate is used (id: '@ohif/extension-default.layoutTemplateModule.viewerLayout')
720
+ * it will include the leftPanels, rightPanels, and viewports. However, if
721
+ * you define another layoutTemplate that includes a Footer for instance,
722
+ * you should provide the Footer component here too. Note: We use Strings
723
+ * to reference the component's ID as they are registered in the internal
724
+ * ExtensionManager. The template for the string is:
725
+ * `${extensionId}.{moduleType}.${componentId}`.
726
+ */
727
+ routes: [{
728
+ path: 'template',
729
+ layoutTemplate: ({
730
+ location,
731
+ servicesManager
732
+ }) => {
733
+ return {
734
+ id: ohif.layout,
735
+ props: {
736
+ leftPanels: [ohif.leftPanel],
737
+ rightPanels: [segmentation.panelTool],
738
+ viewports: [{
739
+ namespace: cornerstone.viewport,
740
+ displaySetsToDisplay: [ohif.sopClassHandler]
741
+ }, {
742
+ namespace: segmentation.viewport,
743
+ displaySetsToDisplay: [segmentation.sopClassHandler]
744
+ }]
745
+ }
746
+ };
747
+ }
748
+ }],
749
+ /** List of extensions that are used by the mode */
750
+ extensions: extensionDependencies,
751
+ /** HangingProtocol used by the mode */
752
+ // hangingProtocol: [''],
753
+ /** SopClassHandlers used by the mode */
754
+ sopClassHandlers: [ohif.sopClassHandler, segmentation.sopClassHandler],
755
+ /** hotkeys for mode */
756
+ hotkeys: [...src/* hotkeys */.ot.defaults.hotkeyBindings]
757
+ };
758
+ }
759
+ const mode = {
760
+ id: id,
761
+ modeFactory,
762
+ extensionDependencies
763
+ };
764
+ /* harmony default export */ const segmentation_src = (mode);
765
+
766
+ /***/ })
767
+
768
+ }]);