@ohif/app 3.9.0 → 3.9.2

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 (38) hide show
  1. package/dist/{1185.bundle.a6e220f00576d6926fe7.js → 1185.bundle.d328aabb2b43e9ea1f96.js} +62 -14
  2. package/dist/{1266.bundle.8fd38b710e91305721e5.js → 1266.bundle.46de27eda2ef1fce1243.js} +5 -0
  3. package/dist/{1436.bundle.773756cd51b69e887bac.js → 1436.bundle.27ae9c87e9fc7f52cad3.js} +234 -63
  4. package/dist/{1927.bundle.49539e3ab5b0aad1399c.js → 1927.bundle.2b2fa0b539d6ac5b0dc3.js} +1 -1
  5. package/dist/{3200.bundle.45b19ea468d6208f0e7e.js → 3200.bundle.ccb809fb554332d9a0f5.js} +62 -9
  6. package/dist/{149.bundle.b8d177954628f4631fc0.js → 3900.bundle.3937999d1ee1f391647a.js} +46 -7
  7. package/dist/{4571.bundle.3b1691730b3c57bf4d35.js → 4571.bundle.a37be49663df2f4a2c8a.js} +99 -89
  8. package/dist/{5247.bundle.03fa8aac71d4e597d708.js → 5247.bundle.1a1d7c27de482e4a73f3.js} +2 -2
  9. package/dist/{5252.bundle.5ec502c53a9cc877ed8d.js → 5252.bundle.f2675336275573a288d5.js} +13 -1
  10. package/dist/{1520.bundle.fde5eb31364855194519.js → 5630.bundle.1bd2402f37597078c1a1.js} +70 -59
  11. package/dist/{5717.bundle.848e13f256818475f57f.js → 5717.bundle.32836c212103dbbe8e4a.js} +247 -64
  12. package/dist/{7197.bundle.db0d51e5529d88a4cd7f.js → 7197.bundle.42a975bb7ae4a8df2d00.js} +2 -2
  13. package/dist/{7955.bundle.699bffabae3a9915c326.js → 7955.bundle.f6c5edb284bdf8b80f2a.js} +1 -1
  14. package/dist/{8228.bundle.55ac03d7165248f47d4e.js → 8228.bundle.0a7997d04c82dd8c11c5.js} +2 -2
  15. package/dist/{8523.bundle.648334132159465cdc41.js → 8523.bundle.c0ec85de98ba380ebeb4.js} +55 -13
  16. package/dist/{9551.bundle.13a3eec1e003a46095bc.js → 9551.bundle.63b2679dd7beee6396d8.js} +1 -1
  17. package/dist/{app.bundle.8e454976c3d4c3348750.js → app.bundle.632bc6188462e1c95a41.js} +156 -89
  18. package/dist/app.bundle.css +2 -2
  19. package/dist/index.html +1 -1
  20. package/dist/{polySeg.bundle.b79ae514989e86301c71.js → polySeg.bundle.6e85073e3abf2e6e6078.js} +1 -1
  21. package/dist/serve.json +1 -10
  22. package/dist/{suv-peak-worker.bundle.76dd4fdf82aaa2c3ad41.js → suv-peak-worker.bundle.1f483dc7131d7c26b517.js} +3 -3
  23. package/dist/sw.js +1 -1
  24. package/package.json +19 -19
  25. /package/dist/{1374.bundle.f56c07364d8f6ed2d00e.js → 1374.bundle.1ee8326c0748c7b1a7c0.js} +0 -0
  26. /package/dist/{213.bundle.38caad239bcfec1d28fb.js → 213.bundle.8c04fecea2e3796e4d73.js} +0 -0
  27. /package/dist/{2424.bundle.c7b6d3475da1ffff744b.js → 2424.bundle.38b19314ebd984c9d393.js} +0 -0
  28. /package/dist/{2825.bundle.ba60e0011bcebdf7a413.js → 2825.bundle.0307cae794e8b057c674.js} +0 -0
  29. /package/dist/{3198.bundle.9b80ca2f1d99a7f9a4fe.js → 3198.bundle.ab612063af0d67397377.js} +0 -0
  30. /package/dist/{4834.bundle.4bfa1bd1d4a163de3350.js → 4834.bundle.c25348524be5214e90d6.js} +0 -0
  31. /package/dist/{5139.bundle.b185b1df3847a2025829.js → 5139.bundle.db30dc02cf41e91c8985.js} +0 -0
  32. /package/dist/{5687.bundle.3a558ac2eb26f5295668.js → 5687.bundle.05de4787676bf79f9906.js} +0 -0
  33. /package/dist/{717.bundle.62437bfeb54f01269abe.js → 717.bundle.3a4b8835adf03e4554c7.js} +0 -0
  34. /package/dist/{8008.bundle.1ab47eccf7608fe14e92.js → 8008.bundle.d4187a30e8f656a21316.js} +0 -0
  35. /package/dist/{8259.bundle.4385bd89c3f7f4ced27c.js → 8259.bundle.990db2fa9ce0800319e9.js} +0 -0
  36. /package/dist/{8558.bundle.3b0654ad2a52ac9786dd.js → 8558.bundle.63714e2329c22c9cb9da.js} +0 -0
  37. /package/dist/{9611.bundle.767595c93877e5166c03.js → 9611.bundle.78a4ffb439f65cfd0379.js} +0 -0
  38. /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
 
@@ -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();
@@ -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',