@ohif/app 3.7.0-beta.79 → 3.7.0-beta.80

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 (40) hide show
  1. package/dist/{128.bundle.d4536952e6eda267cb5a.js → 128.bundle.5198a2266456afecd420.js} +37 -55
  2. package/dist/{181.bundle.9a76ce585a7139d4862f.js → 181.bundle.fa57199595cf28f44c7b.js} +3 -3
  3. package/dist/{30.bundle.16bfc3a374fc4eda5ffc.js → 19.bundle.75ec1ec14786e136b7b3.js} +114 -260
  4. package/dist/19.css +1 -0
  5. package/dist/{202.bundle.6c3b5e9f37d88388e5c8.js → 202.bundle.96bbb4547a346fe3921f.js} +3 -3
  6. package/dist/221.bundle.8a81cea315fa7697c0e0.js +1722 -0
  7. package/dist/221.css +2 -0
  8. package/dist/{236.bundle.2386ed58739fdbdd53f8.js → 236.bundle.d2da6d1991e1229bf913.js} +11 -16
  9. package/dist/{250.bundle.77985c008fc579308ca9.js → 250.bundle.36909d7bc681d66087d1.js} +4 -4
  10. package/dist/{90.bundle.1d113c4a201e850c98c0.js → 342.bundle.70da5239bd664aa5d41a.js} +408 -152
  11. package/dist/{348.bundle.343c39a8c96a044b0fe2.js → 348.bundle.8c5b950d30e5aa992290.js} +45 -56
  12. package/dist/{359.bundle.2618db789083f7d3007d.js → 359.bundle.d2a3abe1a5cd3ca3cd8e.js} +36 -115
  13. package/dist/{410.bundle.5cc4909f3c608350a71e.js → 410.bundle.be538faa9c7fad92189b.js} +3 -4
  14. package/dist/{451.bundle.aaabf094eb8fa67da819.js → 451.bundle.dc0d14c3724464cca2bf.js} +27 -19
  15. package/dist/{471.bundle.953dacdccd46028efba7.js → 471.bundle.2206d4c0ac2ad0df2362.js} +26 -19
  16. package/dist/{506.bundle.c0258b1d7299fdb7628e.js → 506.bundle.97e53732423192fee818.js} +1 -75
  17. package/dist/{677.bundle.ec5f2b4707db33bd4d8e.js → 530.bundle.a03b6f942ace3e1baa1e.js} +5 -10
  18. package/dist/613.bundle.549d71231abfed24a2dc.js +532 -0
  19. package/dist/{754.bundle.6618bdd7f648b532c682.js → 754.bundle.e3ce6855d8d4d187f224.js} +36 -46
  20. package/dist/{777.bundle.82a7cc23a7b6a8bd12fa.js → 777.bundle.ae3fdb8a470caecc0c6a.js} +2 -2
  21. package/dist/{782.bundle.6fa60a24d3d4ad76c8db.js → 782.bundle.ee8dba2e8582b55cb38d.js} +7 -7
  22. package/dist/{822.bundle.4767349eb43b79145b3e.js → 822.bundle.5fca45a4f40f5259aec5.js} +2 -2
  23. package/dist/831.bundle.83658f62fcc769043605.js +16700 -0
  24. package/dist/{886.bundle.7ee671b1d5656455d067.js → 886.bundle.a9de117c3a42b7907cf6.js} +2 -2
  25. package/dist/{967.bundle.ab062b0b325bed3b9af9.js → 967.bundle.cce1d004b2ff178b1a8e.js} +242 -101
  26. package/dist/app-config.js +1 -5
  27. package/dist/{app.bundle.adf312c193d56262fa41.js → app.bundle.681f66ab37cef811e68b.js} +21839 -18707
  28. package/dist/app.bundle.css +8 -7
  29. package/dist/index.html +1 -1
  30. package/dist/sw.js +1 -1
  31. package/package.json +19 -19
  32. package/dist/150.bundle.1fff6b0c3496b6367f58.js +0 -742
  33. /package/dist/{12.bundle.653904a1682368c34d6b.js → 12.bundle.4a052141b46dec16862d.js} +0 -0
  34. /package/dist/{125.bundle.aeaad798561853bf6939.js → 125.bundle.253395f320b72180da63.js} +0 -0
  35. /package/dist/{281.bundle.fbb8c83b343a6903d529.js → 281.bundle.21a9e3178ddebe01b958.js} +0 -0
  36. /package/dist/{417.bundle.6cadc61b8a455776de31.js → 417.bundle.af0a207c29b109f84159.js} +0 -0
  37. /package/dist/{663.bundle.5175469e25c5196a739c.js → 663.bundle.b0f98b6e7221b1b9cf6a.js} +0 -0
  38. /package/dist/{686.bundle.b3dbf84eefbef768843f.js → 686.bundle.dccef1f36e4bc79bcc48.js} +0 -0
  39. /package/dist/{687.bundle.60d3856e6e77c027c174.js → 687.bundle.ab0ffdccae4610b00224.js} +0 -0
  40. /package/dist/{814.bundle.ba4f6267b43f8dbc803f.js → 814.bundle.eec4458e893e6055f0fc.js} +0 -0
@@ -16,8 +16,8 @@ __webpack_require__.d(__webpack_exports__, {
16
16
 
17
17
  // EXTERNAL MODULE: ../../core/src/index.ts + 75 modules
18
18
  var src = __webpack_require__(34491);
19
- // EXTERNAL MODULE: ../../ui/src/index.js + 458 modules
20
- var ui_src = __webpack_require__(88344);
19
+ // EXTERNAL MODULE: ../../ui/src/index.js + 485 modules
20
+ var ui_src = __webpack_require__(71783);
21
21
  ;// CONCATENATED MODULE: ../../../modes/longitudinal/src/toolbarButtons.js
22
22
  // TODO: torn, can either bake this here; or have to create a whole new button type
23
23
  // Only ways that you can pass in a custom React component for render :l
@@ -463,7 +463,18 @@ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManage
463
463
  passive: [{
464
464
  toolName: toolNames.Length
465
465
  }, {
466
- toolName: toolNames.ArrowAnnotate
466
+ toolName: toolNames.ArrowAnnotate,
467
+ configuration: {
468
+ getTextCallback: (callback, eventDetails) => commandsManager.runCommand('arrowTextCallback', {
469
+ callback,
470
+ eventDetails
471
+ }),
472
+ changeTextCallback: (data, eventDetails, callback) => commandsManager.runCommand('arrowTextCallback', {
473
+ callback,
474
+ data,
475
+ eventDetails
476
+ })
477
+ }
467
478
  }, {
468
479
  toolName: toolNames.Bidirectional
469
480
  }, {
@@ -498,23 +509,13 @@ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManage
498
509
  toolName: toolNames.ReferenceLines
499
510
  }]
500
511
  };
501
- const toolsConfig = {
502
- [toolNames.ArrowAnnotate]: {
503
- getTextCallback: (callback, eventDetails) => commandsManager.runCommand('arrowTextCallback', {
504
- callback,
505
- eventDetails
506
- }),
507
- changeTextCallback: (data, eventDetails, callback) => commandsManager.runCommand('arrowTextCallback', {
508
- callback,
509
- data,
510
- eventDetails
511
- })
512
- }
513
- };
514
- toolGroupService.createToolGroupAndAddTools(toolGroupId, tools, toolsConfig);
512
+ toolGroupService.createToolGroupAndAddTools(toolGroupId, tools);
515
513
  }
516
514
  function initSRToolGroup(extensionManager, toolGroupService, commandsManager) {
517
515
  const SRUtilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone-dicom-sr.utilityModule.tools');
516
+ if (!SRUtilityModule) {
517
+ return;
518
+ }
518
519
  const CS3DUtilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
519
520
  const {
520
521
  toolNames: SRToolNames
@@ -561,21 +562,8 @@ function initSRToolGroup(extensionManager, toolGroupService, commandsManager) {
561
562
  // disabled
562
563
  };
563
564
 
564
- const toolsConfig = {
565
- [toolNames.ArrowAnnotate]: {
566
- getTextCallback: (callback, eventDetails) => commandsManager.runCommand('arrowTextCallback', {
567
- callback,
568
- eventDetails
569
- }),
570
- changeTextCallback: (data, eventDetails, callback) => commandsManager.runCommand('arrowTextCallback', {
571
- callback,
572
- data,
573
- eventDetails
574
- })
575
- }
576
- };
577
565
  const toolGroupId = 'SRToolGroup';
578
- toolGroupService.createToolGroupAndAddTools(toolGroupId, tools, toolsConfig);
566
+ toolGroupService.createToolGroupAndAddTools(toolGroupId, tools);
579
567
  }
580
568
  function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
581
569
  const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
@@ -606,7 +594,18 @@ function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
606
594
  passive: [{
607
595
  toolName: toolNames.Length
608
596
  }, {
609
- toolName: toolNames.ArrowAnnotate
597
+ toolName: toolNames.ArrowAnnotate,
598
+ configuration: {
599
+ getTextCallback: (callback, eventDetails) => commandsManager.runCommand('arrowTextCallback', {
600
+ callback,
601
+ eventDetails
602
+ }),
603
+ changeTextCallback: (data, eventDetails, callback) => commandsManager.runCommand('arrowTextCallback', {
604
+ callback,
605
+ data,
606
+ eventDetails
607
+ })
608
+ }
610
609
  }, {
611
610
  toolName: toolNames.Bidirectional
612
611
  }, {
@@ -629,7 +628,14 @@ function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
629
628
  toolName: toolNames.SegmentationDisplay
630
629
  }],
631
630
  disabled: [{
632
- toolName: toolNames.Crosshairs
631
+ toolName: toolNames.Crosshairs,
632
+ configuration: {
633
+ viewportIndicators: false,
634
+ autoPan: {
635
+ enabled: false,
636
+ panSize: 10
637
+ }
638
+ }
633
639
  }, {
634
640
  toolName: toolNames.ReferenceLines
635
641
  }]
@@ -638,27 +644,7 @@ function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
638
644
  // disabled
639
645
  };
640
646
 
641
- const toolsConfig = {
642
- [toolNames.Crosshairs]: {
643
- viewportIndicators: false,
644
- autoPan: {
645
- enabled: false,
646
- panSize: 10
647
- }
648
- },
649
- [toolNames.ArrowAnnotate]: {
650
- getTextCallback: (callback, eventDetails) => commandsManager.runCommand('arrowTextCallback', {
651
- callback,
652
- eventDetails
653
- }),
654
- changeTextCallback: (data, eventDetails, callback) => commandsManager.runCommand('arrowTextCallback', {
655
- callback,
656
- data,
657
- eventDetails
658
- })
659
- }
660
- };
661
- toolGroupService.createToolGroupAndAddTools('mpr', tools, toolsConfig);
647
+ toolGroupService.createToolGroupAndAddTools('mpr', tools);
662
648
  }
663
649
  function initVolume3DToolGroup(extensionManager, toolGroupService) {
664
650
  const utilityModule = extensionManager.getModuleEntry('@ohif/extension-cornerstone.utilityModule.tools');
@@ -769,7 +755,7 @@ function modeFactory(_ref) {
769
755
  toolbarService,
770
756
  toolGroupService,
771
757
  panelService,
772
- segmentationService
758
+ customizationService
773
759
  } = servicesManager.services;
774
760
  measurementService.clearMeasurements();
775
761
 
@@ -779,7 +765,6 @@ function modeFactory(_ref) {
779
765
  const activateTool = () => {
780
766
  toolbarService.recordInteraction({
781
767
  groupId: 'WindowLevel',
782
- itemId: 'WindowLevel',
783
768
  interactionType: 'tool',
784
769
  commands: [{
785
770
  commandName: 'setToolActive',
@@ -803,6 +788,10 @@ function modeFactory(_ref) {
803
788
  toolbarService.init(extensionManager);
804
789
  toolbarService.addButtons(src_toolbarButtons);
805
790
  toolbarService.createButtonSection('primary', ['MeasurementTools', 'Zoom', 'WindowLevel', 'Pan', 'Capture', 'Layout', 'MPR', 'Crosshairs', 'MoreTools']);
791
+ customizationService.addModeCustomizations([{
792
+ id: 'segmentation.disableEditing',
793
+ value: true
794
+ }]);
806
795
 
807
796
  // // ActivatePanel event trigger for when a segmentation or measurement is added.
808
797
  // // Do not force activation so as to respect the state the user may have left the UI in.
@@ -14,8 +14,8 @@ __webpack_require__.d(__webpack_exports__, {
14
14
 
15
15
  // EXTERNAL MODULE: ../../core/src/index.ts + 75 modules
16
16
  var src = __webpack_require__(34491);
17
- // EXTERNAL MODULE: ../../ui/src/index.js + 458 modules
18
- var ui_src = __webpack_require__(88344);
17
+ // EXTERNAL MODULE: ../../ui/src/index.js + 485 modules
18
+ var ui_src = __webpack_require__(71783);
19
19
  ;// CONCATENATED MODULE: ../../../modes/tmtv/src/initToolGroups.js
20
20
  const toolGroupIds = {
21
21
  CT: 'ctToolGroup',
@@ -50,7 +50,20 @@ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager) {
50
50
  passive: [{
51
51
  toolName: toolNames.Length
52
52
  }, {
53
- toolName: toolNames.ArrowAnnotate
53
+ toolName: toolNames.ArrowAnnotate,
54
+ configuration: {
55
+ getTextCallback: (callback, eventDetails) => {
56
+ commandsManager.runCommand('arrowTextCallback', {
57
+ callback,
58
+ eventDetails
59
+ });
60
+ },
61
+ changeTextCallback: (data, eventDetails, callback) => commandsManager.runCommand('arrowTextCallback', {
62
+ callback,
63
+ data,
64
+ eventDetails
65
+ })
66
+ }
54
67
  }, {
55
68
  toolName: toolNames.Bidirectional
56
69
  }, {
@@ -74,32 +87,17 @@ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager) {
74
87
  toolName: toolNames.SegmentationDisplay
75
88
  }],
76
89
  disabled: [{
77
- toolName: toolNames.Crosshairs
78
- }]
79
- };
80
- const toolsConfig = {
81
- [toolNames.Crosshairs]: {
82
- viewportIndicators: false,
83
- autoPan: {
84
- enabled: false,
85
- panSize: 10
90
+ toolName: toolNames.Crosshairs,
91
+ configuration: {
92
+ viewportIndicators: false,
93
+ autoPan: {
94
+ enabled: false,
95
+ panSize: 10
96
+ }
86
97
  }
87
- },
88
- [toolNames.ArrowAnnotate]: {
89
- getTextCallback: (callback, eventDetails) => {
90
- commandsManager.runCommand('arrowTextCallback', {
91
- callback,
92
- eventDetails
93
- });
94
- },
95
- changeTextCallback: (data, eventDetails, callback) => commandsManager.runCommand('arrowTextCallback', {
96
- callback,
97
- data,
98
- eventDetails
99
- })
100
- }
98
+ }]
101
99
  };
102
- toolGroupService.createToolGroupAndAddTools(toolGroupIds.CT, tools, toolsConfig);
100
+ toolGroupService.createToolGroupAndAddTools(toolGroupIds.CT, tools);
103
101
  toolGroupService.createToolGroupAndAddTools(toolGroupIds.PT, {
104
102
  active: tools.active,
105
103
  passive: [...tools.passive, {
@@ -107,14 +105,20 @@ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager) {
107
105
  }],
108
106
  enabled: tools.enabled,
109
107
  disabled: tools.disabled
110
- }, toolsConfig);
111
- toolGroupService.createToolGroupAndAddTools(toolGroupIds.Fusion, tools, toolsConfig);
112
- toolGroupService.createToolGroupAndAddTools(toolGroupIds.default, tools, toolsConfig);
108
+ });
109
+ toolGroupService.createToolGroupAndAddTools(toolGroupIds.Fusion, tools);
110
+ toolGroupService.createToolGroupAndAddTools(toolGroupIds.default, tools);
113
111
  const mipTools = {
114
112
  active: [{
115
- toolName: toolNames.VolumeRotateMouseWheel
113
+ toolName: toolNames.VolumeRotateMouseWheel,
114
+ configuration: {
115
+ rotateIncrementDegrees: 0.1
116
+ }
116
117
  }, {
117
118
  toolName: toolNames.MipJumpToClick,
119
+ configuration: {
120
+ toolGroupId: toolGroupIds.PT
121
+ },
118
122
  bindings: [{
119
123
  mouseButton: Enums.MouseBindings.Primary
120
124
  }]
@@ -123,93 +127,11 @@ function _initToolGroups(toolNames, Enums, toolGroupService, commandsManager) {
123
127
  toolName: toolNames.SegmentationDisplay
124
128
  }]
125
129
  };
126
- const mipToolsConfig = {
127
- [toolNames.VolumeRotateMouseWheel]: {
128
- rotateIncrementDegrees: 0.1
129
- },
130
- [toolNames.MipJumpToClick]: {
131
- toolGroupId: toolGroupIds.PT
132
- }
133
- };
134
- toolGroupService.createToolGroupAndAddTools(toolGroupIds.MIP, mipTools, mipToolsConfig);
135
- }
136
- function initMPRToolGroup(toolNames, Enums, toolGroupService, commandsManager) {
137
- const tools = {
138
- active: [{
139
- toolName: toolNames.WindowLevel,
140
- bindings: [{
141
- mouseButton: Enums.MouseBindings.Primary
142
- }]
143
- }, {
144
- toolName: toolNames.Pan,
145
- bindings: [{
146
- mouseButton: Enums.MouseBindings.Auxiliary
147
- }]
148
- }, {
149
- toolName: toolNames.Zoom,
150
- bindings: [{
151
- mouseButton: Enums.MouseBindings.Secondary
152
- }]
153
- }, {
154
- toolName: toolNames.StackScrollMouseWheel,
155
- bindings: []
156
- }],
157
- passive: [{
158
- toolName: toolNames.Length
159
- }, {
160
- toolName: toolNames.ArrowAnnotate
161
- }, {
162
- toolName: toolNames.Bidirectional
163
- }, {
164
- toolName: toolNames.DragProbe
165
- }, {
166
- toolName: toolNames.EllipticalROI
167
- }, {
168
- toolName: toolNames.RectangleROI
169
- }, {
170
- toolName: toolNames.StackScroll
171
- }, {
172
- toolName: toolNames.Angle
173
- }, {
174
- toolName: toolNames.CobbAngle
175
- }, {
176
- toolName: toolNames.SegmentationDisplay
177
- }],
178
- disabled: [{
179
- toolName: toolNames.Crosshairs
180
- }]
181
-
182
- // enabled
183
- // disabled
184
- };
185
-
186
- const toolsConfig = {
187
- [toolNames.Crosshairs]: {
188
- viewportIndicators: false,
189
- autoPan: {
190
- enabled: false,
191
- panSize: 10
192
- }
193
- },
194
- [toolNames.ArrowAnnotate]: {
195
- getTextCallback: (callback, eventDetails) => commandsManager.runCommand('arrowTextCallback', {
196
- callback,
197
- eventDetails
198
- }),
199
- changeTextCallback: (data, eventDetails, callback) => commandsManager.runCommand('arrowTextCallback', {
200
- callback,
201
- data,
202
- eventDetails
203
- })
204
- }
205
- };
206
- toolGroupService.createToolGroupAndAddTools('mpr', tools, toolsConfig);
130
+ toolGroupService.createToolGroupAndAddTools(toolGroupIds.MIP, mipTools);
207
131
  }
208
132
  function initToolGroups(toolNames, Enums, toolGroupService, commandsManager) {
209
133
  _initToolGroups(toolNames, Enums, toolGroupService, commandsManager);
210
- // initMPRToolGroup(toolNames, Enums, toolGroupService, commandsManager);
211
134
  }
212
-
213
135
  /* harmony default export */ const src_initToolGroups = (initToolGroups);
214
136
  ;// CONCATENATED MODULE: ../../../modes/tmtv/src/toolbarButtons.js
215
137
  // TODO: torn, can either bake this here; or have to create a whole new button type
@@ -551,7 +473,6 @@ function modeFactory(_ref) {
551
473
  const setWindowLevelActive = () => {
552
474
  toolbarService.recordInteraction({
553
475
  groupId: 'WindowLevel',
554
- itemId: 'WindowLevel',
555
476
  interactionType: 'tool',
556
477
  commands: [{
557
478
  commandName: 'setToolActive',
@@ -12,8 +12,8 @@ __webpack_require__.d(__webpack_exports__, {
12
12
  "default": () => (/* binding */ basic_dev_mode_src)
13
13
  });
14
14
 
15
- // EXTERNAL MODULE: ../../ui/src/index.js + 458 modules
16
- var src = __webpack_require__(88344);
15
+ // EXTERNAL MODULE: ../../ui/src/index.js + 485 modules
16
+ var src = __webpack_require__(71783);
17
17
  // EXTERNAL MODULE: ../../core/src/index.ts + 75 modules
18
18
  var core_src = __webpack_require__(34491);
19
19
  ;// CONCATENATED MODULE: ../../../modes/basic-dev-mode/src/toolbarButtons.js
@@ -355,12 +355,11 @@ function modeFactory(_ref) {
355
355
  };
356
356
 
357
357
  const toolGroupId = 'default';
358
- toolGroupService.createToolGroupAndAddTools(toolGroupId, tools, configs);
358
+ toolGroupService.createToolGroupAndAddTools(toolGroupId, tools);
359
359
  let unsubscribe;
360
360
  const activateTool = () => {
361
361
  toolbarService.recordInteraction({
362
362
  groupId: 'WindowLevel',
363
- itemId: 'WindowLevel',
364
363
  interactionType: 'tool',
365
364
  commands: [{
366
365
  commandName: 'setToolActive',
@@ -21,21 +21,18 @@ var react = __webpack_require__(43001);
21
21
  var es = __webpack_require__(69190);
22
22
  // EXTERNAL MODULE: ../../core/src/index.ts + 75 modules
23
23
  var src = __webpack_require__(34491);
24
- // EXTERNAL MODULE: ../../ui/src/index.js + 458 modules
25
- var ui_src = __webpack_require__(88344);
24
+ // EXTERNAL MODULE: ../../ui/src/index.js + 485 modules
25
+ var ui_src = __webpack_require__(71783);
26
26
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-seg/src/utils/initSEGToolGroup.ts
27
27
  function createSEGToolGroupAndAddTools(ToolGroupService, customizationService, toolGroupId) {
28
28
  const {
29
29
  tools
30
30
  } = customizationService.get('cornerstone.overlayViewportTools') ?? {};
31
- return ToolGroupService.createToolGroupAndAddTools(toolGroupId, tools, {});
31
+ return ToolGroupService.createToolGroupAndAddTools(toolGroupId, tools);
32
32
  }
33
33
  /* harmony default export */ const initSEGToolGroup = (createSEGToolGroupAndAddTools);
34
- // EXTERNAL MODULE: ../../../extensions/cornerstone-dicom-seg/src/utils/_hydrateSEG.ts
35
- var _hydrateSEG = __webpack_require__(28417);
36
34
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-seg/src/utils/promptHydrateSEG.ts
37
35
 
38
-
39
36
  const RESPONSE = {
40
37
  NO_NEVER: -1,
41
38
  CANCEL: 0,
@@ -46,7 +43,8 @@ function promptHydrateSEG(_ref) {
46
43
  servicesManager,
47
44
  segDisplaySet,
48
45
  viewportId,
49
- preHydrateCallbacks
46
+ preHydrateCallbacks,
47
+ hydrateSEGDisplaySet
50
48
  } = _ref;
51
49
  const {
52
50
  uiViewportDialogService
@@ -57,10 +55,9 @@ function promptHydrateSEG(_ref) {
57
55
  preHydrateCallbacks?.forEach(callback => {
58
56
  callback();
59
57
  });
60
- const isHydrated = await (0,_hydrateSEG/* default */.Z)({
58
+ const isHydrated = await hydrateSEGDisplaySet({
61
59
  segDisplaySet,
62
- viewportId,
63
- servicesManager
60
+ viewportId
64
61
  });
65
62
  resolve(isHydrated);
66
63
  }
@@ -70,11 +67,11 @@ function _askHydrate(uiViewportDialogService, viewportId) {
70
67
  return new Promise(function (resolve, reject) {
71
68
  const message = 'Do you want to open this Segmentation?';
72
69
  const actions = [{
73
- type: ui_src/* ButtonEnums.type */.LZ.U.secondary,
70
+ type: ui_src/* ButtonEnums.type */.LZ.dt.secondary,
74
71
  text: 'No',
75
72
  value: RESPONSE.CANCEL
76
73
  }, {
77
- type: ui_src/* ButtonEnums.type */.LZ.U.primary,
74
+ type: ui_src/* ButtonEnums.type */.LZ.dt.primary,
78
75
  text: 'Yes',
79
76
  value: RESPONSE.HYDRATE_SEG
80
77
  }];
@@ -152,7 +149,6 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
152
149
 
153
150
 
154
151
 
155
-
156
152
  const {
157
153
  formatDate
158
154
  } = src.utils;
@@ -287,7 +283,8 @@ function OHIFCornerstoneSEGViewport(props) {
287
283
  servicesManager,
288
284
  viewportId,
289
285
  segDisplaySet,
290
- preHydrateCallbacks: [storePresentationState]
286
+ preHydrateCallbacks: [storePresentationState],
287
+ hydrateSEGDisplaySet
291
288
  }).then(isHydrated => {
292
289
  if (isHydrated) {
293
290
  setIsHydrated(true);
@@ -401,6 +398,16 @@ function OHIFCornerstoneSEGViewport(props) {
401
398
  SeriesDescription,
402
399
  SpacingBetweenSlices
403
400
  } = referencedDisplaySetRef.current.metadata;
401
+ const hydrateSEGDisplaySet = _ref4 => {
402
+ let {
403
+ segDisplaySet,
404
+ viewportId
405
+ } = _ref4;
406
+ commandsManager.runCommand('loadSegmentationDisplaySetsForViewport', {
407
+ displaySets: [segDisplaySet],
408
+ viewportId
409
+ });
410
+ };
404
411
  const onStatusClick = async () => {
405
412
  // Before hydrating a SEG and make it added to all viewports in the grid
406
413
  // that share the same frameOfReferenceUID, we need to store the viewport grid
@@ -409,10 +416,9 @@ function OHIFCornerstoneSEGViewport(props) {
409
416
  // presentation state (w/l and invert) and then opens the SEG. If we don't store
410
417
  // the presentation state, the viewport will be reset to the default presentation
411
418
  storePresentationState();
412
- const isHydrated = await (0,_hydrateSEG/* default */.Z)({
419
+ const isHydrated = await hydrateSEGDisplaySet({
413
420
  segDisplaySet,
414
- viewportId,
415
- servicesManager
421
+ viewportId
416
422
  });
417
423
  setIsHydrated(isHydrated);
418
424
  };
@@ -465,11 +471,13 @@ OHIFCornerstoneSEGViewport.defaultProps = {
465
471
  };
466
472
  function _getReferencedDisplaySetMetadata(referencedDisplaySet, segDisplaySet) {
467
473
  const {
468
- SharedFunctionalGroupsSequence: [SharedFunctionalGroup]
474
+ SharedFunctionalGroupsSequence
469
475
  } = segDisplaySet.instance;
476
+ const SharedFunctionalGroup = Array.isArray(SharedFunctionalGroupsSequence) ? SharedFunctionalGroupsSequence[0] : SharedFunctionalGroupsSequence;
470
477
  const {
471
- PixelMeasuresSequence: [PixelMeasures]
478
+ PixelMeasuresSequence
472
479
  } = SharedFunctionalGroup;
480
+ const PixelMeasures = Array.isArray(PixelMeasuresSequence) ? PixelMeasuresSequence[0] : PixelMeasuresSequence;
473
481
  const {
474
482
  SpacingBetweenSlices,
475
483
  SliceThickness
@@ -19,13 +19,10 @@ var prop_types = __webpack_require__(3827);
19
19
  var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
20
20
  // EXTERNAL MODULE: ../../core/src/index.ts + 75 modules
21
21
  var src = __webpack_require__(34491);
22
- // EXTERNAL MODULE: ../../ui/src/index.js + 458 modules
23
- var ui_src = __webpack_require__(88344);
24
- // EXTERNAL MODULE: ../../../extensions/cornerstone-dicom-rt/src/utils/_hydrateRT.ts
25
- var _hydrateRT = __webpack_require__(50995);
22
+ // EXTERNAL MODULE: ../../ui/src/index.js + 485 modules
23
+ var ui_src = __webpack_require__(71783);
26
24
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-rt/src/utils/promptHydrateRT.ts
27
25
 
28
-
29
26
  const RESPONSE = {
30
27
  NO_NEVER: -1,
31
28
  CANCEL: 0,
@@ -37,7 +34,8 @@ function promptHydrateRT(_ref) {
37
34
  rtDisplaySet,
38
35
  viewportId,
39
36
  toolGroupId = 'default',
40
- preHydrateCallbacks
37
+ preHydrateCallbacks,
38
+ hydrateRTDisplaySet
41
39
  } = _ref;
42
40
  const {
43
41
  uiViewportDialogService
@@ -48,7 +46,7 @@ function promptHydrateRT(_ref) {
48
46
  preHydrateCallbacks?.forEach(callback => {
49
47
  callback();
50
48
  });
51
- const isHydrated = await (0,_hydrateRT/* default */.Z)({
49
+ const isHydrated = await hydrateRTDisplaySet({
52
50
  rtDisplaySet,
53
51
  viewportId,
54
52
  toolGroupId,
@@ -62,11 +60,11 @@ function _askHydrate(uiViewportDialogService, viewportId) {
62
60
  return new Promise(function (resolve, reject) {
63
61
  const message = 'Do you want to open this Segmentation?';
64
62
  const actions = [{
65
- type: ui_src/* ButtonEnums.type */.LZ.U.secondary,
63
+ type: ui_src/* ButtonEnums.type */.LZ.dt.secondary,
66
64
  text: 'No',
67
65
  value: RESPONSE.CANCEL
68
66
  }, {
69
- type: ui_src/* ButtonEnums.type */.LZ.U.primary,
67
+ type: ui_src/* ButtonEnums.type */.LZ.dt.primary,
70
68
  text: 'Yes',
71
69
  value: RESPONSE.HYDRATE_SEG
72
70
  }];
@@ -141,7 +139,7 @@ function createRTToolGroupAndAddTools(ToolGroupService, customizationService, to
141
139
  const {
142
140
  tools
143
141
  } = customizationService.get('cornerstone.overlayViewportTools') ?? {};
144
- return ToolGroupService.createToolGroupAndAddTools(toolGroupId, tools, {});
142
+ return ToolGroupService.createToolGroupAndAddTools(toolGroupId, tools);
145
143
  }
146
144
  /* harmony default export */ const initRTToolGroup = (createRTToolGroupAndAddTools);
147
145
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-rt/src/viewports/OHIFCornerstoneRTViewport.tsx
@@ -153,7 +151,6 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
153
151
 
154
152
 
155
153
 
156
-
157
154
  const {
158
155
  formatDate
159
156
  } = src.utils;
@@ -236,6 +233,16 @@ function OHIFCornerstoneRTViewport(props) {
236
233
  });
237
234
  });
238
235
  }, [viewportGrid]);
236
+ const hydrateRTDisplaySet = _ref2 => {
237
+ let {
238
+ rtDisplaySet,
239
+ viewportId
240
+ } = _ref2;
241
+ commandsManager.runCommand('loadSegmentationDisplaySetsForViewport', {
242
+ displaySets: [rtDisplaySet],
243
+ viewportId
244
+ });
245
+ };
239
246
  const getCornerstoneViewport = (0,react.useCallback)(() => {
240
247
  const {
241
248
  component: Component
@@ -284,7 +291,8 @@ function OHIFCornerstoneRTViewport(props) {
284
291
  servicesManager,
285
292
  viewportId,
286
293
  rtDisplaySet,
287
- preHydrateCallbacks: [storePresentationState]
294
+ preHydrateCallbacks: [storePresentationState],
295
+ hydrateRTDisplaySet
288
296
  }).then(isHydrated => {
289
297
  if (isHydrated) {
290
298
  setIsHydrated(true);
@@ -313,11 +321,11 @@ function OHIFCornerstoneRTViewport(props) {
313
321
  (0,react.useEffect)(() => {
314
322
  const {
315
323
  unsubscribe
316
- } = segmentationService.subscribe(segmentationService.EVENTS.SEGMENT_LOADING_COMPLETE, _ref2 => {
324
+ } = segmentationService.subscribe(segmentationService.EVENTS.SEGMENT_LOADING_COMPLETE, _ref3 => {
317
325
  let {
318
326
  percentComplete,
319
327
  numSegments
320
- } = _ref2;
328
+ } = _ref3;
321
329
  setProcessingProgress({
322
330
  percentComplete,
323
331
  totalSegments: numSegments
@@ -332,10 +340,10 @@ function OHIFCornerstoneRTViewport(props) {
332
340
  Cleanup the SEG viewport when the viewport is destroyed
333
341
  */
334
342
  (0,react.useEffect)(() => {
335
- const onDisplaySetsRemovedSubscription = displaySetService.subscribe(displaySetService.EVENTS.DISPLAY_SETS_REMOVED, _ref3 => {
343
+ const onDisplaySetsRemovedSubscription = displaySetService.subscribe(displaySetService.EVENTS.DISPLAY_SETS_REMOVED, _ref4 => {
336
344
  let {
337
345
  displaySetInstanceUIDs
338
- } = _ref3;
346
+ } = _ref4;
339
347
  const activeViewport = viewports.get(activeViewportId);
340
348
  if (displaySetInstanceUIDs.includes(activeViewport.displaySetInstanceUID)) {
341
349
  viewportGridService.setDisplaySetsForViewport({
@@ -403,10 +411,9 @@ function OHIFCornerstoneRTViewport(props) {
403
411
  // presentation state (w/l and invert) and then opens the RT. If we don't store
404
412
  // the presentation state, the viewport will be reset to the default presentation
405
413
  storePresentationState();
406
- const isHydrated = await (0,_hydrateRT/* default */.Z)({
414
+ const isHydrated = await hydrateRTDisplaySet({
407
415
  rtDisplaySet,
408
- viewportId,
409
- servicesManager
416
+ viewportId
410
417
  });
411
418
  setIsHydrated(isHydrated);
412
419
  };