@ohif/app 3.13.0-beta.113 → 3.13.0-beta.115

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