@ohif/app 3.12.0-beta.38 → 3.12.0-beta.39

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 (27) hide show
  1. package/dist/{1447.bundle.e88bf45d0a9cb5278d35.js → 1447.bundle.e1abda3a7f374ea48644.js} +2 -2
  2. package/dist/5457.bundle.451d7b3b9227cbc8e174.js +1366 -0
  3. package/dist/{6980.bundle.fd48c02fe2b0116af7e0.js → 5485.bundle.9153094dec354e1279ad.js} +250 -177
  4. package/dist/{7656.bundle.34a2d6b8d9b70241f809.js → 7656.bundle.9443079e27d7d8f36257.js} +4 -4
  5. package/dist/{810.bundle.9ace57858979249f785e.js → 810.bundle.16f391c4e7da9848a949.js} +2 -2
  6. package/dist/{app.bundle.ba0e05beb4ada6de1619.js → app.bundle.a9bfe5da304e33900bed.js} +69 -9
  7. package/dist/index.html +1 -1
  8. package/dist/sw.js +1 -1
  9. package/package.json +20 -20
  10. /package/dist/{1459.bundle.0e3a249f226d794bcde0.js → 1459.bundle.6d912e6019da628cd492.js} +0 -0
  11. /package/dist/{1604.bundle.311c3a2272fbf50c1e6b.js → 1604.bundle.bc6c02b33c3ddd17a04c.js} +0 -0
  12. /package/dist/{1807.bundle.72fcd7caa015c35427ad.js → 1807.bundle.0f86d6bd87a1fc204bfd.js} +0 -0
  13. /package/dist/{1919.bundle.4226e0a09126c7fe8005.js → 1919.bundle.90e6282dbd3ce41fa7dc.js} +0 -0
  14. /package/dist/{213.bundle.f6a51e5f86bd1b78cb51.js → 213.bundle.4487a3ea21668eb84e13.js} +0 -0
  15. /package/dist/{2243.bundle.60c1dd2d2c137c916d1a.js → 2243.bundle.60352e87f85cb1ec5726.js} +0 -0
  16. /package/dist/{2424.bundle.f79694b71d571f84ae34.js → 2424.bundle.67f472e25f465cb097ab.js} +0 -0
  17. /package/dist/{4113.bundle.7c2407f8b23f2dae23e4.js → 4113.bundle.41441b4f42dc493ead44.js} +0 -0
  18. /package/dist/{414.bundle.cf576bfd36e0f3f8b09c.js → 414.bundle.888425a9fa3b4d5efaec.js} +0 -0
  19. /package/dist/{6027.bundle.574eae7f62dc75eec6f7.js → 6027.bundle.c6ac80144b3111fac9d8.js} +0 -0
  20. /package/dist/{6201.bundle.bd101f8f1cae06424b15.js → 6201.bundle.d5afb33076730728189f.js} +0 -0
  21. /package/dist/{6991.bundle.961b556c2ae8d9f29e8d.js → 6991.bundle.60df34bab80853e97851.js} +0 -0
  22. /package/dist/{7197.bundle.07504357a0d046770087.js → 7197.bundle.3d8123242414bedbcd12.js} +0 -0
  23. /package/dist/{7639.bundle.5594d6111939a77d15af.js → 7639.bundle.8ed96aea654d5e51d53c.js} +0 -0
  24. /package/dist/{85.bundle.9e7e6f9ecd378e3ac618.js → 85.bundle.59f6dd4a87b898971a5f.js} +0 -0
  25. /package/dist/{8558.bundle.f88e17c368c17e662338.js → 8558.bundle.cdfdbc82525fc0a6dccf.js} +0 -0
  26. /package/dist/{8815.bundle.ae678ee7277df9a69e2a.js → 8815.bundle.5ef65b0b08cbbd044225.js} +0 -0
  27. /package/dist/{934.bundle.0e299de1635556a34a70.js → 934.bundle.1300bc4b558647bff6a8.js} +0 -0
@@ -0,0 +1,1366 @@
1
+ "use strict";
2
+ (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[5457,5485],{
3
+
4
+ /***/ 35485:
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
+ NON_IMAGE_MODALITIES: () => (/* binding */ NON_IMAGE_MODALITIES),
13
+ basicLayout: () => (/* binding */ basicLayout),
14
+ basicRoute: () => (/* binding */ basicRoute),
15
+ cornerstone: () => (/* binding */ cornerstone),
16
+ "default": () => (/* binding */ basic_src),
17
+ dicomPmap: () => (/* binding */ dicomPmap),
18
+ dicomRT: () => (/* binding */ dicomRT),
19
+ dicomSeg: () => (/* binding */ dicomSeg),
20
+ dicompdf: () => (/* binding */ dicompdf),
21
+ dicomsr: () => (/* binding */ dicomsr),
22
+ dicomvideo: () => (/* binding */ dicomvideo),
23
+ extensionDependencies: () => (/* binding */ extensionDependencies),
24
+ initToolGroups: () => (/* reexport */ src_initToolGroups),
25
+ isValidMode: () => (/* binding */ isValidMode),
26
+ layoutTemplate: () => (/* binding */ layoutTemplate),
27
+ mode: () => (/* binding */ mode),
28
+ modeFactory: () => (/* binding */ modeFactory),
29
+ modeInstance: () => (/* binding */ modeInstance),
30
+ ohif: () => (/* binding */ ohif),
31
+ onModeEnter: () => (/* binding */ onModeEnter),
32
+ onModeExit: () => (/* binding */ onModeExit),
33
+ sopClassHandlers: () => (/* binding */ sopClassHandlers),
34
+ toolbarButtons: () => (/* reexport */ src_toolbarButtons),
35
+ toolbarSections: () => (/* binding */ toolbarSections)
36
+ });
37
+
38
+ // EXTERNAL MODULE: ../../../node_modules/immutability-helper/index.js
39
+ var immutability_helper = __webpack_require__(1752);
40
+ var immutability_helper_default = /*#__PURE__*/__webpack_require__.n(immutability_helper);
41
+ // EXTERNAL MODULE: ../../core/src/index.ts + 69 modules
42
+ var src = __webpack_require__(76569);
43
+ ;// ../../../modes/basic/src/initToolGroups.ts
44
+ const colours = {
45
+ 'viewport-0': 'rgb(200, 0, 0)',
46
+ 'viewport-1': 'rgb(200, 200, 0)',
47
+ 'viewport-2': 'rgb(0, 200, 0)'
48
+ };
49
+ const colorsByOrientation = {
50
+ axial: 'rgb(200, 0, 0)',
51
+ sagittal: 'rgb(200, 200, 0)',
52
+ coronal: 'rgb(0, 200, 0)'
53
+ };
54
+ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, toolGroupId) {
55
+ const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
56
+ const {
57
+ toolNames,
58
+ Enums
59
+ } = utilityModule.exports;
60
+ const tools = {
61
+ active: [{
62
+ toolName: toolNames.WindowLevel,
63
+ bindings: [{
64
+ mouseButton: Enums.MouseBindings.Primary
65
+ }]
66
+ }, {
67
+ toolName: toolNames.Pan,
68
+ bindings: [{
69
+ mouseButton: Enums.MouseBindings.Auxiliary
70
+ }]
71
+ }, {
72
+ toolName: toolNames.Zoom,
73
+ bindings: [{
74
+ mouseButton: Enums.MouseBindings.Secondary
75
+ }, {
76
+ numTouchPoints: 2
77
+ }]
78
+ }, {
79
+ toolName: toolNames.StackScroll,
80
+ bindings: [{
81
+ mouseButton: Enums.MouseBindings.Wheel
82
+ }, {
83
+ numTouchPoints: 3
84
+ }]
85
+ }],
86
+ passive: [{
87
+ toolName: toolNames.Length
88
+ }, {
89
+ toolName: toolNames.ArrowAnnotate,
90
+ configuration: {
91
+ getTextCallback: (callback, eventDetails) => {
92
+ commandsManager.runCommand('arrowTextCallback', {
93
+ callback,
94
+ eventDetails
95
+ });
96
+ },
97
+ changeTextCallback: (data, eventDetails, callback) => {
98
+ commandsManager.runCommand('arrowTextCallback', {
99
+ callback,
100
+ data,
101
+ eventDetails
102
+ });
103
+ }
104
+ }
105
+ }, {
106
+ toolName: toolNames.SegmentBidirectional
107
+ }, {
108
+ toolName: toolNames.Bidirectional
109
+ }, {
110
+ toolName: toolNames.DragProbe
111
+ }, {
112
+ toolName: toolNames.Probe
113
+ }, {
114
+ toolName: toolNames.EllipticalROI
115
+ }, {
116
+ toolName: toolNames.CircleROI
117
+ }, {
118
+ toolName: toolNames.RectangleROI
119
+ }, {
120
+ toolName: toolNames.StackScroll
121
+ }, {
122
+ toolName: toolNames.Angle
123
+ }, {
124
+ toolName: toolNames.CobbAngle
125
+ }, {
126
+ toolName: toolNames.Magnify
127
+ }, {
128
+ toolName: toolNames.CalibrationLine
129
+ }, {
130
+ toolName: toolNames.PlanarFreehandContourSegmentation,
131
+ configuration: {
132
+ displayOnePointAsCrosshairs: true
133
+ }
134
+ }, {
135
+ toolName: toolNames.UltrasoundDirectional
136
+ }, {
137
+ toolName: toolNames.PlanarFreehandROI
138
+ }, {
139
+ toolName: toolNames.SplineROI
140
+ }, {
141
+ toolName: toolNames.LivewireContour
142
+ }, {
143
+ toolName: toolNames.WindowLevelRegion
144
+ }],
145
+ enabled: [{
146
+ toolName: toolNames.ImageOverlayViewer
147
+ }, {
148
+ toolName: toolNames.ReferenceLines
149
+ }],
150
+ disabled: [{
151
+ toolName: toolNames.AdvancedMagnify
152
+ }]
153
+ };
154
+ const updatedTools = commandsManager.run('initializeSegmentLabelTool', {
155
+ tools
156
+ });
157
+ toolGroupService.createToolGroupAndAddTools(toolGroupId, updatedTools);
158
+ }
159
+ function initSRToolGroup(extensionManager, toolGroupService) {
160
+ const SRUtilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone-dicom-sr.utilityModule.tools');
161
+ if (!SRUtilityModule) {
162
+ return;
163
+ }
164
+ const CS3DUtilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
165
+ const {
166
+ toolNames: SRToolNames
167
+ } = SRUtilityModule.exports;
168
+ const {
169
+ toolNames,
170
+ Enums
171
+ } = CS3DUtilityModule.exports;
172
+ const tools = {
173
+ active: [{
174
+ toolName: toolNames.WindowLevel,
175
+ bindings: [{
176
+ mouseButton: Enums.MouseBindings.Primary
177
+ }]
178
+ }, {
179
+ toolName: toolNames.Pan,
180
+ bindings: [{
181
+ mouseButton: Enums.MouseBindings.Auxiliary
182
+ }]
183
+ }, {
184
+ toolName: toolNames.Zoom,
185
+ bindings: [{
186
+ mouseButton: Enums.MouseBindings.Secondary
187
+ }, {
188
+ numTouchPoints: 2
189
+ }]
190
+ }, {
191
+ toolName: toolNames.StackScroll,
192
+ bindings: [{
193
+ mouseButton: Enums.MouseBindings.Wheel
194
+ }, {
195
+ numTouchPoints: 3
196
+ }]
197
+ }],
198
+ passive: [{
199
+ toolName: SRToolNames.SRLength
200
+ }, {
201
+ toolName: SRToolNames.SRArrowAnnotate
202
+ }, {
203
+ toolName: SRToolNames.SRBidirectional
204
+ }, {
205
+ toolName: SRToolNames.SREllipticalROI
206
+ }, {
207
+ toolName: SRToolNames.SRCircleROI
208
+ }, {
209
+ toolName: SRToolNames.SRPlanarFreehandROI
210
+ }, {
211
+ toolName: SRToolNames.SRRectangleROI
212
+ }, {
213
+ toolName: toolNames.WindowLevelRegion
214
+ }],
215
+ enabled: [{
216
+ toolName: SRToolNames.DICOMSRDisplay
217
+ }]
218
+ // disabled
219
+ };
220
+ const toolGroupId = 'SRToolGroup';
221
+ toolGroupService.createToolGroupAndAddTools(toolGroupId, tools);
222
+ }
223
+ function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
224
+ const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
225
+ const serviceManager = extensionManager._servicesManager;
226
+ const {
227
+ cornerstoneViewportService
228
+ } = serviceManager.services;
229
+ const {
230
+ toolNames,
231
+ Enums
232
+ } = utilityModule.exports;
233
+ const tools = {
234
+ active: [{
235
+ toolName: toolNames.WindowLevel,
236
+ bindings: [{
237
+ mouseButton: Enums.MouseBindings.Primary
238
+ }]
239
+ }, {
240
+ toolName: toolNames.Pan,
241
+ bindings: [{
242
+ mouseButton: Enums.MouseBindings.Auxiliary
243
+ }]
244
+ }, {
245
+ toolName: toolNames.Zoom,
246
+ bindings: [{
247
+ mouseButton: Enums.MouseBindings.Secondary
248
+ }, {
249
+ numTouchPoints: 2
250
+ }]
251
+ }, {
252
+ toolName: toolNames.StackScroll,
253
+ bindings: [{
254
+ mouseButton: Enums.MouseBindings.Wheel
255
+ }, {
256
+ numTouchPoints: 3
257
+ }]
258
+ }],
259
+ passive: [{
260
+ toolName: toolNames.Length
261
+ }, {
262
+ toolName: toolNames.ArrowAnnotate,
263
+ configuration: {
264
+ getTextCallback: (callback, eventDetails) => {
265
+ commandsManager.runCommand('arrowTextCallback', {
266
+ callback,
267
+ eventDetails
268
+ });
269
+ },
270
+ changeTextCallback: (data, eventDetails, callback) => {
271
+ commandsManager.runCommand('arrowTextCallback', {
272
+ callback,
273
+ data,
274
+ eventDetails
275
+ });
276
+ }
277
+ }
278
+ }, {
279
+ toolName: toolNames.Bidirectional
280
+ }, {
281
+ toolName: toolNames.DragProbe
282
+ }, {
283
+ toolName: toolNames.Probe
284
+ }, {
285
+ toolName: toolNames.EllipticalROI
286
+ }, {
287
+ toolName: toolNames.CircleROI
288
+ }, {
289
+ toolName: toolNames.RectangleROI
290
+ }, {
291
+ toolName: toolNames.StackScroll
292
+ }, {
293
+ toolName: toolNames.Angle
294
+ }, {
295
+ toolName: toolNames.CobbAngle
296
+ }, {
297
+ toolName: toolNames.PlanarFreehandROI
298
+ }, {
299
+ toolName: toolNames.SplineROI
300
+ }, {
301
+ toolName: toolNames.LivewireContour
302
+ }, {
303
+ toolName: toolNames.WindowLevelRegion
304
+ }, {
305
+ toolName: toolNames.PlanarFreehandContourSegmentation,
306
+ configuration: {
307
+ displayOnePointAsCrosshairs: true
308
+ }
309
+ }],
310
+ disabled: [{
311
+ toolName: toolNames.Crosshairs,
312
+ configuration: {
313
+ viewportIndicators: true,
314
+ viewportIndicatorsConfig: {
315
+ circleRadius: 5,
316
+ xOffset: 0.95,
317
+ yOffset: 0.05
318
+ },
319
+ disableOnPassive: true,
320
+ autoPan: {
321
+ enabled: false,
322
+ panSize: 10
323
+ },
324
+ getReferenceLineColor: viewportId => {
325
+ const viewportInfo = cornerstoneViewportService.getViewportInfo(viewportId);
326
+ const viewportOptions = viewportInfo?.viewportOptions;
327
+ if (viewportOptions) {
328
+ return colours[viewportOptions.id] || colorsByOrientation[viewportOptions.orientation] || '#0c0';
329
+ } else {
330
+ console.warn('missing viewport?', viewportId);
331
+ return '#0c0';
332
+ }
333
+ }
334
+ }
335
+ }, {
336
+ toolName: toolNames.AdvancedMagnify
337
+ }, {
338
+ toolName: toolNames.ReferenceLines
339
+ }]
340
+ };
341
+ toolGroupService.createToolGroupAndAddTools('mpr', tools);
342
+ }
343
+ function initVolume3DToolGroup(extensionManager, toolGroupService) {
344
+ const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
345
+ const {
346
+ toolNames,
347
+ Enums
348
+ } = utilityModule.exports;
349
+ const tools = {
350
+ active: [{
351
+ toolName: toolNames.TrackballRotateTool,
352
+ bindings: [{
353
+ mouseButton: Enums.MouseBindings.Primary
354
+ }]
355
+ }, {
356
+ toolName: toolNames.Zoom,
357
+ bindings: [{
358
+ mouseButton: Enums.MouseBindings.Secondary
359
+ }, {
360
+ numTouchPoints: 2
361
+ }]
362
+ }, {
363
+ toolName: toolNames.Pan,
364
+ bindings: [{
365
+ mouseButton: Enums.MouseBindings.Auxiliary
366
+ }, {
367
+ numTouchPoints: 3
368
+ }]
369
+ }]
370
+ };
371
+ toolGroupService.createToolGroupAndAddTools('volume3d', tools);
372
+ }
373
+ function initToolGroups(extensionManager, toolGroupService, commandsManager) {
374
+ initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, 'default');
375
+ initSRToolGroup(extensionManager, toolGroupService);
376
+ initMPRToolGroup(extensionManager, toolGroupService, commandsManager);
377
+ initVolume3DToolGroup(extensionManager, toolGroupService);
378
+ }
379
+ /* harmony default export */ const src_initToolGroups = (initToolGroups);
380
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 1 modules
381
+ var esm = __webpack_require__(15327);
382
+ // EXTERNAL MODULE: ../../../node_modules/i18next/dist/esm/i18next.js
383
+ var i18next = __webpack_require__(40680);
384
+ ;// ../../../modes/basic/src/toolbarButtons.ts
385
+
386
+
387
+
388
+ const callbacks = toolName => [{
389
+ commandName: 'setViewportForToolConfiguration',
390
+ commandOptions: {
391
+ toolName
392
+ }
393
+ }];
394
+ const setToolActiveToolbar = {
395
+ commandName: 'setToolActiveToolbar',
396
+ commandOptions: {
397
+ toolGroupIds: ['default', 'mpr', 'SRToolGroup', 'volume3d']
398
+ }
399
+ };
400
+ const toolbarButtons = [
401
+ // sections
402
+ {
403
+ id: 'MeasurementTools',
404
+ uiType: 'ohif.toolButtonList',
405
+ props: {
406
+ buttonSection: true
407
+ }
408
+ }, {
409
+ id: 'MoreTools',
410
+ uiType: 'ohif.toolButtonList',
411
+ props: {
412
+ buttonSection: true
413
+ }
414
+ }, {
415
+ id: 'AdvancedRenderingControls',
416
+ uiType: 'ohif.advancedRenderingControls',
417
+ props: {
418
+ buttonSection: true
419
+ }
420
+ },
421
+ // tool defs
422
+ {
423
+ id: 'modalityLoadBadge',
424
+ uiType: 'ohif.modalityLoadBadge',
425
+ props: {
426
+ icon: 'Status',
427
+ label: i18next/* default */.A.t('Buttons:Status'),
428
+ tooltip: i18next/* default */.A.t('Buttons:Status'),
429
+ evaluate: {
430
+ name: 'evaluate.modalityLoadBadge',
431
+ hideWhenDisabled: true
432
+ }
433
+ }
434
+ }, {
435
+ id: 'navigationComponent',
436
+ uiType: 'ohif.navigationComponent',
437
+ props: {
438
+ icon: 'Navigation',
439
+ label: i18next/* default */.A.t('Buttons:Navigation'),
440
+ tooltip: i18next/* default */.A.t('Buttons:Navigate between segments/measurements and manage their visibility'),
441
+ evaluate: {
442
+ name: 'evaluate.navigationComponent',
443
+ hideWhenDisabled: true
444
+ }
445
+ }
446
+ }, {
447
+ id: 'trackingStatus',
448
+ uiType: 'ohif.trackingStatus',
449
+ props: {
450
+ icon: 'TrackingStatus',
451
+ label: i18next/* default */.A.t('Buttons:Tracking Status'),
452
+ tooltip: i18next/* default */.A.t('Buttons:View and manage tracking status of measurements and annotations'),
453
+ evaluate: {
454
+ name: 'evaluate.trackingStatus',
455
+ hideWhenDisabled: true
456
+ }
457
+ }
458
+ }, {
459
+ id: 'dataOverlayMenu',
460
+ uiType: 'ohif.dataOverlayMenu',
461
+ props: {
462
+ icon: 'ViewportViews',
463
+ label: i18next/* default */.A.t('Buttons:Data Overlay'),
464
+ tooltip: i18next/* default */.A.t('Buttons:Configure data overlay options and manage foreground/background display sets'),
465
+ evaluate: 'evaluate.dataOverlayMenu'
466
+ }
467
+ }, {
468
+ id: 'orientationMenu',
469
+ uiType: 'ohif.orientationMenu',
470
+ props: {
471
+ icon: 'OrientationSwitch',
472
+ label: i18next/* default */.A.t('Buttons:Orientation'),
473
+ tooltip: i18next/* default */.A.t('Buttons:Change viewport orientation between axial, sagittal, coronal and reformat planes'),
474
+ evaluate: {
475
+ name: 'evaluate.orientationMenu'
476
+ // hideWhenDisabled: true,
477
+ }
478
+ }
479
+ }, {
480
+ id: 'windowLevelMenuEmbedded',
481
+ uiType: 'ohif.windowLevelMenuEmbedded',
482
+ props: {
483
+ icon: 'WindowLevel',
484
+ label: i18next/* default */.A.t('Buttons:Window Level'),
485
+ tooltip: i18next/* default */.A.t('Buttons:Adjust window/level presets and customize image contrast settings'),
486
+ evaluate: {
487
+ name: 'evaluate.windowLevelMenuEmbedded',
488
+ hideWhenDisabled: true
489
+ }
490
+ }
491
+ }, {
492
+ id: 'windowLevelMenu',
493
+ uiType: 'ohif.windowLevelMenu',
494
+ props: {
495
+ icon: 'WindowLevel',
496
+ label: i18next/* default */.A.t('Buttons:Window Level'),
497
+ tooltip: i18next/* default */.A.t('Buttons:Adjust window/level presets and customize image contrast settings'),
498
+ evaluate: {
499
+ name: 'evaluate.windowLevelMenu'
500
+ }
501
+ }
502
+ }, {
503
+ id: 'voiManualControlMenu',
504
+ uiType: 'ohif.voiManualControlMenu',
505
+ props: {
506
+ icon: 'WindowLevelAdvanced',
507
+ label: i18next/* default */.A.t('Buttons:Advanced Window Level'),
508
+ tooltip: i18next/* default */.A.t('Buttons:Advanced window/level settings with manual controls and presets'),
509
+ evaluate: 'evaluate.voiManualControlMenu'
510
+ }
511
+ }, {
512
+ id: 'thresholdMenu',
513
+ uiType: 'ohif.thresholdMenu',
514
+ props: {
515
+ icon: 'Threshold',
516
+ label: i18next/* default */.A.t('Buttons:Threshold'),
517
+ tooltip: i18next/* default */.A.t('Buttons:Image threshold settings'),
518
+ evaluate: {
519
+ name: 'evaluate.thresholdMenu',
520
+ hideWhenDisabled: true
521
+ }
522
+ }
523
+ }, {
524
+ id: 'opacityMenu',
525
+ uiType: 'ohif.opacityMenu',
526
+ props: {
527
+ icon: 'Opacity',
528
+ label: i18next/* default */.A.t('Buttons:Opacity'),
529
+ tooltip: i18next/* default */.A.t('Buttons:Image opacity settings'),
530
+ evaluate: {
531
+ name: 'evaluate.opacityMenu',
532
+ hideWhenDisabled: true
533
+ }
534
+ }
535
+ }, {
536
+ id: 'Colorbar',
537
+ uiType: 'ohif.colorbar',
538
+ props: {
539
+ type: 'tool',
540
+ label: i18next/* default */.A.t('Buttons:Colorbar')
541
+ }
542
+ }, {
543
+ id: 'Reset',
544
+ uiType: 'ohif.toolButton',
545
+ props: {
546
+ icon: 'tool-reset',
547
+ label: i18next/* default */.A.t('Buttons:Reset View'),
548
+ tooltip: i18next/* default */.A.t('Buttons:Reset View'),
549
+ commands: 'resetViewport',
550
+ evaluate: 'evaluate.action'
551
+ }
552
+ }, {
553
+ id: 'rotate-right',
554
+ uiType: 'ohif.toolButton',
555
+ props: {
556
+ icon: 'tool-rotate-right',
557
+ label: i18next/* default */.A.t('Buttons:Rotate Right'),
558
+ tooltip: i18next/* default */.A.t('Buttons:Rotate +90'),
559
+ commands: 'rotateViewportCW',
560
+ evaluate: ['evaluate.action', {
561
+ name: 'evaluate.viewport.supported',
562
+ unsupportedViewportTypes: ['video']
563
+ }]
564
+ }
565
+ }, {
566
+ id: 'flipHorizontal',
567
+ uiType: 'ohif.toolButton',
568
+ props: {
569
+ icon: 'tool-flip-horizontal',
570
+ label: i18next/* default */.A.t('Buttons:Flip Horizontal'),
571
+ tooltip: i18next/* default */.A.t('Buttons:Flip Horizontally'),
572
+ commands: 'flipViewportHorizontal',
573
+ evaluate: ['evaluate.viewportProperties.toggle', {
574
+ name: 'evaluate.viewport.supported',
575
+ unsupportedViewportTypes: ['video', 'volume3d']
576
+ }]
577
+ }
578
+ }, {
579
+ id: 'ImageSliceSync',
580
+ uiType: 'ohif.toolButton',
581
+ props: {
582
+ icon: 'link',
583
+ label: i18next/* default */.A.t('Buttons:Image Slice Sync'),
584
+ tooltip: i18next/* default */.A.t('Buttons:Enable position synchronization on stack viewports'),
585
+ commands: {
586
+ commandName: 'toggleSynchronizer',
587
+ commandOptions: {
588
+ type: 'imageSlice'
589
+ }
590
+ },
591
+ listeners: {
592
+ [esm.EVENTS.VIEWPORT_NEW_IMAGE_SET]: {
593
+ commandName: 'toggleImageSliceSync',
594
+ commandOptions: {
595
+ toggledState: true
596
+ }
597
+ }
598
+ },
599
+ evaluate: ['evaluate.cornerstone.synchronizer', {
600
+ name: 'evaluate.viewport.supported',
601
+ unsupportedViewportTypes: ['video', 'volume3d']
602
+ }]
603
+ }
604
+ }, {
605
+ id: 'ReferenceLines',
606
+ uiType: 'ohif.toolButton',
607
+ props: {
608
+ icon: 'tool-referenceLines',
609
+ label: i18next/* default */.A.t('Buttons:Reference Lines'),
610
+ tooltip: i18next/* default */.A.t('Buttons:Show Reference Lines'),
611
+ commands: 'toggleEnabledDisabledToolbar',
612
+ listeners: {
613
+ [src/* ViewportGridService */.sI.EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: callbacks('ReferenceLines'),
614
+ [src/* ViewportGridService */.sI.EVENTS.VIEWPORTS_READY]: callbacks('ReferenceLines')
615
+ },
616
+ evaluate: ['evaluate.cornerstoneTool.toggle', {
617
+ name: 'evaluate.viewport.supported',
618
+ unsupportedViewportTypes: ['video']
619
+ }]
620
+ }
621
+ }, {
622
+ id: 'ImageOverlayViewer',
623
+ uiType: 'ohif.toolButton',
624
+ props: {
625
+ icon: 'toggle-dicom-overlay',
626
+ label: i18next/* default */.A.t('Buttons:Image Overlay'),
627
+ tooltip: i18next/* default */.A.t('Buttons:Toggle Image Overlay'),
628
+ commands: 'toggleEnabledDisabledToolbar',
629
+ evaluate: ['evaluate.cornerstoneTool.toggle', {
630
+ name: 'evaluate.viewport.supported',
631
+ unsupportedViewportTypes: ['video']
632
+ }]
633
+ }
634
+ }, {
635
+ id: 'StackScroll',
636
+ uiType: 'ohif.toolButton',
637
+ props: {
638
+ icon: 'tool-stack-scroll',
639
+ label: i18next/* default */.A.t('Buttons:Stack Scroll'),
640
+ tooltip: i18next/* default */.A.t('Buttons:Stack Scroll'),
641
+ commands: setToolActiveToolbar,
642
+ evaluate: 'evaluate.cornerstoneTool'
643
+ }
644
+ }, {
645
+ id: 'invert',
646
+ uiType: 'ohif.toolButton',
647
+ props: {
648
+ icon: 'tool-invert',
649
+ label: i18next/* default */.A.t('Buttons:Invert'),
650
+ tooltip: i18next/* default */.A.t('Buttons:Invert Colors'),
651
+ commands: 'invertViewport',
652
+ evaluate: ['evaluate.viewportProperties.toggle', {
653
+ name: 'evaluate.viewport.supported',
654
+ unsupportedViewportTypes: ['video']
655
+ }]
656
+ }
657
+ }, {
658
+ id: 'Probe',
659
+ uiType: 'ohif.toolButton',
660
+ props: {
661
+ icon: 'tool-probe',
662
+ label: i18next/* default */.A.t('Buttons:Probe'),
663
+ tooltip: i18next/* default */.A.t('Buttons:Probe'),
664
+ commands: setToolActiveToolbar,
665
+ evaluate: 'evaluate.cornerstoneTool'
666
+ }
667
+ }, {
668
+ id: 'Cine',
669
+ uiType: 'ohif.toolButton',
670
+ props: {
671
+ icon: 'tool-cine',
672
+ label: i18next/* default */.A.t('Buttons:Cine'),
673
+ tooltip: i18next/* default */.A.t('Buttons:Cine'),
674
+ commands: 'toggleCine',
675
+ evaluate: ['evaluate.cine', {
676
+ name: 'evaluate.viewport.supported',
677
+ unsupportedViewportTypes: ['volume3d']
678
+ }]
679
+ }
680
+ }, {
681
+ id: 'Angle',
682
+ uiType: 'ohif.toolButton',
683
+ props: {
684
+ icon: 'tool-angle',
685
+ label: i18next/* default */.A.t('Buttons:Angle'),
686
+ tooltip: i18next/* default */.A.t('Buttons:Angle'),
687
+ commands: setToolActiveToolbar,
688
+ evaluate: 'evaluate.cornerstoneTool'
689
+ }
690
+ }, {
691
+ id: 'CobbAngle',
692
+ uiType: 'ohif.toolButton',
693
+ props: {
694
+ icon: 'icon-tool-cobb-angle',
695
+ label: i18next/* default */.A.t('Buttons:Cobb Angle'),
696
+ tooltip: i18next/* default */.A.t('Buttons:Cobb Angle'),
697
+ commands: setToolActiveToolbar,
698
+ evaluate: 'evaluate.cornerstoneTool'
699
+ }
700
+ }, {
701
+ id: 'Magnify',
702
+ uiType: 'ohif.toolButton',
703
+ props: {
704
+ icon: 'tool-magnify',
705
+ label: i18next/* default */.A.t('Buttons:Zoom-in'),
706
+ tooltip: i18next/* default */.A.t('Buttons:Zoom-in'),
707
+ commands: setToolActiveToolbar,
708
+ evaluate: ['evaluate.cornerstoneTool', {
709
+ name: 'evaluate.viewport.supported',
710
+ unsupportedViewportTypes: ['video']
711
+ }]
712
+ }
713
+ }, {
714
+ id: 'CalibrationLine',
715
+ uiType: 'ohif.toolButton',
716
+ props: {
717
+ icon: 'tool-calibration',
718
+ label: i18next/* default */.A.t('Buttons:Calibration'),
719
+ tooltip: i18next/* default */.A.t('Buttons:Calibration Line'),
720
+ commands: setToolActiveToolbar,
721
+ evaluate: ['evaluate.cornerstoneTool', {
722
+ name: 'evaluate.viewport.supported',
723
+ unsupportedViewportTypes: ['video']
724
+ }]
725
+ }
726
+ }, {
727
+ id: 'TagBrowser',
728
+ uiType: 'ohif.toolButton',
729
+ props: {
730
+ icon: 'dicom-tag-browser',
731
+ label: i18next/* default */.A.t('Buttons:Dicom Tag Browser'),
732
+ tooltip: i18next/* default */.A.t('Buttons:Dicom Tag Browser'),
733
+ commands: 'openDICOMTagViewer'
734
+ }
735
+ }, {
736
+ id: 'AdvancedMagnify',
737
+ uiType: 'ohif.toolButton',
738
+ props: {
739
+ icon: 'icon-tool-loupe',
740
+ label: i18next/* default */.A.t('Buttons:Magnify Probe'),
741
+ tooltip: i18next/* default */.A.t('Buttons:Magnify Probe'),
742
+ commands: 'toggleActiveDisabledToolbar',
743
+ evaluate: ['evaluate.cornerstoneTool.toggle.ifStrictlyDisabled', {
744
+ name: 'evaluate.viewport.supported',
745
+ unsupportedViewportTypes: ['video']
746
+ }]
747
+ }
748
+ }, {
749
+ id: 'UltrasoundDirectionalTool',
750
+ uiType: 'ohif.toolButton',
751
+ props: {
752
+ icon: 'icon-tool-ultrasound-bidirectional',
753
+ label: i18next/* default */.A.t('Buttons:Ultrasound Directional'),
754
+ tooltip: i18next/* default */.A.t('Buttons:Ultrasound Directional'),
755
+ commands: setToolActiveToolbar,
756
+ evaluate: ['evaluate.cornerstoneTool', {
757
+ name: 'evaluate.modality.supported',
758
+ supportedModalities: ['US']
759
+ }]
760
+ }
761
+ }, {
762
+ id: 'WindowLevelRegion',
763
+ uiType: 'ohif.toolButton',
764
+ props: {
765
+ icon: 'icon-tool-window-region',
766
+ label: i18next/* default */.A.t('Buttons:Window Level Region'),
767
+ tooltip: i18next/* default */.A.t('Buttons:Window Level Region'),
768
+ commands: setToolActiveToolbar,
769
+ evaluate: ['evaluate.cornerstoneTool', {
770
+ name: 'evaluate.viewport.supported',
771
+ unsupportedViewportTypes: ['video']
772
+ }]
773
+ }
774
+ }, {
775
+ id: 'Length',
776
+ uiType: 'ohif.toolButton',
777
+ props: {
778
+ icon: 'tool-length',
779
+ label: i18next/* default */.A.t('Buttons:Length'),
780
+ tooltip: i18next/* default */.A.t('Buttons:Length Tool'),
781
+ commands: setToolActiveToolbar,
782
+ evaluate: 'evaluate.cornerstoneTool'
783
+ }
784
+ }, {
785
+ id: 'Bidirectional',
786
+ uiType: 'ohif.toolButton',
787
+ props: {
788
+ icon: 'tool-bidirectional',
789
+ label: i18next/* default */.A.t('Buttons:Bidirectional'),
790
+ tooltip: i18next/* default */.A.t('Buttons:Bidirectional Tool'),
791
+ commands: setToolActiveToolbar,
792
+ evaluate: 'evaluate.cornerstoneTool'
793
+ }
794
+ }, {
795
+ id: 'ArrowAnnotate',
796
+ uiType: 'ohif.toolButton',
797
+ props: {
798
+ icon: 'tool-annotate',
799
+ label: i18next/* default */.A.t('Buttons:Annotation'),
800
+ tooltip: i18next/* default */.A.t('Buttons:Arrow Annotate'),
801
+ commands: setToolActiveToolbar,
802
+ evaluate: 'evaluate.cornerstoneTool'
803
+ }
804
+ }, {
805
+ id: 'EllipticalROI',
806
+ uiType: 'ohif.toolButton',
807
+ props: {
808
+ icon: 'tool-ellipse',
809
+ label: i18next/* default */.A.t('Buttons:Ellipse'),
810
+ tooltip: i18next/* default */.A.t('Buttons:Ellipse ROI'),
811
+ commands: setToolActiveToolbar,
812
+ evaluate: 'evaluate.cornerstoneTool'
813
+ }
814
+ }, {
815
+ id: 'RectangleROI',
816
+ uiType: 'ohif.toolButton',
817
+ props: {
818
+ icon: 'tool-rectangle',
819
+ label: i18next/* default */.A.t('Buttons:Rectangle'),
820
+ tooltip: i18next/* default */.A.t('Buttons:Rectangle ROI'),
821
+ commands: setToolActiveToolbar,
822
+ evaluate: 'evaluate.cornerstoneTool'
823
+ }
824
+ }, {
825
+ id: 'CircleROI',
826
+ uiType: 'ohif.toolButton',
827
+ props: {
828
+ icon: 'tool-circle',
829
+ label: i18next/* default */.A.t('Buttons:Circle'),
830
+ tooltip: i18next/* default */.A.t('Buttons:Circle Tool'),
831
+ commands: setToolActiveToolbar,
832
+ evaluate: 'evaluate.cornerstoneTool'
833
+ }
834
+ }, {
835
+ id: 'PlanarFreehandROI',
836
+ uiType: 'ohif.toolButton',
837
+ props: {
838
+ icon: 'icon-tool-freehand-roi',
839
+ label: i18next/* default */.A.t('Buttons:Freehand ROI'),
840
+ tooltip: i18next/* default */.A.t('Buttons:Freehand ROI'),
841
+ commands: setToolActiveToolbar,
842
+ evaluate: 'evaluate.cornerstoneTool'
843
+ }
844
+ }, {
845
+ id: 'SplineROI',
846
+ uiType: 'ohif.toolButton',
847
+ props: {
848
+ icon: 'icon-tool-spline-roi',
849
+ label: i18next/* default */.A.t('Buttons:Spline ROI'),
850
+ tooltip: i18next/* default */.A.t('Buttons:Spline ROI'),
851
+ commands: setToolActiveToolbar,
852
+ evaluate: 'evaluate.cornerstoneTool'
853
+ }
854
+ }, {
855
+ id: 'LivewireContour',
856
+ uiType: 'ohif.toolButton',
857
+ props: {
858
+ icon: 'icon-tool-livewire',
859
+ label: i18next/* default */.A.t('Buttons:Livewire tool'),
860
+ tooltip: i18next/* default */.A.t('Buttons:Livewire tool'),
861
+ commands: setToolActiveToolbar,
862
+ evaluate: 'evaluate.cornerstoneTool'
863
+ }
864
+ },
865
+ // Window Level
866
+ {
867
+ id: 'WindowLevel',
868
+ uiType: 'ohif.toolButton',
869
+ props: {
870
+ icon: 'tool-window-level',
871
+ label: i18next/* default */.A.t('Buttons:Window Level'),
872
+ commands: setToolActiveToolbar,
873
+ evaluate: ['evaluate.cornerstoneTool', {
874
+ name: 'evaluate.viewport.supported',
875
+ unsupportedViewportTypes: ['wholeSlide']
876
+ }]
877
+ }
878
+ }, {
879
+ id: 'Pan',
880
+ uiType: 'ohif.toolButton',
881
+ props: {
882
+ type: 'tool',
883
+ icon: 'tool-move',
884
+ label: i18next/* default */.A.t('Buttons:Pan'),
885
+ commands: setToolActiveToolbar,
886
+ evaluate: 'evaluate.cornerstoneTool'
887
+ }
888
+ }, {
889
+ id: 'Zoom',
890
+ uiType: 'ohif.toolButton',
891
+ props: {
892
+ type: 'tool',
893
+ icon: 'tool-zoom',
894
+ label: i18next/* default */.A.t('Buttons:Zoom'),
895
+ commands: setToolActiveToolbar,
896
+ evaluate: 'evaluate.cornerstoneTool'
897
+ }
898
+ }, {
899
+ id: 'TrackballRotate',
900
+ uiType: 'ohif.toolButton',
901
+ props: {
902
+ type: 'tool',
903
+ icon: 'tool-3d-rotate',
904
+ label: i18next/* default */.A.t('Buttons:3D Rotate'),
905
+ commands: setToolActiveToolbar,
906
+ evaluate: {
907
+ name: 'evaluate.cornerstoneTool',
908
+ disabledText: 'Select a 3D viewport to enable this tool'
909
+ }
910
+ }
911
+ }, {
912
+ id: 'Capture',
913
+ uiType: 'ohif.toolButton',
914
+ props: {
915
+ icon: 'tool-capture',
916
+ label: i18next/* default */.A.t('Buttons:Capture'),
917
+ commands: 'showDownloadViewportModal',
918
+ evaluate: ['evaluate.action', {
919
+ name: 'evaluate.viewport.supported',
920
+ unsupportedViewportTypes: ['video', 'wholeSlide']
921
+ }]
922
+ }
923
+ }, {
924
+ id: 'Layout',
925
+ uiType: 'ohif.layoutSelector',
926
+ props: {
927
+ rows: 3,
928
+ columns: 4,
929
+ evaluate: 'evaluate.action'
930
+ }
931
+ }, {
932
+ id: 'Crosshairs',
933
+ uiType: 'ohif.toolButton',
934
+ props: {
935
+ type: 'tool',
936
+ icon: 'tool-crosshair',
937
+ label: i18next/* default */.A.t('Buttons:Crosshairs'),
938
+ commands: {
939
+ commandName: 'setToolActiveToolbar',
940
+ commandOptions: {
941
+ toolGroupIds: ['mpr']
942
+ }
943
+ },
944
+ evaluate: {
945
+ name: 'evaluate.cornerstoneTool',
946
+ disabledText: 'Select an MPR viewport to enable this tool'
947
+ }
948
+ }
949
+ },
950
+ // Section containers for the nested toolbox
951
+ {
952
+ id: 'SegmentationUtilities',
953
+ uiType: 'ohif.toolBoxButton',
954
+ props: {
955
+ buttonSection: true
956
+ }
957
+ }, {
958
+ id: 'SegmentLabelTool',
959
+ uiType: 'ohif.toolBoxButton',
960
+ props: {
961
+ icon: 'tool-segment-label',
962
+ label: i18next/* default */.A.t('Buttons:Segment Label Display'),
963
+ tooltip: i18next/* default */.A.t('Buttons:Click to show or hide segment labels when hovering with your mouse.'),
964
+ commands: {
965
+ commandName: 'toggleSegmentLabel'
966
+ },
967
+ evaluate: ['evaluate.cornerstoneTool.toggle', {
968
+ name: 'evaluate.cornerstone.hasSegmentation'
969
+ }]
970
+ }
971
+ }
972
+ // {
973
+ // id: 'Undo',
974
+ // uiType: 'ohif.toolButton',
975
+ // props: {
976
+ // type: 'tool',
977
+ // icon: 'prev-arrow',
978
+ // label: 'Undo',
979
+ // commands: {
980
+ // commandName: 'undo',
981
+ // },
982
+ // evaluate: 'evaluate.action',
983
+ // },
984
+ // },
985
+ // {
986
+ // id: 'Redo',
987
+ // uiType: 'ohif.toolButton',
988
+ // props: {
989
+ // type: 'tool',
990
+ // icon: 'next-arrow',
991
+ // label: 'Redo',
992
+ // commands: {
993
+ // commandName: 'redo',
994
+ // },
995
+ // evaluate: 'evaluate.action',
996
+ // },
997
+ // },
998
+ ];
999
+ /* harmony default export */ const src_toolbarButtons = (toolbarButtons);
1000
+ ;// ../../../modes/basic/package.json
1001
+ const package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@ohif/mode-basic"}');
1002
+ ;// ../../../modes/basic/src/id.js
1003
+
1004
+ const id = package_namespaceObject.UU;
1005
+
1006
+ ;// ../../../modes/basic/src/index.tsx
1007
+
1008
+
1009
+
1010
+
1011
+
1012
+ const {
1013
+ TOOLBAR_SECTIONS
1014
+ } = src/* ToolbarService */.hx;
1015
+ const {
1016
+ structuredCloneWithFunctions
1017
+ } = src/* utils */.Wp;
1018
+
1019
+ /**
1020
+ * Define non-imaging modalities.
1021
+ * This can be used to exclude modes which have only these modalities,
1022
+ * or it can be used to not display thumbnails for some of these.
1023
+ * This list used to include SM, for whole slide imaging, but this is now supported
1024
+ * by cornerstone. Others of these may get added.
1025
+ */
1026
+ const NON_IMAGE_MODALITIES = ['ECG', 'SEG', 'RTSTRUCT', 'RTPLAN', 'PR', 'SR', 'DOC'];
1027
+ const ohif = {
1028
+ layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',
1029
+ sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',
1030
+ thumbnailList: '@ohif/extension-default.panelModule.seriesList',
1031
+ wsiSopClassHandler: '@ohif/extension-cornerstone.sopClassHandlerModule.DicomMicroscopySopClassHandler'
1032
+ };
1033
+ const cornerstone = {
1034
+ measurements: '@ohif/extension-cornerstone.panelModule.panelMeasurement',
1035
+ segmentation: '@ohif/extension-cornerstone.panelModule.panelSegmentation',
1036
+ viewport: '@ohif/extension-cornerstone.viewportModule.cornerstone'
1037
+ };
1038
+ const dicomsr = {
1039
+ sopClassHandler: '@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr',
1040
+ sopClassHandler3D: '@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr-3d',
1041
+ viewport: '@ohif/extension-cornerstone-dicom-sr.viewportModule.dicom-sr'
1042
+ };
1043
+ const dicomvideo = {
1044
+ sopClassHandler: '@ohif/extension-dicom-video.sopClassHandlerModule.dicom-video',
1045
+ viewport: '@ohif/extension-dicom-video.viewportModule.dicom-video'
1046
+ };
1047
+ const dicompdf = {
1048
+ sopClassHandler: '@ohif/extension-dicom-pdf.sopClassHandlerModule.dicom-pdf',
1049
+ viewport: '@ohif/extension-dicom-pdf.viewportModule.dicom-pdf'
1050
+ };
1051
+ const dicomSeg = {
1052
+ sopClassHandler: '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',
1053
+ viewport: '@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg'
1054
+ };
1055
+ const dicomPmap = {
1056
+ sopClassHandler: '@ohif/extension-cornerstone-dicom-pmap.sopClassHandlerModule.dicom-pmap',
1057
+ viewport: '@ohif/extension-cornerstone-dicom-pmap.viewportModule.dicom-pmap'
1058
+ };
1059
+ const dicomRT = {
1060
+ viewport: '@ohif/extension-cornerstone-dicom-rt.viewportModule.dicom-rt',
1061
+ sopClassHandler: '@ohif/extension-cornerstone-dicom-rt.sopClassHandlerModule.dicom-rt'
1062
+ };
1063
+ const extensionDependencies = {
1064
+ // Can derive the versions at least process.env.from npm_package_version
1065
+ '@ohif/extension-default': '^3.0.0',
1066
+ '@ohif/extension-cornerstone': '^3.0.0',
1067
+ '@ohif/extension-cornerstone-dicom-sr': '^3.0.0',
1068
+ '@ohif/extension-cornerstone-dicom-seg': '^3.0.0',
1069
+ '@ohif/extension-cornerstone-dicom-pmap': '^3.0.0',
1070
+ '@ohif/extension-cornerstone-dicom-rt': '^3.0.0',
1071
+ '@ohif/extension-dicom-pdf': '^3.0.1',
1072
+ '@ohif/extension-dicom-video': '^3.0.1'
1073
+ };
1074
+ const sopClassHandlers = [dicomvideo.sopClassHandler, dicomSeg.sopClassHandler, dicomPmap.sopClassHandler, ohif.sopClassHandler, ohif.wsiSopClassHandler, dicompdf.sopClassHandler, dicomsr.sopClassHandler3D, dicomsr.sopClassHandler, dicomRT.sopClassHandler];
1075
+
1076
+ /**
1077
+ * Indicate this is a valid mode if:
1078
+ * - it contains at least one of the modeModalities
1079
+ * - it contains all of the array value in modeModalities
1080
+ * Otherwise, if modeModalities is not defined:
1081
+ * - it contains at least one modality other than the nonModeMOdalities.
1082
+ */
1083
+ function isValidMode({
1084
+ modalities
1085
+ }) {
1086
+ const modalities_list = modalities.split('\\');
1087
+ if (this.modeModalities?.length) {
1088
+ for (const modeModality of this.modeModalities) {
1089
+ if (Array.isArray(modeModality) && modeModality.every(m => modalities.indexOf(m) !== -1)) {
1090
+ return {
1091
+ valid: true,
1092
+ description: `Matches ${modeModality.join(', ')}`
1093
+ };
1094
+ } else if (modalities.indexOf(modeModality)) {
1095
+ return {
1096
+ valid: true,
1097
+ description: `Matches ${modeModality}`
1098
+ };
1099
+ }
1100
+ }
1101
+ return {
1102
+ valid: false,
1103
+ description: `None of the mode modalities match: ${JSON.stringify(this.modeModalities)}`
1104
+ };
1105
+ }
1106
+ return {
1107
+ valid: !!modalities_list.find(modality => this.nonModeModalities.indexOf(modality) === -1),
1108
+ description: `The mode does not support studies that ONLY include the following modalities: ${this.nonModeModalities.join(', ')}`
1109
+ };
1110
+ }
1111
+ function onModeEnter({
1112
+ servicesManager,
1113
+ extensionManager,
1114
+ commandsManager,
1115
+ panelService,
1116
+ segmentationService
1117
+ }) {
1118
+ const {
1119
+ measurementService,
1120
+ toolbarService,
1121
+ toolGroupService,
1122
+ customizationService
1123
+ } = servicesManager.services;
1124
+ measurementService.clearMeasurements();
1125
+
1126
+ // Init Default and SR ToolGroups
1127
+ src_initToolGroups(extensionManager, toolGroupService, commandsManager);
1128
+ toolbarService.register(this.toolbarButtons);
1129
+ for (const [key, section] of Object.entries(this.toolbarSections)) {
1130
+ toolbarService.updateSection(key, section);
1131
+ }
1132
+ if (!this.enableSegmentationEdit) {
1133
+ customizationService.setCustomizations({
1134
+ 'panelSegmentation.disableEditing': {
1135
+ $set: true
1136
+ }
1137
+ });
1138
+ }
1139
+
1140
+ // // ActivatePanel event trigger for when a segmentation or measurement is added.
1141
+ // // Do not force activation so as to respect the state the user may have left the UI in.
1142
+ if (this.activatePanelTrigger) {
1143
+ this._activatePanelTriggersSubscriptions = [...panelService.addActivatePanelTriggers(cornerstone.segmentation, [{
1144
+ sourcePubSubService: segmentationService,
1145
+ sourceEvents: [segmentationService.EVENTS.SEGMENTATION_ADDED]
1146
+ }], true), ...panelService.addActivatePanelTriggers(cornerstone.measurements, [{
1147
+ sourcePubSubService: measurementService,
1148
+ sourceEvents: [measurementService.EVENTS.MEASUREMENT_ADDED, measurementService.EVENTS.RAW_MEASUREMENT_ADDED]
1149
+ }], true), true];
1150
+ }
1151
+ }
1152
+ function onModeExit({
1153
+ servicesManager
1154
+ }) {
1155
+ const {
1156
+ toolGroupService,
1157
+ syncGroupService,
1158
+ segmentationService,
1159
+ cornerstoneViewportService,
1160
+ uiDialogService,
1161
+ uiModalService
1162
+ } = servicesManager.services;
1163
+ this._activatePanelTriggersSubscriptions.forEach(sub => sub.unsubscribe());
1164
+ this._activatePanelTriggersSubscriptions.length = 0;
1165
+ uiDialogService.hideAll();
1166
+ uiModalService.hide();
1167
+ toolGroupService.destroy();
1168
+ syncGroupService.destroy();
1169
+ segmentationService.destroy();
1170
+ cornerstoneViewportService.destroy();
1171
+ }
1172
+ const toolbarSections = {
1173
+ [TOOLBAR_SECTIONS.primary]: ['MeasurementTools', 'Zoom', 'Pan', 'TrackballRotate', 'WindowLevel', 'Capture', 'Layout', 'Crosshairs', 'MoreTools'],
1174
+ [TOOLBAR_SECTIONS.viewportActionMenu.topLeft]: ['orientationMenu', 'dataOverlayMenu'],
1175
+ [TOOLBAR_SECTIONS.viewportActionMenu.bottomMiddle]: ['AdvancedRenderingControls'],
1176
+ AdvancedRenderingControls: ['windowLevelMenuEmbedded', 'voiManualControlMenu', 'Colorbar', 'opacityMenu', 'thresholdMenu'],
1177
+ [TOOLBAR_SECTIONS.viewportActionMenu.topRight]: ['modalityLoadBadge', 'trackingStatus', 'navigationComponent'],
1178
+ [TOOLBAR_SECTIONS.viewportActionMenu.bottomLeft]: ['windowLevelMenu'],
1179
+ MeasurementTools: ['Length', 'Bidirectional', 'ArrowAnnotate', 'EllipticalROI', 'RectangleROI', 'CircleROI', 'PlanarFreehandROI', 'SplineROI', 'LivewireContour'],
1180
+ MoreTools: ['Reset', 'rotate-right', 'flipHorizontal', 'ImageSliceSync', 'ReferenceLines', 'ImageOverlayViewer', 'StackScroll', 'invert', 'Probe', 'Cine', 'Angle', 'CobbAngle', 'Magnify', 'CalibrationLine', 'TagBrowser', 'AdvancedMagnify', 'UltrasoundDirectionalTool', 'WindowLevelRegion', 'SegmentLabelTool']
1181
+ };
1182
+ const basicLayout = {
1183
+ id: ohif.layout,
1184
+ props: {
1185
+ leftPanels: [ohif.thumbnailList],
1186
+ leftPanelResizable: true,
1187
+ rightPanels: [cornerstone.segmentation, cornerstone.measurements],
1188
+ rightPanelClosed: true,
1189
+ rightPanelResizable: true,
1190
+ viewports: [{
1191
+ namespace: cornerstone.viewport,
1192
+ displaySetsToDisplay: [ohif.sopClassHandler, dicomvideo.sopClassHandler, ohif.wsiSopClassHandler]
1193
+ }, {
1194
+ namespace: dicomsr.viewport,
1195
+ displaySetsToDisplay: [dicomsr.sopClassHandler, dicomsr.sopClassHandler3D]
1196
+ }, {
1197
+ namespace: dicompdf.viewport,
1198
+ displaySetsToDisplay: [dicompdf.sopClassHandler]
1199
+ }, {
1200
+ namespace: dicomSeg.viewport,
1201
+ displaySetsToDisplay: [dicomSeg.sopClassHandler]
1202
+ }, {
1203
+ namespace: dicomPmap.viewport,
1204
+ displaySetsToDisplay: [dicomPmap.sopClassHandler]
1205
+ }, {
1206
+ namespace: dicomRT.viewport,
1207
+ displaySetsToDisplay: [dicomRT.sopClassHandler]
1208
+ }]
1209
+ }
1210
+ };
1211
+ function layoutTemplate() {
1212
+ return structuredCloneWithFunctions(this.layoutInstance);
1213
+ }
1214
+ const basicRoute = {
1215
+ path: 'basic',
1216
+ layoutTemplate,
1217
+ layoutInstance: basicLayout
1218
+ };
1219
+ const modeInstance = {
1220
+ // TODO: We're using this as a route segment
1221
+ // We should not be.
1222
+ id: id,
1223
+ routeName: 'basic',
1224
+ // Don't hide this by default - see the registration later to hide the basic
1225
+ // instance by default.
1226
+ hide: false,
1227
+ displayName: 'Non-Longitudinal Basic',
1228
+ _activatePanelTriggersSubscriptions: [],
1229
+ toolbarSections,
1230
+ /**
1231
+ * Lifecycle hooks
1232
+ */
1233
+ onModeEnter,
1234
+ onModeExit,
1235
+ validationTags: {
1236
+ study: [],
1237
+ series: []
1238
+ },
1239
+ isValidMode,
1240
+ routes: [basicRoute],
1241
+ extensions: extensionDependencies,
1242
+ // Default protocol gets self-registered by default in the init
1243
+ hangingProtocol: 'default',
1244
+ // Order is important in sop class handlers when two handlers both use
1245
+ // the same sop class under different situations. In that case, the more
1246
+ // general handler needs to come last. For this case, the dicomvideo must
1247
+ // come first to remove video transfer syntax before ohif uses images
1248
+ sopClassHandlers,
1249
+ toolbarButtons: src_toolbarButtons,
1250
+ enableSegmentationEdit: false,
1251
+ nonModeModalities: NON_IMAGE_MODALITIES
1252
+ };
1253
+
1254
+ /**
1255
+ * Creates a mode on this object, using immutability-helper to apply changes
1256
+ * from modeConfiguration into the modeInstance.
1257
+ */
1258
+ function modeFactory({
1259
+ modeConfiguration
1260
+ }) {
1261
+ let modeInstance = this.modeInstance;
1262
+ if (modeConfiguration) {
1263
+ modeInstance = immutability_helper_default()(modeInstance, modeConfiguration);
1264
+ }
1265
+ return modeInstance;
1266
+ }
1267
+ const mode = {
1268
+ id: id,
1269
+ modeFactory,
1270
+ modeInstance: {
1271
+ ...modeInstance,
1272
+ hide: true
1273
+ },
1274
+ extensionDependencies
1275
+ };
1276
+ /* harmony default export */ const basic_src = (mode);
1277
+
1278
+
1279
+ /***/ }),
1280
+
1281
+ /***/ 95457:
1282
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1283
+
1284
+ // ESM COMPAT FLAG
1285
+ __webpack_require__.r(__webpack_exports__);
1286
+
1287
+ // EXPORTS
1288
+ __webpack_require__.d(__webpack_exports__, {
1289
+ "default": () => (/* binding */ longitudinal_src),
1290
+ extensionDependencies: () => (/* binding */ extensionDependencies),
1291
+ initToolGroups: () => (/* reexport */ src.initToolGroups),
1292
+ longitudinalInstance: () => (/* binding */ longitudinalInstance),
1293
+ longitudinalRoute: () => (/* binding */ longitudinalRoute),
1294
+ modeInstance: () => (/* binding */ modeInstance),
1295
+ toolbarButtons: () => (/* reexport */ src.toolbarButtons),
1296
+ tracked: () => (/* binding */ tracked)
1297
+ });
1298
+
1299
+ // EXTERNAL MODULE: ../../../node_modules/i18next/dist/esm/i18next.js
1300
+ var i18next = __webpack_require__(40680);
1301
+ ;// ../../../modes/longitudinal/package.json
1302
+ const package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@ohif/mode-longitudinal"}');
1303
+ ;// ../../../modes/longitudinal/src/id.js
1304
+
1305
+ const id = package_namespaceObject.UU;
1306
+
1307
+ // EXTERNAL MODULE: ../../../modes/basic/src/index.tsx + 4 modules
1308
+ var src = __webpack_require__(35485);
1309
+ ;// ../../../modes/longitudinal/src/index.ts
1310
+
1311
+
1312
+
1313
+ const tracked = {
1314
+ measurements: '@ohif/extension-measurement-tracking.panelModule.trackedMeasurements',
1315
+ thumbnailList: '@ohif/extension-measurement-tracking.panelModule.seriesList',
1316
+ viewport: '@ohif/extension-measurement-tracking.viewportModule.cornerstone-tracked'
1317
+ };
1318
+ const extensionDependencies = {
1319
+ // Can derive the versions at least process.env.from npm_package_version
1320
+ ...src.extensionDependencies,
1321
+ '@ohif/extension-measurement-tracking': '^3.0.0'
1322
+ };
1323
+ const longitudinalInstance = {
1324
+ ...src.basicLayout,
1325
+ id: src.ohif.layout,
1326
+ props: {
1327
+ ...src.basicLayout.props,
1328
+ leftPanels: [tracked.thumbnailList],
1329
+ rightPanels: [src.cornerstone.segmentation, tracked.measurements],
1330
+ viewports: [{
1331
+ namespace: tracked.viewport,
1332
+ // Re-use the display sets from basic
1333
+ displaySetsToDisplay: src.basicLayout.props.viewports[0].displaySetsToDisplay
1334
+ }, ...src.basicLayout.props.viewports]
1335
+ }
1336
+ };
1337
+ const longitudinalRoute = {
1338
+ ...src.basicRoute,
1339
+ path: 'longitudinal',
1340
+ /*init: ({ servicesManager, extensionManager }) => {
1341
+ //defaultViewerRouteInit
1342
+ },*/
1343
+ layoutInstance: longitudinalInstance
1344
+ };
1345
+ const modeInstance = {
1346
+ ...src.modeInstance,
1347
+ // TODO: We're using this as a route segment
1348
+ // We should not be.
1349
+ id: id,
1350
+ routeName: 'viewer',
1351
+ displayName: i18next/* default */.A.t('Modes:Basic Viewer'),
1352
+ routes: [longitudinalRoute],
1353
+ extensions: extensionDependencies
1354
+ };
1355
+ const mode = {
1356
+ ...src.mode,
1357
+ id: id,
1358
+ modeInstance,
1359
+ extensionDependencies
1360
+ };
1361
+ /* harmony default export */ const longitudinal_src = (mode);
1362
+
1363
+
1364
+ /***/ })
1365
+
1366
+ }]);