@ohif/app 3.12.0-beta.99 → 3.12.0
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.
- package/dist/{1403.bundle.94a178e2572f1f0b2a2c.js → 1403.bundle.1c9ce804d1e88033e276.js} +4 -2
- package/dist/{147.bundle.205350dc3d21478277b1.js → 147.bundle.37d627289453cb6c3937.js} +6 -15
- package/dist/{1608.bundle.f855c4bdb7f00eb66fca.js → 1608.bundle.0687c661f1c9edfb3b8a.js} +4 -4
- package/dist/{1730.bundle.37c569ae3ed057b69840.js → 1730.bundle.66a5e554ab20dab97b11.js} +7 -5
- package/dist/{1927.bundle.019331c266d306772371.js → 1927.bundle.3050588e95f43cf57cdd.js} +1 -1
- package/dist/{1933.bundle.ab5e8036f6e1c854c965.js → 1933.bundle.682f142e3217d4c7fbf7.js} +7 -3
- package/dist/{2018.bundle.469f9ad42597b6b29ff1.js → 2018.bundle.c06693143228cc034cb9.js} +47 -47
- package/dist/{213.bundle.398730bb3ceb1af54413.js → 213.bundle.c2d4d7370c26b0823880.js} +2 -2
- package/dist/{2424.bundle.be90e7bcf0fd8db68b2f.js → 2424.bundle.c1e287e752f352b76543.js} +2 -2
- package/dist/{2701.bundle.aca0d4f24a6f2094c3c3.js → 2701.bundle.12bd01a80a9f8ea4cd94.js} +4 -4
- package/dist/{2842.bundle.7852a204d3510fca8b27.js → 2842.bundle.860b9f10fcdd9656947a.js} +330 -123
- package/dist/{1903.bundle.dc5248f7cb6ba1dc1072.js → 3081.bundle.41838985e0472851eadb.js} +644 -322
- package/dist/{3343.bundle.f8fe9316b0ff68d087f7.js → 3343.bundle.d7578ce8f75d158c0bab.js} +2 -0
- package/dist/{3461.bundle.50c752c623f39cf6c457.js → 3461.bundle.a8fcefd1c6e389d905fc.js} +21 -17
- package/dist/{3584.bundle.839a16d349815b3f7c97.js → 3584.bundle.8cc0750425513433e9cc.js} +15 -17
- package/dist/{4019.bundle.01f63d5dd5b96ded0c00.js → 4019.bundle.83a604779f7da0101ced.js} +196 -366
- package/dist/{4202.bundle.790706560c6edb303476.js → 4202.bundle.5a0f8e4004c5d8a68548.js} +2 -2
- package/dist/{5448.bundle.9a36e001169ea3bfeb6c.js → 4410.bundle.c5224cd7d6238a7d4660.js} +313 -57
- package/dist/{4775.bundle.d7f0645419f1df8e00b8.js → 4775.bundle.70bc407db26afaa4331a.js} +24 -16
- package/dist/{4819.bundle.ef1151f023b3784bc1be.js → 4819.bundle.47e7aa44747ddab3a39a.js} +8 -6
- package/dist/{5028.bundle.b3611b7c7422a5c2e723.js → 5028.bundle.274945a9ae69c6b6ad51.js} +6 -6
- package/dist/{5462.bundle.a81a691eeef782ab95b9.js → 5462.bundle.21beddaca145b7465c72.js} +2 -0
- package/dist/{5485.bundle.71041ca4bc9e6ab57d92.js → 5485.bundle.4e0ec03c61ec5cadd9bb.js} +3 -3
- package/dist/{5802.bundle.28ab859d9b48a5b2c31c.js → 5802.bundle.3bf5e6b3ab330a594a47.js} +6 -12
- package/dist/{6163.bundle.1f096bdbe3a341c1710d.js → 6163.bundle.ca93a4e6501880901f94.js} +4 -2
- package/dist/{3353.bundle.a0f1654c642395bbbbbc.js → 6347.bundle.784c48912700f281de1d.js} +323 -179
- package/dist/{5400.bundle.de97508611da1c00d58a.js → 6409.bundle.b36048896cb11c8571fb.js} +450 -79
- package/dist/{7412.bundle.aec4834a71fc27c4ce06.js → 7412.bundle.fab1742191b7fe937330.js} +251 -197
- package/dist/{7431.bundle.999b2b65d4973bc56218.js → 7431.bundle.b01791d10e6cf9f503b0.js} +10 -4
- package/dist/{7639.bundle.e004d734044049fe8fe9.js → 7639.bundle.32152cacb059089ed7d7.js} +24 -20
- package/dist/{8305.bundle.ba43ed23edea2bf394b3.js → 8305.bundle.2ede68ba3c075928c9f4.js} +47 -29
- package/dist/{8558.bundle.463ddb34a619cf47493e.js → 8558.bundle.3e84c4ba2c7ec6fce52c.js} +33 -3
- package/dist/{8583.bundle.59c239cf891c2e10bf10.js → 8583.bundle.2908eee785e7e4595d14.js} +28 -23
- package/dist/{9195.bundle.e2fd5c6b5830c0ee25a8.js → 9195.bundle.606ca286a0fed8a43f58.js} +146 -73
- package/dist/{9845.bundle.31aec3fe7a5cdc247f4e.js → 9845.bundle.255e7c7f7a88193b4e47.js} +16 -8
- package/dist/{9862.bundle.3ca0ad5f54db87ccf91e.js → 9862.bundle.3a8958a82c572015d25d.js} +2 -2
- package/dist/{9927.bundle.f421cd167be94a7109f6.js → 9927.bundle.e798a347dfe1f241578f.js} +16 -16
- package/dist/{5549.bundle.d5def6a3124a3a481b7c.js → 997.bundle.822b33e561263084e18c.js} +961 -290
- package/dist/{app.bundle.7df5bc1cd812bd602686.js → app.bundle.26b7eafdf05b5445414b.js} +5893 -2247
- package/dist/app.bundle.css +1 -1
- package/dist/{compute.bundle.fdee4a0f193ee2e1b6da.js → compute.bundle.64280c7af19ff567465f.js} +3 -3
- package/dist/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js +3254 -1792
- package/dist/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js.map +1 -1
- package/dist/index.html +1 -1
- package/dist/{polySeg.bundle.11f9746cd60c9811a412.js → polySeg.bundle.a5aa9130b4191253c410.js} +3 -3
- package/dist/sw.js +1 -1
- package/package.json +24 -24
- /package/dist/{1459.bundle.3785cdd0abf449adebf1.js → 1459.bundle.e8802999a4d7f7edf628.js} +0 -0
- /package/dist/{5457.bundle.9f2eb65ad85fcbb75e27.js → 5457.bundle.f7de73bcfe1012a73b9f.js} +0 -0
- /package/dist/{5858.bundle.d5f4bf849aaeebf5025c.js → 5858.bundle.ff6b340cf7457db76a1a.js} +0 -0
- /package/dist/{6027.bundle.160bd47ea03784276275.js → 6027.bundle.2b12862684b0cb3af4b4.js} +0 -0
- /package/dist/{85.bundle.a16e254910c60223df19.js → 85.bundle.05591d5a14d74a502dfe.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[
|
|
1
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[4410],{
|
|
2
2
|
|
|
3
3
|
/***/ 86871:
|
|
4
4
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
@@ -1142,7 +1142,7 @@ class BaseVolumeViewport extends Viewport/* default */.A {
|
|
|
1142
1142
|
getSliceViewInfo() {
|
|
1143
1143
|
throw new Error('Method not implemented.');
|
|
1144
1144
|
}
|
|
1145
|
-
applyViewOrientation(orientation, resetCamera = true) {
|
|
1145
|
+
applyViewOrientation(orientation, resetCamera = true, suppressEvents = false) {
|
|
1146
1146
|
const { viewPlaneNormal, viewUp } = this._getOrientationVectors(orientation) || {};
|
|
1147
1147
|
if (!viewPlaneNormal || !viewUp) {
|
|
1148
1148
|
return;
|
|
@@ -1153,7 +1153,11 @@ class BaseVolumeViewport extends Viewport/* default */.A {
|
|
|
1153
1153
|
this.initialViewUp = viewUp;
|
|
1154
1154
|
if (resetCamera) {
|
|
1155
1155
|
const t = this;
|
|
1156
|
-
t.resetCamera({
|
|
1156
|
+
t.resetCamera({
|
|
1157
|
+
resetOrientation: false,
|
|
1158
|
+
resetRotation: false,
|
|
1159
|
+
suppressEvents,
|
|
1160
|
+
});
|
|
1157
1161
|
}
|
|
1158
1162
|
}
|
|
1159
1163
|
initializeVolumeNewImageEventDispatcher() {
|
|
@@ -1457,10 +1461,14 @@ class BaseVolumeViewport extends Viewport/* default */.A {
|
|
|
1457
1461
|
setViewPlane(planeRestriction) {
|
|
1458
1462
|
const { point, inPlaneVector1, inPlaneVector2, FrameOfReferenceUID } = planeRestriction;
|
|
1459
1463
|
this.setBestOrentation(inPlaneVector1, inPlaneVector2);
|
|
1464
|
+
const { focalPoint, viewPlaneNormal } = this.getCamera();
|
|
1465
|
+
const deltaFocal = esm/* vec3.subtract */.eR.subtract(esm/* vec3.create */.eR.create(), point, focalPoint);
|
|
1466
|
+
const alongNormal = esm/* vec3.dot */.eR.dot(deltaFocal, viewPlaneNormal);
|
|
1467
|
+
const deltaNormal = esm/* vec3.scaleAndAdd */.eR.scaleAndAdd(esm/* vec3.create */.eR.create(), focalPoint, viewPlaneNormal, alongNormal);
|
|
1460
1468
|
this.setViewReference({
|
|
1461
1469
|
FrameOfReferenceUID,
|
|
1462
|
-
cameraFocalPoint:
|
|
1463
|
-
viewPlaneNormal:
|
|
1470
|
+
cameraFocalPoint: deltaNormal,
|
|
1471
|
+
viewPlaneNormal: viewPlaneNormal,
|
|
1464
1472
|
});
|
|
1465
1473
|
}
|
|
1466
1474
|
setViewReference(viewRef) {
|
|
@@ -1491,7 +1499,7 @@ class BaseVolumeViewport extends Viewport/* default */.A {
|
|
|
1491
1499
|
}
|
|
1492
1500
|
else if (refFrameOfReference === this.getFrameOfReferenceUID()) {
|
|
1493
1501
|
if (refViewPlaneNormal && !isNegativeNormal && !isSameNormal) {
|
|
1494
|
-
this.setOrientation({ viewPlaneNormal: refViewPlaneNormal, viewUp });
|
|
1502
|
+
this.setOrientation({ viewPlaneNormal: refViewPlaneNormal, viewUp }, true, true);
|
|
1495
1503
|
this.setViewReference(viewRef);
|
|
1496
1504
|
return;
|
|
1497
1505
|
}
|
|
@@ -1555,6 +1563,7 @@ class BaseVolumeViewport extends Viewport/* default */.A {
|
|
|
1555
1563
|
colormap,
|
|
1556
1564
|
preset,
|
|
1557
1565
|
slabThickness,
|
|
1566
|
+
sampleDistanceMultiplier,
|
|
1558
1567
|
});
|
|
1559
1568
|
}
|
|
1560
1569
|
if (invert !== undefined && this.viewportProperties.invert !== invert) {
|
|
@@ -1727,7 +1736,7 @@ class BaseVolumeViewport extends Viewport/* default */.A {
|
|
|
1727
1736
|
this.render();
|
|
1728
1737
|
}
|
|
1729
1738
|
}
|
|
1730
|
-
setOrientation(_orientation, _immediate = true) {
|
|
1739
|
+
setOrientation(_orientation, _immediate = true, _suppressEvents = false) {
|
|
1731
1740
|
console.warn('Method "setOrientation" needs implementation');
|
|
1732
1741
|
}
|
|
1733
1742
|
initializeColorTransferFunction(volumeInputArray) {
|
|
@@ -1796,7 +1805,7 @@ class BaseVolumeViewport extends Viewport/* default */.A {
|
|
|
1796
1805
|
}
|
|
1797
1806
|
volumeId ||= this.getVolumeId();
|
|
1798
1807
|
const actorEntry = this.getActors()?.find((actor) => actor.referencedId === volumeId);
|
|
1799
|
-
if (!(0,actorCheck/* actorIsA */.N)(actorEntry, 'vtkVolume')) {
|
|
1808
|
+
if (!actorEntry || !(0,actorCheck/* actorIsA */.N)(actorEntry, 'vtkVolume')) {
|
|
1800
1809
|
return;
|
|
1801
1810
|
}
|
|
1802
1811
|
const actor = actorEntry.actor;
|
|
@@ -1955,6 +1964,9 @@ class BaseVolumeViewport extends Viewport/* default */.A {
|
|
|
1955
1964
|
return;
|
|
1956
1965
|
}
|
|
1957
1966
|
volumeId = actorEntries.find((actorEntry) => actorEntry.actor.getClassName() === 'vtkVolume')?.referencedId;
|
|
1967
|
+
if (!volumeId) {
|
|
1968
|
+
return;
|
|
1969
|
+
}
|
|
1958
1970
|
}
|
|
1959
1971
|
const currentIndex = this.getSliceIndex();
|
|
1960
1972
|
sliceIndex ??= currentIndex;
|
|
@@ -6375,7 +6387,9 @@ class VideoViewport extends Viewport/* default */.A {
|
|
|
6375
6387
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(71851);
|
|
6376
6388
|
/* harmony import */ var _utilities_deepClone__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(99949);
|
|
6377
6389
|
/* harmony import */ var _utilities_updatePlaneRestriction__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(41365);
|
|
6378
|
-
/* harmony import */ var
|
|
6390
|
+
/* harmony import */ var _utilities_getPlaneCubeIntersectionDimensions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(52623);
|
|
6391
|
+
/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(26896);
|
|
6392
|
+
|
|
6379
6393
|
|
|
6380
6394
|
|
|
6381
6395
|
|
|
@@ -6406,7 +6420,7 @@ class Viewport {
|
|
|
6406
6420
|
paletteLut: true,
|
|
6407
6421
|
}; }
|
|
6408
6422
|
constructor(props) {
|
|
6409
|
-
this.insetImageMultiplier = (0,
|
|
6423
|
+
this.insetImageMultiplier = (0,_init__WEBPACK_IMPORTED_MODULE_18__/* .getConfiguration */ .D0)().rendering
|
|
6410
6424
|
?.useLegacyCameraFOV
|
|
6411
6425
|
? 1.1
|
|
6412
6426
|
: 1;
|
|
@@ -6892,15 +6906,6 @@ class Viewport {
|
|
|
6892
6906
|
}
|
|
6893
6907
|
const focalPoint = [0, 0, 0];
|
|
6894
6908
|
const imageData = this.getDefaultImageData();
|
|
6895
|
-
if (imageData) {
|
|
6896
|
-
const spc = imageData.getSpacing();
|
|
6897
|
-
bounds[0] = bounds[0] + spc[0] / 2;
|
|
6898
|
-
bounds[1] = bounds[1] - spc[0] / 2;
|
|
6899
|
-
bounds[2] = bounds[2] + spc[1] / 2;
|
|
6900
|
-
bounds[3] = bounds[3] - spc[1] / 2;
|
|
6901
|
-
bounds[4] = bounds[4] + spc[2] / 2;
|
|
6902
|
-
bounds[5] = bounds[5] - spc[2] / 2;
|
|
6903
|
-
}
|
|
6904
6909
|
const activeCamera = this.getVtkActiveCamera();
|
|
6905
6910
|
const viewPlaneNormal = activeCamera.getViewPlaneNormal();
|
|
6906
6911
|
const viewUp = activeCamera.getViewUp();
|
|
@@ -6913,18 +6918,13 @@ class Viewport {
|
|
|
6913
6918
|
const idx = [middleIJK[0], middleIJK[1], middleIJK[2]];
|
|
6914
6919
|
imageData.indexToWorld(idx, focalPoint);
|
|
6915
6920
|
}
|
|
6916
|
-
let widthWorld
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
if (imageData && !useLegacyMethod) {
|
|
6921
|
-
const extent = imageData.getExtent();
|
|
6921
|
+
let { widthWorld, heightWorld } = imageData
|
|
6922
|
+
? (0,_utilities_getPlaneCubeIntersectionDimensions__WEBPACK_IMPORTED_MODULE_17__/* .getCubeSizeInView */ .H)(imageData, viewPlaneNormal, viewUp)
|
|
6923
|
+
: this._getWorldDistanceViewUpAndViewRight(bounds, viewUp, viewPlaneNormal);
|
|
6924
|
+
if (imageData) {
|
|
6922
6925
|
const spacing = imageData.getSpacing();
|
|
6923
|
-
widthWorld = (
|
|
6924
|
-
heightWorld = (
|
|
6925
|
-
}
|
|
6926
|
-
else {
|
|
6927
|
-
({ widthWorld, heightWorld } = this._getWorldDistanceViewUpAndViewRight(bounds, viewUp, viewPlaneNormal));
|
|
6926
|
+
widthWorld = Math.max(spacing[0], widthWorld - spacing[0]);
|
|
6927
|
+
heightWorld = Math.max(spacing[1], heightWorld - spacing[1]);
|
|
6928
6928
|
}
|
|
6929
6929
|
const canvasSize = [this.sWidth, this.sHeight];
|
|
6930
6930
|
const boundsAspectRatio = widthWorld / heightWorld;
|
|
@@ -7593,8 +7593,11 @@ class VolumeViewport extends BaseVolumeViewport/* default */.A {
|
|
|
7593
7593
|
suppressEvents: true,
|
|
7594
7594
|
});
|
|
7595
7595
|
};
|
|
7596
|
-
this.getCurrentImageIdIndex = (volumeId, useSlabThickness = true) => {
|
|
7597
|
-
|
|
7596
|
+
this.getCurrentImageIdIndex = (volumeId = this.getVolumeId(), useSlabThickness = true) => {
|
|
7597
|
+
if (!volumeId) {
|
|
7598
|
+
return 0;
|
|
7599
|
+
}
|
|
7600
|
+
const { currentStepIndex } = (0,getVolumeViewportScrollInfo/* default */.A)(this, volumeId, useSlabThickness);
|
|
7598
7601
|
return currentStepIndex;
|
|
7599
7602
|
};
|
|
7600
7603
|
this.getSliceIndex = () => {
|
|
@@ -7678,9 +7681,19 @@ class VolumeViewport extends BaseVolumeViewport/* default */.A {
|
|
|
7678
7681
|
return super.addVolumes(volumeInputArray, immediate, suppressEvents);
|
|
7679
7682
|
}
|
|
7680
7683
|
jumpToWorld(worldPos) {
|
|
7684
|
+
let targetWorldPos = worldPos;
|
|
7685
|
+
const imageData = this.getImageData();
|
|
7686
|
+
if (imageData?.imageData) {
|
|
7687
|
+
const bounds = imageData.imageData.getBounds();
|
|
7688
|
+
targetWorldPos = [
|
|
7689
|
+
Math.max(bounds[0], Math.min(bounds[1], worldPos[0])),
|
|
7690
|
+
Math.max(bounds[2], Math.min(bounds[3], worldPos[1])),
|
|
7691
|
+
Math.max(bounds[4], Math.min(bounds[5], worldPos[2])),
|
|
7692
|
+
];
|
|
7693
|
+
}
|
|
7681
7694
|
const { focalPoint } = this.getCamera();
|
|
7682
7695
|
const delta = [0, 0, 0];
|
|
7683
|
-
esm/* vec3.sub */.eR.sub(delta,
|
|
7696
|
+
esm/* vec3.sub */.eR.sub(delta, targetWorldPos, focalPoint);
|
|
7684
7697
|
const camera = this.getCamera();
|
|
7685
7698
|
const normal = camera.viewPlaneNormal;
|
|
7686
7699
|
const dotProd = esm/* vec3.dot */.eR.dot(delta, normal);
|
|
@@ -7701,7 +7714,7 @@ class VolumeViewport extends BaseVolumeViewport/* default */.A {
|
|
|
7701
7714
|
}
|
|
7702
7715
|
return true;
|
|
7703
7716
|
}
|
|
7704
|
-
setOrientation(orientation, immediate = true) {
|
|
7717
|
+
setOrientation(orientation, immediate = true, suppressEvents = false) {
|
|
7705
7718
|
let viewPlaneNormal, viewUp;
|
|
7706
7719
|
if (typeof orientation === 'string') {
|
|
7707
7720
|
if (orientation === enums.OrientationAxis.ACQUISITION) {
|
|
@@ -7728,7 +7741,7 @@ class VolumeViewport extends BaseVolumeViewport/* default */.A {
|
|
|
7728
7741
|
}
|
|
7729
7742
|
else {
|
|
7730
7743
|
({ viewPlaneNormal, viewUp } = orientation);
|
|
7731
|
-
this.applyViewOrientation(orientation);
|
|
7744
|
+
this.applyViewOrientation(orientation, true, suppressEvents);
|
|
7732
7745
|
}
|
|
7733
7746
|
if (immediate) {
|
|
7734
7747
|
this.render();
|
|
@@ -18428,6 +18441,9 @@ function vtkStreamingOpenGLTexture(publicAPI, model) {
|
|
|
18428
18441
|
return;
|
|
18429
18442
|
}
|
|
18430
18443
|
const volume = cache/* default */.Ay.getVolume(volumeId);
|
|
18444
|
+
if (!volume) {
|
|
18445
|
+
return;
|
|
18446
|
+
}
|
|
18431
18447
|
model._openGLRenderWindow.activateTexture(publicAPI);
|
|
18432
18448
|
publicAPI.createTexture();
|
|
18433
18449
|
publicAPI.bind();
|
|
@@ -19585,8 +19601,8 @@ class BaseStreamingImageVolume extends _ImageVolume__WEBPACK_IMPORTED_MODULE_9__
|
|
|
19585
19601
|
}
|
|
19586
19602
|
getLoaderImageOptions(imageId) {
|
|
19587
19603
|
const { transferSyntaxUID: transferSyntaxUID } = _metaData__WEBPACK_IMPORTED_MODULE_0__.get('transferSyntax', imageId) || {};
|
|
19588
|
-
const
|
|
19589
|
-
const
|
|
19604
|
+
const targetRows = this.dimensions[1];
|
|
19605
|
+
const targetCols = this.dimensions[0];
|
|
19590
19606
|
const imageIdIndex = this.getImageIdIndex(imageId);
|
|
19591
19607
|
const modalityLutModule = _metaData__WEBPACK_IMPORTED_MODULE_0__.get('modalityLutModule', imageId) || {};
|
|
19592
19608
|
const generalSeriesModule = _metaData__WEBPACK_IMPORTED_MODULE_0__.get('generalSeriesModule', imageId) || {};
|
|
@@ -19619,8 +19635,8 @@ class BaseStreamingImageVolume extends _ImageVolume__WEBPACK_IMPORTED_MODULE_9__
|
|
|
19619
19635
|
}
|
|
19620
19636
|
const targetBuffer = {
|
|
19621
19637
|
type: this.dataType,
|
|
19622
|
-
rows,
|
|
19623
|
-
columns,
|
|
19638
|
+
rows: targetRows,
|
|
19639
|
+
columns: targetCols,
|
|
19624
19640
|
};
|
|
19625
19641
|
return {
|
|
19626
19642
|
targetBuffer,
|
|
@@ -19767,12 +19783,16 @@ class BaseStreamingImageVolume extends _ImageVolume__WEBPACK_IMPORTED_MODULE_9__
|
|
|
19767
19783
|
|
|
19768
19784
|
|
|
19769
19785
|
class ImageVolume {
|
|
19786
|
+
get numTimePoints() {
|
|
19787
|
+
return typeof this.numDimensionGroups === 'number'
|
|
19788
|
+
? this.numDimensionGroups
|
|
19789
|
+
: 1;
|
|
19790
|
+
}
|
|
19770
19791
|
constructor(props) {
|
|
19771
19792
|
this._imageIdsIndexMap = new Map();
|
|
19772
19793
|
this._imageURIsIndexMap = new Map();
|
|
19773
19794
|
this.cornerstoneImageMetaData = null;
|
|
19774
19795
|
this.isPreScaled = false;
|
|
19775
|
-
this.numTimePoints = null;
|
|
19776
19796
|
this.numFrames = null;
|
|
19777
19797
|
const { imageIds, scaling, dimensions, spacing, origin, direction, dataType, volumeId, referencedVolumeId, metadata, referencedImageIds, additionalDetails, voxelManager, numberOfComponents, } = props;
|
|
19778
19798
|
if (!dataType) {
|
|
@@ -19852,7 +19872,10 @@ class ImageVolume {
|
|
|
19852
19872
|
});
|
|
19853
19873
|
}
|
|
19854
19874
|
isDynamicVolume() {
|
|
19855
|
-
|
|
19875
|
+
if (this.numTimePoints) {
|
|
19876
|
+
return this.numTimePoints > 1;
|
|
19877
|
+
}
|
|
19878
|
+
return false;
|
|
19856
19879
|
}
|
|
19857
19880
|
getImageIdIndex(imageId) {
|
|
19858
19881
|
return this._imageIdsIndexMap.get(imageId);
|
|
@@ -21662,7 +21685,7 @@ class Mesh {
|
|
|
21662
21685
|
/* unused harmony export default */
|
|
21663
21686
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71851);
|
|
21664
21687
|
/* harmony import */ var _eventTarget__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10364);
|
|
21665
|
-
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
21688
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85343);
|
|
21666
21689
|
/* harmony import */ var _BaseStreamingImageVolume__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(35637);
|
|
21667
21690
|
|
|
21668
21691
|
|
|
@@ -25238,7 +25261,7 @@ function createProgressive(configuration) {
|
|
|
25238
25261
|
/* harmony import */ var _utils_mesh_createMesh__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(83469);
|
|
25239
25262
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71851);
|
|
25240
25263
|
/* harmony import */ var _eventTarget__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10364);
|
|
25241
|
-
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
25264
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(85343);
|
|
25242
25265
|
|
|
25243
25266
|
|
|
25244
25267
|
|
|
@@ -25324,7 +25347,7 @@ async function fetchAndProcessMeshData(meshId, options, loaderOptions) {
|
|
|
25324
25347
|
"use strict";
|
|
25325
25348
|
/* unused harmony export cornerstoneStreamingDynamicImageVolumeLoader */
|
|
25326
25349
|
/* harmony import */ var _cache__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50584);
|
|
25327
|
-
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
25350
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(85343);
|
|
25328
25351
|
|
|
25329
25352
|
|
|
25330
25353
|
function cornerstoneStreamingDynamicImageVolumeLoader(volumeId, options) {
|
|
@@ -25480,6 +25503,183 @@ function cornerstoneStreamingImageVolumeLoader(volumeId, options) {
|
|
|
25480
25503
|
|
|
25481
25504
|
|
|
25482
25505
|
|
|
25506
|
+
/***/ }),
|
|
25507
|
+
|
|
25508
|
+
/***/ 18481:
|
|
25509
|
+
/***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => {
|
|
25510
|
+
|
|
25511
|
+
"use strict";
|
|
25512
|
+
|
|
25513
|
+
// UNUSED EXPORTS: decimatedVolumeLoader, default
|
|
25514
|
+
|
|
25515
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/cache/classes/StreamingImageVolume.js
|
|
25516
|
+
var classes_StreamingImageVolume = __webpack_require__(50180);
|
|
25517
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/generateVolumePropsFromImageIds.js
|
|
25518
|
+
var utilities_generateVolumePropsFromImageIds = __webpack_require__(9734);
|
|
25519
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/decimate.js
|
|
25520
|
+
var utilities_decimate = __webpack_require__(63470);
|
|
25521
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/VoxelManager.js
|
|
25522
|
+
var utilities_VoxelManager = __webpack_require__(24623);
|
|
25523
|
+
;// ../../../node_modules/@cornerstonejs/core/dist/esm/loaders/decimatedVolumeModifiers/applyDecimatedVolumeModifiers.js
|
|
25524
|
+
function applyDecimatedVolumeModifiers_applyDecimatedVolumeModifiers(baseProps, modifiers, context) {
|
|
25525
|
+
return modifiers.reduce((currentProps, modifier) => modifier.apply(currentProps, context), baseProps);
|
|
25526
|
+
}
|
|
25527
|
+
|
|
25528
|
+
;// ../../../node_modules/@cornerstonejs/core/dist/esm/loaders/decimatedVolumeModifiers/inPlaneDecimationModifier.js
|
|
25529
|
+
const inPlaneDecimationModifier_inPlaneDecimationModifier = {
|
|
25530
|
+
name: 'InPlaneDecimationModifier',
|
|
25531
|
+
apply(volumeProps, context) {
|
|
25532
|
+
const [iDecimation = 1, jDecimation = iDecimation] = context.options.ijkDecimation ?? [];
|
|
25533
|
+
const columnFactor = Math.max(1, Math.floor(iDecimation));
|
|
25534
|
+
const rowFactor = Math.max(1, Math.floor(jDecimation));
|
|
25535
|
+
if (columnFactor === 1 && rowFactor === 1) {
|
|
25536
|
+
return volumeProps;
|
|
25537
|
+
}
|
|
25538
|
+
const [columns, rows] = volumeProps.dimensions;
|
|
25539
|
+
const newColumns = Math.max(1, Math.floor(columns / columnFactor));
|
|
25540
|
+
const newRows = Math.max(1, Math.floor(rows / rowFactor));
|
|
25541
|
+
const newDimensions = [
|
|
25542
|
+
newColumns,
|
|
25543
|
+
newRows,
|
|
25544
|
+
volumeProps.dimensions[2],
|
|
25545
|
+
];
|
|
25546
|
+
const newSpacing = [
|
|
25547
|
+
volumeProps.spacing[0] * columnFactor,
|
|
25548
|
+
volumeProps.spacing[1] * rowFactor,
|
|
25549
|
+
volumeProps.spacing[2],
|
|
25550
|
+
];
|
|
25551
|
+
const metadata = {
|
|
25552
|
+
...volumeProps.metadata,
|
|
25553
|
+
Columns: newColumns,
|
|
25554
|
+
Rows: newRows,
|
|
25555
|
+
PixelSpacing: [newSpacing[1], newSpacing[0]],
|
|
25556
|
+
};
|
|
25557
|
+
return {
|
|
25558
|
+
...volumeProps,
|
|
25559
|
+
dimensions: newDimensions,
|
|
25560
|
+
spacing: newSpacing,
|
|
25561
|
+
metadata,
|
|
25562
|
+
};
|
|
25563
|
+
},
|
|
25564
|
+
};
|
|
25565
|
+
|
|
25566
|
+
;// ../../../node_modules/@cornerstonejs/core/dist/esm/loaders/decimatedVolumeModifiers/index.js
|
|
25567
|
+
|
|
25568
|
+
|
|
25569
|
+
|
|
25570
|
+
;// ../../../node_modules/@cornerstonejs/core/dist/esm/loaders/decimatedVolumeLoader.js
|
|
25571
|
+
|
|
25572
|
+
|
|
25573
|
+
|
|
25574
|
+
|
|
25575
|
+
|
|
25576
|
+
function decimatedVolumeLoader(volumeId, options) {
|
|
25577
|
+
if (!options || !options.imageIds || !options.imageIds.length) {
|
|
25578
|
+
throw new Error('ImageIds must be provided to create a streaming image volume ');
|
|
25579
|
+
}
|
|
25580
|
+
const [iDecimation = 1, jDecimation = iDecimation, kDecimation = 1] = options.ijkDecimation ?? [];
|
|
25581
|
+
const columnDecimation = Math.max(1, Math.floor(iDecimation));
|
|
25582
|
+
const rowDecimation = jDecimation > 1 ? Math.max(1, Math.floor(jDecimation)) : columnDecimation;
|
|
25583
|
+
const kAxisDecimation = Math.max(1, Math.floor(kDecimation));
|
|
25584
|
+
const hasInPlaneDecimation = columnDecimation > 1 || rowDecimation > 1;
|
|
25585
|
+
const modifierOptions = {
|
|
25586
|
+
ijkDecimation: [
|
|
25587
|
+
columnDecimation,
|
|
25588
|
+
rowDecimation,
|
|
25589
|
+
kAxisDecimation,
|
|
25590
|
+
],
|
|
25591
|
+
};
|
|
25592
|
+
const modifiers = [inPlaneDecimationModifier];
|
|
25593
|
+
function addDecimationToImageId(imageId, factor) {
|
|
25594
|
+
if (factor === 1) {
|
|
25595
|
+
return imageId;
|
|
25596
|
+
}
|
|
25597
|
+
return `${imageId}#decimation=${factor}`;
|
|
25598
|
+
}
|
|
25599
|
+
const expectedDecimatedCount = Math.floor(options.imageIds.length / kAxisDecimation);
|
|
25600
|
+
const isAlreadyDecimated = kAxisDecimation > 1 &&
|
|
25601
|
+
options.imageIds.length <= expectedDecimatedCount + 1;
|
|
25602
|
+
if (kAxisDecimation > 1 && !isAlreadyDecimated) {
|
|
25603
|
+
const decimatedResult = decimate(options.imageIds, kAxisDecimation);
|
|
25604
|
+
const decimatedImageIds = Array.isArray(decimatedResult) &&
|
|
25605
|
+
decimatedResult.length &&
|
|
25606
|
+
typeof decimatedResult[0] === 'number'
|
|
25607
|
+
? decimatedResult.map((idx) => options.imageIds[idx])
|
|
25608
|
+
: decimatedResult;
|
|
25609
|
+
options.imageIds = decimatedImageIds;
|
|
25610
|
+
}
|
|
25611
|
+
if (columnDecimation > 1) {
|
|
25612
|
+
options.imageIds = options.imageIds.map((imageId) => addDecimationToImageId(imageId, columnDecimation));
|
|
25613
|
+
}
|
|
25614
|
+
async function getStreamingImageVolume() {
|
|
25615
|
+
const baseVolumeProps = generateVolumePropsFromImageIds(options.imageIds, volumeId);
|
|
25616
|
+
const modifierContext = {
|
|
25617
|
+
volumeId,
|
|
25618
|
+
imageIds: options.imageIds,
|
|
25619
|
+
options: modifierOptions,
|
|
25620
|
+
};
|
|
25621
|
+
const volumeProps = applyDecimatedVolumeModifiers(baseVolumeProps, modifiers, modifierContext);
|
|
25622
|
+
const { dimensions, spacing, origin, direction, metadata, imageIds, dataType, numberOfComponents, } = volumeProps;
|
|
25623
|
+
const streamingImageVolume = new StreamingImageVolume({
|
|
25624
|
+
volumeId,
|
|
25625
|
+
metadata,
|
|
25626
|
+
dimensions,
|
|
25627
|
+
spacing,
|
|
25628
|
+
origin,
|
|
25629
|
+
direction,
|
|
25630
|
+
imageIds,
|
|
25631
|
+
dataType,
|
|
25632
|
+
numberOfComponents,
|
|
25633
|
+
}, {
|
|
25634
|
+
imageIds,
|
|
25635
|
+
loadStatus: {
|
|
25636
|
+
loaded: false,
|
|
25637
|
+
loading: false,
|
|
25638
|
+
cancelled: false,
|
|
25639
|
+
cachedFrames: [],
|
|
25640
|
+
callbacks: [],
|
|
25641
|
+
},
|
|
25642
|
+
});
|
|
25643
|
+
if (hasInPlaneDecimation) {
|
|
25644
|
+
const vtkImageData = streamingImageVolume.imageData;
|
|
25645
|
+
if (vtkImageData) {
|
|
25646
|
+
vtkImageData.setDimensions(streamingImageVolume.dimensions);
|
|
25647
|
+
vtkImageData.setSpacing(streamingImageVolume.spacing);
|
|
25648
|
+
vtkImageData.modified();
|
|
25649
|
+
}
|
|
25650
|
+
const newVoxelManager = VoxelManager.createImageVolumeVoxelManager({
|
|
25651
|
+
dimensions: streamingImageVolume.dimensions,
|
|
25652
|
+
imageIds: streamingImageVolume.imageIds,
|
|
25653
|
+
numberOfComponents: numberOfComponents,
|
|
25654
|
+
});
|
|
25655
|
+
streamingImageVolume.voxelManager = newVoxelManager;
|
|
25656
|
+
if (vtkImageData) {
|
|
25657
|
+
vtkImageData.set({
|
|
25658
|
+
voxelManager: newVoxelManager,
|
|
25659
|
+
});
|
|
25660
|
+
}
|
|
25661
|
+
}
|
|
25662
|
+
return streamingImageVolume;
|
|
25663
|
+
}
|
|
25664
|
+
const streamingImageVolumePromise = getStreamingImageVolume();
|
|
25665
|
+
return {
|
|
25666
|
+
promise: streamingImageVolumePromise,
|
|
25667
|
+
decache: () => {
|
|
25668
|
+
streamingImageVolumePromise.then((streamingImageVolume) => {
|
|
25669
|
+
streamingImageVolume.destroy();
|
|
25670
|
+
streamingImageVolume = null;
|
|
25671
|
+
});
|
|
25672
|
+
},
|
|
25673
|
+
cancel: () => {
|
|
25674
|
+
streamingImageVolumePromise.then((streamingImageVolume) => {
|
|
25675
|
+
streamingImageVolume.cancelLoading();
|
|
25676
|
+
});
|
|
25677
|
+
},
|
|
25678
|
+
};
|
|
25679
|
+
}
|
|
25680
|
+
/* harmony default export */ const loaders_decimatedVolumeLoader = ((/* unused pure expression or super */ null && (decimatedVolumeLoader)));
|
|
25681
|
+
|
|
25682
|
+
|
|
25483
25683
|
/***/ }),
|
|
25484
25684
|
|
|
25485
25685
|
/***/ 52269:
|
|
@@ -34214,7 +34414,7 @@ class VoxelManager {
|
|
|
34214
34414
|
this._set = options._set;
|
|
34215
34415
|
this._id = options._id || '';
|
|
34216
34416
|
this._getConstructor = options._getConstructor;
|
|
34217
|
-
this.numberOfComponents =
|
|
34417
|
+
this.numberOfComponents = options.numberOfComponents || 1;
|
|
34218
34418
|
this.scalarData = options.scalarData;
|
|
34219
34419
|
this._getScalarData = options._getScalarData;
|
|
34220
34420
|
this._updateScalarData = options._updateScalarData;
|
|
@@ -34952,6 +35152,24 @@ function createPositionCallback(imageData) {
|
|
|
34952
35152
|
}
|
|
34953
35153
|
|
|
34954
35154
|
|
|
35155
|
+
/***/ }),
|
|
35156
|
+
|
|
35157
|
+
/***/ 63470:
|
|
35158
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
35159
|
+
|
|
35160
|
+
"use strict";
|
|
35161
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
35162
|
+
/* harmony export */ A: () => (/* binding */ decimate)
|
|
35163
|
+
/* harmony export */ });
|
|
35164
|
+
function decimate(list, interleave, offset = 0) {
|
|
35165
|
+
const interleaveIndices = [];
|
|
35166
|
+
for (let i = offset; i < list.length; i += interleave) {
|
|
35167
|
+
interleaveIndices.push(i);
|
|
35168
|
+
}
|
|
35169
|
+
return interleaveIndices;
|
|
35170
|
+
}
|
|
35171
|
+
|
|
35172
|
+
|
|
34955
35173
|
/***/ }),
|
|
34956
35174
|
|
|
34957
35175
|
/***/ 74268:
|
|
@@ -35282,7 +35500,7 @@ function uuidv4() {
|
|
|
35282
35500
|
|
|
35283
35501
|
"use strict";
|
|
35284
35502
|
/* unused harmony export version */
|
|
35285
|
-
const version = '4.
|
|
35503
|
+
const version = '4.15.29';
|
|
35286
35504
|
|
|
35287
35505
|
|
|
35288
35506
|
/***/ }),
|
|
@@ -36686,6 +36904,8 @@ var SegmentationRepresentations;
|
|
|
36686
36904
|
/* harmony export */ });
|
|
36687
36905
|
var StrategyCallbacks;
|
|
36688
36906
|
(function (StrategyCallbacks) {
|
|
36907
|
+
StrategyCallbacks["CalculateCursorGeometry"] = "calculateCursorGeometry";
|
|
36908
|
+
StrategyCallbacks["RenderCursor"] = "renderCursor";
|
|
36689
36909
|
StrategyCallbacks["OnInteractionStart"] = "onInteractionStart";
|
|
36690
36910
|
StrategyCallbacks["OnInteractionEnd"] = "onInteractionEnd";
|
|
36691
36911
|
StrategyCallbacks["Preview"] = "preview";
|
|
@@ -37478,7 +37698,8 @@ function addAnnotation(annotation, annotationGroupSelector) {
|
|
|
37478
37698
|
annotation.annotationUID = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.uuidv4();
|
|
37479
37699
|
}
|
|
37480
37700
|
const manager = getAnnotationManager();
|
|
37481
|
-
if (annotationGroupSelector instanceof HTMLDivElement
|
|
37701
|
+
if (annotationGroupSelector instanceof HTMLDivElement &&
|
|
37702
|
+
(0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(annotationGroupSelector)) {
|
|
37482
37703
|
const groupKey = manager.getGroupKey(annotationGroupSelector);
|
|
37483
37704
|
manager.addAnnotation(annotation, groupKey);
|
|
37484
37705
|
(0,_helpers_state__WEBPACK_IMPORTED_MODULE_1__.triggerAnnotationAddedForElement)(annotation, annotationGroupSelector);
|
|
@@ -38139,6 +38360,9 @@ function getColorLUT(index) {
|
|
|
38139
38360
|
|
|
38140
38361
|
function getCurrentLabelmapImageIdForViewport(viewportId, segmentationId) {
|
|
38141
38362
|
const imageIds = getCurrentLabelmapImageIdsForViewport(viewportId, segmentationId);
|
|
38363
|
+
if (!imageIds?.length) {
|
|
38364
|
+
return;
|
|
38365
|
+
}
|
|
38142
38366
|
return imageIds[0];
|
|
38143
38367
|
}
|
|
38144
38368
|
function getCurrentLabelmapImageIdsForViewport(viewportId, segmentationId) {
|
|
@@ -39002,9 +39226,11 @@ class ToolGroup_ToolGroup {
|
|
|
39002
39226
|
const cursor = MouseCursor.getDefinedCursor('default');
|
|
39003
39227
|
this._setCursorForViewports(cursor);
|
|
39004
39228
|
}
|
|
39229
|
+
toolInstance.isPrimary = false;
|
|
39005
39230
|
}
|
|
39006
39231
|
else {
|
|
39007
39232
|
this.setViewportsCursorByToolName(toolName);
|
|
39233
|
+
toolInstance.isPrimary = true;
|
|
39008
39234
|
}
|
|
39009
39235
|
if (this._hasMousePrimaryButtonBinding(toolBindingsOptions)) {
|
|
39010
39236
|
if (this.prevActivePrimaryToolName === null) {
|
|
@@ -39051,6 +39277,7 @@ class ToolGroup_ToolGroup {
|
|
|
39051
39277
|
}
|
|
39052
39278
|
this.toolOptions[toolName] = toolOptions;
|
|
39053
39279
|
toolInstance.mode = mode;
|
|
39280
|
+
toolInstance.isPrimary = false;
|
|
39054
39281
|
if (typeof toolInstance.onSetToolPassive === 'function') {
|
|
39055
39282
|
toolInstance.onSetToolPassive();
|
|
39056
39283
|
}
|
|
@@ -39571,6 +39798,9 @@ AnnotationDisplayTool.toolName = 'AnnotationDisplayTool';
|
|
|
39571
39798
|
|
|
39572
39799
|
const { DefaultHistoryMemo } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.HistoryMemo;
|
|
39573
39800
|
class BaseTool {
|
|
39801
|
+
get configurationTyped() {
|
|
39802
|
+
return this.configuration;
|
|
39803
|
+
}
|
|
39574
39804
|
static { this.defaults = {
|
|
39575
39805
|
configuration: {
|
|
39576
39806
|
strategies: {},
|
|
@@ -39580,6 +39810,7 @@ class BaseTool {
|
|
|
39580
39810
|
},
|
|
39581
39811
|
}; }
|
|
39582
39812
|
constructor(toolProps, defaultToolProps) {
|
|
39813
|
+
this.isPrimary = false;
|
|
39583
39814
|
const mergedDefaults = BaseTool.mergeDefaultProps(BaseTool.defaults, defaultToolProps);
|
|
39584
39815
|
const initialProps = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.deepMerge(mergedDefaults, toolProps);
|
|
39585
39816
|
const { configuration = {}, supportedInteractionTypes, toolGroupId, } = initialProps;
|
|
@@ -39594,6 +39825,11 @@ class BaseTool {
|
|
|
39594
39825
|
}
|
|
39595
39826
|
return _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.deepMerge(defaultProps, additionalProps);
|
|
39596
39827
|
}
|
|
39828
|
+
static isSpecifiedTargetId(desiredVolumeId) {
|
|
39829
|
+
return (_viewport, { targetId }) => {
|
|
39830
|
+
return targetId.includes(desiredVolumeId);
|
|
39831
|
+
};
|
|
39832
|
+
}
|
|
39597
39833
|
get toolName() {
|
|
39598
39834
|
return this.getToolName();
|
|
39599
39835
|
}
|
|
@@ -39653,10 +39889,18 @@ class BaseTool {
|
|
|
39653
39889
|
throw new Error('getTargetIdImage: targetId must start with "imageId:" or "volumeId:"');
|
|
39654
39890
|
}
|
|
39655
39891
|
}
|
|
39656
|
-
getTargetId(viewport) {
|
|
39657
|
-
const
|
|
39658
|
-
if (
|
|
39659
|
-
|
|
39892
|
+
getTargetId(viewport, data) {
|
|
39893
|
+
const { isPreferredTargetId } = this.configurationTyped;
|
|
39894
|
+
if (isPreferredTargetId && data?.cachedStats) {
|
|
39895
|
+
for (const [targetId, cachedStat] of Object.entries(data.cachedStats)) {
|
|
39896
|
+
if (isPreferredTargetId(viewport, { targetId, cachedStat })) {
|
|
39897
|
+
return targetId;
|
|
39898
|
+
}
|
|
39899
|
+
}
|
|
39900
|
+
}
|
|
39901
|
+
const defaultTargetId = viewport.getViewReferenceId?.();
|
|
39902
|
+
if (defaultTargetId) {
|
|
39903
|
+
return defaultTargetId;
|
|
39660
39904
|
}
|
|
39661
39905
|
throw new Error('getTargetId: viewport must have a getViewReferenceId method');
|
|
39662
39906
|
}
|
|
@@ -39784,7 +40028,12 @@ async function render(viewport, contourRepresentation) {
|
|
|
39784
40028
|
(0,_config__WEBPACK_IMPORTED_MODULE_5__/* .getPolySeg */ .Qy)()?.canComputeRequestedRepresentation(segmentationId, _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.Contour) &&
|
|
39785
40029
|
!polySegConversionInProgressForViewportId.get(viewport.id)) {
|
|
39786
40030
|
polySegConversionInProgressForViewportId.set(viewport.id, true);
|
|
39787
|
-
|
|
40031
|
+
try {
|
|
40032
|
+
contourData = await (0,_utilities_segmentation_computeAndAddRepresentation__WEBPACK_IMPORTED_MODULE_6__/* .computeAndAddRepresentation */ .d)(segmentationId, _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A.Contour, () => polySeg.computeContourData(segmentationId, { viewport }));
|
|
40033
|
+
}
|
|
40034
|
+
catch (error) {
|
|
40035
|
+
console.warn('Unable to compute contour data for segmentationId', segmentationId, error);
|
|
40036
|
+
}
|
|
39788
40037
|
polySegConversionInProgressForViewportId.set(viewport.id, false);
|
|
39789
40038
|
}
|
|
39790
40039
|
else if (!contourData && !(0,_config__WEBPACK_IMPORTED_MODULE_5__/* .getPolySeg */ .Qy)()) {
|
|
@@ -44156,8 +44405,6 @@ function createBidirectionalToolData(bidirectionalData, viewport) {
|
|
|
44156
44405
|
/* unused harmony exports restoreMemo, createRleMemo */
|
|
44157
44406
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15327);
|
|
44158
44407
|
/* harmony import */ var _stateManagement_segmentation_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49906);
|
|
44159
|
-
/* harmony import */ var _enums_Events__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94021);
|
|
44160
|
-
|
|
44161
44408
|
|
|
44162
44409
|
|
|
44163
44410
|
const { VoxelManager, RLEVoxelMap } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities;
|
|
@@ -44316,7 +44563,7 @@ function createMergedLabelmapForIndex(labelmaps, segmentIndex = 1, volumeId = 'm
|
|
|
44316
44563
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15327);
|
|
44317
44564
|
|
|
44318
44565
|
function getOrCreateImageVolume(referencedImageIds) {
|
|
44319
|
-
if (!referencedImageIds
|
|
44566
|
+
if (!referencedImageIds?.length) {
|
|
44320
44567
|
return;
|
|
44321
44568
|
}
|
|
44322
44569
|
const isValidVolume = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.isValidVolume(referencedImageIds);
|
|
@@ -44349,6 +44596,9 @@ function getOrCreateImageVolume(referencedImageIds) {
|
|
|
44349
44596
|
|
|
44350
44597
|
function getOrCreateSegmentationVolume(segmentationId) {
|
|
44351
44598
|
const { representationData } = (0,_stateManagement_segmentation_getSegmentation__WEBPACK_IMPORTED_MODULE_1__/* .getSegmentation */ .T)(segmentationId);
|
|
44599
|
+
if (!representationData.Labelmap) {
|
|
44600
|
+
return;
|
|
44601
|
+
}
|
|
44352
44602
|
let { volumeId } = representationData.Labelmap;
|
|
44353
44603
|
let segVolume;
|
|
44354
44604
|
if (volumeId) {
|
|
@@ -44359,7 +44609,7 @@ function getOrCreateSegmentationVolume(segmentationId) {
|
|
|
44359
44609
|
}
|
|
44360
44610
|
const { imageIds: labelmapImageIds } = representationData.Labelmap;
|
|
44361
44611
|
volumeId = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.generateVolumeId(labelmapImageIds);
|
|
44362
|
-
if (!labelmapImageIds || labelmapImageIds.length ===
|
|
44612
|
+
if (!labelmapImageIds || labelmapImageIds.length === 0) {
|
|
44363
44613
|
return;
|
|
44364
44614
|
}
|
|
44365
44615
|
const isValidVolume = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.isValidVolume(labelmapImageIds);
|
|
@@ -44397,7 +44647,10 @@ function getReferenceVolumeForSegmentationVolume(segmentationVolumeId) {
|
|
|
44397
44647
|
const imageIds = segmentationVolume.imageIds;
|
|
44398
44648
|
const image = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getImage(imageIds[0]);
|
|
44399
44649
|
const referencedImageId = image.referencedImageId;
|
|
44400
|
-
|
|
44650
|
+
let volumeInfo = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolumeContainingImageId(referencedImageId);
|
|
44651
|
+
if (!volumeInfo?.volume) {
|
|
44652
|
+
volumeInfo = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolumeContainingImageId(image.imageId);
|
|
44653
|
+
}
|
|
44401
44654
|
imageVolume = volumeInfo?.volume;
|
|
44402
44655
|
}
|
|
44403
44656
|
return imageVolume;
|
|
@@ -44520,6 +44773,9 @@ async function getStatistics({ segmentationId, segmentIndices, mode = 'collectiv
|
|
|
44520
44773
|
}
|
|
44521
44774
|
async function calculateVolumeStatistics({ operationData, indices, unit, mode, }) {
|
|
44522
44775
|
const strategyData = (0,_utilsForWorker__WEBPACK_IMPORTED_MODULE_1__/* .prepareVolumeStrategyDataForWorker */ .o9)(operationData);
|
|
44776
|
+
if (!strategyData) {
|
|
44777
|
+
return;
|
|
44778
|
+
}
|
|
44523
44779
|
const { segmentationVoxelManager, imageVoxelManager, segmentationImageData, imageData, } = strategyData;
|
|
44524
44780
|
if (!segmentationVoxelManager || !segmentationImageData) {
|
|
44525
44781
|
return;
|