@ohif/app 3.14.0-beta.55 → 3.14.0-beta.56

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 (37) hide show
  1. package/dist/{9187.bundle.47a04a89.js → 1283.bundle.56abacf4.js} +162 -137
  2. package/dist/{4262.bundle.0c550b7f.js → 1558.bundle.03d5783b.js} +36 -11
  3. package/dist/{1566.bundle.8d90bb15.js → 1566.bundle.e9f5d851.js} +5 -1
  4. package/dist/{1645.bundle.65cff869.js → 1645.bundle.618a2886.js} +700 -389
  5. package/dist/{1724.bundle.b4757283.js → 1724.bundle.59b20c59.js} +1184 -1139
  6. package/dist/{1788.bundle.5b78672d.js → 1788.bundle.3f1349d2.js} +101 -43
  7. package/dist/1975.bundle.53cf5d7c.js +8216 -0
  8. package/dist/{5922.bundle.46b3e037.js → 2894.bundle.db3f8686.js} +240 -151
  9. package/dist/{6567.bundle.cc57e572.js → 3044.bundle.039294b9.js} +105 -76
  10. package/dist/{3386.bundle.7665dd43.js → 3386.bundle.a9fd7dfd.js} +92 -23
  11. package/dist/{4004.bundle.da822fd2.js → 4018.bundle.48c288e5.js} +128 -253
  12. package/dist/{2894.bundle.d612efb2.js → 513.bundle.9c0548cf.js} +1 -1
  13. package/dist/{5143.bundle.62bcf4ee.js → 5143.bundle.67167d39.js} +219 -147
  14. package/dist/{5895.bundle.b4892e1b.js → 5320.bundle.0c7b2cb7.js} +1473 -617
  15. package/dist/{5383.bundle.d393d2f5.js → 5383.bundle.79243338.js} +26 -4
  16. package/dist/{4324.bundle.8645d6b4.js → 5888.bundle.cd717f42.js} +1364 -8004
  17. package/dist/{8128.bundle.2afe5a05.js → 5914.bundle.00f408d2.js} +419 -49
  18. package/dist/{1284.bundle.a489bd1d.js → 5989.bundle.f8096a4e.js} +1175 -616
  19. package/dist/{6255.bundle.ee378f1c.js → 6255.bundle.521051c1.js} +42 -18
  20. package/dist/{829.bundle.e60fee3a.js → 641.bundle.4627a8e1.js} +472 -483
  21. package/dist/{1568.bundle.474a5a93.js → 9187.bundle.237037e4.js} +1 -1
  22. package/dist/{6711.bundle.baba2ccd.js → 9232.bundle.3b0caf8e.js} +10 -10
  23. package/dist/{1895.bundle.923d0bd4.js → 9620.bundle.67375c83.js} +82 -24
  24. package/dist/{app.bundle.3a861c86.js → app.bundle.5a277c45.js} +44 -44
  25. package/dist/{compute.bundle.caab94e6.js → compute.bundle.a8f26c49.js} +10 -10
  26. package/dist/index.html +1 -1
  27. package/dist/{interpolation.bundle.eed65b60.js → interpolation.bundle.aef2f614.js} +5 -5
  28. package/dist/{polySeg.bundle.34a58c4f.js → polySeg.bundle.ba052ac3.js} +11 -11
  29. package/dist/static/wasm/{27ff970b98.module.wasm → 0e14aeab30.module.wasm} +0 -0
  30. package/dist/static/wasm/58a146bc8c.module.wasm +0 -0
  31. package/dist/static/wasm/99a2672e64.module.wasm +0 -0
  32. package/dist/static/wasm/{11f8dc2413.module.wasm → d8b213f3ea.module.wasm} +0 -0
  33. package/dist/sw.js +1 -1
  34. package/package.json +6 -6
  35. package/dist/0.bundle.485115b4.js +0 -4498
  36. package/dist/static/wasm/58769f1d7d.module.wasm +0 -0
  37. /package/dist/{1895.bundle.css → 9620.bundle.css} +0 -0
@@ -1,4 +1,4 @@
1
- (globalThis["rspackChunk_ohif_app"] ||= []).push([[9187], {
1
+ (globalThis["rspackChunk_ohif_app"] ||= []).push([[1283], {
2
2
  80874(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
3
3
  "use strict";
4
4
  /**
@@ -37316,6 +37316,7 @@ class PlanarLegacyCompatibilityController {
37316
37316
  constructor(host) {
37317
37317
  this.host = host;
37318
37318
  this.managedDataIds = new Set();
37319
+ this.mountingDataIds = new Set();
37319
37320
  this.volumeDataIds = new Map();
37320
37321
  this.stackSetRequestId = 0;
37321
37322
  this.properties = new Map();
@@ -37525,6 +37526,9 @@ class PlanarLegacyCompatibilityController {
37525
37526
  return Math.max(this.host.getImageCount(), this.host.getMaxImageIdIndex() + 1);
37526
37527
  }
37527
37528
  removeData(dataId) {
37529
+ if (this.mountingDataIds.has(dataId)) {
37530
+ return;
37531
+ }
37528
37532
  if (!this.managedDataIds.delete(dataId)) {
37529
37533
  return;
37530
37534
  }
@@ -37594,18 +37598,24 @@ class PlanarLegacyCompatibilityController {
37594
37598
  orientation: this.host.getRequestedOrientation(),
37595
37599
  };
37596
37600
  const existingSourceDataId = this.host.getActiveDataId();
37597
- await this.host.setDisplaySets(...dataIds.map((dataId, index) => {
37598
- const shouldMountAsSource = index === 0 && (replaceExisting || !existingSourceDataId);
37599
- return {
37600
- displaySetId: dataId,
37601
- options: {
37602
- ...sharedOptions,
37603
- role: shouldMountAsSource
37604
- ? 'source'
37605
- : 'overlay',
37606
- },
37607
- };
37608
- }));
37601
+ dataIds.forEach((dataId) => this.mountingDataIds.add(dataId));
37602
+ try {
37603
+ await this.host.setDisplaySets(...dataIds.map((dataId, index) => {
37604
+ const shouldMountAsSource = index === 0 && (replaceExisting || !existingSourceDataId);
37605
+ return {
37606
+ displaySetId: dataId,
37607
+ options: {
37608
+ ...sharedOptions,
37609
+ role: shouldMountAsSource
37610
+ ? 'source'
37611
+ : 'overlay',
37612
+ },
37613
+ };
37614
+ }));
37615
+ }
37616
+ finally {
37617
+ dataIds.forEach((dataId) => this.mountingDataIds.delete(dataId));
37618
+ }
37609
37619
  volumeInputArray.forEach((volumeInput, index) => {
37610
37620
  const dataId = dataIds[index];
37611
37621
  if (volumeInput.visibility !== undefined) {
@@ -40729,6 +40739,8 @@ function adjustInitialViewUp(initialViewUp, flipHorizontal, flipVertical, viewPl
40729
40739
  return adjustedInitialViewUp;
40730
40740
  }
40731
40741
 
40742
+ // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/core/dist/esm/utilities/getNormalizedAspectRatio.js
40743
+ var getNormalizedAspectRatio = __webpack_require__(47232);
40732
40744
  // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/helpers/isContextPoolRenderingEngine.js
40733
40745
  var isContextPoolRenderingEngine = __webpack_require__(45413);
40734
40746
  // EXTERNAL MODULE: ../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/renderPasses/index.js + 3 modules
@@ -40782,6 +40794,7 @@ var RenderingEngine_renderPasses = __webpack_require__(82484);
40782
40794
 
40783
40795
 
40784
40796
 
40797
+
40785
40798
 
40786
40799
 
40787
40800
  const log = logger.coreLog.getLogger('RenderingEngine', 'StackViewport');
@@ -40970,7 +40983,7 @@ class StackViewport extends Viewport/* ["default"] */.A {
40970
40983
  const distance = vtkCamera.getDistance();
40971
40984
  vtkCamera.setClippingRange(distance, distance + 0.1);
40972
40985
  const devicePixelRatio = window.devicePixelRatio || 1;
40973
- const { width, height } = this.canvas;
40986
+ const { width, height } = this.getRenderedCanvasSize();
40974
40987
  const aspectRatio = width / height;
40975
40988
  const canvasPosWithDPR = [
40976
40989
  canvasPos[0] * devicePixelRatio,
@@ -41021,7 +41034,7 @@ class StackViewport extends Viewport/* ["default"] */.A {
41021
41034
  const distance = vtkCamera.getDistance();
41022
41035
  vtkCamera.setClippingRange(distance, distance + 0.1);
41023
41036
  const devicePixelRatio = window.devicePixelRatio || 1;
41024
- const { width, height } = this.canvas;
41037
+ const { width, height } = this.getRenderedCanvasSize();
41025
41038
  const aspectRatio = width / height;
41026
41039
  const viewCoords = renderer.worldToView(worldPos[0], worldPos[1], worldPos[2]);
41027
41040
  const projCoords = renderer.viewToProjection(viewCoords[0], viewCoords[1], viewCoords[2], aspectRatio);
@@ -41161,13 +41174,12 @@ class StackViewport extends Viewport/* ["default"] */.A {
41161
41174
  },
41162
41175
  resetCamera: {
41163
41176
  cpu: (options = {}) => {
41164
- const { resetPan = true, resetZoom = true } = options;
41165
- this.resetCameraCPU({ resetPan, resetZoom });
41177
+ const { resetPan = true, resetZoom = true, resetAspectRatio = true, } = options;
41178
+ this.resetCameraCPU({ resetPan, resetZoom, resetAspectRatio });
41166
41179
  return true;
41167
41180
  },
41168
41181
  gpu: (options = {}) => {
41169
- const { resetPan = true, resetZoom = true, resetAspectRatio = true, } = options;
41170
- this.resetCameraGPU({ resetPan, resetZoom, resetAspectRatio });
41182
+ this.resetCameraGPU(options);
41171
41183
  return true;
41172
41184
  },
41173
41185
  },
@@ -41594,40 +41606,28 @@ class StackViewport extends Viewport/* ["default"] */.A {
41594
41606
  flipVertical: this.flipVertical,
41595
41607
  };
41596
41608
  }
41597
- setAspectRatioForViewport(aspectRatio, isFitViewportAfterStretch = true) {
41598
- const { viewport, image } = this._cpuFallbackEnabledElement;
41599
- if (!isFitViewportAfterStretch) {
41600
- viewport.aspectRatio = aspectRatio;
41601
- return;
41602
- }
41609
+ setAspectRatioForViewport(aspectRatio) {
41610
+ const { viewport } = this._cpuFallbackEnabledElement;
41611
+ viewport.aspectRatio = aspectRatio;
41612
+ }
41613
+ getFitParallelScaleCPU(ratioValue) {
41614
+ const { image } = this._cpuFallbackEnabledElement;
41603
41615
  const { clientWidth, clientHeight } = this.element;
41604
41616
  const { rowPixelSpacing, columnPixelSpacing, width, height } = image;
41605
- const getRatioValue = ([x, y]) => x / y;
41606
- const oldRatioValue = getRatioValue(viewport.aspectRatio || [1, 1]);
41607
- const newRatioValue = getRatioValue(aspectRatio);
41608
41617
  const canvasRatio = clientWidth / clientHeight;
41609
41618
  const baseHeight = clientHeight * rowPixelSpacing * 0.5;
41610
- const calculateFitParallelScale = (rVal) => {
41611
- const effectiveWidth = width * columnPixelSpacing * rVal;
41612
- const effectiveHeight = height * rowPixelSpacing;
41613
- if (effectiveWidth / effectiveHeight > canvasRatio) {
41614
- return baseHeight / (clientWidth / effectiveWidth);
41615
- }
41616
- const fitPScale = effectiveHeight * 0.5;
41617
- return rVal < 1 ? fitPScale / rVal : fitPScale;
41618
- };
41619
- const ratioFactor = calculateFitParallelScale(newRatioValue) /
41620
- calculateFitParallelScale(oldRatioValue);
41621
- viewport.aspectRatio = aspectRatio;
41622
- if (viewport.parallelScale) {
41623
- viewport.parallelScale *= ratioFactor;
41624
- viewport.scale = baseHeight / viewport.parallelScale;
41619
+ const effectiveWidth = width * columnPixelSpacing * ratioValue;
41620
+ const effectiveHeight = height * rowPixelSpacing;
41621
+ if (effectiveWidth / effectiveHeight > canvasRatio) {
41622
+ return baseHeight / (clientWidth / effectiveWidth);
41625
41623
  }
41624
+ const fitParallelScale = effectiveHeight * 0.5;
41625
+ return ratioValue < 1 ? fitParallelScale / ratioValue : fitParallelScale;
41626
41626
  }
41627
41627
  setCameraCPU(cameraInterface) {
41628
41628
  const { viewport, image } = this._cpuFallbackEnabledElement;
41629
41629
  const previousCamera = this.getCameraCPU();
41630
- const { focalPoint, parallelScale, scale, flipHorizontal, flipVertical, aspectRatio, isFitViewportAfterStretch, } = cameraInterface;
41630
+ const { focalPoint, parallelScale, scale, flipHorizontal, flipVertical, aspectRatio, } = cameraInterface;
41631
41631
  const { clientHeight } = this.element;
41632
41632
  if (focalPoint) {
41633
41633
  const focalPointCanvas = this.worldToCanvasCPU(focalPoint);
@@ -41652,7 +41652,7 @@ class StackViewport extends Viewport/* ["default"] */.A {
41652
41652
  viewport.parallelScale = (clientHeight * rowPixelSpacing * 0.5) / scale;
41653
41653
  }
41654
41654
  if (aspectRatio) {
41655
- this.setAspectRatioForViewport(aspectRatio, isFitViewportAfterStretch);
41655
+ this.setAspectRatioForViewport(aspectRatio);
41656
41656
  }
41657
41657
  if (flipHorizontal !== undefined || flipVertical !== undefined) {
41658
41658
  this.setFlipCPU({ flipHorizontal, flipVertical });
@@ -41690,7 +41690,8 @@ class StackViewport extends Viewport/* ["default"] */.A {
41690
41690
  const { aspectRatio } = this.getCameraCPU();
41691
41691
  return aspectRatio ?? this.options?.aspectRatio ?? [1, 1];
41692
41692
  }
41693
- setAspectRatioCPU(value, isFitViewportAfterStretch = true, storeAsInitialCamera = false) {
41693
+ setAspectRatioCPU(value, options = {}) {
41694
+ const { fit = false, storeAsInitialCamera = false } = options;
41694
41695
  const camera = this.getCameraCPU();
41695
41696
  if (storeAsInitialCamera) {
41696
41697
  this.options.aspectRatio = value;
@@ -41698,8 +41699,14 @@ class StackViewport extends Viewport/* ["default"] */.A {
41698
41699
  this.setCameraCPU({
41699
41700
  ...camera,
41700
41701
  aspectRatio: value,
41701
- isFitViewportAfterStretch,
41702
41702
  });
41703
+ if (fit) {
41704
+ this.resetCameraCPU({
41705
+ resetPan: false,
41706
+ resetZoom: true,
41707
+ resetAspectRatio: false,
41708
+ });
41709
+ }
41703
41710
  }
41704
41711
  setFlipCPU({ flipHorizontal, flipVertical }) {
41705
41712
  const { viewport } = this._cpuFallbackEnabledElement;
@@ -42488,19 +42495,30 @@ class StackViewport extends Viewport/* ["default"] */.A {
42488
42495
  }
42489
42496
  return imageId;
42490
42497
  }
42491
- resetCameraCPU({ resetPan = true, resetZoom = true, }) {
42498
+ resetCameraCPU({ resetPan = true, resetZoom = true, resetAspectRatio = true, }) {
42492
42499
  const { image } = this._cpuFallbackEnabledElement;
42493
42500
  if (!image) {
42494
42501
  return;
42495
42502
  }
42503
+ const targetAspectRatio = resetAspectRatio
42504
+ ? this.options?.aspectRatio || [1, 1]
42505
+ : this.getAspectRatioCPU();
42496
42506
  resetCamera(this._cpuFallbackEnabledElement, resetPan, resetZoom);
42497
- const { scale } = this._cpuFallbackEnabledElement.viewport;
42507
+ let { scale } = this._cpuFallbackEnabledElement.viewport;
42508
+ if (resetZoom) {
42509
+ const [stretchX, stretchY] = (0,getNormalizedAspectRatio/* .getNormalizedAspectRatio */.x)(targetAspectRatio);
42510
+ const stretchRatio = stretchX / stretchY;
42511
+ scale /=
42512
+ this.getFitParallelScaleCPU(stretchRatio) /
42513
+ this.getFitParallelScaleCPU(1);
42514
+ }
42498
42515
  const { clientWidth, clientHeight } = this.element;
42499
42516
  const center = [clientWidth / 2, clientHeight / 2];
42500
42517
  const centerWorld = this.canvasToWorldCPU(center);
42501
42518
  this.setCameraCPU({
42502
42519
  focalPoint: centerWorld,
42503
42520
  scale,
42521
+ aspectRatio: targetAspectRatio,
42504
42522
  });
42505
42523
  }
42506
42524
  resetCameraGPU(resetOptions) {
@@ -43195,12 +43213,18 @@ class VolumeViewport extends BaseVolumeViewport/* ["default"] */.A {
43195
43213
  }
43196
43214
  }
43197
43215
  resetCamera(options) {
43198
- const { resetPan = true, resetZoom = true, resetRotation = true, resetToCenter = true, suppressEvents = false, resetOrientation = true, resetAspectRatio = true, } = options || {};
43216
+ const { resetPan = true, resetZoom = true, resetRotation = true, resetToCenter = true, suppressEvents = false, resetOrientation = true, resetAspectRatio = true, storeAsInitialCamera = true, } = options || {};
43199
43217
  const { orientation } = this.viewportProperties;
43200
43218
  if (orientation && resetOrientation) {
43201
43219
  this.applyViewOrientation(orientation, false);
43202
43220
  }
43203
- super.resetCamera({ resetPan, resetZoom, resetToCenter, resetAspectRatio });
43221
+ super.resetCamera({
43222
+ resetPan,
43223
+ resetZoom,
43224
+ resetToCenter,
43225
+ resetAspectRatio,
43226
+ storeAsInitialCamera,
43227
+ });
43204
43228
  const activeCamera = this.getVtkActiveCamera();
43205
43229
  const viewPlaneNormal = activeCamera.getViewPlaneNormal();
43206
43230
  const focalPoint = activeCamera.getFocalPoint();
@@ -43494,8 +43518,14 @@ class VolumeViewport3D extends _BaseVolumeViewport_js__rspack_import_6/* ["defau
43494
43518
  isInAcquisitionPlane() {
43495
43519
  return false;
43496
43520
  }
43497
- resetCamera({ resetPan = true, resetZoom = true, resetToCenter = true, } = {}) {
43498
- super.resetCamera({ resetPan, resetZoom, resetToCenter });
43521
+ resetCamera({ resetPan = true, resetZoom = true, resetToCenter = true, resetAspectRatio = true, storeAsInitialCamera = true, } = {}) {
43522
+ super.resetCamera({
43523
+ resetPan,
43524
+ resetZoom,
43525
+ resetToCenter,
43526
+ resetAspectRatio,
43527
+ storeAsInitialCamera,
43528
+ });
43499
43529
  const activeCamera = this.getVtkActiveCamera();
43500
43530
  if (activeCamera.getParallelProjection()) {
43501
43531
  activeCamera.setClippingRange(-_constants_index_js__rspack_import_0.RENDERING_DEFAULTS.MAXIMUM_RAY_DISTANCE, _constants_index_js__rspack_import_0.RENDERING_DEFAULTS.MAXIMUM_RAY_DISTANCE);
@@ -47268,12 +47298,6 @@ function extendedVtkCamera(publicAPI, model) {
47268
47298
  }
47269
47299
  return matrix;
47270
47300
  };
47271
- publicAPI.getAspectRatio = () => {
47272
- return model.aspectRatio;
47273
- };
47274
- publicAPI.setAspectRatio = (aspectRatio) => {
47275
- model.aspectRatio = aspectRatio;
47276
- };
47277
47301
  }
47278
47302
  const DEFAULT_VALUES = {
47279
47303
  aspectRatio: [1, 1],
@@ -58620,16 +58644,24 @@ __webpack_require__.d(__webpack_exports__, {
58620
58644
  /* import */ var _cache_cache_js__rspack_import_0 = __webpack_require__(73998);
58621
58645
  /* import */ var _constants_index_js__rspack_import_1 = __webpack_require__(62851);
58622
58646
  /* import */ var _getSpacingInNormalDirection_js__rspack_import_2 = __webpack_require__(1680);
58623
- /* import */ var _loaders_volumeLoader_js__rspack_import_3 = __webpack_require__(66441);
58624
- /* import */ var _getVolumeId_js__rspack_import_4 = __webpack_require__(65237);
58647
+ /* import */ var _voxelSlab_getVoxelThicknessAlongNormal_js__rspack_import_3 = __webpack_require__(61761);
58648
+ /* import */ var _init_js__rspack_import_4 = __webpack_require__(90934);
58649
+ /* import */ var _loaders_volumeLoader_js__rspack_import_5 = __webpack_require__(66441);
58650
+ /* import */ var _getVolumeId_js__rspack_import_6 = __webpack_require__(65237);
58651
+ /* import */ var _logger_js__rspack_import_7 = __webpack_require__(34040);
58625
58652
 
58626
58653
 
58627
58654
 
58628
58655
 
58629
58656
 
58657
+
58658
+
58659
+
58660
+ const sliceStepLog = _logger_js__rspack_import_7.coreLog.getLogger('utilities', 'getTargetVolumeAndSpacingInNormalDir');
58661
+ let lastSliceStepLine = '';
58630
58662
  const EPSILON_PART = 1 + _constants_index_js__rspack_import_1.EPSILON;
58631
58663
  const startsWith = (str, starts) => starts === str.substring(0, Math.min(str.length, starts.length));
58632
- const isPrimaryVolume = (volume) => !!(0,_loaders_volumeLoader_js__rspack_import_3.getVolumeLoaderSchemes)().find((scheme) => startsWith(volume.volumeId, scheme));
58664
+ const isPrimaryVolume = (volume) => !!(0,_loaders_volumeLoader_js__rspack_import_5.getVolumeLoaderSchemes)().find((scheme) => startsWith(volume.volumeId, scheme));
58633
58665
  function getTargetVolumeAndSpacingInNormalDir(viewport, camera, targetId, useSlabThickness = false) {
58634
58666
  const { viewPlaneNormal } = camera;
58635
58667
  const volumeActors = viewport.getActors();
@@ -58647,7 +58679,7 @@ function getTargetVolumeAndSpacingInNormalDir(viewport, camera, targetId, useSla
58647
58679
  })
58648
58680
  .filter((iv) => !!iv);
58649
58681
  if (targetId) {
58650
- const targetVolumeId = (0,_getVolumeId_js__rspack_import_4/* .getVolumeId */.A)(targetId);
58682
+ const targetVolumeId = (0,_getVolumeId_js__rspack_import_6/* .getVolumeId */.A)(targetId);
58651
58683
  const imageVolumeIndex = imageVolumes.findIndex((iv) => targetVolumeId.includes(iv.volumeId));
58652
58684
  const imageVolume = imageVolumes[imageVolumeIndex];
58653
58685
  const { uid: actorUID } = volumeActors[imageVolumeIndex];
@@ -58684,10 +58716,31 @@ function getTargetVolumeAndSpacingInNormalDir(viewport, camera, targetId, useSla
58684
58716
  }
58685
58717
  function getSpacingInNormal(imageVolume, viewPlaneNormal, viewport, useSlabThickness = false) {
58686
58718
  const slabThickness = viewport.getProperties?.()?.slabThickness;
58687
- if (slabThickness && useSlabThickness) {
58688
- return slabThickness;
58719
+ const measure = (0,_init_js__rspack_import_4/* .getConfiguration */.D0)().rendering?.sliceStepMeasure;
58720
+ const geometric = measure === 'l1'
58721
+ ? (0,_voxelSlab_getVoxelThicknessAlongNormal_js__rspack_import_3/* ["default"] */.A)(imageVolume, viewPlaneNormal)
58722
+ : (0,_getSpacingInNormalDirection_js__rspack_import_2/* ["default"] */.A)(imageVolume, viewPlaneNormal);
58723
+ const used = slabThickness && useSlabThickness ? slabThickness : geometric;
58724
+ if ((sliceStepLog.getLevel?.() ?? 5) <= 1) {
58725
+ const l1 = (0,_voxelSlab_getVoxelThicknessAlongNormal_js__rspack_import_3/* ["default"] */.A)(imageVolume, viewPlaneNormal);
58726
+ const l2 = (0,_getSpacingInNormalDirection_js__rspack_import_2/* ["default"] */.A)(imageVolume, viewPlaneNormal);
58727
+ if (Math.abs(l1 - l2) > 1e-6 * Math.max(l1, l2)) {
58728
+ const line = `slice step [${viewport?.id}] measure=${measure ?? 'l2'} ` +
58729
+ `used=${used.toFixed(4)} l1=${l1.toFixed(4)} l2=${l2.toFixed(4)} ` +
58730
+ `l1/l2=${(l1 / l2).toFixed(4)} ` +
58731
+ `fromSlabThickness=${Boolean(slabThickness && useSlabThickness)}`;
58732
+ if (line !== lastSliceStepLine) {
58733
+ lastSliceStepLine = line;
58734
+ sliceStepLog.debug(line, {
58735
+ slabThickness,
58736
+ useSlabThickness,
58737
+ viewPlaneNormal,
58738
+ spacing: imageVolume.spacing,
58739
+ });
58740
+ }
58741
+ }
58689
58742
  }
58690
- return (0,_getSpacingInNormalDirection_js__rspack_import_2/* ["default"] */.A)(imageVolume, viewPlaneNormal);
58743
+ return used;
58691
58744
  }
58692
58745
 
58693
58746
  __webpack_require__.d(__webpack_exports__, {
@@ -58724,6 +58777,24 @@ __webpack_require__.d(__webpack_exports__, {
58724
58777
  });
58725
58778
 
58726
58779
 
58780
+ },
58781
+ 13054(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
58782
+ "use strict";
58783
+ /* import */ var _constants_index_js__rspack_import_0 = __webpack_require__(62851);
58784
+
58785
+ function getViewSlabDepth(depth) {
58786
+ if (!Number.isFinite(depth) ||
58787
+ depth <= _constants_index_js__rspack_import_0.RENDERING_DEFAULTS.MINIMUM_SLAB_THICKNESS * 2) {
58788
+ return undefined;
58789
+ }
58790
+ return depth;
58791
+ }
58792
+
58793
+ __webpack_require__.d(__webpack_exports__, {
58794
+ A: () => (getViewSlabDepth)
58795
+ });
58796
+
58797
+
58727
58798
  },
58728
58799
  78580(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
58729
58800
  "use strict";
@@ -58934,7 +59005,7 @@ __webpack_require__.d(__webpack_exports__, {
58934
59005
  },
58935
59006
  60465(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
58936
59007
  "use strict";
58937
- /* import */ var _cornerstonejs_metadata__rspack_import_0 = __webpack_require__(34047);
59008
+ /* import */ var _cornerstonejs_metadata__rspack_import_0 = __webpack_require__(76368);
58938
59009
 
58939
59010
  /* export default */ __webpack_exports__.A = (_cornerstonejs_metadata__rspack_import_0/* .utilities.imageIdToURI */.BF.YF);
58940
59011
 
@@ -59091,7 +59162,7 @@ __webpack_require__.d(__webpack_exports__, {
59091
59162
  },
59092
59163
  15793(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
59093
59164
  "use strict";
59094
- /* import */ var _cornerstonejs_metadata__rspack_import_0 = __webpack_require__(34047);
59165
+ /* import */ var _cornerstonejs_metadata__rspack_import_0 = __webpack_require__(76368);
59095
59166
 
59096
59167
  /* export default */ __webpack_exports__.A = (_cornerstonejs_metadata__rspack_import_0/* .utilities.isVideoTransferSyntax */.BF.AR);
59097
59168
  const { /* videoUIDs */Le: videoUIDs } = _cornerstonejs_metadata__rspack_import_0/* .utilities */.BF;
@@ -59512,6 +59583,26 @@ __webpack_require__.d(__webpack_exports__, {
59512
59583
  });
59513
59584
 
59514
59585
 
59586
+ },
59587
+ 61761(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
59588
+ "use strict";
59589
+ /* import */ var gl_matrix__rspack_import_0 = __webpack_require__(50341);
59590
+
59591
+ function getVoxelThicknessAlongNormal(volume, normal) {
59592
+ const { direction, spacing } = volume;
59593
+ const iVector = direction.slice(0, 3);
59594
+ const jVector = direction.slice(3, 6);
59595
+ const kVector = direction.slice(6, 9);
59596
+ return (Math.abs(gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(iVector, normal)) * spacing[0] +
59597
+ Math.abs(gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(jVector, normal)) * spacing[1] +
59598
+ Math.abs(gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(kVector, normal)) * spacing[2]);
59599
+ }
59600
+
59601
+ __webpack_require__.d(__webpack_exports__, {
59602
+ A: () => (getVoxelThicknessAlongNormal)
59603
+ });
59604
+
59605
+
59515
59606
  },
59516
59607
  45827(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
59517
59608
  "use strict";
@@ -60472,29 +60563,17 @@ const moduleDefinitions = [
60472
60563
  ];
60473
60564
 
60474
60565
 
60475
- },
60476
- 71374(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
60477
- "use strict";
60478
- /* import */ var _cornerstonejs_utils__rspack_import_0 = __webpack_require__(20325);
60479
-
60480
-
60481
-
60482
- __webpack_require__.d(__webpack_exports__, {
60483
- IQ: () => (/* reexport safe */ _cornerstonejs_utils__rspack_import_0.IQ)
60484
- });
60485
-
60486
-
60487
60566
  },
60488
60567
  24671() {
60489
60568
  "use strict";
60490
- const version = '5.10.3';
60569
+ const version = '5.12.0';
60491
60570
 
60492
60571
 
60493
60572
  },
60494
60573
  28102(__unused_rspack___webpack_module__, __unused_rspack___webpack_exports__, __webpack_require__) {
60495
60574
  "use strict";
60496
60575
  /* import */ var _object_index_js__rspack_import_0 = __webpack_require__(33430);
60497
- /* import */ var _math_index_js__rspack_import_1 = __webpack_require__(99511);
60576
+ /* import */ var _math_index_js__rspack_import_1 = __webpack_require__(40937);
60498
60577
  /* import */ var _logging_index_js__rspack_import_2 = __webpack_require__(68272);
60499
60578
 
60500
60579
 
@@ -60554,60 +60633,6 @@ __webpack_require__.d(__webpack_exports__, {
60554
60633
  });
60555
60634
 
60556
60635
 
60557
- },
60558
- 15801(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
60559
- "use strict";
60560
- function isNumberLike(value) {
60561
- return (typeof value === 'string' ||
60562
- typeof value === 'number' ||
60563
- value instanceof String ||
60564
- value instanceof Number);
60565
- }
60566
- function isEntryWise(value) {
60567
- if (typeof value !== 'object' || value === null) {
60568
- return false;
60569
- }
60570
- return (Symbol.iterator in value ||
60571
- typeof value.length === 'number');
60572
- }
60573
- function toFiniteNumber(value, defaultValue) {
60574
- if (value === undefined || value === null) {
60575
- return defaultValue;
60576
- }
60577
- if (isNumberLike(value)) {
60578
- const converted = Number(value);
60579
- return Number.isFinite(converted) ? converted : defaultValue;
60580
- }
60581
- if (!isEntryWise(value)) {
60582
- return defaultValue;
60583
- }
60584
- return Array.from(value, (entry) => {
60585
- const converted = Number(entry);
60586
- return Number.isFinite(converted) ? converted : defaultValue;
60587
- });
60588
- }
60589
- function toNumber(val) {
60590
- if (val === undefined || val === null) {
60591
- return undefined;
60592
- }
60593
- if (isNumberLike(val)) {
60594
- return Number(val);
60595
- }
60596
- if (Array.isArray(val)) {
60597
- return val.map((entry) => Number(entry));
60598
- }
60599
- if (typeof val === 'object' && Symbol.iterator in val) {
60600
- return Array.from(val, (entry) => Number(entry));
60601
- }
60602
- return Number(val);
60603
- }
60604
- /* unused export default */ var __rspack_default_export = ((/* unused pure expression or super */ null && (toNumber)));
60605
-
60606
- __webpack_require__.d(__webpack_exports__, {
60607
- IQ: () => (toFiniteNumber)
60608
- });
60609
-
60610
-
60611
60636
  },
60612
60637
  33430() {
60613
60638
  "use strict";
@@ -60631,7 +60656,7 @@ function asArray(item) {
60631
60656
  },
60632
60657
  88253() {
60633
60658
  "use strict";
60634
- const version = '5.10.3';
60659
+ const version = '5.12.0';
60635
60660
 
60636
60661
 
60637
60662
  },
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
- (globalThis["rspackChunk_ohif_app"] ||= []).push([[4262], {
3
- 5637(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
2
+ (globalThis["rspackChunk_ohif_app"] ||= []).push([[1558], {
3
+ 65733(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
4
4
  var __defProp = Object.defineProperty;
5
5
  var __export = (target, all) => {
6
6
  for (var name in all)
@@ -518,6 +518,13 @@ var Decoder = class _Decoder {
518
518
  static MSB = 2147483648;
519
519
  static RESTART_MARKER_BEGIN = 65488;
520
520
  static RESTART_MARKER_END = 65495;
521
+ // Value `markerIndex` takes once the 0xFF that introduces a marker has been
522
+ // shifted into `temp`. Only `!== 0` is ever tested - see `readPastEntropyData`
523
+ // for what the bit count itself means.
524
+ static MARKER_SEEN = 9;
525
+ // How many bits of `temp` that 0xFF occupies. Bits below it are the marker,
526
+ // not entropy coded data.
527
+ static MARKER_BITS = 8;
521
528
  buffer = null;
522
529
  stream = null;
523
530
  frame = new FrameHeader();
@@ -924,7 +931,7 @@ var Decoder = class _Decoder {
924
931
  if (input === 255) {
925
932
  this.marker = this.stream.get8();
926
933
  if (this.marker !== 0) {
927
- this.markerIndex = 9;
934
+ this.markerIndex = _Decoder.MARKER_SEEN;
928
935
  }
929
936
  }
930
937
  temp[0] |= input;
@@ -943,7 +950,7 @@ var Decoder = class _Decoder {
943
950
  if (input === 255) {
944
951
  this.marker = this.stream.get8();
945
952
  if (this.marker !== 0) {
946
- this.markerIndex = 9;
953
+ this.markerIndex = _Decoder.MARKER_SEEN;
947
954
  }
948
955
  }
949
956
  temp[0] |= input;
@@ -954,7 +961,7 @@ var Decoder = class _Decoder {
954
961
  if (index[0] < 0) {
955
962
  throw new Error("index=" + index[0] + " temp=" + temp[0] + " code=" + code + " in HuffmanValue()");
956
963
  }
957
- if (index[0] < this.markerIndex) {
964
+ if (this.readPastEntropyData(index)) {
958
965
  this.markerIndex = 0;
959
966
  return 65280 | this.marker;
960
967
  }
@@ -980,7 +987,7 @@ var Decoder = class _Decoder {
980
987
  }
981
988
  index[0] -= n;
982
989
  if (index[0] >= 0) {
983
- if (index[0] < this.markerIndex && !this.isLastPixel()) {
990
+ if (this.readPastEntropyData(index)) {
984
991
  this.markerIndex = 0;
985
992
  return (65280 | this.marker) << 8;
986
993
  }
@@ -992,7 +999,7 @@ var Decoder = class _Decoder {
992
999
  if (input === 255) {
993
1000
  this.marker = this.stream.get8();
994
1001
  if (this.marker !== 0) {
995
- this.markerIndex = 9;
1002
+ this.markerIndex = _Decoder.MARKER_SEEN;
996
1003
  }
997
1004
  }
998
1005
  temp[0] |= input;
@@ -1007,7 +1014,7 @@ var Decoder = class _Decoder {
1007
1014
  if (input === 255) {
1008
1015
  this.marker = this.stream.get8();
1009
1016
  if (this.marker !== 0) {
1010
- this.markerIndex = 9;
1017
+ this.markerIndex = _Decoder.MARKER_SEEN;
1011
1018
  }
1012
1019
  }
1013
1020
  temp[0] |= input;
@@ -1016,7 +1023,7 @@ var Decoder = class _Decoder {
1016
1023
  if (index[0] < 0) {
1017
1024
  throw new Error("index=" + index[0] + " in getn()");
1018
1025
  }
1019
- if (index[0] < this.markerIndex) {
1026
+ if (this.readPastEntropyData(index)) {
1020
1027
  this.markerIndex = 0;
1021
1028
  return (65280 | this.marker) << 8;
1022
1029
  }
@@ -1057,8 +1064,26 @@ var Decoder = class _Decoder {
1057
1064
  return this.getPreviousX(compOffset);
1058
1065
  }
1059
1066
  }
1060
- isLastPixel() {
1061
- return this.xLoc === this.xDim - 1 && this.yLoc === this.yDim - 1;
1067
+ /**
1068
+ * True when the bits just consumed came out of a marker rather than out of
1069
+ * the entropy coded segment.
1070
+ *
1071
+ * `temp` holds `index` unconsumed bits (see the `getHuffmanValue` notes). The
1072
+ * moment `getHuffmanValue`/`getn` shifts in a byte that turns out to be the
1073
+ * 0xFF introducing a marker, those 8 bits stop being data: only the
1074
+ * `index - MARKER_BITS` bits above them are real, and the scan is over once
1075
+ * they run out.
1076
+ *
1077
+ * Consuming the last real bit leaves `index === MARKER_BITS`, and that is
1078
+ * still a valid decode - it is a scan whose final Huffman code ends exactly
1079
+ * on a byte boundary, so the encoder had no partial byte left to pad (T.81
1080
+ * B.1.1.2 pads only an incomplete final byte). Testing `index < markerIndex`
1081
+ * rejected that case and dropped the frame's last sample, which is what
1082
+ * DCMTK produces when a frame ends in a long run of one value: the run's
1083
+ * short codes tile the final byte exactly.
1084
+ */
1085
+ readPastEntropyData(index) {
1086
+ return this.markerIndex !== 0 && index[0] < _Decoder.MARKER_BITS;
1062
1087
  }
1063
1088
  outputSingle(PRED) {
1064
1089
  if (this.setter === null)
@@ -3455,7 +3455,7 @@ __webpack_require__.r(__webpack_exports__);
3455
3455
  /* import */ var _isPlaneDepthViewable_js__rspack_import_3 = __webpack_require__(45827);
3456
3456
  /* import */ var _iterateVoxelsInShape_js__rspack_import_4 = __webpack_require__(72960);
3457
3457
  /* import */ var _sampleVoxelsInShape_js__rspack_import_5 = __webpack_require__(98412);
3458
- /* import */ var _shapes_index_js__rspack_import_6 = __webpack_require__(1766);
3458
+ /* import */ var _shapes_index_js__rspack_import_6 = __webpack_require__(24779);
3459
3459
 
3460
3460
 
3461
3461
 
@@ -3476,17 +3476,21 @@ __webpack_require__.d(__webpack_exports__, {
3476
3476
  createPlaneBasis: () => (/* reexport safe */ _shapes_index_js__rspack_import_6.NC),
3477
3477
  createPolylineShape: () => (/* reexport safe */ _shapes_index_js__rspack_import_6.oY),
3478
3478
  createRectangleShape: () => (/* reexport safe */ _shapes_index_js__rspack_import_6.Tc),
3479
+ createUnionShape: () => (/* reexport safe */ _shapes_index_js__rspack_import_6.ZG),
3479
3480
  depthAtIndex: () => (/* reexport safe */ _indexSpaceSlab_js__rspack_import_2.xe),
3480
3481
  getAxisSteps: () => (/* reexport safe */ _shapes_index_js__rspack_import_6.NU),
3481
3482
  getDepthRun: () => (/* reexport safe */ _indexSpaceSlab_js__rspack_import_2.XT),
3482
3483
  getDisplayHalfWidth: () => (/* reexport safe */ _slabMembership_js__rspack_import_1.k),
3484
+ getFillHalfWidth: () => (/* reexport safe */ _slabMembership_js__rspack_import_1.xG),
3483
3485
  getIndexSpaceNormal: () => (/* reexport safe */ _indexSpaceSlab_js__rspack_import_2.M0),
3484
3486
  getMembershipHalfWidth: () => (/* reexport safe */ _slabMembership_js__rspack_import_1.q$),
3485
3487
  getSlabAxisBound: () => (/* reexport safe */ _indexSpaceSlab_js__rspack_import_2.i3),
3486
3488
  getSlabEpsilon: () => (/* reexport safe */ _slabMembership_js__rspack_import_1.Xm),
3489
+ getSlabHalfWidth: () => (/* reexport safe */ _slabMembership_js__rspack_import_1.ks),
3487
3490
  getVoxelThicknessAlongNormal: () => (/* reexport safe */ _getVoxelThicknessAlongNormal_js__rspack_import_0.A),
3488
3491
  intersectRanges: () => (/* reexport safe */ _shapes_index_js__rspack_import_6.im),
3489
3492
  isPlaneDepthViewable: () => (/* reexport safe */ _isPlaneDepthViewable_js__rspack_import_3.L),
3493
+ isSlabDepthLowInclusive: () => (/* reexport safe */ _slabMembership_js__rspack_import_1.K5),
3490
3494
  isVoxelCenterInSlab: () => (/* reexport safe */ _slabMembership_js__rspack_import_1.$X),
3491
3495
  isWithinSlab: () => (/* reexport safe */ _slabMembership_js__rspack_import_1.OP),
3492
3496
  iterateVoxelsInShape: () => (/* reexport safe */ _iterateVoxelsInShape_js__rspack_import_4.m),