@ohif/app 3.12.0-beta.90 → 3.12.0-beta.92

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 (45) hide show
  1. package/dist/{1037.bundle.87a5adb8c92bd5bf53f5.js → 1037.bundle.dd9098a9a640f0d0ef0f.js} +129 -96
  2. package/dist/{1608.bundle.3d904bc76f5d5f78ff21.js → 1608.bundle.f855c4bdb7f00eb66fca.js} +1 -1
  3. package/dist/{1903.bundle.f0505c6e927d0bef5589.js → 1903.bundle.9a291597f23ebaa3371c.js} +49 -47
  4. package/dist/{1604.bundle.4f01a6b0b8d5b1cbc294.js → 1933.bundle.a5d41c04da5425d06694.js} +13 -26
  5. package/dist/{2018.bundle.59c7c4cb3f79f63bab68.js → 2018.bundle.4527f2b0c1c8ff75f568.js} +18 -43
  6. package/dist/{306.bundle.f9faa2b3cdd7e86b5869.js → 306.bundle.a0af0889477845729c6a.js} +23 -1
  7. package/dist/{3461.bundle.458597198f24359ec78f.js → 3461.bundle.3cac685ef19f883a0f9d.js} +27 -8
  8. package/dist/{4019.bundle.1be1cdd0805ad2c59d65.js → 4019.bundle.03029c488a02493cb7f3.js} +17 -1
  9. package/dist/{2518.bundle.644302643ac0790e7374.js → 4033.bundle.1609f8751de2a6aff280.js} +457 -303
  10. package/dist/{4819.bundle.f187a4c0517c85e37ab0.js → 4819.bundle.14344bf9acf5c5f6d123.js} +3 -3
  11. package/dist/{5028.bundle.6003ab9178779929462f.js → 5028.bundle.c61b7cd88172e2d589d5.js} +2 -2
  12. package/dist/{5400.bundle.c3a3fe8867efa2edfa94.js → 5400.bundle.428fdd2dc347a7fda9e6.js} +96 -92
  13. package/dist/5457.bundle.af893cd38fdaeafd5c2a.js +89 -0
  14. package/dist/{5485.bundle.2ee096f57ff7e51d4c23.js → 5485.bundle.929d9add8bdf90a4f3c7.js} +8 -0
  15. package/dist/{5802.bundle.8922caf16c088b10cdb0.js → 5802.bundle.756d2ed511c06ee8b461.js} +2 -2
  16. package/dist/{6991.bundle.46bc04720d99fbb06785.js → 6991.bundle.7d091de815571097b96e.js} +8 -10
  17. package/dist/{7412.bundle.34fe5e72833e857edc0a.js → 7412.bundle.dfe01ae3e53107abe53d.js} +80 -57
  18. package/dist/{8305.bundle.8ea926425cdffaf84fe3.js → 8305.bundle.08ba73235df90e099838.js} +75 -55
  19. package/dist/{8558.bundle.c9ffb4f942dbbbff1849.js → 8558.bundle.705446f4883e84021bf4.js} +29 -11
  20. package/dist/{8583.bundle.7715397a42e8f00a9e3e.js → 8583.bundle.0288cadf5cf8401446b1.js} +12 -13
  21. package/dist/{874.bundle.92ddc54408fef9debee7.js → 874.bundle.7e543ec9343c9a718e3d.js} +35 -42
  22. package/dist/{3613.bundle.6157004e0592003c0800.js → 8802.bundle.4958d8ba1d0d521a002a.js} +131 -76
  23. package/dist/{9548.bundle.7be4f24aeadd0ad4f16c.js → 9195.bundle.70afccd0f802b78c279a.js} +75 -104
  24. package/dist/{9845.bundle.7e4db5e31b28d73fdac2.js → 9845.bundle.0d22f2210c1d5ac18882.js} +1 -1
  25. package/dist/{app.bundle.bdd8a45996ed4ca28560.js → app.bundle.2b7e40349f89ffdfd96c.js} +1055 -219
  26. package/dist/{compute.bundle.f3ca9fb0e7ce9e885b9c.js → compute.bundle.4c0ef8b919cbe5eef44d.js} +3 -3
  27. package/dist/index.html +1 -1
  28. package/dist/{polySeg.bundle.7b8d1bb21d442a48da1d.js → polySeg.bundle.75f37f2780c5375e161e.js} +3 -3
  29. package/dist/sw.js +1 -1
  30. package/package.json +22 -22
  31. package/dist/5457.bundle.535bae0c872c1ca0c2cb.js +0 -1358
  32. /package/dist/{1459.bundle.0481573ae1bde12b24ee.js → 1459.bundle.c4acfc6df383fc187e9e.js} +0 -0
  33. /package/dist/{147.bundle.6fc65a239d1ae1c6a918.js → 147.bundle.c191ca0b67633f707aff.js} +0 -0
  34. /package/dist/{1515.bundle.73d415797a677ae5261e.js → 1515.bundle.3f81b326242dd945ecdb.js} +0 -0
  35. /package/dist/{1604.css → 1933.css} +0 -0
  36. /package/dist/{213.bundle.9b152cd4d202cae43af2.js → 213.bundle.33092c23ffe1d81ae242.js} +0 -0
  37. /package/dist/{2243.bundle.25ca9faa6d0776355adf.js → 2243.bundle.e37c80996a222167dc14.js} +0 -0
  38. /package/dist/{2424.bundle.57b7484a3b1b1e5a1722.js → 2424.bundle.45583fc64208a2821aa3.js} +0 -0
  39. /package/dist/{319.bundle.4ea0dbcfeb553c900206.js → 319.bundle.febb2a63634488c11db6.js} +0 -0
  40. /package/dist/{6027.bundle.06ab1f1cd27f93f826e5.js → 6027.bundle.b2942a0dd2c583374d7b.js} +0 -0
  41. /package/dist/{7431.bundle.55dd86000e66bee467e2.js → 7431.bundle.b80819b8eb28d2ee897d.js} +0 -0
  42. /package/dist/{7639.bundle.a89f4a8c6e8b2593d7a4.js → 7639.bundle.2ad4b6cd132d87439fa6.js} +0 -0
  43. /package/dist/{85.bundle.f3a9149485e3fcf652f0.js → 85.bundle.a772983604a0f9514e33.js} +0 -0
  44. /package/dist/{9862.bundle.0456a2d473895bf2916e.js → 9862.bundle.eca4ea8821bb040a44c1.js} +0 -0
  45. /package/dist/{9927.bundle.d7051dac659d827d62d3.js → 9927.bundle.775cb41458de4c28a9ba.js} +0 -0
@@ -1,1358 +0,0 @@
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__(42356);
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
- id: 'SegmentLabelTool',
951
- uiType: 'ohif.toolBoxButton',
952
- props: {
953
- icon: 'tool-segment-label',
954
- label: i18next/* default */.A.t('Buttons:Segment Label Display'),
955
- tooltip: i18next/* default */.A.t('Buttons:Click to show or hide segment labels when hovering with your mouse.'),
956
- commands: {
957
- commandName: 'toggleSegmentLabel'
958
- },
959
- evaluate: ['evaluate.cornerstoneTool.toggle', {
960
- name: 'evaluate.cornerstone.hasSegmentation'
961
- }]
962
- }
963
- }
964
- // {
965
- // id: 'Undo',
966
- // uiType: 'ohif.toolButton',
967
- // props: {
968
- // type: 'tool',
969
- // icon: 'prev-arrow',
970
- // label: 'Undo',
971
- // commands: {
972
- // commandName: 'undo',
973
- // },
974
- // evaluate: 'evaluate.action',
975
- // },
976
- // },
977
- // {
978
- // id: 'Redo',
979
- // uiType: 'ohif.toolButton',
980
- // props: {
981
- // type: 'tool',
982
- // icon: 'next-arrow',
983
- // label: 'Redo',
984
- // commands: {
985
- // commandName: 'redo',
986
- // },
987
- // evaluate: 'evaluate.action',
988
- // },
989
- // },
990
- ];
991
- /* harmony default export */ const src_toolbarButtons = (toolbarButtons);
992
- ;// ../../../modes/basic/package.json
993
- const package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@ohif/mode-basic"}');
994
- ;// ../../../modes/basic/src/id.js
995
-
996
- const id = package_namespaceObject.UU;
997
-
998
- ;// ../../../modes/basic/src/index.tsx
999
-
1000
-
1001
-
1002
-
1003
-
1004
- const {
1005
- TOOLBAR_SECTIONS
1006
- } = src/* ToolbarService */.hx;
1007
- const {
1008
- structuredCloneWithFunctions
1009
- } = src/* utils */.Wp;
1010
-
1011
- /**
1012
- * Define non-imaging modalities.
1013
- * This can be used to exclude modes which have only these modalities,
1014
- * or it can be used to not display thumbnails for some of these.
1015
- * This list used to include SM, for whole slide imaging, but this is now supported
1016
- * by cornerstone. Others of these may get added.
1017
- */
1018
- const NON_IMAGE_MODALITIES = ['ECG', 'SEG', 'RTSTRUCT', 'RTPLAN', 'PR', 'SR', 'DOC'];
1019
- const ohif = {
1020
- layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout',
1021
- sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',
1022
- thumbnailList: '@ohif/extension-default.panelModule.seriesList',
1023
- wsiSopClassHandler: '@ohif/extension-cornerstone.sopClassHandlerModule.DicomMicroscopySopClassHandler'
1024
- };
1025
- const cornerstone = {
1026
- measurements: '@ohif/extension-cornerstone.panelModule.panelMeasurement',
1027
- segmentation: '@ohif/extension-cornerstone.panelModule.panelSegmentation',
1028
- viewport: '@ohif/extension-cornerstone.viewportModule.cornerstone'
1029
- };
1030
- const dicomsr = {
1031
- sopClassHandler: '@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr',
1032
- sopClassHandler3D: '@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr-3d',
1033
- viewport: '@ohif/extension-cornerstone-dicom-sr.viewportModule.dicom-sr'
1034
- };
1035
- const dicomvideo = {
1036
- sopClassHandler: '@ohif/extension-dicom-video.sopClassHandlerModule.dicom-video',
1037
- viewport: '@ohif/extension-dicom-video.viewportModule.dicom-video'
1038
- };
1039
- const dicompdf = {
1040
- sopClassHandler: '@ohif/extension-dicom-pdf.sopClassHandlerModule.dicom-pdf',
1041
- viewport: '@ohif/extension-dicom-pdf.viewportModule.dicom-pdf'
1042
- };
1043
- const dicomSeg = {
1044
- sopClassHandler: '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',
1045
- viewport: '@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg'
1046
- };
1047
- const dicomPmap = {
1048
- sopClassHandler: '@ohif/extension-cornerstone-dicom-pmap.sopClassHandlerModule.dicom-pmap',
1049
- viewport: '@ohif/extension-cornerstone-dicom-pmap.viewportModule.dicom-pmap'
1050
- };
1051
- const dicomRT = {
1052
- viewport: '@ohif/extension-cornerstone-dicom-rt.viewportModule.dicom-rt',
1053
- sopClassHandler: '@ohif/extension-cornerstone-dicom-rt.sopClassHandlerModule.dicom-rt'
1054
- };
1055
- const extensionDependencies = {
1056
- // Can derive the versions at least process.env.from npm_package_version
1057
- '@ohif/extension-default': '^3.0.0',
1058
- '@ohif/extension-cornerstone': '^3.0.0',
1059
- '@ohif/extension-cornerstone-dicom-sr': '^3.0.0',
1060
- '@ohif/extension-cornerstone-dicom-seg': '^3.0.0',
1061
- '@ohif/extension-cornerstone-dicom-pmap': '^3.0.0',
1062
- '@ohif/extension-cornerstone-dicom-rt': '^3.0.0',
1063
- '@ohif/extension-dicom-pdf': '^3.0.1',
1064
- '@ohif/extension-dicom-video': '^3.0.1'
1065
- };
1066
- const sopClassHandlers = [dicomvideo.sopClassHandler, dicomSeg.sopClassHandler, dicomPmap.sopClassHandler, ohif.sopClassHandler, ohif.wsiSopClassHandler, dicompdf.sopClassHandler, dicomsr.sopClassHandler3D, dicomsr.sopClassHandler, dicomRT.sopClassHandler];
1067
-
1068
- /**
1069
- * Indicate this is a valid mode if:
1070
- * - it contains at least one of the modeModalities
1071
- * - it contains all of the array value in modeModalities
1072
- * Otherwise, if modeModalities is not defined:
1073
- * - it contains at least one modality other than the nonModeMOdalities.
1074
- */
1075
- function isValidMode({
1076
- modalities
1077
- }) {
1078
- const modalities_list = modalities.split('\\');
1079
- if (this.modeModalities?.length) {
1080
- for (const modeModality of this.modeModalities) {
1081
- if (Array.isArray(modeModality) && modeModality.every(m => modalities.indexOf(m) !== -1)) {
1082
- return {
1083
- valid: true,
1084
- description: `Matches ${modeModality.join(', ')}`
1085
- };
1086
- } else if (modalities.indexOf(modeModality)) {
1087
- return {
1088
- valid: true,
1089
- description: `Matches ${modeModality}`
1090
- };
1091
- }
1092
- }
1093
- return {
1094
- valid: false,
1095
- description: `None of the mode modalities match: ${JSON.stringify(this.modeModalities)}`
1096
- };
1097
- }
1098
- return {
1099
- valid: !!modalities_list.find(modality => this.nonModeModalities.indexOf(modality) === -1),
1100
- description: `The mode does not support studies that ONLY include the following modalities: ${this.nonModeModalities.join(', ')}`
1101
- };
1102
- }
1103
- function onModeEnter({
1104
- servicesManager,
1105
- extensionManager,
1106
- commandsManager,
1107
- panelService,
1108
- segmentationService
1109
- }) {
1110
- const {
1111
- measurementService,
1112
- toolbarService,
1113
- toolGroupService,
1114
- customizationService
1115
- } = servicesManager.services;
1116
- measurementService.clearMeasurements();
1117
-
1118
- // Init Default and SR ToolGroups
1119
- src_initToolGroups(extensionManager, toolGroupService, commandsManager);
1120
- toolbarService.register(this.toolbarButtons);
1121
- for (const [key, section] of Object.entries(this.toolbarSections)) {
1122
- toolbarService.updateSection(key, section);
1123
- }
1124
- if (!this.enableSegmentationEdit) {
1125
- customizationService.setCustomizations({
1126
- 'panelSegmentation.disableEditing': {
1127
- $set: true
1128
- }
1129
- });
1130
- }
1131
-
1132
- // // ActivatePanel event trigger for when a segmentation or measurement is added.
1133
- // // Do not force activation so as to respect the state the user may have left the UI in.
1134
- if (this.activatePanelTrigger) {
1135
- this._activatePanelTriggersSubscriptions = [...panelService.addActivatePanelTriggers(cornerstone.segmentation, [{
1136
- sourcePubSubService: segmentationService,
1137
- sourceEvents: [segmentationService.EVENTS.SEGMENTATION_ADDED]
1138
- }], true), ...panelService.addActivatePanelTriggers(cornerstone.measurements, [{
1139
- sourcePubSubService: measurementService,
1140
- sourceEvents: [measurementService.EVENTS.MEASUREMENT_ADDED, measurementService.EVENTS.RAW_MEASUREMENT_ADDED]
1141
- }], true), true];
1142
- }
1143
- }
1144
- function onModeExit({
1145
- servicesManager
1146
- }) {
1147
- const {
1148
- toolGroupService,
1149
- syncGroupService,
1150
- segmentationService,
1151
- cornerstoneViewportService,
1152
- uiDialogService,
1153
- uiModalService
1154
- } = servicesManager.services;
1155
- this._activatePanelTriggersSubscriptions.forEach(sub => sub.unsubscribe());
1156
- this._activatePanelTriggersSubscriptions.length = 0;
1157
- uiDialogService.hideAll();
1158
- uiModalService.hide();
1159
- toolGroupService.destroy();
1160
- syncGroupService.destroy();
1161
- segmentationService.destroy();
1162
- cornerstoneViewportService.destroy();
1163
- }
1164
- const toolbarSections = {
1165
- [TOOLBAR_SECTIONS.primary]: ['MeasurementTools', 'Zoom', 'Pan', 'TrackballRotate', 'WindowLevel', 'Capture', 'Layout', 'Crosshairs', 'MoreTools'],
1166
- [TOOLBAR_SECTIONS.viewportActionMenu.topLeft]: ['orientationMenu', 'dataOverlayMenu'],
1167
- [TOOLBAR_SECTIONS.viewportActionMenu.bottomMiddle]: ['AdvancedRenderingControls'],
1168
- AdvancedRenderingControls: ['windowLevelMenuEmbedded', 'voiManualControlMenu', 'Colorbar', 'opacityMenu', 'thresholdMenu'],
1169
- [TOOLBAR_SECTIONS.viewportActionMenu.topRight]: ['modalityLoadBadge', 'trackingStatus', 'navigationComponent'],
1170
- [TOOLBAR_SECTIONS.viewportActionMenu.bottomLeft]: ['windowLevelMenu'],
1171
- MeasurementTools: ['Length', 'Bidirectional', 'ArrowAnnotate', 'EllipticalROI', 'RectangleROI', 'CircleROI', 'PlanarFreehandROI', 'SplineROI', 'LivewireContour'],
1172
- MoreTools: ['Reset', 'rotate-right', 'flipHorizontal', 'ImageSliceSync', 'ReferenceLines', 'ImageOverlayViewer', 'StackScroll', 'invert', 'Probe', 'Cine', 'Angle', 'CobbAngle', 'Magnify', 'CalibrationLine', 'TagBrowser', 'AdvancedMagnify', 'UltrasoundDirectionalTool', 'WindowLevelRegion', 'SegmentLabelTool']
1173
- };
1174
- const basicLayout = {
1175
- id: ohif.layout,
1176
- props: {
1177
- leftPanels: [ohif.thumbnailList],
1178
- leftPanelResizable: true,
1179
- rightPanels: [cornerstone.segmentation, cornerstone.measurements],
1180
- rightPanelClosed: true,
1181
- rightPanelResizable: true,
1182
- viewports: [{
1183
- namespace: cornerstone.viewport,
1184
- displaySetsToDisplay: [ohif.sopClassHandler, dicomvideo.sopClassHandler, ohif.wsiSopClassHandler]
1185
- }, {
1186
- namespace: dicomsr.viewport,
1187
- displaySetsToDisplay: [dicomsr.sopClassHandler, dicomsr.sopClassHandler3D]
1188
- }, {
1189
- namespace: dicompdf.viewport,
1190
- displaySetsToDisplay: [dicompdf.sopClassHandler]
1191
- }, {
1192
- namespace: dicomSeg.viewport,
1193
- displaySetsToDisplay: [dicomSeg.sopClassHandler]
1194
- }, {
1195
- namespace: dicomPmap.viewport,
1196
- displaySetsToDisplay: [dicomPmap.sopClassHandler]
1197
- }, {
1198
- namespace: dicomRT.viewport,
1199
- displaySetsToDisplay: [dicomRT.sopClassHandler]
1200
- }]
1201
- }
1202
- };
1203
- function layoutTemplate() {
1204
- return structuredCloneWithFunctions(this.layoutInstance);
1205
- }
1206
- const basicRoute = {
1207
- path: 'basic',
1208
- layoutTemplate,
1209
- layoutInstance: basicLayout
1210
- };
1211
- const modeInstance = {
1212
- // TODO: We're using this as a route segment
1213
- // We should not be.
1214
- id: id,
1215
- routeName: 'basic',
1216
- // Don't hide this by default - see the registration later to hide the basic
1217
- // instance by default.
1218
- hide: false,
1219
- displayName: 'Non-Longitudinal Basic',
1220
- _activatePanelTriggersSubscriptions: [],
1221
- toolbarSections,
1222
- /**
1223
- * Lifecycle hooks
1224
- */
1225
- onModeEnter,
1226
- onModeExit,
1227
- validationTags: {
1228
- study: [],
1229
- series: []
1230
- },
1231
- isValidMode,
1232
- routes: [basicRoute],
1233
- extensions: extensionDependencies,
1234
- // Default protocol gets self-registered by default in the init
1235
- hangingProtocol: 'default',
1236
- // Order is important in sop class handlers when two handlers both use
1237
- // the same sop class under different situations. In that case, the more
1238
- // general handler needs to come last. For this case, the dicomvideo must
1239
- // come first to remove video transfer syntax before ohif uses images
1240
- sopClassHandlers,
1241
- toolbarButtons: src_toolbarButtons,
1242
- enableSegmentationEdit: false,
1243
- nonModeModalities: NON_IMAGE_MODALITIES
1244
- };
1245
-
1246
- /**
1247
- * Creates a mode on this object, using immutability-helper to apply changes
1248
- * from modeConfiguration into the modeInstance.
1249
- */
1250
- function modeFactory({
1251
- modeConfiguration
1252
- }) {
1253
- let modeInstance = this.modeInstance;
1254
- if (modeConfiguration) {
1255
- modeInstance = immutability_helper_default()(modeInstance, modeConfiguration);
1256
- }
1257
- return modeInstance;
1258
- }
1259
- const mode = {
1260
- id: id,
1261
- modeFactory,
1262
- modeInstance: {
1263
- ...modeInstance,
1264
- hide: true
1265
- },
1266
- extensionDependencies
1267
- };
1268
- /* harmony default export */ const basic_src = (mode);
1269
-
1270
-
1271
- /***/ }),
1272
-
1273
- /***/ 95457:
1274
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1275
-
1276
- // ESM COMPAT FLAG
1277
- __webpack_require__.r(__webpack_exports__);
1278
-
1279
- // EXPORTS
1280
- __webpack_require__.d(__webpack_exports__, {
1281
- "default": () => (/* binding */ longitudinal_src),
1282
- extensionDependencies: () => (/* binding */ extensionDependencies),
1283
- initToolGroups: () => (/* reexport */ src.initToolGroups),
1284
- longitudinalInstance: () => (/* binding */ longitudinalInstance),
1285
- longitudinalRoute: () => (/* binding */ longitudinalRoute),
1286
- modeInstance: () => (/* binding */ modeInstance),
1287
- toolbarButtons: () => (/* reexport */ src.toolbarButtons),
1288
- tracked: () => (/* binding */ tracked)
1289
- });
1290
-
1291
- // EXTERNAL MODULE: ../../../node_modules/i18next/dist/esm/i18next.js
1292
- var i18next = __webpack_require__(40680);
1293
- ;// ../../../modes/longitudinal/package.json
1294
- const package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@ohif/mode-longitudinal"}');
1295
- ;// ../../../modes/longitudinal/src/id.js
1296
-
1297
- const id = package_namespaceObject.UU;
1298
-
1299
- // EXTERNAL MODULE: ../../../modes/basic/src/index.tsx + 4 modules
1300
- var src = __webpack_require__(35485);
1301
- ;// ../../../modes/longitudinal/src/index.ts
1302
-
1303
-
1304
-
1305
- const tracked = {
1306
- measurements: '@ohif/extension-measurement-tracking.panelModule.trackedMeasurements',
1307
- thumbnailList: '@ohif/extension-measurement-tracking.panelModule.seriesList',
1308
- viewport: '@ohif/extension-measurement-tracking.viewportModule.cornerstone-tracked'
1309
- };
1310
- const extensionDependencies = {
1311
- // Can derive the versions at least process.env.from npm_package_version
1312
- ...src.extensionDependencies,
1313
- '@ohif/extension-measurement-tracking': '^3.0.0'
1314
- };
1315
- const longitudinalInstance = {
1316
- ...src.basicLayout,
1317
- id: src.ohif.layout,
1318
- props: {
1319
- ...src.basicLayout.props,
1320
- leftPanels: [tracked.thumbnailList],
1321
- rightPanels: [src.cornerstone.segmentation, tracked.measurements],
1322
- viewports: [{
1323
- namespace: tracked.viewport,
1324
- // Re-use the display sets from basic
1325
- displaySetsToDisplay: src.basicLayout.props.viewports[0].displaySetsToDisplay
1326
- }, ...src.basicLayout.props.viewports]
1327
- }
1328
- };
1329
- const longitudinalRoute = {
1330
- ...src.basicRoute,
1331
- path: 'longitudinal',
1332
- /*init: ({ servicesManager, extensionManager }) => {
1333
- //defaultViewerRouteInit
1334
- },*/
1335
- layoutInstance: longitudinalInstance
1336
- };
1337
- const modeInstance = {
1338
- ...src.modeInstance,
1339
- // TODO: We're using this as a route segment
1340
- // We should not be.
1341
- id: id,
1342
- routeName: 'viewer',
1343
- displayName: i18next/* default */.A.t('Modes:Basic Viewer'),
1344
- routes: [longitudinalRoute],
1345
- extensions: extensionDependencies
1346
- };
1347
- const mode = {
1348
- ...src.mode,
1349
- id: id,
1350
- modeInstance,
1351
- extensionDependencies
1352
- };
1353
- /* harmony default export */ const longitudinal_src = (mode);
1354
-
1355
-
1356
- /***/ })
1357
-
1358
- }]);