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

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