@ohif/app 3.14.0-beta.90 → 3.14.0-beta.92

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.
@@ -1,4 +1,4 @@
1
- (globalThis["rspackChunk_ohif_app"] ||= []).push([[8029], {
1
+ (globalThis["rspackChunk_ohif_app"] ||= []).push([[8312], {
2
2
  80874(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
3
3
  "use strict";
4
4
  /**
@@ -39742,6 +39742,75 @@ __webpack_require__.d(__webpack_exports__, {
39742
39742
  });
39743
39743
 
39744
39744
 
39745
+ },
39746
+ 17615(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
39747
+ "use strict";
39748
+ /* import */ var gl_matrix__rspack_import_0 = __webpack_require__(50341);
39749
+
39750
+ const SOURCE_SLICE_INDEX_TOLERANCE = 1e-4;
39751
+ const NEAREST_VOXEL_TIE_EPSILON = 1e-6;
39752
+ function dot(a, b) {
39753
+ return gl_matrix__rspack_import_0/* .vec3.dot */.eR.Om(a, b);
39754
+ }
39755
+ function getIndexMajorAxis(volume, worldVector, majorThreshold = 0.995) {
39756
+ const row = volume.direction.slice(0, 3);
39757
+ const col = volume.direction.slice(3, 6);
39758
+ const scan = volume.direction.slice(6, 9);
39759
+ const components = [
39760
+ dot(worldVector, row),
39761
+ dot(worldVector, col),
39762
+ dot(worldVector, scan),
39763
+ ];
39764
+ const absComponents = components.map((value) => Math.abs(value));
39765
+ const maxValue = Math.max(...absComponents);
39766
+ const axis = absComponents.indexOf(maxValue);
39767
+ if (maxValue < majorThreshold) {
39768
+ return;
39769
+ }
39770
+ const secondary = absComponents
39771
+ .filter((_value, index) => index !== axis)
39772
+ .some((value) => value > 1 - majorThreshold);
39773
+ if (secondary) {
39774
+ return;
39775
+ }
39776
+ return {
39777
+ axis,
39778
+ sign: components[axis] >= 0 ? 1 : -1,
39779
+ };
39780
+ }
39781
+ function getSpatiallyClampedContinuousCoordinate(dimension, value) {
39782
+ const upperBound = dimension - 0.5;
39783
+ if (value < -0.5 - SOURCE_SLICE_INDEX_TOLERANCE ||
39784
+ value > upperBound + SOURCE_SLICE_INDEX_TOLERANCE) {
39785
+ return;
39786
+ }
39787
+ return Math.min(dimension - 1, Math.max(0, value));
39788
+ }
39789
+ function getNearestVoxelIndex(continuousIndex) {
39790
+ return Math.floor(continuousIndex + 0.5 - NEAREST_VOXEL_TIE_EPSILON);
39791
+ }
39792
+ function getSpatiallyClampedContinuousIndex(dimensions, continuousIndex) {
39793
+ const clampedIndex = [0, 0, 0];
39794
+ for (let axis = 0; axis < 3; axis++) {
39795
+ const clampedCoordinate = getSpatiallyClampedContinuousCoordinate(dimensions[axis], continuousIndex[axis]);
39796
+ if (clampedCoordinate === undefined) {
39797
+ return;
39798
+ }
39799
+ clampedIndex[axis] = clampedCoordinate;
39800
+ }
39801
+ return clampedIndex;
39802
+ }
39803
+
39804
+ __webpack_require__.d(__webpack_exports__, {
39805
+ Jy: () => (getSpatiallyClampedContinuousCoordinate),
39806
+ RB: () => (getIndexMajorAxis),
39807
+ fF: () => (getSpatiallyClampedContinuousIndex),
39808
+ lp: () => (getNearestVoxelIndex)
39809
+ }, {
39810
+ AA: NEAREST_VOXEL_TIE_EPSILON
39811
+ });
39812
+
39813
+
39745
39814
  },
39746
39815
  92070(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
39747
39816
  "use strict";
@@ -55581,6 +55650,10 @@ class BaseStreamingImageVolume extends _ImageVolume_js__rspack_import_11/* ["def
55581
55650
  this.framesLoaded++;
55582
55651
  this.framesProcessed++;
55583
55652
  }
55653
+ this.markFrameTexturesDirty(frameIndex);
55654
+ if (this.isInCurrentDimensionGroup(imageIdIndex)) {
55655
+ this.recordFrameDelivery(frameIndex, imageQualityStatus);
55656
+ }
55584
55657
  const eventDetail = {
55585
55658
  FrameOfReferenceUID,
55586
55659
  volumeId: this.volumeId,
@@ -55604,10 +55677,6 @@ class BaseStreamingImageVolume extends _ImageVolume_js__rspack_import_11/* ["def
55604
55677
  complete,
55605
55678
  imageQualityStatus,
55606
55679
  });
55607
- this.markFrameTexturesDirty(frameIndex);
55608
- if (this.isInCurrentDimensionGroup(imageIdIndex)) {
55609
- this.recordFrameDelivery(frameIndex, imageQualityStatus);
55610
- }
55611
55680
  if (this.loadStatus.loaded) {
55612
55681
  this.loadStatus.callbacks = [];
55613
55682
  }
@@ -62446,6 +62515,342 @@ __webpack_require__.d(__webpack_exports__, {
62446
62515
  });
62447
62516
 
62448
62517
 
62518
+ },
62519
+ 82188(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
62520
+ "use strict";
62521
+ /* import */ var _enums_index_js__rspack_import_0 = __webpack_require__(71088);
62522
+ /* import */ var _RenderingEngine_GenericViewport_Planar_planarCPUVolumeSamplingUtils_js__rspack_import_1 = __webpack_require__(17615);
62523
+
62524
+
62525
+ const SPAN_MARGIN = 1e-7;
62526
+ const MINIMUM_SPAN_STEP = 1e-12;
62527
+ function getVolumeArray(volume, voxelCount) {
62528
+ const scalarData = volume.voxelManager.getWritableScalarData?.();
62529
+ return scalarData?.length === voxelCount ? scalarData : undefined;
62530
+ }
62531
+ function getSliceArray(context, sliceIndex) {
62532
+ const known = context.sliceArrays[sliceIndex];
62533
+ if (known !== undefined) {
62534
+ return known;
62535
+ }
62536
+ const { volume, volumeArray, columns, rows } = context;
62537
+ const sliceSize = columns * rows;
62538
+ let sliceArray = null;
62539
+ if (volumeArray) {
62540
+ sliceArray = volumeArray.subarray(sliceIndex * sliceSize, (sliceIndex + 1) * sliceSize);
62541
+ }
62542
+ else {
62543
+ const scalarData = volume.voxelManager._getSliceView?.(sliceIndex);
62544
+ if (scalarData?.length === sliceSize) {
62545
+ sliceArray = scalarData;
62546
+ }
62547
+ }
62548
+ context.sliceArrays[sliceIndex] = sliceArray;
62549
+ return sliceArray;
62550
+ }
62551
+ function finishSample(context, sample) {
62552
+ let value = sample;
62553
+ if (context.limitValues) {
62554
+ if (!Number.isFinite(value)) {
62555
+ value = context.outsideValue;
62556
+ }
62557
+ else if (value < context.rangeMin) {
62558
+ value = context.rangeMin;
62559
+ }
62560
+ else if (value > context.rangeMax) {
62561
+ value = context.rangeMax;
62562
+ }
62563
+ }
62564
+ return context.round ? Math.round(value) : value;
62565
+ }
62566
+ function sampleCheckedPoint(context, i, j, k) {
62567
+ const { columns, rows, slices } = context;
62568
+ const lowerBound = -0.5 - (/* inlined export .SOURCE_SLICE_INDEX_TOLERANCE */0.0001);
62569
+ if (!(i >= lowerBound &&
62570
+ i <= columns - 0.5 + (/* inlined export .SOURCE_SLICE_INDEX_TOLERANCE */0.0001) &&
62571
+ j >= lowerBound &&
62572
+ j <= rows - 0.5 + (/* inlined export .SOURCE_SLICE_INDEX_TOLERANCE */0.0001) &&
62573
+ k >= lowerBound &&
62574
+ k <= slices - 0.5 + (/* inlined export .SOURCE_SLICE_INDEX_TOLERANCE */0.0001))) {
62575
+ return context.outsideValue;
62576
+ }
62577
+ const { voxelManager } = context.volume;
62578
+ const lastI = columns - 1;
62579
+ const lastJ = rows - 1;
62580
+ const lastK = slices - 1;
62581
+ const clampedI = i < 0 ? 0 : i > lastI ? lastI : i;
62582
+ const clampedJ = j < 0 ? 0 : j > lastJ ? lastJ : j;
62583
+ const clampedK = k < 0 ? 0 : k > lastK ? lastK : k;
62584
+ if (context.useNearest) {
62585
+ const voxelI = Math.floor(clampedI + 0.5 - _RenderingEngine_GenericViewport_Planar_planarCPUVolumeSamplingUtils_js__rspack_import_1/* .NEAREST_VOXEL_TIE_EPSILON */.AA);
62586
+ const voxelJ = Math.floor(clampedJ + 0.5 - _RenderingEngine_GenericViewport_Planar_planarCPUVolumeSamplingUtils_js__rspack_import_1/* .NEAREST_VOXEL_TIE_EPSILON */.AA);
62587
+ const voxelK = Math.floor(clampedK + 0.5 - _RenderingEngine_GenericViewport_Planar_planarCPUVolumeSamplingUtils_js__rspack_import_1/* .NEAREST_VOXEL_TIE_EPSILON */.AA);
62588
+ const sliceArray = getSliceArray(context, voxelK);
62589
+ return finishSample(context, sliceArray
62590
+ ? sliceArray[voxelJ * columns + voxelI]
62591
+ : Number(voxelManager.getAtIJK(voxelI, voxelJ, voxelK)));
62592
+ }
62593
+ const i0 = Math.floor(clampedI);
62594
+ const j0 = Math.floor(clampedJ);
62595
+ const k0 = Math.floor(clampedK);
62596
+ const i1 = i0 < lastI ? i0 + 1 : lastI;
62597
+ const j1 = j0 < lastJ ? j0 + 1 : lastJ;
62598
+ const k1 = k0 < lastK ? k0 + 1 : lastK;
62599
+ const di = clampedI - i0;
62600
+ const dj = clampedJ - j0;
62601
+ const dk = clampedK - k0;
62602
+ const oneMinusDi = 1 - di;
62603
+ const oneMinusDj = 1 - dj;
62604
+ const oneMinusDk = 1 - dk;
62605
+ const lowerSlice = getSliceArray(context, k0);
62606
+ const upperSlice = getSliceArray(context, k1);
62607
+ let c000;
62608
+ let c100;
62609
+ let c010;
62610
+ let c110;
62611
+ let c001;
62612
+ let c101;
62613
+ let c011;
62614
+ let c111;
62615
+ if (lowerSlice && upperSlice) {
62616
+ c000 = lowerSlice[j0 * columns + i0];
62617
+ c100 = lowerSlice[j0 * columns + i1];
62618
+ c010 = lowerSlice[j1 * columns + i0];
62619
+ c110 = lowerSlice[j1 * columns + i1];
62620
+ c001 = upperSlice[j0 * columns + i0];
62621
+ c101 = upperSlice[j0 * columns + i1];
62622
+ c011 = upperSlice[j1 * columns + i0];
62623
+ c111 = upperSlice[j1 * columns + i1];
62624
+ }
62625
+ else {
62626
+ c000 = Number(voxelManager.getAtIJK(i0, j0, k0));
62627
+ c100 = Number(voxelManager.getAtIJK(i1, j0, k0));
62628
+ c010 = Number(voxelManager.getAtIJK(i0, j1, k0));
62629
+ c110 = Number(voxelManager.getAtIJK(i1, j1, k0));
62630
+ c001 = Number(voxelManager.getAtIJK(i0, j0, k1));
62631
+ c101 = Number(voxelManager.getAtIJK(i1, j0, k1));
62632
+ c011 = Number(voxelManager.getAtIJK(i0, j1, k1));
62633
+ c111 = Number(voxelManager.getAtIJK(i1, j1, k1));
62634
+ }
62635
+ const c00 = c000 * oneMinusDi + c100 * di;
62636
+ const c10 = c010 * oneMinusDi + c110 * di;
62637
+ const c01 = c001 * oneMinusDi + c101 * di;
62638
+ const c11 = c011 * oneMinusDi + c111 * di;
62639
+ const c0 = c00 * oneMinusDj + c10 * dj;
62640
+ const c1 = c01 * oneMinusDj + c11 * dj;
62641
+ return finishSample(context, c0 * oneMinusDk + c1 * dk);
62642
+ }
62643
+ function narrowColumnSpan(span, start, step, low, high) {
62644
+ if (Math.abs(step) < MINIMUM_SPAN_STEP) {
62645
+ if (start < low || start > high) {
62646
+ span.first = 1;
62647
+ span.last = 0;
62648
+ }
62649
+ return;
62650
+ }
62651
+ const atLow = (low - start) / step;
62652
+ const atHigh = (high - start) / step;
62653
+ const from = Math.ceil(atLow < atHigh ? atLow : atHigh);
62654
+ const to = Math.floor(atLow < atHigh ? atHigh : atLow);
62655
+ if (from > span.first) {
62656
+ span.first = from;
62657
+ }
62658
+ if (to < span.last) {
62659
+ span.last = to;
62660
+ }
62661
+ }
62662
+ function sampleVolumeGrid(options) {
62663
+ const { volume, pixelData, width, height, startIndex, columnStep, rowStep, interpolationType = _enums_index_js__rspack_import_0.InterpolationType.NEAREST, outsideValue = 0, valueRange, round = false, } = options;
62664
+ const { voxelManager } = volume;
62665
+ const [columns, rows, slices] = volume.dimensions;
62666
+ const useNearest = interpolationType === _enums_index_js__rspack_import_0.InterpolationType.NEAREST;
62667
+ const limitValues = !!valueRange;
62668
+ const finishValues = limitValues || round;
62669
+ const context = {
62670
+ volume,
62671
+ volumeArray: getVolumeArray(volume, columns * rows * slices),
62672
+ sliceArrays: new Array(slices),
62673
+ columns,
62674
+ rows,
62675
+ slices,
62676
+ useNearest,
62677
+ outsideValue,
62678
+ limitValues,
62679
+ rangeMin: valueRange ? valueRange.min : 0,
62680
+ rangeMax: valueRange ? valueRange.max : 0,
62681
+ round,
62682
+ };
62683
+ const { sliceArrays } = context;
62684
+ const outerLow = -0.5 - (/* inlined export .SOURCE_SLICE_INDEX_TOLERANCE */0.0001) - SPAN_MARGIN;
62685
+ const outerHighOffset = -0.5 + (/* inlined export .SOURCE_SLICE_INDEX_TOLERANCE */0.0001) + SPAN_MARGIN;
62686
+ const innerLow = useNearest
62687
+ ? -0.5 + _RenderingEngine_GenericViewport_Planar_planarCPUVolumeSamplingUtils_js__rspack_import_1/* .NEAREST_VOXEL_TIE_EPSILON */.AA + SPAN_MARGIN
62688
+ : SPAN_MARGIN;
62689
+ const innerHighOffset = useNearest
62690
+ ? -0.5 + _RenderingEngine_GenericViewport_Planar_planarCPUVolumeSamplingUtils_js__rspack_import_1/* .NEAREST_VOXEL_TIE_EPSILON */.AA - SPAN_MARGIN
62691
+ : -1 - SPAN_MARGIN;
62692
+ const stepI = columnStep[0];
62693
+ const stepJ = columnStep[1];
62694
+ const stepK = columnStep[2];
62695
+ const outer = { first: 0, last: 0 };
62696
+ const inner = { first: 0, last: 0 };
62697
+ let rowI = startIndex[0];
62698
+ let rowJ = startIndex[1];
62699
+ let rowK = startIndex[2];
62700
+ let min = Infinity;
62701
+ let max = -Infinity;
62702
+ let wroteOutsideValue = false;
62703
+ let pixelIndex = 0;
62704
+ for (let row = 0; row < height; row++) {
62705
+ outer.first = 0;
62706
+ outer.last = width - 1;
62707
+ narrowColumnSpan(outer, rowI, stepI, outerLow, columns + outerHighOffset);
62708
+ narrowColumnSpan(outer, rowJ, stepJ, outerLow, rows + outerHighOffset);
62709
+ narrowColumnSpan(outer, rowK, stepK, outerLow, slices + outerHighOffset);
62710
+ const hasOuter = outer.first <= outer.last;
62711
+ const outerFirst = Math.max(0, outer.first - 1);
62712
+ const outerLast = Math.min(width - 1, outer.last + 1);
62713
+ inner.first = 0;
62714
+ inner.last = width - 1;
62715
+ narrowColumnSpan(inner, rowI, stepI, innerLow, columns + innerHighOffset);
62716
+ narrowColumnSpan(inner, rowJ, stepJ, innerLow, rows + innerHighOffset);
62717
+ narrowColumnSpan(inner, rowK, stepK, innerLow, slices + innerHighOffset);
62718
+ const innerFirst = inner.first + 1;
62719
+ const innerLast = inner.last - 1;
62720
+ const hasInner = hasOuter && innerFirst <= innerLast;
62721
+ const outsideEnd = hasOuter ? outerFirst : width;
62722
+ const checkedEnd = hasOuter ? outerLast + 1 : 0;
62723
+ const firstCheckedEnd = hasInner ? innerFirst : checkedEnd;
62724
+ let i = rowI;
62725
+ let j = rowJ;
62726
+ let k = rowK;
62727
+ let column = 0;
62728
+ if (outsideEnd > 0 || checkedEnd < width) {
62729
+ wroteOutsideValue = true;
62730
+ }
62731
+ for (; column < outsideEnd; column++) {
62732
+ pixelData[pixelIndex++] = outsideValue;
62733
+ i += stepI;
62734
+ j += stepJ;
62735
+ k += stepK;
62736
+ }
62737
+ for (; column < firstCheckedEnd; column++) {
62738
+ const value = sampleCheckedPoint(context, i, j, k);
62739
+ pixelData[pixelIndex++] = value;
62740
+ if (value < min) {
62741
+ min = value;
62742
+ }
62743
+ if (value > max) {
62744
+ max = value;
62745
+ }
62746
+ i += stepI;
62747
+ j += stepJ;
62748
+ k += stepK;
62749
+ }
62750
+ if (hasInner && useNearest) {
62751
+ for (; column <= innerLast; column++) {
62752
+ const voxelI = Math.floor(i + 0.5 - _RenderingEngine_GenericViewport_Planar_planarCPUVolumeSamplingUtils_js__rspack_import_1/* .NEAREST_VOXEL_TIE_EPSILON */.AA);
62753
+ const voxelJ = Math.floor(j + 0.5 - _RenderingEngine_GenericViewport_Planar_planarCPUVolumeSamplingUtils_js__rspack_import_1/* .NEAREST_VOXEL_TIE_EPSILON */.AA);
62754
+ const voxelK = Math.floor(k + 0.5 - _RenderingEngine_GenericViewport_Planar_planarCPUVolumeSamplingUtils_js__rspack_import_1/* .NEAREST_VOXEL_TIE_EPSILON */.AA);
62755
+ const sliceArray = sliceArrays[voxelK] ?? getSliceArray(context, voxelK);
62756
+ let value = sliceArray
62757
+ ? sliceArray[voxelJ * columns + voxelI]
62758
+ : Number(voxelManager.getAtIJK(voxelI, voxelJ, voxelK));
62759
+ if (finishValues) {
62760
+ value = finishSample(context, value);
62761
+ }
62762
+ pixelData[pixelIndex++] = value;
62763
+ if (value < min) {
62764
+ min = value;
62765
+ }
62766
+ if (value > max) {
62767
+ max = value;
62768
+ }
62769
+ i += stepI;
62770
+ j += stepJ;
62771
+ k += stepK;
62772
+ }
62773
+ }
62774
+ else if (hasInner) {
62775
+ for (; column <= innerLast; column++) {
62776
+ const i0 = Math.floor(i);
62777
+ const j0 = Math.floor(j);
62778
+ const k0 = Math.floor(k);
62779
+ const lowerSlice = sliceArrays[k0] ?? getSliceArray(context, k0);
62780
+ const upperSlice = sliceArrays[k0 + 1] ?? getSliceArray(context, k0 + 1);
62781
+ let value;
62782
+ if (lowerSlice && upperSlice) {
62783
+ const di = i - i0;
62784
+ const dj = j - j0;
62785
+ const dk = k - k0;
62786
+ const oneMinusDi = 1 - di;
62787
+ const oneMinusDj = 1 - dj;
62788
+ const oneMinusDk = 1 - dk;
62789
+ const lowerRow = j0 * columns + i0;
62790
+ const upperRow = lowerRow + columns;
62791
+ const c00 = lowerSlice[lowerRow] * oneMinusDi + lowerSlice[lowerRow + 1] * di;
62792
+ const c10 = lowerSlice[upperRow] * oneMinusDi + lowerSlice[upperRow + 1] * di;
62793
+ const c01 = upperSlice[lowerRow] * oneMinusDi + upperSlice[lowerRow + 1] * di;
62794
+ const c11 = upperSlice[upperRow] * oneMinusDi + upperSlice[upperRow + 1] * di;
62795
+ const c0 = c00 * oneMinusDj + c10 * dj;
62796
+ const c1 = c01 * oneMinusDj + c11 * dj;
62797
+ value = c0 * oneMinusDk + c1 * dk;
62798
+ if (finishValues) {
62799
+ value = finishSample(context, value);
62800
+ }
62801
+ }
62802
+ else {
62803
+ value = sampleCheckedPoint(context, i, j, k);
62804
+ }
62805
+ pixelData[pixelIndex++] = value;
62806
+ if (value < min) {
62807
+ min = value;
62808
+ }
62809
+ if (value > max) {
62810
+ max = value;
62811
+ }
62812
+ i += stepI;
62813
+ j += stepJ;
62814
+ k += stepK;
62815
+ }
62816
+ }
62817
+ for (; column < checkedEnd; column++) {
62818
+ const value = sampleCheckedPoint(context, i, j, k);
62819
+ pixelData[pixelIndex++] = value;
62820
+ if (value < min) {
62821
+ min = value;
62822
+ }
62823
+ if (value > max) {
62824
+ max = value;
62825
+ }
62826
+ i += stepI;
62827
+ j += stepJ;
62828
+ k += stepK;
62829
+ }
62830
+ for (; column < width; column++) {
62831
+ pixelData[pixelIndex++] = outsideValue;
62832
+ }
62833
+ rowI += rowStep[0];
62834
+ rowJ += rowStep[1];
62835
+ rowK += rowStep[2];
62836
+ }
62837
+ if (wroteOutsideValue) {
62838
+ if (outsideValue < min) {
62839
+ min = outsideValue;
62840
+ }
62841
+ if (outsideValue > max) {
62842
+ max = outsideValue;
62843
+ }
62844
+ }
62845
+ return { min, max };
62846
+ }
62847
+
62848
+
62849
+ __webpack_require__.d(__webpack_exports__, {
62850
+ A: () => (sampleVolumeGrid)
62851
+ });
62852
+
62853
+
62449
62854
  },
62450
62855
  69780(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
62451
62856
  "use strict";
@@ -65908,7 +66313,7 @@ const moduleDefinitions = [
65908
66313
  },
65909
66314
  24671() {
65910
66315
  "use strict";
65911
- const version = '5.18.0';
66316
+ const version = '5.18.3';
65912
66317
 
65913
66318
 
65914
66319
  },
@@ -66011,7 +66416,7 @@ __webpack_require__.d(__webpack_exports__, {
66011
66416
  },
66012
66417
  88253() {
66013
66418
  "use strict";
66014
- const version = '5.18.0';
66419
+ const version = '5.18.3';
66015
66420
 
66016
66421
 
66017
66422
  },