@ohif/app 3.9.1 → 3.9.3

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 (51) hide show
  1. package/dist/{1185.bundle.023fe7179faaa50019d3.js → 1185.bundle.9f4c770baf52abcf3c6d.js} +120 -53
  2. package/dist/{1266.bundle.e9abd5c45b5236544151.js → 1266.bundle.0097d9c4ba974905a833.js} +8 -3
  3. package/dist/{1374.bundle.019bbc010eeb66109e8b.js → 1374.bundle.2e1fa65e28731d98969a.js} +2 -2
  4. package/dist/{1436.bundle.773756cd51b69e887bac.js → 1436.bundle.be39664239aa2bbca527.js} +234 -274
  5. package/dist/{1927.bundle.49539e3ab5b0aad1399c.js → 1927.bundle.2b2fa0b539d6ac5b0dc3.js} +1 -1
  6. package/dist/{213.bundle.e663335fb0884edde6d8.js → 213.bundle.c0c23f7fd4b66d78d0fe.js} +2 -2
  7. package/dist/{5807.bundle.dac5ce36534a71c77723.js → 2343.bundle.f096450c21417279d4cc.js} +270 -1
  8. package/dist/{2424.bundle.b7da298db43541d3a7c0.js → 2424.bundle.d73e8d67dc2aace299d2.js} +2 -2
  9. package/dist/{2701.bundle.8c1ff2e0faaa7d2f4716.js → 2701.bundle.c8271fa4986a45fea350.js} +17 -24
  10. package/dist/{2825.bundle.b04c941a87fd580deb6d.js → 2825.bundle.0612b1b8ab3e8ee01b93.js} +1 -1
  11. package/dist/{3198.bundle.c82b7424070ffd02faf1.js → 3198.bundle.7a18515cfe4113417251.js} +10 -6
  12. package/dist/{3200.bundle.a12825fb5aec200d33e2.js → 3200.bundle.e46dca03aa824998973a.js} +18 -10
  13. package/dist/3326.bundle.d01046d6c2c31654c125.js +265 -0
  14. package/dist/{149.bundle.ce5596fc563276036744.js → 3900.bundle.0e4e29374e221b260ed1.js} +35 -59
  15. package/dist/{8295.bundle.4ecb27f9e58526f12bcb.js → 3902.bundle.8ae7b2e27f760af997dd.js} +20 -1
  16. package/dist/3902.css +2 -0
  17. package/dist/{4202.bundle.5c8120ed4841da0af211.js → 4202.bundle.497702023d73202f4f39.js} +2 -1
  18. package/dist/{3121.bundle.d3e7092e305cf6cecdb5.js → 4438.bundle.a945f803d0eeb11d081f.js} +24 -4
  19. package/dist/{4571.bundle.3b1691730b3c57bf4d35.js → 4571.bundle.a37be49663df2f4a2c8a.js} +99 -89
  20. package/dist/4759.bundle.1e982897292fc19ecd7c.js +265 -0
  21. package/dist/{4834.bundle.aad44c2628cdefb7a4dd.js → 4834.bundle.92ba088cc62a6b791000.js} +2 -2
  22. package/dist/{5139.bundle.367a6827071448e2923d.js → 5139.bundle.70d3be7dd1896f245d7b.js} +3 -3
  23. package/dist/{5247.bundle.6dc2a50f21821b2ffdf5.js → 5247.bundle.4e8669e41fd28813e643.js} +5 -5
  24. package/dist/{5252.bundle.5ec502c53a9cc877ed8d.js → 5252.bundle.f2675336275573a288d5.js} +13 -1
  25. package/dist/{1520.bundle.97dbd9bfa83148e5334d.js → 5630.bundle.44d0ca81d77b7ae5193b.js} +63 -58
  26. package/dist/{5687.bundle.5731ec23dd9eb43a083e.js → 5687.bundle.50b800a714486557b243.js} +5 -5
  27. package/dist/{5717.bundle.848e13f256818475f57f.js → 5717.bundle.9218cb67ad1994cd1a99.js} +305 -64
  28. package/dist/{3970.bundle.31942cc0c12a008e7ba0.js → 5758.bundle.cd1599b81bdb1f735f9d.js} +270 -1
  29. package/dist/{717.bundle.0f32b7b57347b5141248.js → 7013.bundle.979d3a29f6142e8c1290.js} +264 -4
  30. package/dist/7013.css +4 -0
  31. package/dist/{7197.bundle.c28453cdb392072d8bf8.js → 7197.bundle.30f8969751309ab5235c.js} +6 -6
  32. package/dist/{7955.bundle.6a255705b1ef5906f4a8.js → 7955.bundle.9264a10437f0a67e6057.js} +3 -3
  33. package/dist/{8008.bundle.5bf7b274246be10e2f05.js → 8008.bundle.6772a210a995b568f8d0.js} +2 -2
  34. package/dist/{8228.bundle.55ac03d7165248f47d4e.js → 8228.bundle.2c1e61eec1f9f4b3b613.js} +8 -26
  35. package/dist/{8259.bundle.623c29b26b170a8a085b.js → 8259.bundle.9cf9ef151893ede068bb.js} +2 -2
  36. package/dist/{8523.bundle.648334132159465cdc41.js → 8523.bundle.c0ec85de98ba380ebeb4.js} +55 -13
  37. package/dist/{8558.bundle.01d05fd73da5db8e60f9.js → 8558.bundle.9c22f000a404f1006a41.js} +10 -5
  38. package/dist/{9551.bundle.6c260a9869e14dcc3543.js → 9551.bundle.3507bb1d4353df13bf3a.js} +3 -3
  39. package/dist/{9611.bundle.767595c93877e5166c03.js → 9611.bundle.9f1aa9041196d77f2b7e.js} +2 -2
  40. package/dist/{app.bundle.d02143bec2df7fec9964.js → app.bundle.9af5a6d7ff3a778d05b7.js} +278 -150
  41. package/dist/app.bundle.css +2 -2
  42. package/dist/index.html +1 -1
  43. package/dist/{polySeg.bundle.b79ae514989e86301c71.js → polySeg.bundle.6e85073e3abf2e6e6078.js} +1 -1
  44. package/dist/serve.json +1 -10
  45. package/dist/{suv-peak-worker.bundle.31c3b3b957204af93b7e.js → suv-peak-worker.bundle.e2e8e46de3e958a1a3db.js} +3 -3
  46. package/dist/sw.js +1 -1
  47. package/package.json +19 -19
  48. /package/dist/{1801.css → 3326.css} +0 -0
  49. /package/dist/{717.css → 4438.css} +0 -0
  50. /package/dist/{2591.css → 4759.css} +0 -0
  51. /package/dist/{9862.bundle.7146682e56aa66130ae6.js → 9862.bundle.aa2f8e0010f1be1bc87d.js} +0 -0
@@ -19,8 +19,8 @@ var prop_types = __webpack_require__(97598);
19
19
  var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
20
20
  // EXTERNAL MODULE: ../../ui/src/index.js + 690 modules
21
21
  var src = __webpack_require__(35647);
22
- // EXTERNAL MODULE: ../../../extensions/default/src/index.ts + 114 modules
23
- var default_src = __webpack_require__(71520);
22
+ // EXTERNAL MODULE: ../../../extensions/default/src/index.ts + 115 modules
23
+ var default_src = __webpack_require__(55630);
24
24
  ;// CONCATENATED MODULE: ../../../extensions/dicom-microscopy/src/DicomMicroscopyViewport.css
25
25
  // extracted by mini-css-extract-plugin
26
26
 
@@ -113,28 +113,6 @@ function utils_formatDICOMTime(time, strFormat = 'HH:mm:ss') {
113
113
  return moment(time, 'HH:mm:ss').format(strFormat);
114
114
  }
115
115
 
116
- /**
117
- * Formats a patient name for display purposes
118
- *
119
- * @param {string} name
120
- * @returns {string} formatted name.
121
- */
122
- function utils_formatPN(name) {
123
- if (!name) {
124
- return;
125
- }
126
-
127
- // Convert the first ^ to a ', '. String.replace() only affects
128
- // the first appearance of the character.
129
- const commaBetweenFirstAndLast = name.replace('^', ', ');
130
-
131
- // Replace any remaining '^' characters with spaces
132
- const cleaned = commaBetweenFirstAndLast.replace(/\^/g, ' ');
133
-
134
- // Trim any extraneous whitespace
135
- return cleaned.trim();
136
- }
137
-
138
116
  /**
139
117
  * Gets compression type
140
118
  *
@@ -155,12 +133,18 @@ function getCompression(imageId) {
155
133
  }
156
134
  return 'Lossless / Uncompressed';
157
135
  }
136
+ // EXTERNAL MODULE: ../../core/src/index.ts + 72 modules
137
+ var core_src = __webpack_require__(80818);
158
138
  ;// CONCATENATED MODULE: ../../../extensions/dicom-microscopy/src/components/ViewportOverlay/index.tsx
159
139
 
160
140
 
161
141
 
162
142
 
163
143
 
144
+
145
+ const {
146
+ formatPN
147
+ } = core_src/* utils */.Wp;
164
148
  /**
165
149
  *
166
150
  * @param {*} config is a configuration object that defines four lists of elements,
@@ -253,8 +237,6 @@ const itemGenerator = props => {
253
237
  }, content.value)));
254
238
  };
255
239
  /* harmony default export */ const ViewportOverlay = (generateFromConfig({}));
256
- // EXTERNAL MODULE: ../../core/src/index.ts + 71 modules
257
- var core_src = __webpack_require__(29463);
258
240
  ;// CONCATENATED MODULE: ../../../extensions/dicom-microscopy/src/utils/dicomWebClient.ts
259
241
 
260
242
 
@@ -12,8 +12,8 @@ __webpack_require__.d(__webpack_exports__, {
12
12
  "default": () => (/* binding */ basic_test_mode_src)
13
13
  });
14
14
 
15
- // EXTERNAL MODULE: ../../core/src/index.ts + 71 modules
16
- var src = __webpack_require__(29463);
15
+ // EXTERNAL MODULE: ../../core/src/index.ts + 72 modules
16
+ var src = __webpack_require__(80818);
17
17
  // EXTERNAL MODULE: ../../ui/src/index.js + 690 modules
18
18
  var ui_src = __webpack_require__(35647);
19
19
  ;// CONCATENATED MODULE: ../../../modes/basic-test-mode/src/toolbarButtons.ts
@@ -933,7 +933,7 @@ class BaseVolumeViewport extends _Viewport__WEBPACK_IMPORTED_MODULE_18__/* ["def
933
933
  sliceIndex ??= currentIndex;
934
934
  const { viewPlaneNormal, focalPoint } = this.getCamera();
935
935
  const querySeparator = volumeId.includes('?') ? '&' : '?';
936
- return `volumeId:${volumeId}${querySeparator}sliceIndex=${sliceIndex}&viewPlaneNormal=${viewPlaneNormal.join(',')}&focalPoint=${focalPoint.join(',')}`;
936
+ return `volumeId:${volumeId}${querySeparator}sliceIndex=${sliceIndex}&viewPlaneNormal=${viewPlaneNormal.join(',')}`;
937
937
  }
938
938
  _addVolumeId(volumeId) {
939
939
  this.volumeIds.add(volumeId);
@@ -16552,6 +16552,12 @@ var cache = __webpack_require__(49038);
16552
16552
 
16553
16553
 
16554
16554
 
16555
+ function convertDataType(data, targetDataType) {
16556
+ const Constructor = (0,getBufferConfiguration/* getConstructorFromType */.j)(targetDataType);
16557
+ const convertedData = new Constructor(data.length);
16558
+ convertedData.set(data);
16559
+ return convertedData;
16560
+ }
16555
16561
  function vtkStreamingOpenGLTexture(publicAPI, model) {
16556
16562
  model.classHierarchy.push('vtkStreamingOpenGLTexture');
16557
16563
  model.updatedFrames = [];
@@ -16602,10 +16608,14 @@ function vtkStreamingOpenGLTexture(publicAPI, model) {
16602
16608
  if (!image) {
16603
16609
  continue;
16604
16610
  }
16605
- const data = image.voxelManager.getScalarData();
16611
+ let data = image.voxelManager.getScalarData();
16606
16612
  const gl = model.context;
16607
- const dataType = data.constructor.name;
16608
- const [pixData] = publicAPI.updateArrayDataTypeForGL(dataType, [data]);
16613
+ if (volume.dataType !== data.constructor.name) {
16614
+ data = convertDataType(data, volume.dataType);
16615
+ }
16616
+ const [pixData] = publicAPI.updateArrayDataTypeForGL(volume.dataType, [
16617
+ data,
16618
+ ]);
16609
16619
  publicAPI.bind();
16610
16620
  const zOffset = i;
16611
16621
  gl.texSubImage3D(model.target, 0, 0, 0, zOffset, model.width, model.height, 1, model.format, model.openGLDataType, pixData);
@@ -16639,8 +16649,12 @@ function vtkStreamingOpenGLTexture(publicAPI, model) {
16639
16649
  constructor = data.constructor;
16640
16650
  }
16641
16651
  const gl = model.context;
16642
- const dataType = data.constructor.name;
16643
- const [pixData] = publicAPI.updateArrayDataTypeForGL(dataType, [data]);
16652
+ if (volume.dataType !== data.constructor.name) {
16653
+ data = convertDataType(data, volume.dataType);
16654
+ }
16655
+ const [pixData] = publicAPI.updateArrayDataTypeForGL(volume.dataType, [
16656
+ data,
16657
+ ]);
16644
16658
  publicAPI.bind();
16645
16659
  let zOffset = i;
16646
16660
  gl.texSubImage3D(model.target, 0, 0, 0, zOffset, model.width, model.height, 1, model.format, model.openGLDataType, pixData);
@@ -22061,12 +22075,20 @@ const deepMerge = (target = {}, source = {}, optionsArgument = undefined) => {
22061
22075
  /* harmony import */ var _getScalingParameters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(32173);
22062
22076
  /* harmony import */ var _hasFloatScalingParameters__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(30169);
22063
22077
  /* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(59693);
22078
+ /* harmony import */ var _cache_cache__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49038);
22079
+
22064
22080
 
22065
22081
 
22066
22082
 
22067
22083
 
22068
22084
 
22069
22085
 
22086
+ const constructorToTypedArray = {
22087
+ Uint8Array: 'Uint8Array',
22088
+ Int16Array: 'Int16Array',
22089
+ Uint16Array: 'Uint16Array',
22090
+ Float32Array: 'Float32Array',
22091
+ };
22070
22092
  function generateVolumePropsFromImageIds(imageIds, volumeId) {
22071
22093
  const volumeMetadata = (0,_makeVolumeMetadata__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(imageIds);
22072
22094
  const { ImageOrientationPatient, PixelSpacing, Columns, Rows } = volumeMetadata;
@@ -22099,6 +22121,10 @@ function generateVolumePropsFromImageIds(imageIds, volumeId) {
22099
22121
  function _determineDataType(imageIds, volumeMetadata) {
22100
22122
  const { BitsAllocated, PixelRepresentation } = volumeMetadata;
22101
22123
  const signed = PixelRepresentation === 1;
22124
+ const cachedDataType = _getDataTypeFromCache(imageIds);
22125
+ if (cachedDataType) {
22126
+ return cachedDataType;
22127
+ }
22102
22128
  const [firstIndex, middleIndex, lastIndex] = [
22103
22129
  0,
22104
22130
  Math.floor(imageIds.length / 2),
@@ -22133,6 +22159,19 @@ function _determineDataType(imageIds, volumeMetadata) {
22133
22159
  throw new Error(`Bits allocated of ${BitsAllocated} is not defined to generate scalarData for the volume.`);
22134
22160
  }
22135
22161
  }
22162
+ function _getDataTypeFromCache(imageIds) {
22163
+ const indices = [0, Math.floor(imageIds.length / 2), imageIds.length - 1];
22164
+ const images = indices.map((i) => _cache_cache__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Ay.getImage(imageIds[i]));
22165
+ if (!images.every(Boolean)) {
22166
+ return null;
22167
+ }
22168
+ const constructorName = images[0].getPixelData().constructor.name;
22169
+ if (images.every((img) => img.getPixelData().constructor.name === constructorName) &&
22170
+ constructorName in constructorToTypedArray) {
22171
+ return constructorToTypedArray[constructorName];
22172
+ }
22173
+ return null;
22174
+ }
22136
22175
 
22137
22176
 
22138
22177
 
@@ -54877,7 +54916,7 @@ function vtkOpenGLTexture(publicAPI, model) {
54877
54916
  }
54878
54917
  return result;
54879
54918
  };
54880
- publicAPI.useHalfFloat = () => model.enableHalfFloat && model.canUseHalfFloat;
54919
+ publicAPI.useHalfFloat = () => model.enableUseHalfFloat && model.canUseHalfFloat;
54881
54920
 
54882
54921
  //----------------------------------------------------------------------------
54883
54922
  publicAPI.setInternalFormat = iFormat => {
@@ -55511,18 +55550,21 @@ function vtkOpenGLTexture(publicAPI, model) {
55511
55550
  }
55512
55551
  function setCanUseHalfFloat(dataType, offset, scale, preferSizeOverAccuracy) {
55513
55552
  publicAPI.getOpenGLDataType(dataType);
55553
+
55554
+ // Don't consider halfFloat and convert back to Float when the range of data does not generate an accurate halfFloat
55555
+ // AND it is not preferable to have a smaller texture than an exact texture.
55556
+ const isExactHalfFloat = hasExactHalfFloat(offset, scale) || preferSizeOverAccuracy;
55514
55557
  let useHalfFloat = false;
55515
55558
  if (model._openGLRenderWindow.getWebgl2()) {
55516
- useHalfFloat = model.openGLDataType === model.context.HALF_FLOAT;
55559
+ // If OES_texture_float_linear is not available, and using a half float would still be exact, force half floats
55560
+ // This is because half floats are always texture filterable in webgl2, while full *32F floats are not (unless the extension is present)
55561
+ const forceHalfFloat = model.openGLDataType === model.context.FLOAT && model.context.getExtension('OES_texture_float_linear') === null && isExactHalfFloat;
55562
+ useHalfFloat = forceHalfFloat || model.openGLDataType === model.context.HALF_FLOAT;
55517
55563
  } else {
55518
55564
  const halfFloatExt = model.context.getExtension('OES_texture_half_float');
55519
55565
  useHalfFloat = halfFloatExt && model.openGLDataType === halfFloatExt.HALF_FLOAT_OES;
55520
55566
  }
55521
-
55522
- // Don't consider halfFloat and convert back to Float when the range of data does not generate an accurate halfFloat
55523
- // AND it is not preferable to have a smaller texture than an exact texture.
55524
- const isHalfFloat = useHalfFloat && (hasExactHalfFloat(offset, scale) || preferSizeOverAccuracy);
55525
- model.canUseHalfFloat = isHalfFloat;
55567
+ model.canUseHalfFloat = useHalfFloat && isExactHalfFloat;
55526
55568
  }
55527
55569
  function processDataArray(dataArray, preferSizeOverAccuracy) {
55528
55570
  const numComps = dataArray.getNumberOfComponents();
@@ -283,8 +283,8 @@ const SOPClassHandlerId = `${id}.sopClassHandlerModule.${SOPClassHandlerName}`;
283
283
 
284
284
  // EXTERNAL MODULE: ../../../node_modules/react/index.js
285
285
  var react = __webpack_require__(86326);
286
- // EXTERNAL MODULE: ../../core/src/index.ts + 71 modules
287
- var src = __webpack_require__(29463);
286
+ // EXTERNAL MODULE: ../../core/src/index.ts + 72 modules
287
+ var src = __webpack_require__(80818);
288
288
  // EXTERNAL MODULE: ../../../node_modules/dcmjs/build/dcmjs.es.js
289
289
  var dcmjs_es = __webpack_require__(5842);
290
290
  ;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-rt/src/loadRTStruct.js
@@ -399,7 +399,8 @@ async function loadRTStruct(extensionManager, rtStructDisplaySet, headers) {
399
399
  StructureSetLabel: instance.StructureSetLabel,
400
400
  SeriesInstanceUID: instance.SeriesInstanceUID,
401
401
  ROIContours: [],
402
- visible: true
402
+ visible: true,
403
+ ReferencedSOPInstanceUIDsSet: new Set()
403
404
  };
404
405
  for (let i = 0; i < ROIContourSequence.length; i++) {
405
406
  const ROIContour = ROIContourSequence[i];
@@ -416,7 +417,8 @@ async function loadRTStruct(extensionManager, rtStructDisplaySet, headers) {
416
417
  const {
417
418
  ContourData,
418
419
  NumberOfContourPoints,
419
- ContourGeometricType
420
+ ContourGeometricType,
421
+ ContourImageSequence
420
422
  } = ContourSequenceArray[c];
421
423
  let isSupported = false;
422
424
  const points = [];
@@ -442,6 +444,9 @@ async function loadRTStruct(extensionManager, rtStructDisplaySet, headers) {
442
444
  type: ContourGeometricType,
443
445
  isSupported
444
446
  });
447
+ if (ContourImageSequence?.ReferencedSOPInstanceUID) {
448
+ structureSet.ReferencedSOPInstanceUIDsSet.add(ContourImageSequence?.ReferencedSOPInstanceUID);
449
+ }
445
450
  }
446
451
  _setROIContourMetadata(structureSet, StructureSetROISequence, RTROIObservationsSequence, ROIContour, contourPoints, isSupported);
447
452
  }
@@ -731,7 +736,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
731
736
 
732
737
 
733
738
  const Component = /*#__PURE__*/react.lazy(() => {
734
- return __webpack_require__.e(/* import() */ 3121).then(__webpack_require__.bind(__webpack_require__, 23121));
739
+ return Promise.all(/* import() */[__webpack_require__.e(3900), __webpack_require__.e(1436), __webpack_require__.e(3334), __webpack_require__.e(5630), __webpack_require__.e(1185), __webpack_require__.e(4438)]).then(__webpack_require__.bind(__webpack_require__, 23121));
735
740
  });
736
741
  const OHIFCornerstoneRTViewport = props => {
737
742
  return /*#__PURE__*/react.createElement(react.Suspense, {
@@ -12,8 +12,8 @@ __webpack_require__.d(__webpack_exports__, {
12
12
  "default": () => (/* binding */ tmtv_src)
13
13
  });
14
14
 
15
- // EXTERNAL MODULE: ../../core/src/index.ts + 71 modules
16
- var src = __webpack_require__(29463);
15
+ // EXTERNAL MODULE: ../../core/src/index.ts + 72 modules
16
+ var src = __webpack_require__(80818);
17
17
  ;// CONCATENATED MODULE: ../../../modes/tmtv/src/initToolGroups.js
18
18
  const toolGroupIds = {
19
19
  CT: 'ctToolGroup',
@@ -632,7 +632,7 @@ function modeFactory({
632
632
  minValue: 'Minimum Value',
633
633
  maxValue: 'Maximum Value',
634
634
  meanValue: 'Mean Value',
635
- volume: 'Volume',
635
+ volume: 'Volume (ml)',
636
636
  suvPeak: 'SUV Peak',
637
637
  suvMax: 'Maximum SUV',
638
638
  suvMaxIJK: 'SUV Max IJK',
@@ -20,8 +20,8 @@ var index_esm = __webpack_require__(81980);
20
20
  var esm = __webpack_require__(55139);
21
21
  // EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js
22
22
  var dist_esm = __webpack_require__(81985);
23
- // EXTERNAL MODULE: ../../core/src/index.ts + 71 modules
24
- var src = __webpack_require__(29463);
23
+ // EXTERNAL MODULE: ../../core/src/index.ts + 72 modules
24
+ var src = __webpack_require__(80818);
25
25
  // EXTERNAL MODULE: ../../ui/src/index.js + 690 modules
26
26
  var ui_src = __webpack_require__(35647);
27
27
  // EXTERNAL MODULE: ../../../extensions/cornerstone/src/state.ts