@ohif/app 3.7.0-beta.5 → 3.7.0-beta.50

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 (54) hide show
  1. package/dist/{917.bundle.24fc5ca2280d2980bf0f.js → 12.bundle.7348933f311b7e2e7d1e.js} +6 -6
  2. package/dist/{295.bundle.957b1159fec14b9199a1.js → 125.bundle.1ae4c6313c31cd0502cc.js} +4 -4
  3. package/dist/{208.bundle.e50761cf714ac772d9cc.js → 128.bundle.d933d385a22b1ce9ac77.js} +6 -6
  4. package/dist/{616.bundle.cbb2e0a23b1343b6441f.js → 150.bundle.e6880fd33346f8c24f6e.js} +148 -103
  5. package/dist/{351.bundle.0742237651aef9694a65.js → 181.bundle.234fef330d4fe6baca8b.js} +139 -128
  6. package/dist/{351.css → 181.css} +1 -1
  7. package/dist/{606.bundle.5d876f5f3dd8287f0a28.js → 202.bundle.ac1e5e25d4daf54581b1.js} +3705 -981
  8. package/dist/{926.bundle.dbc9d0e591cb9217fda2.js → 220.bundle.f7e1c96c94245e70f2be.js} +990 -400
  9. package/dist/{664.bundle.09abae984223969d1bde.js → 23.bundle.e008ad788170f2ed5569.js} +5 -6
  10. package/dist/{976.bundle.3b8f97b61cdfa7dc32e3.js → 236.bundle.765f3c70e21f29ab2e89.js} +38 -24
  11. package/dist/{55.bundle.550a823e75eb608e8d5e.js → 250.bundle.3bcee6d765a209281ddd.js} +37 -25
  12. package/dist/{973.bundle.77245411064eaa3ee79a.js → 281.bundle.dcc5492f44a83edd5320.js} +18 -14
  13. package/dist/{744.bundle.81246dc9f043a17fde8a.js → 30.bundle.5e2f6eeb779d579fc16e.js} +77 -89
  14. package/dist/{192.bundle.6dc1f92074738663620f.js → 348.bundle.c2deacff008bb8c68a14.js} +18 -14
  15. package/dist/{404.bundle.b7b371a30ca5bc5a0554.js → 359.bundle.594d68e783da31f97c30.js} +13 -19
  16. package/dist/{50.bundle.135ada11018fff84d66b.js → 378.bundle.6996a4170f4f05198f23.js} +10 -8
  17. package/dist/{790.bundle.ca48b21507b91b675810.js → 410.bundle.c8759293de9af17687c4.js} +6 -6
  18. package/dist/{151.bundle.31ea35044218837bf73f.js → 417.bundle.720dc8f3a6e99f378aa9.js} +9 -11
  19. package/dist/{569.bundle.21f8ad57c06a210448b5.js → 451.bundle.9941d9134fcf747d452a.js} +62 -81
  20. package/dist/{581.bundle.dc6197189f7c88c27d4c.js → 471.bundle.c9e618aeda78362776aa.js} +43 -72
  21. package/dist/{199.bundle.dff92336f7bc36f2e484.js → 506.bundle.8a2562b7038f6c983884.js} +79 -15
  22. package/dist/{935.bundle.deeffff0e4f7b528e3c3.js → 604.bundle.a51f83e64004bca5f497.js} +2 -3
  23. package/dist/{984.bundle.0301a876361809048be0.js → 663.bundle.e839c4819de3e372d07b.js} +52 -34
  24. package/dist/{531.bundle.2a82fb1d69e5b57cc72b.js → 677.bundle.ec5f2b4707db33bd4d8e.js} +731 -447
  25. package/dist/{707.bundle.7068a46e5be26fe60fce.js → 678.bundle.84a43fe18483016344de.js} +237 -244
  26. package/dist/{205.bundle.b5a473c200dcf2bbcdb4.js → 686.bundle.70565410179f1e7d22e6.js} +4 -4
  27. package/dist/{331.bundle.bd0c13931a21d53086c9.js → 754.bundle.8a16fc8ad21fe00c2e15.js} +12346 -7519
  28. package/dist/{728.bundle.d13856835357400fef82.js → 774.bundle.8ba82ee206266eb2da5e.js} +90 -63
  29. package/dist/{381.bundle.0905e683605fcbc0895f.js → 775.bundle.2285e7e0e67878948c0d.js} +16 -16
  30. package/dist/{283.bundle.f06203ec47c287f44cea.js → 782.bundle.0ea6e2a386f4ba43d830.js} +57 -25
  31. package/dist/{82.bundle.0456c9e58fa89b131f14.js → 789.bundle.aad9b29b476ea70e1350.js} +522 -157
  32. package/dist/{642.bundle.e8d980d4ba95b0b2665f.js → 814.bundle.2e308e04f0d21b4295a9.js} +6 -6
  33. package/dist/{799.bundle.758558e64147e5aad612.js → 822.bundle.d40c439da659f0e8500d.js} +65 -16
  34. package/dist/{953.bundle.3b0189ebc11cf0946f18.js → 886.bundle.68ef58774a6837f57631.js} +11 -10
  35. package/dist/{270.bundle.4564621556b0f963a004.js → 925.bundle.a2f1103d968c53a2b8fb.js} +626 -544
  36. package/dist/945.min.worker.js +1 -1
  37. package/dist/945.min.worker.js.map +1 -1
  38. package/dist/app-config.js +7 -7
  39. package/dist/{app.bundle.3ab8624d0394f1b10a0d.js → app.bundle.00cc8e251524b80d3347.js} +59252 -59601
  40. package/dist/app.bundle.css +9 -9
  41. package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
  42. package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
  43. package/dist/{dicom-microscopy-viewer.bundle.aa60bdf008c32c39cfd7.js → dicom-microscopy-viewer.bundle.44f7fedc03a58d5911d1.js} +3 -3
  44. package/dist/google.js +6 -5
  45. package/dist/index.html +1 -1
  46. package/dist/{index.worker.1c69152d710fa7b84bce.worker.js → index.worker.e62ecca63f1a2e124230.worker.js} +2 -2
  47. package/dist/index.worker.e62ecca63f1a2e124230.worker.js.map +1 -0
  48. package/dist/sw.js +1 -1
  49. package/package.json +19 -20
  50. package/dist/780.bundle.fd0f13dc92e9caa0581e.js +0 -4769
  51. package/dist/index.worker.1c69152d710fa7b84bce.worker.js.map +0 -1
  52. /package/dist/{55.css → 250.css} +0 -0
  53. /package/dist/{806.css → 579.css} +0 -0
  54. /package/dist/{707.css → 678.css} +0 -0
@@ -1,6 +1,6 @@
1
- (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[707],{
1
+ (self["webpackChunk"] = self["webpackChunk"] || []).push([[678],{
2
2
 
3
- /***/ 31197:
3
+ /***/ 55970:
4
4
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5
5
 
6
6
  "use strict";
@@ -26,27 +26,26 @@ __webpack_require__.r(utils_namespaceObject);
26
26
  __webpack_require__.d(utils_namespaceObject, {
27
27
  getFirstAnnotationSelected: () => (getFirstAnnotationSelected),
28
28
  getHandlesFromPoints: () => (getHandlesFromPoints),
29
- getModalityUnit: () => (utils_getModalityUnit),
30
29
  getSOPInstanceAttributes: () => (getSOPInstanceAttributes/* default */.Z),
31
30
  isAnnotationSelected: () => (isAnnotationSelected),
32
31
  setAnnotationSelected: () => (setAnnotationSelected)
33
32
  });
34
33
 
35
34
  // EXTERNAL MODULE: ../../../node_modules/react/index.js
36
- var react = __webpack_require__(32735);
37
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 335 modules
38
- var esm = __webpack_require__(77331);
39
- // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js + 321 modules
40
- var dist_esm = __webpack_require__(57270);
41
- // EXTERNAL MODULE: ../../core/src/index.ts + 101 modules
42
- var src = __webpack_require__(48501);
35
+ var react = __webpack_require__(43001);
36
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 337 modules
37
+ var esm = __webpack_require__(45754);
38
+ // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js + 323 modules
39
+ var dist_esm = __webpack_require__(26925);
40
+ // EXTERNAL MODULE: ../../core/src/index.ts + 104 modules
41
+ var src = __webpack_require__(24966);
43
42
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/streaming-image-volume-loader/dist/esm/index.js + 13 modules
44
- var streaming_image_volume_loader_dist_esm = __webpack_require__(28909);
43
+ var streaming_image_volume_loader_dist_esm = __webpack_require__(7087);
45
44
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/dynamic-import/cornerstoneDICOMImageLoader.min.js
46
- var cornerstoneDICOMImageLoader_min = __webpack_require__(99605);
45
+ var cornerstoneDICOMImageLoader_min = __webpack_require__(61539);
47
46
  var cornerstoneDICOMImageLoader_min_default = /*#__PURE__*/__webpack_require__.n(cornerstoneDICOMImageLoader_min);
48
47
  // EXTERNAL MODULE: ../../../node_modules/dicom-parser/dist/dicomParser.min.js
49
- var dicomParser_min = __webpack_require__(43264);
48
+ var dicomParser_min = __webpack_require__(56660);
50
49
  var dicomParser_min_default = /*#__PURE__*/__webpack_require__.n(dicomParser_min);
51
50
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/initWADOImageLoader.js
52
51
 
@@ -76,7 +75,7 @@ function initWebWorkers(appConfig) {
76
75
  initialized = true;
77
76
  }
78
77
  }
79
- function initWADOImageLoader(userAuthenticationService, appConfig) {
78
+ function initWADOImageLoader(userAuthenticationService, appConfig, extensionManager) {
80
79
  (cornerstoneDICOMImageLoader_min_default()).external.cornerstone = esm;
81
80
  (cornerstoneDICOMImageLoader_min_default()).external.dicomParser = (dicomParser_min_default());
82
81
  registerVolumeLoader('cornerstoneStreamingImageVolume', streaming_image_volume_loader_dist_esm/* cornerstoneStreamingImageVolumeLoader */.IU);
@@ -90,18 +89,13 @@ function initWADOImageLoader(userAuthenticationService, appConfig) {
90
89
  convertFloatPixelDataToInt: false
91
90
  },
92
91
  beforeSend: function (xhr) {
92
+ //TODO should be removed in the future and request emitted by DicomWebDataSource
93
+ const sourceConfig = extensionManager.getActiveDataSource()?.[0].getConfig() ?? {};
93
94
  const headers = userAuthenticationService.getAuthorizationHeader();
94
-
95
- // Request:
96
- // JPEG-LS Lossless (1.2.840.10008.1.2.4.80) if available, otherwise accept
97
- // whatever transfer-syntax the origin server provides.
98
- // For now we use image/jls and image/x-jls because some servers still use the old type
99
- // http://dicom.nema.org/medical/dicom/current/output/html/part18.html
95
+ const acceptHeader = src.utils.generateAcceptHeader(sourceConfig.acceptHeader, sourceConfig.requestTransferSyntaxUID, sourceConfig.omitQuotationForMultipartRequest);
100
96
  const xhrRequestHeaders = {
101
- Accept: appConfig.omitQuotationForMultipartRequest ? 'multipart/related; type=application/octet-stream' : 'multipart/related; type="application/octet-stream"'
102
- // 'multipart/related; type="image/x-jls", multipart/related; type="image/jls"; transfer-syntax="1.2.840.10008.1.2.4.80", multipart/related; type="image/x-jls", multipart/related; type="application/octet-stream"; transfer-syntax=*',
97
+ Accept: acceptHeader
103
98
  };
104
-
105
99
  if (headers) {
106
100
  Object.assign(xhrRequestHeaders, headers);
107
101
  }
@@ -122,8 +116,8 @@ function destroy() {
122
116
  }
123
117
  webWorkers.length = 0;
124
118
  }
125
- // EXTERNAL MODULE: ../../ui/src/index.js + 452 modules
126
- var ui_src = __webpack_require__(28619);
119
+ // EXTERNAL MODULE: ../../ui/src/index.js + 456 modules
120
+ var ui_src = __webpack_require__(60082);
127
121
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/callInputDialog.tsx
128
122
 
129
123
 
@@ -157,7 +151,9 @@ function callInputDialog(uiDialogService, data, callback) {
157
151
  } = _ref;
158
152
  switch (action.id) {
159
153
  case 'save':
160
- if (typeof validateFunc === 'function' && !validateFunc(value.label)) return;
154
+ if (typeof validateFunc === 'function' && !validateFunc(value.label)) {
155
+ return;
156
+ }
161
157
  callback(value.label, action.id);
162
158
  break;
163
159
  case 'cancel':
@@ -232,7 +228,7 @@ function callInputDialog(uiDialogService, data, callback) {
232
228
  }
233
229
  /* harmony default export */ const utils_callInputDialog = (callInputDialog);
234
230
  // EXTERNAL MODULE: ../../../extensions/cornerstone/src/state.ts
235
- var state = __webpack_require__(21922);
231
+ var state = __webpack_require__(73704);
236
232
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/getActiveViewportEnabledElement.ts
237
233
 
238
234
 
@@ -434,7 +430,7 @@ const toolNames = {
434
430
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/measurementServiceMappings/constants/supportedTools.js
435
431
  /* harmony default export */ const supportedTools = (['Length', 'EllipticalROI', 'CircleROI', 'Bidirectional', 'ArrowAnnotate', 'Angle', 'CobbAngle', 'Probe', 'RectangleROI', 'PlanarFreehandROI']);
436
432
  // EXTERNAL MODULE: ../../../extensions/cornerstone/src/utils/measurementServiceMappings/utils/getSOPInstanceAttributes.js
437
- var getSOPInstanceAttributes = __webpack_require__(63130);
433
+ var getSOPInstanceAttributes = __webpack_require__(87172);
438
434
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/measurementServiceMappings/Length.ts
439
435
 
440
436
 
@@ -607,7 +603,9 @@ function getDisplayText(mappedAnnotations, displaySet) {
607
603
  }
608
604
  const instanceText = InstanceNumber ? ` I: ${InstanceNumber}` : '';
609
605
  const frameText = displaySet.isMultiFrame ? ` F: ${frameNumber}` : '';
610
- if (length === null || length === undefined) return displayText;
606
+ if (length === null || length === undefined) {
607
+ return displayText;
608
+ }
611
609
  const roundedLength = src.utils.roundNumber(length, 2);
612
610
  displayText.push(`${roundedLength} mm (S: ${SeriesNumber}${instanceText}${frameText})`);
613
611
  return displayText;
@@ -791,22 +789,10 @@ function Bidirectional_getDisplayText(mappedAnnotations, displaySet) {
791
789
  return displayText;
792
790
  }
793
791
  /* harmony default export */ const measurementServiceMappings_Bidirectional = (Bidirectional);
794
- ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/measurementServiceMappings/utils/getModalityUnit.js
795
- function getModalityUnit(modality) {
796
- if (modality === 'CT') {
797
- return 'HU';
798
- } else if (modality === 'PT') {
799
- return 'SUV';
800
- } else {
801
- return '';
802
- }
803
- }
804
- /* harmony default export */ const utils_getModalityUnit = (getModalityUnit);
805
792
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/measurementServiceMappings/EllipticalROI.ts
806
793
 
807
794
 
808
795
 
809
-
810
796
  const EllipticalROI = {
811
797
  toAnnotation: measurement => {},
812
798
  toMeasurement: (csToolsEventDetail, displaySetService, cornerstoneViewportService, getValueTypeFromToolType) => {
@@ -904,16 +890,16 @@ function EllipticalROI_getMappedAnnotations(annotation, displaySetService) {
904
890
  stdDev,
905
891
  max,
906
892
  area,
907
- Modality
893
+ Modality,
894
+ modalityUnit
908
895
  } = targetStats;
909
- const unit = utils_getModalityUnit(Modality);
910
896
  annotations.push({
911
897
  SeriesInstanceUID,
912
898
  SOPInstanceUID,
913
899
  SeriesNumber,
914
900
  frameNumber,
915
901
  Modality,
916
- unit,
902
+ unit: modalityUnit,
917
903
  mean,
918
904
  stdDev,
919
905
  max,
@@ -1013,7 +999,6 @@ function EllipticalROI_getDisplayText(mappedAnnotations, displaySet) {
1013
999
 
1014
1000
 
1015
1001
 
1016
-
1017
1002
  const CircleROI = {
1018
1003
  toAnnotation: measurement => {},
1019
1004
  toMeasurement: (csToolsEventDetail, DisplaySetService, CornerstoneViewportService, getValueTypeFromToolType) => {
@@ -1111,16 +1096,16 @@ function CircleROI_getMappedAnnotations(annotation, DisplaySetService) {
1111
1096
  stdDev,
1112
1097
  max,
1113
1098
  area,
1114
- Modality
1099
+ Modality,
1100
+ modalityUnit
1115
1101
  } = targetStats;
1116
- const unit = utils_getModalityUnit(Modality);
1117
1102
  annotations.push({
1118
1103
  SeriesInstanceUID,
1119
1104
  SOPInstanceUID,
1120
1105
  SeriesNumber,
1121
1106
  frameNumber,
1122
1107
  Modality,
1123
- unit,
1108
+ unit: modalityUnit,
1124
1109
  mean,
1125
1110
  stdDev,
1126
1111
  max,
@@ -1515,7 +1500,9 @@ function CobbAngle_getDisplayText(mappedAnnotations, displaySet) {
1515
1500
  }
1516
1501
  const instanceText = InstanceNumber ? ` I: ${InstanceNumber}` : '';
1517
1502
  const frameText = displaySet.isMultiFrame ? ` F: ${frameNumber}` : '';
1518
- if (angle === undefined) return displayText;
1503
+ if (angle === undefined) {
1504
+ return displayText;
1505
+ }
1519
1506
  const roundedAngle = src.utils.roundNumber(angle, 2);
1520
1507
  displayText.push(`${roundedAngle} ${unit} (S: ${SeriesNumber}${instanceText}${frameText})`);
1521
1508
  return displayText;
@@ -1695,7 +1682,9 @@ function Angle_getDisplayText(mappedAnnotations, displaySet) {
1695
1682
  }
1696
1683
  const instanceText = InstanceNumber ? ` I: ${InstanceNumber}` : '';
1697
1684
  const frameText = displaySet.isMultiFrame ? ` F: ${frameNumber}` : '';
1698
- if (angle === undefined) return displayText;
1685
+ if (angle === undefined) {
1686
+ return displayText;
1687
+ }
1699
1688
  const roundedAngle = src.utils.roundNumber(angle, 2);
1700
1689
  displayText.push(`${roundedAngle} ${unit} (S: ${SeriesNumber}${instanceText}${frameText})`);
1701
1690
  return displayText;
@@ -1839,7 +1828,6 @@ function PlanarFreehandROI_getDisplayText(mappedAnnotations) {
1839
1828
 
1840
1829
 
1841
1830
 
1842
-
1843
1831
  const RectangleROI = {
1844
1832
  toAnnotation: measurement => {},
1845
1833
  toMeasurement: (csToolsEventDetail, DisplaySetService, CornerstoneViewportService, getValueTypeFromToolType) => {
@@ -1937,16 +1925,16 @@ function RectangleROI_getMappedAnnotations(annotation, DisplaySetService) {
1937
1925
  stdDev,
1938
1926
  max,
1939
1927
  area,
1940
- Modality
1928
+ Modality,
1929
+ modalityUnit
1941
1930
  } = targetStats;
1942
- const unit = utils_getModalityUnit(Modality);
1943
1931
  annotations.push({
1944
1932
  SeriesInstanceUID,
1945
1933
  SOPInstanceUID,
1946
1934
  SeriesNumber,
1947
1935
  frameNumber,
1948
1936
  Modality,
1949
- unit,
1937
+ unit: modalityUnit,
1950
1938
  mean,
1951
1939
  stdDev,
1952
1940
  max,
@@ -2540,7 +2528,7 @@ function getInterleavedFrames(imageIds) {
2540
2528
  return imageIdsToPrefetch;
2541
2529
  }
2542
2530
  // EXTERNAL MODULE: ../../../node_modules/lodash/lodash.js
2543
- var lodash = __webpack_require__(92891);
2531
+ var lodash = __webpack_require__(44379);
2544
2532
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/interleaveCenterLoader.ts
2545
2533
 
2546
2534
 
@@ -2730,8 +2718,12 @@ function getNthFrames(imageIds) {
2730
2718
  * @returns [] reordered to be breadth first traversal of lists
2731
2719
  */
2732
2720
  function interleave(lists) {
2733
- if (!lists || !lists.length) return [];
2734
- if (lists.length === 1) return lists[0];
2721
+ if (!lists || !lists.length) {
2722
+ return [];
2723
+ }
2724
+ if (lists.length === 1) {
2725
+ return lists[0];
2726
+ }
2735
2727
  console.time('interleave');
2736
2728
  const useLists = [...lists];
2737
2729
  const ret = [];
@@ -3020,9 +3012,15 @@ const DEFAULT_CONTEXT_MENU_CLICKS = {
3020
3012
  function getEventName(evt) {
3021
3013
  const button = evt.detail.event.which;
3022
3014
  const nameArr = [];
3023
- if (evt.detail.event.altKey) nameArr.push('alt');
3024
- if (evt.detail.event.ctrlKey) nameArr.push('ctrl');
3025
- if (evt.detail.event.shiftKey) nameArr.push('shift');
3015
+ if (evt.detail.event.altKey) {
3016
+ nameArr.push('alt');
3017
+ }
3018
+ if (evt.detail.event.ctrlKey) {
3019
+ nameArr.push('ctrl');
3020
+ }
3021
+ if (evt.detail.event.shiftKey) {
3022
+ nameArr.push('shift');
3023
+ }
3026
3024
  nameArr.push('button');
3027
3025
  nameArr.push(button);
3028
3026
  return nameArr.join('');
@@ -3057,7 +3055,9 @@ function initContextMenu(_ref) {
3057
3055
  element
3058
3056
  } = evt.detail;
3059
3057
  const viewportInfo = cornerstoneViewportService.getViewportInfo(viewportId);
3060
- if (!viewportInfo) return;
3058
+ if (!viewportInfo) {
3059
+ return;
3060
+ }
3061
3061
  const viewportIndex = viewportInfo.getViewportIndex();
3062
3062
  // TODO check update upstream
3063
3063
  (0,state/* setEnabledElement */.Yc)(viewportIndex, element);
@@ -3094,9 +3094,15 @@ const DEFAULT_DOUBLE_CLICK = {
3094
3094
  */
3095
3095
  function getDoubleClickEventName(evt) {
3096
3096
  const nameArr = [];
3097
- if (evt.detail.event.altKey) nameArr.push('alt');
3098
- if (evt.detail.event.ctrlKey) nameArr.push('ctrl');
3099
- if (evt.detail.event.shiftKey) nameArr.push('shift');
3097
+ if (evt.detail.event.altKey) {
3098
+ nameArr.push('alt');
3099
+ }
3100
+ if (evt.detail.event.ctrlKey) {
3101
+ nameArr.push('ctrl');
3102
+ }
3103
+ if (evt.detail.event.shiftKey) {
3104
+ nameArr.push('shift');
3105
+ }
3100
3106
  nameArr.push('doubleClick');
3101
3107
  return nameArr.join('');
3102
3108
  }
@@ -3154,7 +3160,6 @@ function initDoubleClick(_ref) {
3154
3160
 
3155
3161
 
3156
3162
 
3157
-
3158
3163
  // TODO: Cypress tests are currently grabbing this from the window?
3159
3164
  window.cornerstone = esm;
3160
3165
  window.cornerstoneTools = dist_esm;
@@ -3181,18 +3186,18 @@ async function init(_ref) {
3181
3186
  }
3182
3187
  });
3183
3188
 
3184
- // For debugging large datasets
3185
- const MAX_CACHE_SIZE_1GB = 1073741824;
3186
- const maxCacheSize = appConfig.maxCacheSize;
3187
- esm.cache.setMaxCacheSize(maxCacheSize ? maxCacheSize : MAX_CACHE_SIZE_1GB);
3189
+ // For debugging large datasets, otherwise prefer the defaults
3190
+ const {
3191
+ maxCacheSize
3192
+ } = appConfig;
3193
+ if (maxCacheSize) {
3194
+ esm.cache.setMaxCacheSize(maxCacheSize);
3195
+ }
3188
3196
  initCornerstoneTools();
3189
3197
  esm.Settings.getRuntimeSettings().set('useCursors', Boolean(appConfig.useCursors));
3190
3198
  const {
3191
3199
  userAuthenticationService,
3192
- measurementService,
3193
3200
  customizationService,
3194
- displaySetService,
3195
- uiDialogService,
3196
3201
  uiModalService,
3197
3202
  uiNotificationService,
3198
3203
  cineService,
@@ -3254,7 +3259,7 @@ async function init(_ref) {
3254
3259
  thumbnail: appConfig?.maxNumRequests?.thumbnail || 75,
3255
3260
  prefetch: appConfig?.maxNumRequests?.prefetch || 10
3256
3261
  };
3257
- initWADOImageLoader(userAuthenticationService, appConfig);
3262
+ initWADOImageLoader(userAuthenticationService, appConfig, extensionManager);
3258
3263
 
3259
3264
  /* Measurement Service */
3260
3265
  this.measurementServiceSource = connectToolsToMeasurementService(servicesManager);
@@ -3387,12 +3392,12 @@ function _showCPURenderingModal(uiModalService, hangingProtocolService) {
3387
3392
  });
3388
3393
  }
3389
3394
  // EXTERNAL MODULE: ../../../node_modules/react-dropzone/dist/es/index.js + 5 modules
3390
- var es = __webpack_require__(58591);
3395
+ var es = __webpack_require__(74834);
3391
3396
  // EXTERNAL MODULE: ../../../node_modules/prop-types/index.js
3392
- var prop_types = __webpack_require__(60216);
3397
+ var prop_types = __webpack_require__(3827);
3393
3398
  var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
3394
3399
  // EXTERNAL MODULE: ../../../node_modules/classnames/index.js
3395
- var classnames = __webpack_require__(40841);
3400
+ var classnames = __webpack_require__(44921);
3396
3401
  var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
3397
3402
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/DicomFileUploader.ts
3398
3403
 
@@ -3541,7 +3546,9 @@ class DicomFileUploader extends src/* PubSubService */.hC {
3541
3546
  request.addEventListener('loadend', cleanUpCallback);
3542
3547
  }
3543
3548
  _checkDicomFile(arrayBuffer) {
3544
- if (arrayBuffer.length <= 132) return false;
3549
+ if (arrayBuffer.length <= 132) {
3550
+ return false;
3551
+ }
3545
3552
  const arr = new Uint8Array(arrayBuffer.slice(128, 132));
3546
3553
  // bytes from 128 to 132 must be "DICM"
3547
3554
  return Array.from('DICM').every((char, i) => char.charCodeAt(0) === arr[i]);
@@ -3560,7 +3567,6 @@ const DicomUploadProgressItem = /*#__PURE__*/(0,react.memo)(_ref => {
3560
3567
  const [percentComplete, setPercentComplete] = (0,react.useState)(dicomFileUploader.getPercentComplete());
3561
3568
  const [failedReason, setFailedReason] = (0,react.useState)('');
3562
3569
  const [status, setStatus] = (0,react.useState)(dicomFileUploader.getStatus());
3563
- console.info(`${dicomFileUploader.getFileId()}`);
3564
3570
  const isComplete = (0,react.useCallback)(() => {
3565
3571
  return status === UploadStatus.Failed || status === UploadStatus.Cancelled || status === UploadStatus.Success;
3566
3572
  }, [status]);
@@ -4043,7 +4049,7 @@ function getCustomizationModule() {
4043
4049
  }
4044
4050
  /* harmony default export */ const src_getCustomizationModule = (getCustomizationModule);
4045
4051
  // EXTERNAL MODULE: ../../../node_modules/html2canvas/dist/html2canvas.esm.js
4046
- var html2canvas_esm = __webpack_require__(63691);
4052
+ var html2canvas_esm = __webpack_require__(76010);
4047
4053
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/CornerstoneViewportDownloadForm.tsx
4048
4054
 
4049
4055
 
@@ -4457,6 +4463,7 @@ function commandsModule(_ref) {
4457
4463
  toolGroupService,
4458
4464
  cineService,
4459
4465
  toolbarService,
4466
+ stateSyncService,
4460
4467
  uiDialogService,
4461
4468
  cornerstoneViewportService,
4462
4469
  uiNotificationService,
@@ -4882,15 +4889,13 @@ function commandsModule(_ref) {
4882
4889
  const {
4883
4890
  viewport
4884
4891
  } = enabledElement;
4885
- if (viewport instanceof esm.StackViewport) {
4886
- const {
4887
- invert
4888
- } = viewport.getProperties();
4889
- viewport.setProperties({
4890
- invert: !invert
4891
- });
4892
- viewport.render();
4893
- }
4892
+ const {
4893
+ invert
4894
+ } = viewport.getProperties();
4895
+ viewport.setProperties({
4896
+ invert: !invert
4897
+ });
4898
+ viewport.render();
4894
4899
  },
4895
4900
  resetViewport: () => {
4896
4901
  const enabledElement = _getActiveViewportEnabledElement();
@@ -5060,6 +5065,40 @@ function commandsModule(_ref) {
5060
5065
  );
5061
5066
 
5062
5067
  toolGroup.setToolEnabled(dist_esm.ReferenceLinesTool.toolName);
5068
+ },
5069
+ storePresentation: _ref18 => {
5070
+ let {
5071
+ viewportIndex
5072
+ } = _ref18;
5073
+ const presentation = cornerstoneViewportService.getPresentation(viewportIndex);
5074
+ if (!presentation || !presentation.presentationIds) {
5075
+ return;
5076
+ }
5077
+ const {
5078
+ lutPresentationStore,
5079
+ positionPresentationStore
5080
+ } = stateSyncService.getState();
5081
+ const {
5082
+ presentationIds
5083
+ } = presentation;
5084
+ const {
5085
+ lutPresentationId,
5086
+ positionPresentationId
5087
+ } = presentationIds || {};
5088
+ const storeState = {};
5089
+ if (lutPresentationId) {
5090
+ storeState.lutPresentationStore = {
5091
+ ...lutPresentationStore,
5092
+ [lutPresentationId]: presentation
5093
+ };
5094
+ }
5095
+ if (positionPresentationId) {
5096
+ storeState.positionPresentationStore = {
5097
+ ...positionPresentationStore,
5098
+ [positionPresentationId]: presentation
5099
+ };
5100
+ }
5101
+ stateSyncService.store(storeState);
5063
5102
  }
5064
5103
  };
5065
5104
  const definitions = {
@@ -5196,6 +5235,11 @@ function commandsModule(_ref) {
5196
5235
  },
5197
5236
  toggleReferenceLines: {
5198
5237
  commandFn: actions.toggleReferenceLines
5238
+ },
5239
+ storePresentation: {
5240
+ commandFn: actions.storePresentation,
5241
+ storeContexts: [],
5242
+ options: {}
5199
5243
  }
5200
5244
  };
5201
5245
  return {
@@ -5789,7 +5833,7 @@ class SyncGroupService {
5789
5833
  * @param type is the type of the synchronizer to create
5790
5834
  * @param creator
5791
5835
  */
5792
- setSynchronizer(type, creator) {
5836
+ addSynchronizerType(type, creator) {
5793
5837
  this.synchronizerCreators[type.toLowerCase()] = creator;
5794
5838
  }
5795
5839
  _getOrCreateSynchronizer(type, id, options) {
@@ -5867,10 +5911,10 @@ SyncGroupService.REGISTRATION = {
5867
5911
 
5868
5912
  /* harmony default export */ const services_SyncGroupService = (SyncGroupService);
5869
5913
  // EXTERNAL MODULE: ../../../node_modules/lodash.clonedeep/index.js
5870
- var lodash_clonedeep = __webpack_require__(71975);
5914
+ var lodash_clonedeep = __webpack_require__(11677);
5871
5915
  var lodash_clonedeep_default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep);
5872
5916
  // EXTERNAL MODULE: ../../../node_modules/lodash.isequal/index.js
5873
- var lodash_isequal = __webpack_require__(68652);
5917
+ var lodash_isequal = __webpack_require__(10311);
5874
5918
  var lodash_isequal_default = /*#__PURE__*/__webpack_require__.n(lodash_isequal);
5875
5919
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/transitions.ts
5876
5920
  /**
@@ -6715,6 +6759,7 @@ class SegmentationService extends src/* PubSubService */.hC {
6715
6759
  id: segmentationId,
6716
6760
  displaySetInstanceUID: segDisplaySet.displaySetInstanceUID,
6717
6761
  type: representationType,
6762
+ label: segDisplaySet.SeriesDescription,
6718
6763
  representationData: {
6719
6764
  [LABELMAP]: {
6720
6765
  volumeId: segmentationId,
@@ -6731,11 +6776,11 @@ class SegmentationService extends src/* PubSubService */.hC {
6731
6776
  return this.addOrUpdateSegmentation(Object.assign(segmentation, cachedSegmentation), suppressEvents);
6732
6777
  }
6733
6778
  const {
6734
- segments,
6779
+ labelmapBufferArray,
6735
6780
  referencedVolumeId
6736
6781
  } = segDisplaySet;
6737
- if (!segments || !referencedVolumeId) {
6738
- throw new Error('To create the segmentation from SEG displaySet, the displaySet should be loaded first, you can perform segDisplaySet.load() before calling this method.');
6782
+ if (!labelmapBufferArray || !referencedVolumeId) {
6783
+ throw new Error('No labelmapBufferArray or referencedVolumeId found for the SEG displaySet');
6739
6784
  }
6740
6785
 
6741
6786
  // if the labelmap doesn't exist, we need to create it first from the
@@ -6754,72 +6799,27 @@ class SegmentationService extends src/* PubSubService */.hC {
6754
6799
  sharedArrayBuffer: true
6755
6800
  }
6756
6801
  });
6757
- const [rows, columns] = derivedVolume.dimensions;
6758
6802
  const derivedVolumeScalarData = derivedVolume.getScalarData();
6759
- const {
6760
- imageIds
6761
- } = referencedVolume;
6762
- const sopUIDImageIdIndexMap = imageIds.reduce((acc, imageId, index) => {
6763
- const {
6764
- sopInstanceUid
6765
- } = esm.metaData.get('generalImageModule', imageId);
6766
- acc[sopInstanceUid] = index;
6767
- return acc;
6768
- }, {});
6769
- const numSegments = Object.keys(segments).length;
6770
- // Note: ideally we could use the TypedArray set method, but since each
6771
- // slice can have multiple segments, we need to loop over each slice and
6772
- // set the segment value for each segment.
6773
- let overlappingSegments = false;
6774
- const _segmentInfoUpdate = (segmentInfo, segmentIndex) => {
6803
+ const segmentsInfo = segDisplaySet.segMetadata.data;
6804
+ derivedVolumeScalarData.set(new Uint8Array(labelmapBufferArray[0]));
6805
+ segmentation.segments = segmentsInfo.map((segmentInfo, segmentIndex) => {
6806
+ if (segmentIndex === 0) {
6807
+ return;
6808
+ }
6775
6809
  const {
6776
- pixelData: segPixelData
6810
+ SegmentedPropertyCategoryCodeSequence,
6811
+ SegmentNumber,
6812
+ SegmentLabel,
6813
+ SegmentAlgorithmType,
6814
+ SegmentAlgorithmName,
6815
+ SegmentedPropertyTypeCodeSequence,
6816
+ rgba
6777
6817
  } = segmentInfo;
6778
- let segmentX = 0;
6779
- let segmentY = 0;
6780
- let segmentZ = 0;
6781
- let count = 0;
6782
- for (const [functionalGroupIndex, functionalGroup] of segmentInfo.functionalGroups.entries()) {
6783
- const {
6784
- ReferencedSOPInstanceUID
6785
- } = functionalGroup.DerivationImageSequence.SourceImageSequence;
6786
- const imageIdIndex = sopUIDImageIdIndexMap[ReferencedSOPInstanceUID];
6787
- if (imageIdIndex === -1) {
6788
- return;
6789
- }
6790
- const step = rows * columns;
6791
-
6792
- // we need a faster way to get the pixel data for the current
6793
- // functional group, which we use typed array view
6794
-
6795
- const functionGroupPixelData = new Uint8Array(segPixelData.buffer, functionalGroupIndex * step, step);
6796
- const functionalGroupStartIndex = imageIdIndex * step;
6797
- const functionalGroupEndIndex = (imageIdIndex + 1) * step;
6798
-
6799
- // Note: this for loop is not optimized, since DICOM SEG stores
6800
- // each segment as a separate labelmap so if there is a slice
6801
- // that has multiple segments, we will have to loop over each
6802
- // segment and we cannot use the TypedArray set method.
6803
- for (let i = functionalGroupStartIndex, j = 0; i < functionalGroupEndIndex; i++, j++) {
6804
- if (functionGroupPixelData[j] !== 0) {
6805
- if (derivedVolumeScalarData[i] !== 0) {
6806
- overlappingSegments = true;
6807
- }
6808
- derivedVolumeScalarData[i] = segmentIndex;
6809
-
6810
- // centroid calculations
6811
- segmentX += i % columns;
6812
- segmentY += Math.floor(i / columns) % rows;
6813
- segmentZ += Math.floor(i / (columns * rows));
6814
- count++;
6815
- }
6816
- }
6817
- }
6818
-
6819
- // centroid calculations
6820
- const x = Math.floor(segmentX / count);
6821
- const y = Math.floor(segmentY / count);
6822
- const z = Math.floor(segmentZ / count);
6818
+ const {
6819
+ x,
6820
+ y,
6821
+ z
6822
+ } = segDisplaySet.centroids.get(segmentIndex);
6823
6823
  const centerWorld = derivedVolume.imageData.indexToWorld([x, y, z]);
6824
6824
  segmentation.cachedStats = {
6825
6825
  ...segmentation.cachedStats,
@@ -6834,51 +6834,24 @@ class SegmentationService extends src/* PubSubService */.hC {
6834
6834
  }
6835
6835
  }
6836
6836
  };
6837
- const numInitialized = Object.keys(segmentation.cachedStats.segmentCenter).length;
6838
-
6839
- // Calculate percentage completed
6840
- const percentComplete = Math.round(numInitialized / numSegments * 100);
6841
- this._broadcastEvent(SegmentationService_EVENTS.SEGMENT_LOADING_COMPLETE, {
6842
- percentComplete,
6843
- numSegments: numSegments
6844
- });
6845
- };
6846
- const promiseArray = [];
6847
- for (const segmentIndex in segments) {
6848
- const segmentInfo = segments[segmentIndex];
6849
-
6850
- // Important: we need a non-blocking way to update the segmentation
6851
- // state, otherwise the UI will freeze and the user will not be able
6852
- // to interact with the app or progress bars will not be updated.
6853
- const promise = new Promise((resolve, reject) => {
6854
- setTimeout(() => {
6855
- _segmentInfoUpdate(segmentInfo, segmentIndex);
6856
- resolve();
6857
- }, 0);
6858
- });
6859
- promiseArray.push(promise);
6860
- }
6861
- await Promise.all(promiseArray);
6862
- segmentation.segmentCount = Object.keys(segments).length;
6863
- segmentation.segments = [null]; // segment 0
6864
-
6865
- Object.keys(segments).forEach(segmentIndex => {
6866
- const segmentInfo = segments[segmentIndex];
6867
- const segIndex = Number(segmentIndex);
6868
- segmentation.segments[segIndex] = {
6869
- label: segmentInfo.label || `Segment ${segIndex}`,
6870
- segmentIndex: Number(segmentIndex),
6871
- color: [segmentInfo.color[0], segmentInfo.color[1], segmentInfo.color[2]],
6872
- opacity: segmentInfo.color[3],
6837
+ return {
6838
+ label: SegmentLabel || `Segment ${SegmentNumber}`,
6839
+ segmentIndex: Number(SegmentNumber),
6840
+ category: SegmentedPropertyCategoryCodeSequence ? SegmentedPropertyCategoryCodeSequence.CodeMeaning : '',
6841
+ type: SegmentedPropertyTypeCodeSequence ? SegmentedPropertyTypeCodeSequence.CodeMeaning : '',
6842
+ algorithmType: SegmentAlgorithmType,
6843
+ algorithmName: SegmentAlgorithmName,
6844
+ color: rgba,
6845
+ opacity: 255,
6873
6846
  isVisible: true,
6874
6847
  isLocked: false
6875
6848
  };
6876
6849
  });
6850
+ segmentation.segmentCount = segmentsInfo.length - 1;
6877
6851
  segDisplaySet.isLoaded = true;
6878
6852
  this._broadcastEvent(SegmentationService_EVENTS.SEGMENTATION_LOADING_COMPLETE, {
6879
6853
  segmentationId,
6880
- segDisplaySet,
6881
- overlappingSegments
6854
+ segDisplaySet
6882
6855
  });
6883
6856
  return this.addOrUpdateSegmentation(segmentation, suppressEvents);
6884
6857
  }
@@ -6911,6 +6884,7 @@ class SegmentationService extends src/* PubSubService */.hC {
6911
6884
  id: segmentationId,
6912
6885
  displaySetInstanceUID: rtDisplaySetUID,
6913
6886
  type: representationType,
6887
+ label: rtDisplaySet.SeriesDescription,
6914
6888
  representationData: {
6915
6889
  [CONTOUR]: {
6916
6890
  geometryIds
@@ -6936,41 +6910,47 @@ class SegmentationService extends src/* PubSubService */.hC {
6936
6910
  segmentIndex,
6937
6911
  geometryId
6938
6912
  } = rtStructData;
6939
- const geometry = await esm.geometryLoader.createAndCacheGeometry(geometryId, {
6940
- geometryData: {
6941
- data,
6942
- id,
6943
- color,
6944
- frameOfReferenceUID: structureSet.frameOfReferenceUID,
6945
- segmentIndex
6946
- },
6947
- type: esm.Enums.GeometryType.CONTOUR
6948
- });
6949
- const contourSet = geometry.data;
6950
- const centroid = contourSet.getCentroid();
6951
- segmentsCachedStats[segmentIndex] = {
6952
- center: {
6953
- world: centroid
6954
- },
6955
- modifiedTime: rtDisplaySet.SeriesDate // we use the SeriesDate as the modifiedTime since this is the first time we are creating the segmentation
6956
- };
6957
6913
 
6958
- segmentation.segments[segmentIndex] = {
6959
- label: id,
6960
- segmentIndex,
6961
- color,
6962
- ...SEGMENT_CONSTANT
6963
- };
6964
- const numInitialized = Object.keys(segmentsCachedStats).length;
6965
-
6966
- // Calculate percentage completed
6967
- const percentComplete = Math.round(numInitialized / allRTStructData.length * 100);
6968
- this._broadcastEvent(SegmentationService_EVENTS.SEGMENT_LOADING_COMPLETE, {
6969
- percentComplete,
6970
- // Note: this is not the geometryIds length since there might be
6971
- // some missing ROINumbers
6972
- numSegments: allRTStructData.length
6973
- });
6914
+ // catch error instead of failing to allow loading to continue
6915
+ try {
6916
+ const geometry = await esm.geometryLoader.createAndCacheGeometry(geometryId, {
6917
+ geometryData: {
6918
+ data,
6919
+ id,
6920
+ color,
6921
+ frameOfReferenceUID: structureSet.frameOfReferenceUID,
6922
+ segmentIndex
6923
+ },
6924
+ type: esm.Enums.GeometryType.CONTOUR
6925
+ });
6926
+ const contourSet = geometry.data;
6927
+ const centroid = contourSet.getCentroid();
6928
+ segmentsCachedStats[segmentIndex] = {
6929
+ center: {
6930
+ world: centroid
6931
+ },
6932
+ modifiedTime: rtDisplaySet.SeriesDate // we use the SeriesDate as the modifiedTime since this is the first time we are creating the segmentation
6933
+ };
6934
+
6935
+ segmentation.segments[segmentIndex] = {
6936
+ label: id,
6937
+ segmentIndex,
6938
+ color,
6939
+ ...SEGMENT_CONSTANT
6940
+ };
6941
+ const numInitialized = Object.keys(segmentsCachedStats).length;
6942
+
6943
+ // Calculate percentage completed
6944
+ const percentComplete = Math.round(numInitialized / allRTStructData.length * 100);
6945
+ this._broadcastEvent(SegmentationService_EVENTS.SEGMENT_LOADING_COMPLETE, {
6946
+ percentComplete,
6947
+ // Note: this is not the geometryIds length since there might be
6948
+ // some missing ROINumbers
6949
+ numSegments: allRTStructData.length
6950
+ });
6951
+ } catch (e) {
6952
+ console.warn(e);
6953
+ }
6974
6954
  };
6975
6955
  const promiseArray = [];
6976
6956
  for (let i = 0; i < allRTStructData.length; i++) {
@@ -7741,7 +7721,9 @@ const DEFAULT_TOOLGROUP_ID = 'default';
7741
7721
  // Return true if the data contains the given display set UID OR the imageId
7742
7722
  // if it is a composite object.
7743
7723
  const dataContains = (data, displaySetUID, imageId) => {
7744
- if (data.displaySetInstanceUID === displaySetUID) return true;
7724
+ if (data.displaySetInstanceUID === displaySetUID) {
7725
+ return true;
7726
+ }
7745
7727
  if (imageId && data.isCompositeStack && data.imageIds) {
7746
7728
  return !!data.imageIds.find(dataId => dataId === imageId);
7747
7729
  }
@@ -7773,7 +7755,9 @@ class ViewportInfo {
7773
7755
  * OR if it is a composite stack and contains the given imageId
7774
7756
  */
7775
7757
  contains(displaySetUID, imageId) {
7776
- if (!this.viewportData?.data) return false;
7758
+ if (!this.viewportData?.data) {
7759
+ return false;
7760
+ }
7777
7761
  if (this.viewportData.data.length) {
7778
7762
  return !!this.viewportData.data.find(data => dataContains(data, displaySetUID, imageId));
7779
7763
  }
@@ -7819,7 +7803,7 @@ class ViewportInfo {
7819
7803
  // Since SEG and other derived displaySets are loaded in a different way, and not
7820
7804
  // via cornerstoneViewportService
7821
7805
  let viewportData = this.getViewportData();
7822
- if (viewportData.viewportType === esm.Enums.ViewportType.ORTHOGRAPHIC) {
7806
+ if (viewportData.viewportType === esm.Enums.ViewportType.ORTHOGRAPHIC || viewportData.viewportType === esm.Enums.ViewportType.VOLUME_3D) {
7823
7807
  viewportData = viewportData;
7824
7808
  return viewportData.data.some(_ref => {
7825
7809
  let {
@@ -8068,19 +8052,27 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
8068
8052
  }
8069
8053
  setPresentations(viewport, presentations) {
8070
8054
  const properties = presentations?.lutPresentation?.properties;
8071
- if (properties) viewport.setProperties(properties);
8055
+ if (properties) {
8056
+ viewport.setProperties(properties);
8057
+ }
8072
8058
  const camera = presentations?.positionPresentation?.camera;
8073
- if (camera) viewport.setCamera(camera);
8059
+ if (camera) {
8060
+ viewport.setCamera(camera);
8061
+ }
8074
8062
  }
8075
8063
  getPresentation(viewportIndex) {
8076
8064
  const viewportInfo = this.viewportsInfo.get(viewportIndex);
8077
- if (!viewportInfo) return;
8065
+ if (!viewportInfo) {
8066
+ return;
8067
+ }
8078
8068
  const {
8079
8069
  viewportType,
8080
8070
  presentationIds
8081
8071
  } = viewportInfo.getViewportOptions();
8082
8072
  const csViewport = this.getCornerstoneViewportByIndex(viewportIndex);
8083
- if (!csViewport) return;
8073
+ if (!csViewport) {
8074
+ return;
8075
+ }
8084
8076
  const properties = csViewport.getProperties();
8085
8077
  if (properties.isComputedVOI) {
8086
8078
  delete properties.voiRange;
@@ -8232,7 +8224,9 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
8232
8224
  viewport.setStack(imageIds, initialImageIndexToUse).then(() => {
8233
8225
  viewport.setProperties(properties);
8234
8226
  const camera = presentations.positionPresentation?.camera;
8235
- if (camera) viewport.setCamera(camera);
8227
+ if (camera) {
8228
+ viewport.setCamera(camera);
8229
+ }
8236
8230
  });
8237
8231
  }
8238
8232
  _getInitialImageIndexForViewport(viewportInfo, imageIds) {
@@ -8487,7 +8481,7 @@ class CornerstoneViewportService extends src/* PubSubService */.hC {
8487
8481
  const viewportId = viewportInfo.getViewportId();
8488
8482
  const viewport = this.getCornerstoneViewport(viewportId);
8489
8483
  const viewportCamera = viewport.getCamera();
8490
- if (viewport instanceof esm.VolumeViewport) {
8484
+ if (viewport instanceof esm.VolumeViewport || viewport instanceof esm.VolumeViewport3D) {
8491
8485
  this._setVolumeViewport(viewport, viewportData, viewportInfo).then(() => {
8492
8486
  if (keepCamera) {
8493
8487
  viewport.setCamera(viewportCamera);
@@ -8626,7 +8620,7 @@ CornerstoneViewportService.REGISTRATION = {
8626
8620
 
8627
8621
 
8628
8622
  // EXTERNAL MODULE: ../../../node_modules/dicomweb-client/build/dicomweb-client.es.js
8629
- var dicomweb_client_es = __webpack_require__(75935);
8623
+ var dicomweb_client_es = __webpack_require__(97604);
8630
8624
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/dicomLoaderService.js
8631
8625
 
8632
8626
 
@@ -8818,7 +8812,6 @@ function getHandlesFromPoints(points) {
8818
8812
 
8819
8813
 
8820
8814
 
8821
-
8822
8815
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/measurementServiceMappings/index.ts
8823
8816
 
8824
8817
 
@@ -8847,7 +8840,7 @@ function src_extends() { src_extends = Object.assign ? Object.assign.bind() : fu
8847
8840
 
8848
8841
 
8849
8842
  const Component = /*#__PURE__*/react.lazy(() => {
8850
- return Promise.all(/* import() */[__webpack_require__.e(664), __webpack_require__.e(351)]).then(__webpack_require__.bind(__webpack_require__, 30351));
8843
+ return Promise.all(/* import() */[__webpack_require__.e(23), __webpack_require__.e(181)]).then(__webpack_require__.bind(__webpack_require__, 86181));
8851
8844
  });
8852
8845
  const OHIFCornerstoneViewport = props => {
8853
8846
  return /*#__PURE__*/react.createElement(react.Suspense, {
@@ -8950,7 +8943,7 @@ const cornerstoneExtension = {
8950
8943
 
8951
8944
  /***/ }),
8952
8945
 
8953
- /***/ 21922:
8946
+ /***/ 73704:
8954
8947
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8955
8948
 
8956
8949
  "use strict";
@@ -8993,14 +8986,14 @@ const reset = () => {
8993
8986
 
8994
8987
  /***/ }),
8995
8988
 
8996
- /***/ 63130:
8989
+ /***/ 87172:
8997
8990
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8998
8991
 
8999
8992
  "use strict";
9000
8993
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9001
8994
  /* harmony export */ Z: () => (/* binding */ getSOPInstanceAttributes)
9002
8995
  /* harmony export */ });
9003
- /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77331);
8996
+ /* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(45754);
9004
8997
 
9005
8998
 
9006
8999
  /**