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