@ohif/app 3.13.0-beta.116 → 3.13.0-beta.117

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 (47) hide show
  1. package/dist/{1206.bundle.47f070e2254d128c.js → 1206.bundle.e04ca1efe6f987ba.js} +1 -1
  2. package/dist/1483.bundle.ab1e3a882b58eb79.js +470 -0
  3. package/dist/{1602.bundle.097ec19e8e61516f.js → 1602.bundle.ea4c1b43123dd2b3.js} +2 -2
  4. package/dist/{7701.bundle.945445d6681ddd20.js → 2343.bundle.48839e1b3fa4505e.js} +990 -7
  5. package/dist/{3500.bundle.1e063b7b4910d6cf.js → 3500.bundle.da69a02594beccc8.js} +1 -1
  6. package/dist/{3760.bundle.6c7eeb4b7f1583ca.js → 3760.bundle.e406b1c3fadf2a3b.js} +2 -2
  7. package/dist/{5448.bundle.1e50777e4c4e122a.js → 5448.bundle.5686ebb99c379f64.js} +1 -1
  8. package/dist/{5696.bundle.9f0366ad867385bc.js → 5696.bundle.4e44ce1f590134eb.js} +7 -4
  9. package/dist/{5910.bundle.5561806884c95754.js → 5910.bundle.0f19608f3e76859b.js} +2 -2
  10. package/dist/{419.bundle.9d0e6a72e1e3a17b.js → 6749.bundle.8c3dd9258f09df24.js} +288 -62
  11. package/dist/{7248.bundle.f761b21f343d4b9f.js → 7248.bundle.11ec7ee7e10b0a34.js} +2 -2
  12. package/dist/{7295.bundle.4d4b6de4d2bb8856.js → 7499.bundle.0f065214db09a60b.js} +502 -5
  13. package/dist/{781.bundle.efb0a6981676cebb.js → 781.bundle.3c1a02ca26d4565a.js} +2 -2
  14. package/dist/{8423.bundle.5d1b3092bc9562c9.js → 8423.bundle.f8e7d0f1eba7e178.js} +2 -2
  15. package/dist/8492.bundle.de58afbc98ce7972.js +504 -0
  16. package/dist/8595.css +2 -0
  17. package/dist/{899.bundle.e786f8dfb66d74ca.js → 899.bundle.50c16f860acbc848.js} +2 -2
  18. package/dist/{9068.bundle.cd36fcb4e15a153e.js → 9068.bundle.95f1e638ef694ea9.js} +2 -2
  19. package/dist/{9402.bundle.6549cc304496cd5c.js → 9402.bundle.6a8a324e963b4099.js} +2 -2
  20. package/dist/{9415.bundle.2a970c71de4014bf.js → 9415.bundle.20fee612b3b3dbfd.js} +2 -2
  21. package/dist/{9437.bundle.0fff227a859992ea.js → 9437.bundle.f3f5aff637471ac4.js} +107 -123
  22. package/dist/app-config.js +1 -1
  23. package/dist/{app.bundle.55057e411d635dc3.js → app.bundle.a73ad7e598640adf.js} +203 -36
  24. package/dist/customizations/index.html +400 -0
  25. package/dist/customizations/segmentation/segmentationAnnotationTools.jsonc +48 -0
  26. package/dist/customizations/segmentation/segmentationEditing.jsonc +59 -0
  27. package/dist/customizations/{ctPresets.jsonc → tools/ctPresets.jsonc} +1 -1
  28. package/dist/customizations/{measurementLabels.jsonc → tools/measurementLabels.jsonc} +1 -1
  29. package/dist/customizations/{smoothRotate.jsonc → tools/smoothRotate.jsonc} +1 -1
  30. package/dist/customizations/veterinary/veterinary.jsonc +5 -0
  31. package/dist/customizations/{veterinaryOverlay.jsonc → veterinary/veterinaryOverlay.jsonc} +3 -3
  32. package/dist/customizations/{patientBirthDate.jsonc → worklist/patientBirthDate.jsonc} +2 -2
  33. package/dist/index.html +1 -1
  34. package/dist/sw.js +1 -1
  35. package/package.json +5 -5
  36. package/dist/4834.bundle.a91450199d0f45e4.js +0 -900
  37. package/dist/6001.bundle.0789789db5410764.js +0 -1529
  38. package/dist/customizations/veterinary.jsonc +0 -5
  39. /package/dist/{100.bundle.ac04a425c0851574.js → 100.bundle.ec5ee3b5f479a217.js} +0 -0
  40. /package/dist/{1180.bundle.c19c443fe8d26719.js → 1180.bundle.9bed26c1a1e75389.js} +0 -0
  41. /package/dist/{2779.bundle.dca036a18399be96.js → 2779.bundle.2a225a69fb65c30d.js} +0 -0
  42. /package/dist/{4556.bundle.b705ab15473128c7.js → 4556.bundle.735ccc9efdad0052.js} +0 -0
  43. /package/dist/{4683.bundle.5d12928efa9f70f4.js → 4683.bundle.e5d3182f0f4347af.js} +0 -0
  44. /package/dist/{7295.css → 8492.css} +0 -0
  45. /package/dist/{8832.bundle.ede981706cac8e15.js → 8832.bundle.1cb57aab32daeab8.js} +0 -0
  46. /package/dist/{9116.bundle.225e003c28c550c1.js → 9116.bundle.fffb2ff349a3c452.js} +0 -0
  47. /package/dist/{9290.bundle.a18c40b82772a3c6.js → 9290.bundle.82cf4e74ab3fa20a.js} +0 -0
@@ -1,1529 +0,0 @@
1
- "use strict";
2
- (globalThis["rspackChunk"] = globalThis["rspackChunk"] || []).push([[6001], {
3
- 21992(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
4
-
5
- // EXPORTS
6
- __webpack_require__.d(__webpack_exports__, {
7
- "default": () => (/* binding */ segmentation_src)
8
- });
9
-
10
- // UNUSED EXPORTS: toolbarButtons
11
-
12
- ;// CONCATENATED MODULE: ../../../modes/segmentation/package.json
13
- var package_namespaceObject = JSON.parse('{"UU":"@ohif/mode-segmentation"}')
14
- ;// CONCATENATED MODULE: ../../../modes/segmentation/src/id.js
15
-
16
- const id = package_namespaceObject.UU;
17
-
18
- // EXTERNAL MODULE: ../../core/src/index.ts + 75 modules
19
- var src = __webpack_require__(50679);
20
- // EXTERNAL MODULE: ../../../node_modules/i18next/dist/esm/i18next.js + 22 modules
21
- var i18next = __webpack_require__(26104);
22
- ;// CONCATENATED MODULE: ../../../modes/segmentation/src/constants.ts
23
- const MIN_SEGMENTATION_DRAWING_RADIUS = 0.5;
24
- const MAX_SEGMENTATION_DRAWING_RADIUS = 99.5;
25
- ;// CONCATENATED MODULE: ../../../modes/segmentation/src/toolbarButtons.ts
26
-
27
-
28
-
29
- const setToolActiveToolbar = {
30
- commandName: 'setToolActiveToolbar',
31
- commandOptions: {
32
- toolGroupIds: ['default', 'mpr', 'SRToolGroup', 'volume3d']
33
- }
34
- };
35
- const callbacks = toolName => [{
36
- commandName: 'setViewportForToolConfiguration',
37
- commandOptions: {
38
- toolName
39
- }
40
- }];
41
- const toolbarButtons = [{
42
- id: 'AdvancedRenderingControls',
43
- uiType: 'ohif.advancedRenderingControls',
44
- props: {
45
- buttonSection: true
46
- }
47
- }, {
48
- id: 'modalityLoadBadge',
49
- uiType: 'ohif.modalityLoadBadge',
50
- props: {
51
- icon: 'Status',
52
- label: i18next/* ["default"].t */.A.t('Buttons:Status'),
53
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Status'),
54
- evaluate: {
55
- name: 'evaluate.modalityLoadBadge',
56
- hideWhenDisabled: true
57
- }
58
- }
59
- }, {
60
- id: 'navigationComponent',
61
- uiType: 'ohif.navigationComponent',
62
- props: {
63
- icon: 'Navigation',
64
- label: i18next/* ["default"].t */.A.t('Buttons:Navigation'),
65
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Navigate between segments/measurements and manage their visibility'),
66
- evaluate: {
67
- name: 'evaluate.navigationComponent',
68
- hideWhenDisabled: true
69
- }
70
- }
71
- }, {
72
- id: 'trackingStatus',
73
- uiType: 'ohif.trackingStatus',
74
- props: {
75
- icon: 'TrackingStatus',
76
- label: i18next/* ["default"].t */.A.t('Buttons:Tracking Status'),
77
- tooltip: i18next/* ["default"].t */.A.t('Buttons:View and manage tracking status of measurements and annotations'),
78
- evaluate: {
79
- name: 'evaluate.trackingStatus',
80
- hideWhenDisabled: true
81
- }
82
- }
83
- }, {
84
- id: 'dataOverlayMenu',
85
- uiType: 'ohif.dataOverlayMenu',
86
- props: {
87
- icon: 'ViewportViews',
88
- label: i18next/* ["default"].t */.A.t('Buttons:Data Overlay'),
89
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Configure data overlay options and manage foreground/background display sets'),
90
- evaluate: 'evaluate.dataOverlayMenu'
91
- }
92
- }, {
93
- id: 'orientationMenu',
94
- uiType: 'ohif.orientationMenu',
95
- props: {
96
- icon: 'OrientationSwitch',
97
- label: i18next/* ["default"].t */.A.t('Buttons:Orientation'),
98
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Change viewport orientation between axial, sagittal, coronal and reformat planes'),
99
- evaluate: {
100
- name: 'evaluate.orientationMenu'
101
- // hideWhenDisabled: true,
102
- }
103
- }
104
- }, {
105
- id: 'windowLevelMenuEmbedded',
106
- uiType: 'ohif.windowLevelMenuEmbedded',
107
- props: {
108
- icon: 'WindowLevel',
109
- label: i18next/* ["default"].t */.A.t('Buttons:Window Level'),
110
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Adjust window/level presets and customize image contrast settings'),
111
- evaluate: {
112
- name: 'evaluate.windowLevelMenuEmbedded',
113
- hideWhenDisabled: true
114
- }
115
- }
116
- }, {
117
- id: 'windowLevelMenu',
118
- uiType: 'ohif.windowLevelMenu',
119
- props: {
120
- icon: 'WindowLevel',
121
- label: i18next/* ["default"].t */.A.t('Buttons:Window Level'),
122
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Adjust window/level presets and customize image contrast settings'),
123
- evaluate: 'evaluate.windowLevelMenu'
124
- }
125
- }, {
126
- id: 'voiManualControlMenu',
127
- uiType: 'ohif.voiManualControlMenu',
128
- props: {
129
- icon: 'WindowLevelAdvanced',
130
- label: i18next/* ["default"].t */.A.t('Buttons:Advanced Window Level'),
131
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Advanced window/level settings with manual controls and presets'),
132
- evaluate: 'evaluate.voiManualControlMenu'
133
- }
134
- }, {
135
- id: 'thresholdMenu',
136
- uiType: 'ohif.thresholdMenu',
137
- props: {
138
- icon: 'Threshold',
139
- label: i18next/* ["default"].t */.A.t('Buttons:Threshold'),
140
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Image threshold settings'),
141
- evaluate: {
142
- name: 'evaluate.thresholdMenu',
143
- hideWhenDisabled: true
144
- }
145
- }
146
- }, {
147
- id: 'opacityMenu',
148
- uiType: 'ohif.opacityMenu',
149
- props: {
150
- icon: 'Opacity',
151
- label: i18next/* ["default"].t */.A.t('Buttons:Opacity'),
152
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Image opacity settings'),
153
- evaluate: {
154
- name: 'evaluate.opacityMenu',
155
- hideWhenDisabled: true
156
- }
157
- }
158
- }, {
159
- id: 'Colorbar',
160
- uiType: 'ohif.colorbar',
161
- props: {
162
- type: 'tool',
163
- label: i18next/* ["default"].t */.A.t('Buttons:Colorbar')
164
- }
165
- },
166
- // sections
167
- {
168
- id: 'MoreTools',
169
- uiType: 'ohif.toolButtonList',
170
- props: {
171
- buttonSection: true
172
- }
173
- }, {
174
- id: 'BrushTools',
175
- uiType: 'ohif.toolBoxButtonGroup',
176
- props: {
177
- buttonSection: true
178
- }
179
- },
180
- // Section containers for the nested toolboxes and toolbars.
181
- {
182
- id: 'LabelMapUtilities',
183
- uiType: 'ohif.Toolbar',
184
- props: {
185
- buttonSection: true
186
- }
187
- }, {
188
- id: 'ContourUtilities',
189
- uiType: 'ohif.Toolbar',
190
- props: {
191
- buttonSection: true
192
- }
193
- }, {
194
- id: 'LabelMapTools',
195
- uiType: 'ohif.toolBoxButtonGroup',
196
- props: {
197
- buttonSection: true
198
- }
199
- }, {
200
- id: 'ContourTools',
201
- uiType: 'ohif.toolBoxButtonGroup',
202
- props: {
203
- buttonSection: true
204
- }
205
- },
206
- // tool defs
207
- {
208
- id: 'Zoom',
209
- uiType: 'ohif.toolButton',
210
- props: {
211
- icon: 'tool-zoom',
212
- label: i18next/* ["default"].t */.A.t('Buttons:Zoom'),
213
- commands: setToolActiveToolbar,
214
- evaluate: 'evaluate.cornerstoneTool'
215
- }
216
- }, {
217
- id: 'WindowLevel',
218
- uiType: 'ohif.toolButton',
219
- props: {
220
- icon: 'tool-window-level',
221
- label: i18next/* ["default"].t */.A.t('Buttons:Window Level'),
222
- commands: setToolActiveToolbar,
223
- evaluate: 'evaluate.cornerstoneTool'
224
- }
225
- }, {
226
- id: 'Pan',
227
- uiType: 'ohif.toolButton',
228
- props: {
229
- icon: 'tool-move',
230
- label: i18next/* ["default"].t */.A.t('Buttons:Pan'),
231
- commands: setToolActiveToolbar,
232
- evaluate: 'evaluate.cornerstoneTool'
233
- }
234
- }, {
235
- id: 'TrackballRotate',
236
- uiType: 'ohif.toolButton',
237
- props: {
238
- type: 'tool',
239
- icon: 'tool-3d-rotate',
240
- label: i18next/* ["default"].t */.A.t('Buttons:3D Rotate'),
241
- commands: setToolActiveToolbar,
242
- evaluate: {
243
- name: 'evaluate.cornerstoneTool',
244
- disabledText: i18next/* ["default"].t */.A.t('Buttons:Select a 3D viewport to enable this tool')
245
- }
246
- }
247
- }, {
248
- id: 'Capture',
249
- uiType: 'ohif.toolButton',
250
- props: {
251
- icon: 'tool-capture',
252
- label: i18next/* ["default"].t */.A.t('Buttons:Capture'),
253
- commands: 'showDownloadViewportModal',
254
- evaluate: ['evaluate.action', {
255
- name: 'evaluate.viewport.supported',
256
- unsupportedViewportTypes: ['video', 'wholeSlide']
257
- }]
258
- }
259
- }, {
260
- id: 'Layout',
261
- uiType: 'ohif.layoutSelector',
262
- props: {
263
- rows: 3,
264
- columns: 4,
265
- evaluate: 'evaluate.action',
266
- commands: 'setViewportGridLayout'
267
- }
268
- }, {
269
- id: 'Crosshairs',
270
- uiType: 'ohif.toolButton',
271
- props: {
272
- icon: 'tool-crosshair',
273
- label: i18next/* ["default"].t */.A.t('Buttons:Crosshairs'),
274
- commands: {
275
- commandName: 'setToolActiveToolbar',
276
- commandOptions: {
277
- toolGroupIds: ['mpr']
278
- }
279
- },
280
- evaluate: {
281
- name: 'evaluate.cornerstoneTool',
282
- disabledText: i18next/* ["default"].t */.A.t('Buttons:Select an MPR viewport to enable this tool')
283
- }
284
- }
285
- }, {
286
- id: 'Reset',
287
- uiType: 'ohif.toolButton',
288
- props: {
289
- icon: 'tool-reset',
290
- label: i18next/* ["default"].t */.A.t('Buttons:Reset View'),
291
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Reset View'),
292
- commands: 'resetViewport',
293
- evaluate: 'evaluate.action'
294
- }
295
- }, {
296
- id: 'rotate-right',
297
- uiType: 'ohif.toolButton',
298
- props: {
299
- icon: 'tool-rotate-right',
300
- label: i18next/* ["default"].t */.A.t('Buttons:Rotate Right'),
301
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Rotate +90'),
302
- commands: 'rotateViewportCW',
303
- evaluate: 'evaluate.action'
304
- }
305
- }, {
306
- id: 'flipHorizontal',
307
- uiType: 'ohif.toolButton',
308
- props: {
309
- icon: 'tool-flip-horizontal',
310
- label: i18next/* ["default"].t */.A.t('Buttons:Flip Horizontal'),
311
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Flip Horizontally'),
312
- commands: 'flipViewportHorizontal',
313
- evaluate: ['evaluate.viewportProperties.toggle', {
314
- name: 'evaluate.viewport.supported',
315
- unsupportedViewportTypes: ['volume3d']
316
- }]
317
- }
318
- }, {
319
- id: 'ReferenceLines',
320
- uiType: 'ohif.toolButton',
321
- props: {
322
- icon: 'tool-referenceLines',
323
- label: i18next/* ["default"].t */.A.t('Buttons:Reference Lines'),
324
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Show Reference Lines'),
325
- commands: 'toggleEnabledDisabledToolbar',
326
- evaluate: 'evaluate.cornerstoneTool.toggle'
327
- }
328
- }, {
329
- id: 'ImageOverlayViewer',
330
- uiType: 'ohif.toolButton',
331
- props: {
332
- icon: 'toggle-dicom-overlay',
333
- label: i18next/* ["default"].t */.A.t('Buttons:Image Overlay'),
334
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Toggle Image Overlay'),
335
- commands: 'toggleEnabledDisabledToolbar',
336
- evaluate: 'evaluate.cornerstoneTool.toggle'
337
- }
338
- }, {
339
- id: 'StackScroll',
340
- uiType: 'ohif.toolButton',
341
- props: {
342
- icon: 'tool-stack-scroll',
343
- label: i18next/* ["default"].t */.A.t('Buttons:Stack Scroll'),
344
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Stack Scroll'),
345
- commands: setToolActiveToolbar,
346
- evaluate: 'evaluate.cornerstoneTool'
347
- }
348
- }, {
349
- id: 'invert',
350
- uiType: 'ohif.toolButton',
351
- props: {
352
- icon: 'tool-invert',
353
- label: i18next/* ["default"].t */.A.t('Buttons:Invert'),
354
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Invert Colors'),
355
- commands: 'invertViewport',
356
- evaluate: 'evaluate.viewportProperties.toggle'
357
- }
358
- }, {
359
- id: 'Cine',
360
- uiType: 'ohif.toolButton',
361
- props: {
362
- icon: 'tool-cine',
363
- label: i18next/* ["default"].t */.A.t('Buttons:Cine'),
364
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Cine'),
365
- commands: 'toggleCine',
366
- evaluate: ['evaluate.cine', {
367
- name: 'evaluate.viewport.supported',
368
- unsupportedViewportTypes: ['volume3d']
369
- }]
370
- }
371
- }, {
372
- id: 'Magnify',
373
- uiType: 'ohif.toolButton',
374
- props: {
375
- icon: 'tool-magnify',
376
- label: i18next/* ["default"].t */.A.t('Buttons:Zoom-in'),
377
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Zoom-in'),
378
- commands: setToolActiveToolbar,
379
- evaluate: 'evaluate.cornerstoneTool'
380
- }
381
- }, {
382
- id: 'TagBrowser',
383
- uiType: 'ohif.toolButton',
384
- props: {
385
- icon: 'dicom-tag-browser',
386
- label: i18next/* ["default"].t */.A.t('Buttons:Dicom Tag Browser'),
387
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Dicom Tag Browser'),
388
- commands: 'openDICOMTagViewer'
389
- }
390
- }, {
391
- id: 'PlanarFreehandContourSegmentationTool',
392
- uiType: 'ohif.toolBoxButton',
393
- props: {
394
- icon: 'icon-tool-freehand-roi',
395
- label: i18next/* ["default"].t */.A.t('Buttons:Freehand Segmentation'),
396
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Freehand Segmentation'),
397
- evaluate: [{
398
- name: 'evaluate.cornerstone.segmentation',
399
- toolNames: ['PlanarFreehandContourSegmentationTool'],
400
- disabledText: i18next/* ["default"].t */.A.t('Buttons:Create new segmentation to enable this tool.')
401
- }, {
402
- name: 'evaluate.cornerstone.hasSegmentationOfType',
403
- segmentationRepresentationType: 'Contour'
404
- }],
405
- commands: [{
406
- commandName: 'setToolActiveToolbar',
407
- commandOptions: {
408
- bindings: [{
409
- mouseButton: 1 // Left Click
410
- }, {
411
- mouseButton: 1,
412
- // Left Click+Shift to create a hole
413
- modifierKey: 16 // Shift
414
- }]
415
- }
416
- }, {
417
- commandName: 'activateSelectedSegmentationOfType',
418
- commandOptions: {
419
- segmentationRepresentationType: 'Contour'
420
- }
421
- }],
422
- options: [{
423
- name: i18next/* ["default"].t */.A.t('Buttons:Interpolate Contours'),
424
- type: 'switch',
425
- id: 'planarFreehandInterpolateContours',
426
- value: false,
427
- commands: {
428
- commandName: 'setInterpolationToolConfiguration'
429
- }
430
- }]
431
- }
432
- }, {
433
- id: 'LivewireContourSegmentationTool',
434
- uiType: 'ohif.toolBoxButton',
435
- props: {
436
- icon: 'icon-tool-livewire',
437
- label: i18next/* ["default"].t */.A.t('Buttons:Livewire Contour'),
438
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Livewire Contour'),
439
- evaluate: [{
440
- name: 'evaluate.cornerstone.segmentation',
441
- toolNames: ['LivewireContourSegmentationTool'],
442
- disabledText: i18next/* ["default"].t */.A.t('Buttons:Create new segmentation to enable this tool.')
443
- }, {
444
- name: 'evaluate.cornerstone.hasSegmentationOfType',
445
- segmentationRepresentationType: 'Contour'
446
- }],
447
- commands: [{
448
- commandName: 'setToolActiveToolbar',
449
- commandOptions: {
450
- bindings: [{
451
- mouseButton: 1 // Left Click
452
- }, {
453
- mouseButton: 1,
454
- // Left Click+Shift to create a hole
455
- modifierKey: 16 // Shift
456
- }]
457
- }
458
- }, {
459
- commandName: 'activateSelectedSegmentationOfType',
460
- commandOptions: {
461
- segmentationRepresentationType: 'Contour'
462
- }
463
- }],
464
- options: [{
465
- name: i18next/* ["default"].t */.A.t('Buttons:Interpolate Contours'),
466
- type: 'switch',
467
- id: 'livewireInterpolateContours',
468
- value: false,
469
- commands: {
470
- commandName: 'setInterpolationToolConfiguration'
471
- }
472
- }]
473
- }
474
- }, {
475
- id: 'SplineContourSegmentationTool',
476
- uiType: 'ohif.toolBoxButton',
477
- props: {
478
- icon: 'icon-tool-spline-roi',
479
- label: i18next/* ["default"].t */.A.t('Buttons:Spline Contour Segmentation Tool'),
480
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Spline Contour Segmentation Tool'),
481
- evaluate: [{
482
- name: 'evaluate.cornerstone.segmentation',
483
- toolNames: ['CatmullRomSplineROI', 'LinearSplineROI', 'BSplineROI'],
484
- disabledText: i18next/* ["default"].t */.A.t('Buttons:Create new segmentation to enable this tool.')
485
- }, {
486
- name: 'evaluate.cornerstone.hasSegmentationOfType',
487
- segmentationRepresentationType: 'Contour'
488
- }],
489
- commands: [{
490
- commandName: 'activateSelectedSegmentationOfType',
491
- commandOptions: {
492
- segmentationRepresentationType: 'Contour'
493
- }
494
- }],
495
- options: [{
496
- name: i18next/* ["default"].t */.A.t('Buttons:Spline Type'),
497
- type: 'select',
498
- id: 'splineTypeSelect',
499
- value: 'CatmullRomSplineROI',
500
- values: [{
501
- id: 'CatmullRomSplineROI',
502
- value: 'CatmullRomSplineROI',
503
- label: i18next/* ["default"].t */.A.t('Buttons:Catmull Rom Spline')
504
- }, {
505
- id: 'LinearSplineROI',
506
- value: 'LinearSplineROI',
507
- label: i18next/* ["default"].t */.A.t('Buttons:Linear Spline')
508
- }, {
509
- id: 'BSplineROI',
510
- value: 'BSplineROI',
511
- label: i18next/* ["default"].t */.A.t('Buttons:B-Spline')
512
- }],
513
- commands: {
514
- commandName: 'setToolActiveToolbar',
515
- commandOptions: {
516
- bindings: [{
517
- mouseButton: 1 // Left Click
518
- }, {
519
- mouseButton: 1,
520
- // Left Click+Shift to create a hole
521
- modifierKey: 16 // Shift
522
- }]
523
- }
524
- }
525
- }, {
526
- name: i18next/* ["default"].t */.A.t('Buttons:Simplified Spline'),
527
- type: 'switch',
528
- id: 'simplifiedSpline',
529
- value: true,
530
- commands: {
531
- commandName: 'setSimplifiedSplineForSplineContourSegmentationTool'
532
- }
533
- }, {
534
- name: i18next/* ["default"].t */.A.t('Buttons:Interpolate Contours'),
535
- type: 'switch',
536
- id: 'splineInterpolateContours',
537
- value: false,
538
- commands: {
539
- commandName: 'setInterpolationToolConfiguration',
540
- commandOptions: {
541
- toolNames: ['CatmullRomSplineROI', 'LinearSplineROI', 'BSplineROI']
542
- }
543
- }
544
- }]
545
- }
546
- }, {
547
- id: 'SculptorTool',
548
- uiType: 'ohif.toolBoxButton',
549
- props: {
550
- icon: 'icon-tool-sculptor',
551
- label: i18next/* ["default"].t */.A.t('Buttons:Sculptor Tool'),
552
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Sculptor Tool'),
553
- evaluate: [{
554
- name: 'evaluate.cornerstone.segmentation',
555
- toolNames: ['SculptorTool'],
556
- disabledText: i18next/* ["default"].t */.A.t('Buttons:Create new segmentation to enable this tool.')
557
- }, {
558
- name: 'evaluate.cornerstone.hasSegmentationOfType',
559
- segmentationRepresentationType: 'Contour'
560
- }],
561
- commands: ['setToolActiveToolbar', {
562
- commandName: 'activateSelectedSegmentationOfType',
563
- commandOptions: {
564
- segmentationRepresentationType: 'Contour'
565
- }
566
- }],
567
- options: [{
568
- name: i18next/* ["default"].t */.A.t('Buttons:Dynamic Cursor Size'),
569
- type: 'switch',
570
- id: 'dynamicCursorSize',
571
- value: true,
572
- commands: {
573
- commandName: 'setDynamicCursorSizeForSculptorTool'
574
- }
575
- }]
576
- }
577
- }, {
578
- id: 'Brush',
579
- uiType: 'ohif.toolBoxButton',
580
- props: {
581
- icon: 'icon-tool-brush',
582
- label: i18next/* ["default"].t */.A.t('Buttons:Brush'),
583
- evaluate: [{
584
- name: 'evaluate.cornerstone.segmentation',
585
- toolNames: ['CircularBrush', 'SphereBrush'],
586
- disabledText: i18next/* ["default"].t */.A.t('Buttons:Create new segmentation to enable this tool.')
587
- }, {
588
- name: 'evaluate.cornerstone.segmentation.synchronizeDrawingRadius',
589
- radiusOptionId: 'brush-radius'
590
- }, {
591
- name: 'evaluate.cornerstone.hasSegmentationOfType',
592
- segmentationRepresentationType: 'Labelmap'
593
- }],
594
- commands: {
595
- commandName: 'activateSelectedSegmentationOfType',
596
- commandOptions: {
597
- segmentationRepresentationType: 'Labelmap'
598
- }
599
- },
600
- options: [{
601
- name: i18next/* ["default"].t */.A.t('Buttons:Radius (mm)'),
602
- id: 'brush-radius',
603
- type: 'range',
604
- explicitRunOnly: true,
605
- min: (/* inlined export .MIN_SEGMENTATION_DRAWING_RADIUS */0.5),
606
- max: (/* inlined export .MAX_SEGMENTATION_DRAWING_RADIUS */99.5),
607
- step: 0.5,
608
- value: 25,
609
- commands: [{
610
- commandName: 'setBrushSize',
611
- commandOptions: {
612
- toolNames: ['CircularBrush', 'SphereBrush']
613
- }
614
- }]
615
- }, {
616
- name: i18next/* ["default"].t */.A.t('Buttons:Shape'),
617
- type: 'radio',
618
- id: 'brush-mode',
619
- value: 'CircularBrush',
620
- values: [{
621
- value: 'CircularBrush',
622
- label: i18next/* ["default"].t */.A.t('Buttons:Circle')
623
- }, {
624
- value: 'SphereBrush',
625
- label: i18next/* ["default"].t */.A.t('Buttons:Sphere')
626
- }],
627
- commands: ['setToolActiveToolbar']
628
- }]
629
- }
630
- }, {
631
- id: 'InterpolateLabelmap',
632
- uiType: 'ohif.toolButton',
633
- props: {
634
- icon: 'actions-interpolate',
635
- label: i18next/* ["default"].t */.A.t('Buttons:Interpolate Labelmap'),
636
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Automatically fill in missing slices between drawn segments. Use brush or threshold tools on at least two slices, then click to interpolate across slices. Works in any direction. Volume must be reconstructable.'),
637
- evaluate: [{
638
- name: 'evaluate.cornerstone.segmentation'
639
- }, {
640
- name: 'evaluate.cornerstone.hasSegmentationOfType',
641
- segmentationRepresentationType: 'Labelmap'
642
- }, {
643
- name: 'evaluate.displaySetIsReconstructable',
644
- disabledText: i18next/* ["default"].t */.A.t('Buttons:The current viewport cannot handle interpolation.')
645
- }],
646
- commands: [{
647
- commandName: 'activateSelectedSegmentationOfType',
648
- commandOptions: {
649
- segmentationRepresentationType: 'Labelmap'
650
- }
651
- }, 'interpolateLabelmap']
652
- }
653
- }, {
654
- id: 'SegmentBidirectional',
655
- uiType: 'ohif.toolButton',
656
- props: {
657
- icon: 'actions-bidirectional',
658
- label: i18next/* ["default"].t */.A.t('Buttons:Segment Bidirectional'),
659
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Automatically detects the largest length and width across slices for the selected segment and displays a bidirectional measurement.'),
660
- evaluate: [{
661
- name: 'evaluate.cornerstone.segmentation',
662
- disabledText: i18next/* ["default"].t */.A.t('Buttons:Create new segmentation to enable this tool.')
663
- }, {
664
- name: 'evaluate.cornerstone.hasSegmentationOfType',
665
- segmentationRepresentationType: 'Labelmap'
666
- }],
667
- commands: [{
668
- commandName: 'activateSelectedSegmentationOfType',
669
- commandOptions: {
670
- segmentationRepresentationType: 'Labelmap'
671
- }
672
- }, 'runSegmentBidirectional']
673
- }
674
- }, {
675
- id: 'RegionSegmentPlus',
676
- uiType: 'ohif.toolBoxButton',
677
- props: {
678
- icon: 'icon-tool-click-segment',
679
- label: i18next/* ["default"].t */.A.t('Buttons:One Click Segment'),
680
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Detects segmentable regions with one click. Hover for visual feedback—click when a plus sign appears to auto-segment the lesion.'),
681
- evaluate: [{
682
- name: 'evaluate.cornerstone.segmentation',
683
- toolNames: ['RegionSegmentPlus'],
684
- disabledText: i18next/* ["default"].t */.A.t('Buttons:Create new segmentation to enable this tool.')
685
- }, {
686
- name: 'evaluate.cornerstone.hasSegmentationOfType',
687
- segmentationRepresentationType: 'Labelmap'
688
- }],
689
- commands: ['setToolActiveToolbar', {
690
- commandName: 'activateSelectedSegmentationOfType',
691
- commandOptions: {
692
- segmentationRepresentationType: 'Labelmap'
693
- }
694
- }]
695
- }
696
- }, {
697
- id: 'LabelmapSlicePropagation',
698
- uiType: 'ohif.toolBoxButton',
699
- props: {
700
- icon: 'icon-labelmap-slice-propagation',
701
- label: i18next/* ["default"].t */.A.t('Buttons:Labelmap Assist'),
702
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Toggle AI assistance for segmenting nearby slices. After drawing on a slice, scroll to preview predictions. Press Enter to accept or Esc to skip.'),
703
- evaluate: ['evaluate.cornerstoneTool.toggle', {
704
- name: 'evaluate.cornerstone.hasSegmentationOfType',
705
- segmentationRepresentationType: 'Labelmap'
706
- }],
707
- listeners: {
708
- [src/* .ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED */.sI.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: callbacks('LabelmapSlicePropagation'),
709
- [src/* .ViewportGridService.EVENTS.VIEWPORTS_READY */.sI.EVENTS.VIEWPORTS_READY]: callbacks('LabelmapSlicePropagation')
710
- },
711
- commands: [{
712
- commandName: 'activateSelectedSegmentationOfType',
713
- commandOptions: {
714
- segmentationRepresentationType: 'Labelmap'
715
- }
716
- }, 'toggleEnabledDisabledToolbar']
717
- }
718
- }, {
719
- id: 'MarkerLabelmap',
720
- uiType: 'ohif.toolBoxButton',
721
- props: {
722
- icon: 'icon-marker-labelmap',
723
- label: i18next/* ["default"].t */.A.t('Buttons:Marker Guided Labelmap'),
724
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Use include/exclude markers to guide AI (SAM) segmentation. Click to place markers, Enter to accept results, Esc to reject, and N to go to the next slice while keeping markers.'),
725
- evaluate: [{
726
- name: 'evaluate.cornerstone.segmentation',
727
- toolNames: ['MarkerLabelmap', 'MarkerInclude', 'MarkerExclude']
728
- }, {
729
- name: 'evaluate.cornerstone.hasSegmentationOfType',
730
- segmentationRepresentationType: 'Labelmap'
731
- }],
732
- commands: ['setToolActiveToolbar', {
733
- commandName: 'activateSelectedSegmentationOfType',
734
- commandOptions: {
735
- segmentationRepresentationType: 'Labelmap'
736
- }
737
- }],
738
- listeners: {
739
- [src/* .ViewportGridService.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED */.sI.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: callbacks('MarkerLabelmap'),
740
- [src/* .ViewportGridService.EVENTS.VIEWPORTS_READY */.sI.EVENTS.VIEWPORTS_READY]: callbacks('MarkerLabelmap')
741
- },
742
- options: [{
743
- name: i18next/* ["default"].t */.A.t('Buttons:Marker Mode'),
744
- type: 'radio',
745
- id: 'marker-mode',
746
- value: 'markerInclude',
747
- values: [{
748
- value: 'markerInclude',
749
- label: i18next/* ["default"].t */.A.t('Buttons:Include')
750
- }, {
751
- value: 'markerExclude',
752
- label: i18next/* ["default"].t */.A.t('Buttons:Exclude')
753
- }],
754
- commands: ({
755
- commandsManager,
756
- options
757
- }) => {
758
- const markerModeOption = options.find(option => option.id === 'marker-mode');
759
- if (markerModeOption.value === 'markerInclude') {
760
- commandsManager.run('setToolActive', {
761
- toolName: 'MarkerInclude'
762
- });
763
- } else {
764
- commandsManager.run('setToolActive', {
765
- toolName: 'MarkerExclude'
766
- });
767
- }
768
- }
769
- }, {
770
- name: i18next/* ["default"].t */.A.t('Buttons:Clear Markers'),
771
- type: 'button',
772
- id: 'clear-markers',
773
- commands: 'clearMarkersForMarkerLabelmap'
774
- }]
775
- }
776
- }, {
777
- id: 'Eraser',
778
- uiType: 'ohif.toolBoxButton',
779
- props: {
780
- icon: 'icon-tool-eraser',
781
- label: i18next/* ["default"].t */.A.t('Buttons:Eraser'),
782
- evaluate: [{
783
- name: 'evaluate.cornerstone.segmentation',
784
- toolNames: ['CircularEraser', 'SphereEraser']
785
- }, {
786
- name: 'evaluate.cornerstone.segmentation.synchronizeDrawingRadius',
787
- radiusOptionId: 'eraser-radius'
788
- }, {
789
- name: 'evaluate.cornerstone.hasSegmentationOfType',
790
- segmentationRepresentationType: 'Labelmap'
791
- }],
792
- options: [{
793
- name: i18next/* ["default"].t */.A.t('Buttons:Radius (mm)'),
794
- id: 'eraser-radius',
795
- type: 'range',
796
- explicitRunOnly: true,
797
- min: (/* inlined export .MIN_SEGMENTATION_DRAWING_RADIUS */0.5),
798
- max: (/* inlined export .MAX_SEGMENTATION_DRAWING_RADIUS */99.5),
799
- step: 0.5,
800
- value: 25,
801
- commands: {
802
- commandName: 'setBrushSize',
803
- commandOptions: {
804
- toolNames: ['CircularEraser', 'SphereEraser']
805
- }
806
- }
807
- }, {
808
- name: i18next/* ["default"].t */.A.t('Buttons:Shape'),
809
- type: 'radio',
810
- id: 'eraser-mode',
811
- value: 'CircularEraser',
812
- values: [{
813
- value: 'CircularEraser',
814
- label: i18next/* ["default"].t */.A.t('Buttons:Circle')
815
- }, {
816
- value: 'SphereEraser',
817
- label: i18next/* ["default"].t */.A.t('Buttons:Sphere')
818
- }],
819
- commands: 'setToolActiveToolbar'
820
- }],
821
- commands: {
822
- commandName: 'activateSelectedSegmentationOfType',
823
- commandOptions: {
824
- segmentationRepresentationType: 'Labelmap'
825
- }
826
- }
827
- }
828
- }, {
829
- id: 'Threshold',
830
- uiType: 'ohif.toolBoxButton',
831
- props: {
832
- icon: 'icon-tool-threshold',
833
- label: i18next/* ["default"].t */.A.t('Buttons:Threshold Tool'),
834
- evaluate: [{
835
- name: 'evaluate.cornerstone.segmentation',
836
- toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush', 'ThresholdCircularBrushDynamic', 'ThresholdSphereBrushDynamic']
837
- }, {
838
- name: 'evaluate.cornerstone.segmentation.synchronizeDrawingRadius',
839
- radiusOptionId: 'threshold-radius'
840
- }, {
841
- name: 'evaluate.cornerstone.hasSegmentationOfType',
842
- segmentationRepresentationType: 'Labelmap'
843
- }],
844
- commands: {
845
- commandName: 'activateSelectedSegmentationOfType',
846
- commandOptions: {
847
- segmentationRepresentationType: 'Labelmap'
848
- }
849
- },
850
- options: [{
851
- name: i18next/* ["default"].t */.A.t('Buttons:Radius (mm)'),
852
- id: 'threshold-radius',
853
- type: 'range',
854
- explicitRunOnly: true,
855
- min: (/* inlined export .MIN_SEGMENTATION_DRAWING_RADIUS */0.5),
856
- max: (/* inlined export .MAX_SEGMENTATION_DRAWING_RADIUS */99.5),
857
- step: 0.5,
858
- value: 25,
859
- commands: {
860
- commandName: 'setBrushSize',
861
- commandOptions: {
862
- toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush', 'ThresholdCircularBrushDynamic', 'ThresholdSphereBrushDynamic']
863
- }
864
- }
865
- }, {
866
- name: i18next/* ["default"].t */.A.t('Buttons:Shape'),
867
- type: 'radio',
868
- id: 'threshold-shape',
869
- value: 'ThresholdCircularBrush',
870
- values: [{
871
- value: 'ThresholdCircularBrush',
872
- label: i18next/* ["default"].t */.A.t('Buttons:Circle')
873
- }, {
874
- value: 'ThresholdSphereBrush',
875
- label: i18next/* ["default"].t */.A.t('Buttons:Sphere')
876
- }],
877
- commands: ({
878
- value,
879
- commandsManager,
880
- options
881
- }) => {
882
- const optionsDynamic = options.find(option => option.id === 'dynamic-mode');
883
- if (optionsDynamic.value === 'ThresholdDynamic') {
884
- commandsManager.run('setToolActive', {
885
- toolName: value === 'ThresholdCircularBrush' ? 'ThresholdCircularBrushDynamic' : 'ThresholdSphereBrushDynamic'
886
- });
887
- } else {
888
- commandsManager.run('setToolActive', {
889
- toolName: value
890
- });
891
- }
892
- }
893
- }, {
894
- name: i18next/* ["default"].t */.A.t('Buttons:Threshold'),
895
- type: 'radio',
896
- id: 'dynamic-mode',
897
- value: 'ThresholdDynamic',
898
- values: [{
899
- value: 'ThresholdDynamic',
900
- label: i18next/* ["default"].t */.A.t('Buttons:Dynamic')
901
- }, {
902
- value: 'ThresholdRange',
903
- label: i18next/* ["default"].t */.A.t('Buttons:Range')
904
- }],
905
- commands: ({
906
- value,
907
- commandsManager,
908
- options
909
- }) => {
910
- const thresholdRangeOption = options.find(option => option.id === 'threshold-shape');
911
- if (value === 'ThresholdDynamic') {
912
- commandsManager.run('setToolActiveToolbar', {
913
- toolName: thresholdRangeOption.value === 'ThresholdCircularBrush' ? 'ThresholdCircularBrushDynamic' : 'ThresholdSphereBrushDynamic'
914
- });
915
- } else {
916
- commandsManager.run('setToolActiveToolbar', {
917
- toolName: thresholdRangeOption.value
918
- });
919
- const thresholdRangeValue = options.find(option => option.id === 'threshold-range').value;
920
- commandsManager.run('setThresholdRange', {
921
- toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush'],
922
- value: thresholdRangeValue
923
- });
924
- }
925
- }
926
- }, {
927
- name: 'ThresholdRange',
928
- type: 'double-range',
929
- id: 'threshold-range',
930
- min: -1000,
931
- max: 1000,
932
- step: 1,
933
- value: [50, 600],
934
- condition: ({
935
- options
936
- }) => options.find(option => option.id === 'dynamic-mode').value === 'ThresholdRange',
937
- commands: {
938
- commandName: 'setThresholdRange',
939
- commandOptions: {
940
- toolNames: ['ThresholdCircularBrush', 'ThresholdSphereBrush']
941
- }
942
- }
943
- }]
944
- }
945
- }, {
946
- id: 'Shapes',
947
- uiType: 'ohif.toolBoxButton',
948
- props: {
949
- icon: 'icon-tool-shape',
950
- label: i18next/* ["default"].t */.A.t('Buttons:Shapes'),
951
- evaluate: [{
952
- name: 'evaluate.cornerstone.segmentation',
953
- toolNames: ['CircleScissor', 'SphereScissor', 'RectangleScissor'],
954
- disabledText: i18next/* ["default"].t */.A.t('Buttons:Create new segmentation to enable shapes tool.')
955
- }, {
956
- name: 'evaluate.cornerstone.hasSegmentationOfType',
957
- segmentationRepresentationType: 'Labelmap'
958
- }],
959
- commands: {
960
- commandName: 'activateSelectedSegmentationOfType',
961
- commandOptions: {
962
- segmentationRepresentationType: 'Labelmap'
963
- }
964
- },
965
- options: [{
966
- name: i18next/* ["default"].t */.A.t('Buttons:Shape'),
967
- type: 'radio',
968
- value: 'CircleScissor',
969
- id: 'shape-mode',
970
- values: [{
971
- value: 'CircleScissor',
972
- label: i18next/* ["default"].t */.A.t('Buttons:Circle')
973
- }, {
974
- value: 'SphereScissor',
975
- label: i18next/* ["default"].t */.A.t('Buttons:Sphere')
976
- }, {
977
- value: 'RectangleScissor',
978
- label: i18next/* ["default"].t */.A.t('Buttons:Rectangle')
979
- }],
980
- commands: 'setToolActiveToolbar'
981
- }]
982
- }
983
- }, {
984
- id: 'SimplifyContours',
985
- uiType: 'ohif.toolButton',
986
- props: {
987
- icon: 'actions-simplify',
988
- label: 'Simplify Contours',
989
- tooltip: 'Simplify Contours',
990
- commands: ['toggleActiveSegmentationUtility'],
991
- evaluate: [{
992
- name: 'cornerstone.isActiveSegmentationUtility'
993
- }],
994
- options: 'cornerstone.SimplifyContourOptions'
995
- }
996
- }, {
997
- id: 'SmoothContours',
998
- uiType: 'ohif.toolButton',
999
- props: {
1000
- icon: 'actions-smooth',
1001
- label: 'Smooth Contours',
1002
- tooltip: 'Smooth Contours',
1003
- commands: ['toggleActiveSegmentationUtility'],
1004
- evaluate: [{
1005
- name: 'cornerstone.isActiveSegmentationUtility'
1006
- }],
1007
- options: 'cornerstone.SmoothContoursOptions'
1008
- }
1009
- }, {
1010
- id: 'LogicalContourOperations',
1011
- uiType: 'ohif.toolButton',
1012
- props: {
1013
- icon: 'actions-combine',
1014
- label: 'Combine Contours',
1015
- tooltip: 'Combine Contours',
1016
- commands: ['toggleActiveSegmentationUtility'],
1017
- evaluate: [{
1018
- name: 'cornerstone.isActiveSegmentationUtility'
1019
- }],
1020
- options: 'cornerstone.LogicalContourOperationsOptions'
1021
- }
1022
- }, {
1023
- id: 'LabelMapEditWithContour',
1024
- uiType: 'ohif.toolBoxButton',
1025
- props: {
1026
- icon: 'tool-labelmap-edit-with-contour',
1027
- label: i18next/* ["default"].t */.A.t('Buttons:Labelmap Edit with Contour Tool'),
1028
- tooltip: i18next/* ["default"].t */.A.t('Buttons:Labelmap Edit with Contour Tool'),
1029
- commands: ['setToolActiveToolbar', {
1030
- commandName: 'activateSelectedSegmentationOfType',
1031
- commandOptions: {
1032
- segmentationRepresentationType: 'Labelmap'
1033
- }
1034
- }],
1035
- evaluate: [{
1036
- name: 'evaluate.cornerstone.segmentation',
1037
- toolNames: ['LabelMapEditWithContour'],
1038
- disabledText: 'Create new segmentation to enable this tool.'
1039
- }, {
1040
- name: 'evaluate.cornerstone.hasSegmentationOfType',
1041
- segmentationRepresentationType: 'Labelmap'
1042
- }]
1043
- }
1044
- }];
1045
- /* export default */ const src_toolbarButtons = (toolbarButtons);
1046
- ;// CONCATENATED MODULE: ../../../modes/segmentation/src/initToolGroups.ts
1047
-
1048
- const colours = {
1049
- 'viewport-0': 'rgb(200, 0, 0)',
1050
- 'viewport-1': 'rgb(200, 200, 0)',
1051
- 'viewport-2': 'rgb(0, 200, 0)'
1052
- };
1053
- const colorsByOrientation = {
1054
- axial: 'rgb(200, 0, 0)',
1055
- sagittal: 'rgb(200, 200, 0)',
1056
- coronal: 'rgb(0, 200, 0)'
1057
- };
1058
- function createTools({
1059
- utilityModule,
1060
- commandsManager
1061
- }) {
1062
- const {
1063
- toolNames,
1064
- Enums
1065
- } = utilityModule.exports;
1066
- const tools = {
1067
- active: [{
1068
- toolName: toolNames.WindowLevel,
1069
- bindings: [{
1070
- mouseButton: Enums.MouseBindings.Primary
1071
- }]
1072
- }, {
1073
- toolName: toolNames.Pan,
1074
- bindings: [{
1075
- mouseButton: Enums.MouseBindings.Auxiliary
1076
- }]
1077
- }, {
1078
- toolName: toolNames.Zoom,
1079
- bindings: [{
1080
- mouseButton: Enums.MouseBindings.Secondary
1081
- }, {
1082
- numTouchPoints: 2
1083
- }]
1084
- }, {
1085
- toolName: toolNames.StackScroll,
1086
- bindings: [{
1087
- mouseButton: Enums.MouseBindings.Wheel
1088
- }, {
1089
- numTouchPoints: 3
1090
- }]
1091
- }],
1092
- passive: [{
1093
- toolName: 'CircularBrush',
1094
- parentTool: 'Brush',
1095
- configuration: {
1096
- activeStrategy: 'FILL_INSIDE_CIRCLE',
1097
- minRadius: (/* inlined export .MIN_SEGMENTATION_DRAWING_RADIUS */0.5),
1098
- maxRadius: (/* inlined export .MAX_SEGMENTATION_DRAWING_RADIUS */99.5)
1099
- }
1100
- }, {
1101
- toolName: toolNames.LabelmapSlicePropagation
1102
- }, {
1103
- toolName: toolNames.MarkerLabelmap
1104
- }, {
1105
- toolName: toolNames.RegionSegmentPlus
1106
- }, {
1107
- toolName: 'CircularEraser',
1108
- parentTool: 'Brush',
1109
- configuration: {
1110
- activeStrategy: 'ERASE_INSIDE_CIRCLE',
1111
- minRadius: (/* inlined export .MIN_SEGMENTATION_DRAWING_RADIUS */0.5),
1112
- maxRadius: (/* inlined export .MAX_SEGMENTATION_DRAWING_RADIUS */99.5)
1113
- }
1114
- }, {
1115
- toolName: 'SphereBrush',
1116
- parentTool: 'Brush',
1117
- configuration: {
1118
- activeStrategy: 'FILL_INSIDE_SPHERE',
1119
- minRadius: (/* inlined export .MIN_SEGMENTATION_DRAWING_RADIUS */0.5),
1120
- maxRadius: (/* inlined export .MAX_SEGMENTATION_DRAWING_RADIUS */99.5)
1121
- }
1122
- }, {
1123
- toolName: 'SphereEraser',
1124
- parentTool: 'Brush',
1125
- configuration: {
1126
- activeStrategy: 'ERASE_INSIDE_SPHERE',
1127
- minRadius: (/* inlined export .MIN_SEGMENTATION_DRAWING_RADIUS */0.5),
1128
- maxRadius: (/* inlined export .MAX_SEGMENTATION_DRAWING_RADIUS */99.5)
1129
- }
1130
- }, {
1131
- toolName: 'ThresholdCircularBrush',
1132
- parentTool: 'Brush',
1133
- configuration: {
1134
- activeStrategy: 'THRESHOLD_INSIDE_CIRCLE',
1135
- minRadius: (/* inlined export .MIN_SEGMENTATION_DRAWING_RADIUS */0.5),
1136
- maxRadius: (/* inlined export .MAX_SEGMENTATION_DRAWING_RADIUS */99.5)
1137
- }
1138
- }, {
1139
- toolName: 'ThresholdSphereBrush',
1140
- parentTool: 'Brush',
1141
- configuration: {
1142
- activeStrategy: 'THRESHOLD_INSIDE_SPHERE',
1143
- minRadius: (/* inlined export .MIN_SEGMENTATION_DRAWING_RADIUS */0.5),
1144
- maxRadius: (/* inlined export .MAX_SEGMENTATION_DRAWING_RADIUS */99.5)
1145
- }
1146
- }, {
1147
- toolName: 'ThresholdCircularBrushDynamic',
1148
- parentTool: 'Brush',
1149
- configuration: {
1150
- activeStrategy: 'THRESHOLD_INSIDE_CIRCLE',
1151
- minRadius: (/* inlined export .MIN_SEGMENTATION_DRAWING_RADIUS */0.5),
1152
- maxRadius: (/* inlined export .MAX_SEGMENTATION_DRAWING_RADIUS */99.5),
1153
- threshold: {
1154
- isDynamic: true,
1155
- dynamicRadius: 3
1156
- }
1157
- }
1158
- }, {
1159
- toolName: toolNames.SegmentBidirectional
1160
- }, {
1161
- toolName: toolNames.SegmentSelect
1162
- }, {
1163
- toolName: 'ThresholdSphereBrushDynamic',
1164
- parentTool: 'Brush',
1165
- configuration: {
1166
- activeStrategy: 'THRESHOLD_INSIDE_SPHERE',
1167
- minRadius: (/* inlined export .MIN_SEGMENTATION_DRAWING_RADIUS */0.5),
1168
- maxRadius: (/* inlined export .MAX_SEGMENTATION_DRAWING_RADIUS */99.5),
1169
- threshold: {
1170
- isDynamic: true,
1171
- dynamicRadius: 3
1172
- }
1173
- }
1174
- }, {
1175
- toolName: toolNames.LabelMapEditWithContourTool
1176
- }, {
1177
- toolName: toolNames.CircleScissors
1178
- }, {
1179
- toolName: toolNames.RectangleScissors
1180
- }, {
1181
- toolName: toolNames.SphereScissors
1182
- }, {
1183
- toolName: toolNames.StackScroll
1184
- }, {
1185
- toolName: toolNames.Magnify
1186
- }, {
1187
- toolName: toolNames.WindowLevelRegion
1188
- }, {
1189
- toolName: toolNames.UltrasoundDirectional
1190
- }, {
1191
- toolName: toolNames.PlanarFreehandContourSegmentation
1192
- }, {
1193
- toolName: toolNames.LivewireContourSegmentation
1194
- }, {
1195
- toolName: toolNames.SculptorTool
1196
- }, {
1197
- toolName: toolNames.PlanarFreehandROI
1198
- }, {
1199
- toolName: 'CatmullRomSplineROI',
1200
- parentTool: toolNames.SplineContourSegmentation,
1201
- configuration: {
1202
- spline: {
1203
- type: 'CATMULLROM',
1204
- enableTwoPointPreview: true
1205
- }
1206
- }
1207
- }, {
1208
- toolName: 'LinearSplineROI',
1209
- parentTool: toolNames.SplineContourSegmentation,
1210
- configuration: {
1211
- spline: {
1212
- type: 'LINEAR',
1213
- enableTwoPointPreview: true
1214
- }
1215
- }
1216
- }, {
1217
- toolName: 'BSplineROI',
1218
- parentTool: toolNames.SplineContourSegmentation,
1219
- configuration: {
1220
- spline: {
1221
- type: 'BSPLINE',
1222
- enableTwoPointPreview: true
1223
- }
1224
- }
1225
- }],
1226
- disabled: [{
1227
- toolName: toolNames.ReferenceLines
1228
- }, {
1229
- toolName: toolNames.AdvancedMagnify
1230
- }]
1231
- };
1232
- const updatedTools = commandsManager.run('initializeSegmentLabelTool', {
1233
- tools
1234
- });
1235
- return updatedTools;
1236
- }
1237
- function initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, toolGroupId) {
1238
- const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
1239
- const tools = createTools({
1240
- commandsManager,
1241
- utilityModule
1242
- });
1243
- toolGroupService.createToolGroupAndAddTools(toolGroupId, tools);
1244
- }
1245
- function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
1246
- const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
1247
- const servicesManager = extensionManager._servicesManager;
1248
- const {
1249
- cornerstoneViewportService
1250
- } = servicesManager.services;
1251
- const tools = createTools({
1252
- commandsManager,
1253
- utilityModule
1254
- });
1255
- tools.disabled.push({
1256
- toolName: utilityModule.exports.toolNames.Crosshairs,
1257
- configuration: {
1258
- viewportIndicators: true,
1259
- viewportIndicatorsConfig: {
1260
- circleRadius: 5,
1261
- xOffset: 0.95,
1262
- yOffset: 0.05
1263
- },
1264
- disableOnPassive: true,
1265
- autoPan: {
1266
- enabled: false,
1267
- panSize: 10
1268
- },
1269
- getReferenceLineColor: viewportId => {
1270
- const viewportInfo = cornerstoneViewportService.getViewportInfo(viewportId);
1271
- const viewportOptions = viewportInfo?.viewportOptions;
1272
- if (viewportOptions) {
1273
- return colours[viewportOptions.id] || colorsByOrientation[viewportOptions.orientation] || '#0c0';
1274
- } else {
1275
- console.warn('missing viewport?', viewportId);
1276
- return '#0c0';
1277
- }
1278
- }
1279
- }
1280
- }, {
1281
- toolName: utilityModule.exports.toolNames.ReferenceLines
1282
- });
1283
- toolGroupService.createToolGroupAndAddTools('mpr', tools);
1284
- }
1285
- function initVolume3DToolGroup(extensionManager, toolGroupService) {
1286
- const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
1287
- const {
1288
- toolNames,
1289
- Enums
1290
- } = utilityModule.exports;
1291
- const tools = {
1292
- active: [{
1293
- toolName: toolNames.TrackballRotateTool,
1294
- bindings: [{
1295
- mouseButton: Enums.MouseBindings.Primary
1296
- }]
1297
- }, {
1298
- toolName: toolNames.Zoom,
1299
- bindings: [{
1300
- mouseButton: Enums.MouseBindings.Secondary
1301
- }, {
1302
- numTouchPoints: 2
1303
- }]
1304
- }, {
1305
- toolName: toolNames.Pan,
1306
- bindings: [{
1307
- mouseButton: Enums.MouseBindings.Auxiliary
1308
- }]
1309
- }]
1310
- };
1311
- toolGroupService.createToolGroupAndAddTools('volume3d', tools);
1312
- }
1313
- function initToolGroups(extensionManager, toolGroupService, commandsManager) {
1314
- initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, 'default');
1315
- initMPRToolGroup(extensionManager, toolGroupService, commandsManager);
1316
- initVolume3DToolGroup(extensionManager, toolGroupService);
1317
- }
1318
- /* export default */ const src_initToolGroups = (initToolGroups);
1319
- ;// CONCATENATED MODULE: ../../../modes/segmentation/src/utils/setUpAutoTabSwitchHandler.ts
1320
- /**
1321
- * Sets up auto tab switching for when the first segmentation is added into the viewer.
1322
- */
1323
- function setUpAutoTabSwitchHandler({
1324
- segmentationService,
1325
- viewportGridService,
1326
- panelService
1327
- }) {
1328
- const autoTabSwitchEvents = [segmentationService.EVENTS.SEGMENTATION_MODIFIED, segmentationService.EVENTS.SEGMENTATION_REPRESENTATION_MODIFIED];
1329
-
1330
- // Initially there are no segmentations, so we should switch the tab whenever the first segmentation is added.
1331
- let shouldSwitchTab = true;
1332
- const unsubscribeAutoTabSwitchEvents = autoTabSwitchEvents.map(eventName => segmentationService.subscribe(eventName, () => {
1333
- const segmentations = segmentationService.getSegmentations();
1334
- if (!segmentations.length) {
1335
- // If all the segmentations are removed, then the next time a segmentation is added, we should switch the tab.
1336
- shouldSwitchTab = true;
1337
- return;
1338
- }
1339
- const activeViewportId = viewportGridService.getActiveViewportId();
1340
- const activeRepresentation = segmentationService.getSegmentationRepresentations(activeViewportId)?.find(representation => representation.active);
1341
- if (activeRepresentation && shouldSwitchTab) {
1342
- shouldSwitchTab = false;
1343
- switch (activeRepresentation.type) {
1344
- case 'Labelmap':
1345
- panelService.activatePanel('@ohif/extension-cornerstone.panelModule.panelSegmentationWithToolsLabelMap', true);
1346
- break;
1347
- case 'Contour':
1348
- panelService.activatePanel('@ohif/extension-cornerstone.panelModule.panelSegmentationWithToolsContour', true);
1349
- break;
1350
- }
1351
- }
1352
- })).map(subscription => subscription.unsubscribe);
1353
- return {
1354
- unsubscribeAutoTabSwitchEvents
1355
- };
1356
- }
1357
- // EXTERNAL MODULE: ../../../modes/basic/src/index.tsx + 3 modules
1358
- var basic_src = __webpack_require__(86750);
1359
- ;// CONCATENATED MODULE: ../../../modes/segmentation/src/index.tsx
1360
-
1361
-
1362
-
1363
-
1364
-
1365
-
1366
- function modeFactory({
1367
- modeConfiguration
1368
- }) {
1369
- const _unsubscriptions = [];
1370
- return {
1371
- /**
1372
- * Mode ID, which should be unique among modes used by the viewer. This ID
1373
- * is used to identify the mode in the viewer's state.
1374
- */
1375
- id: id,
1376
- routeName: 'segmentation',
1377
- /**
1378
- * Mode name, which is displayed in the viewer's UI in the workList, for the
1379
- * user to select the mode.
1380
- */
1381
- displayName: 'Segmentation',
1382
- /**
1383
- * Runs when the Mode Route is mounted to the DOM. Usually used to initialize
1384
- * Services and other resources.
1385
- */
1386
- onModeEnter: ({
1387
- servicesManager,
1388
- extensionManager,
1389
- commandsManager
1390
- }) => {
1391
- const {
1392
- measurementService,
1393
- toolbarService,
1394
- toolGroupService,
1395
- segmentationService,
1396
- viewportGridService,
1397
- panelService
1398
- } = servicesManager.services;
1399
- measurementService.clearMeasurements();
1400
-
1401
- // Init Default and SR ToolGroups
1402
- src_initToolGroups(extensionManager, toolGroupService, commandsManager);
1403
- toolbarService.register(src_toolbarButtons);
1404
- toolbarService.updateSection(toolbarService.sections.primary, ['WindowLevel', 'Pan', 'Zoom', 'TrackballRotate', 'Capture', 'Layout', 'Crosshairs', 'MoreTools']);
1405
- toolbarService.updateSection(toolbarService.sections.viewportActionMenu.topLeft, ['orientationMenu', 'dataOverlayMenu']);
1406
- toolbarService.updateSection(toolbarService.sections.viewportActionMenu.bottomMiddle, ['AdvancedRenderingControls']);
1407
- toolbarService.updateSection('AdvancedRenderingControls', ['windowLevelMenuEmbedded', 'voiManualControlMenu', 'Colorbar', 'opacityMenu', 'thresholdMenu']);
1408
- toolbarService.updateSection(toolbarService.sections.viewportActionMenu.topRight, ['modalityLoadBadge', 'trackingStatus', 'navigationComponent']);
1409
- toolbarService.updateSection(toolbarService.sections.viewportActionMenu.bottomLeft, ['windowLevelMenu']);
1410
- toolbarService.updateSection('MoreTools', ['Reset', 'rotate-right', 'flipHorizontal', 'ReferenceLines', 'ImageOverlayViewer', 'StackScroll', 'invert', 'Cine', 'Magnify', 'TagBrowser']);
1411
- toolbarService.updateSection(toolbarService.sections.labelMapSegmentationToolbox, ['LabelMapTools']);
1412
- toolbarService.updateSection(toolbarService.sections.contourSegmentationToolbox, ['ContourTools']);
1413
- toolbarService.updateSection('LabelMapTools', ['LabelmapSlicePropagation', 'BrushTools', 'MarkerLabelmap', 'RegionSegmentPlus', 'Shapes', 'LabelMapEditWithContour']);
1414
- toolbarService.updateSection('ContourTools', ['PlanarFreehandContourSegmentationTool', 'SculptorTool', 'SplineContourSegmentationTool', 'LivewireContourSegmentationTool']);
1415
- toolbarService.updateSection(toolbarService.sections.labelMapSegmentationUtilities, ['LabelMapUtilities']);
1416
- toolbarService.updateSection(toolbarService.sections.contourSegmentationUtilities, ['ContourUtilities']);
1417
- toolbarService.updateSection('LabelMapUtilities', ['InterpolateLabelmap', 'SegmentBidirectional']);
1418
- toolbarService.updateSection('ContourUtilities', ['LogicalContourOperations', 'SimplifyContours', 'SmoothContours']);
1419
- toolbarService.updateSection('BrushTools', ['Brush', 'Eraser', 'Threshold']);
1420
- const {
1421
- unsubscribeAutoTabSwitchEvents
1422
- } = setUpAutoTabSwitchHandler({
1423
- segmentationService,
1424
- viewportGridService,
1425
- panelService
1426
- });
1427
- _unsubscriptions.push(...unsubscribeAutoTabSwitchEvents);
1428
- },
1429
- onModeExit: ({
1430
- servicesManager
1431
- }) => {
1432
- const {
1433
- toolGroupService,
1434
- syncGroupService,
1435
- segmentationService,
1436
- cornerstoneViewportService,
1437
- uiDialogService,
1438
- uiModalService
1439
- } = servicesManager.services;
1440
- _unsubscriptions.forEach(unsubscribe => unsubscribe());
1441
- _unsubscriptions.length = 0;
1442
- uiDialogService.hideAll();
1443
- uiModalService.hide();
1444
- toolGroupService.destroy();
1445
- syncGroupService.destroy();
1446
- segmentationService.destroy();
1447
- cornerstoneViewportService.destroy();
1448
- },
1449
- /** */
1450
- validationTags: {
1451
- study: [],
1452
- series: []
1453
- },
1454
- /**
1455
- * A boolean return value that indicates whether the mode is valid for the
1456
- * modalities of the selected studies. Currently we don't have stack viewport
1457
- * segmentations and we should exclude them
1458
- */
1459
- isValidMode: ({
1460
- modalities
1461
- }) => {
1462
- // Don't show the mode if the selected studies have only one modality
1463
- // that is not supported by the mode
1464
- const modalitiesArray = modalities.split('\\');
1465
- return {
1466
- valid: modalitiesArray.length === 1 ? !['SM', 'ECG', 'OT', 'DOC'].includes(modalitiesArray[0]) : true,
1467
- description: 'The mode does not support studies that ONLY include the following modalities: SM, OT, DOC'
1468
- };
1469
- },
1470
- /**
1471
- * Mode Routes are used to define the mode's behavior. A list of Mode Route
1472
- * that includes the mode's path and the layout to be used. The layout will
1473
- * include the components that are used in the layout. For instance, if the
1474
- * default layoutTemplate is used (id: '@ohif/extension-default.layoutTemplateModule.viewerLayout')
1475
- * it will include the leftPanels, rightPanels, and viewports. However, if
1476
- * you define another layoutTemplate that includes a Footer for instance,
1477
- * you should provide the Footer component here too. Note: We use Strings
1478
- * to reference the component's ID as they are registered in the internal
1479
- * ExtensionManager. The template for the string is:
1480
- * `${extensionId}.{moduleType}.${componentId}`.
1481
- */
1482
- routes: [{
1483
- path: 'template',
1484
- layoutTemplate: ({
1485
- location,
1486
- servicesManager
1487
- }) => {
1488
- return {
1489
- id: basic_src/* .ohif.layout */.Dt.layout,
1490
- props: {
1491
- leftPanels: [basic_src/* .ohif.thumbnailList */.Dt.thumbnailList],
1492
- leftPanelResizable: true,
1493
- rightPanels: [basic_src/* .cornerstone.labelMapSegmentationPanel */.Nu.labelMapSegmentationPanel, basic_src/* .cornerstone.contourSegmentationPanel */.Nu.contourSegmentationPanel],
1494
- rightPanelResizable: true,
1495
- // leftPanelClosed: true,
1496
- viewports: [{
1497
- namespace: basic_src/* .cornerstone.viewport */.Nu.viewport,
1498
- displaySetsToDisplay: [basic_src/* .ohif.sopClassHandler */.Dt.sopClassHandler]
1499
- }, {
1500
- namespace: basic_src/* .segmentation.viewport */.b2.viewport,
1501
- displaySetsToDisplay: [basic_src/* .segmentation.sopClassHandler */.b2.sopClassHandler]
1502
- }, {
1503
- namespace: basic_src/* .dicomRT.viewport */.V6.viewport,
1504
- displaySetsToDisplay: [basic_src/* .dicomRT.sopClassHandler */.V6.sopClassHandler]
1505
- }]
1506
- }
1507
- };
1508
- }
1509
- }],
1510
- /** List of extensions that are used by the mode */
1511
- extensions: basic_src/* .extensionDependencies */.tR,
1512
- /** HangingProtocol used by the mode */
1513
- // Commented out to just use the most applicable registered hanging protocol
1514
- // The example is used for a grid layout to specify that as a preferred layout
1515
- hangingProtocol: ['@ohif/mnGrid'],
1516
- /** SopClassHandlers used by the mode */
1517
- sopClassHandlers: [basic_src/* .ohif.sopClassHandler */.Dt.sopClassHandler, basic_src/* .segmentation.sopClassHandler */.b2.sopClassHandler, basic_src/* .dicomRT.sopClassHandler */.V6.sopClassHandler]
1518
- };
1519
- }
1520
- const mode = {
1521
- id: id,
1522
- modeFactory,
1523
- extensionDependencies: basic_src/* .extensionDependencies */.tR
1524
- };
1525
- /* export default */ const segmentation_src = (mode);
1526
-
1527
- },
1528
-
1529
- }]);