@ohif/app 3.14.0-beta.54 → 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.
- package/dist/{9187.bundle.47a04a89.js → 1283.bundle.56abacf4.js} +162 -137
- package/dist/{4262.bundle.0c550b7f.js → 1558.bundle.03d5783b.js} +36 -11
- package/dist/{1566.bundle.8d90bb15.js → 1566.bundle.e9f5d851.js} +5 -1
- package/dist/{1645.bundle.65cff869.js → 1645.bundle.618a2886.js} +700 -389
- package/dist/{1724.bundle.b4757283.js → 1724.bundle.59b20c59.js} +1184 -1139
- package/dist/{1788.bundle.5b78672d.js → 1788.bundle.3f1349d2.js} +101 -43
- package/dist/1975.bundle.53cf5d7c.js +8216 -0
- package/dist/{5922.bundle.46b3e037.js → 2894.bundle.db3f8686.js} +240 -151
- package/dist/{6567.bundle.cc57e572.js → 3044.bundle.039294b9.js} +105 -76
- package/dist/{3386.bundle.b835901b.js → 3386.bundle.a9fd7dfd.js} +92 -23
- package/dist/{4004.bundle.da822fd2.js → 4018.bundle.48c288e5.js} +128 -253
- package/dist/{2894.bundle.d612efb2.js → 513.bundle.9c0548cf.js} +1 -1
- package/dist/{5143.bundle.62bcf4ee.js → 5143.bundle.67167d39.js} +219 -147
- package/dist/{5895.bundle.b4892e1b.js → 5320.bundle.0c7b2cb7.js} +1473 -617
- package/dist/{5383.bundle.d393d2f5.js → 5383.bundle.79243338.js} +26 -4
- package/dist/{4324.bundle.8645d6b4.js → 5888.bundle.cd717f42.js} +1364 -8004
- package/dist/{8128.bundle.2afe5a05.js → 5914.bundle.00f408d2.js} +419 -49
- package/dist/{1284.bundle.a489bd1d.js → 5989.bundle.f8096a4e.js} +1175 -616
- package/dist/{6255.bundle.ee378f1c.js → 6255.bundle.521051c1.js} +42 -18
- package/dist/{829.bundle.e60fee3a.js → 641.bundle.4627a8e1.js} +472 -483
- package/dist/{1568.bundle.474a5a93.js → 9187.bundle.237037e4.js} +1 -1
- package/dist/{6711.bundle.baba2ccd.js → 9232.bundle.3b0caf8e.js} +10 -10
- package/dist/{1895.bundle.923d0bd4.js → 9620.bundle.67375c83.js} +82 -24
- package/dist/{app.bundle.871d916b.js → app.bundle.5a277c45.js} +44 -44
- package/dist/{compute.bundle.caab94e6.js → compute.bundle.a8f26c49.js} +10 -10
- package/dist/index.html +1 -1
- package/dist/{interpolation.bundle.eed65b60.js → interpolation.bundle.aef2f614.js} +5 -5
- package/dist/{polySeg.bundle.34a58c4f.js → polySeg.bundle.ba052ac3.js} +11 -11
- package/dist/static/wasm/{27ff970b98.module.wasm → 0e14aeab30.module.wasm} +0 -0
- package/dist/static/wasm/58a146bc8c.module.wasm +0 -0
- package/dist/static/wasm/99a2672e64.module.wasm +0 -0
- package/dist/static/wasm/{11f8dc2413.module.wasm → d8b213f3ea.module.wasm} +0 -0
- package/dist/sw.js +1 -1
- package/package.json +6 -6
- package/dist/0.bundle.485115b4.js +0 -4498
- package/dist/static/wasm/58769f1d7d.module.wasm +0 -0
- /package/dist/{1895.bundle.css → 9620.bundle.css} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis["rspackChunk_ohif_app"] ||= []).push([[
|
|
1
|
+
(globalThis["rspackChunk_ohif_app"] ||= []).push([[2894], {
|
|
2
2
|
85631(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
3
3
|
"use strict";
|
|
4
4
|
/* provided dependency */ var Buffer = __webpack_require__(1048).hp;
|
|
@@ -28642,19 +28642,21 @@ BaseRenderingEngine.NEXT_TYPE_REMAP = {
|
|
|
28642
28642
|
/* import */ var _Viewport_js__rspack_import_21 = __webpack_require__(68840);
|
|
28643
28643
|
/* import */ var _vtkClasses_vtkSlabCamera_js__rspack_import_22 = __webpack_require__(65616);
|
|
28644
28644
|
/* import */ var _utilities_getVolumeViewportScrollInfo_js__rspack_import_23 = __webpack_require__(33439);
|
|
28645
|
-
/* import */ var
|
|
28646
|
-
/* import */ var
|
|
28647
|
-
/* import */ var
|
|
28648
|
-
/* import */ var
|
|
28649
|
-
/* import */ var
|
|
28650
|
-
/* import */ var
|
|
28651
|
-
/* import */ var
|
|
28652
|
-
/* import */ var
|
|
28653
|
-
/* import */ var
|
|
28654
|
-
/* import */ var
|
|
28655
|
-
/* import */ var
|
|
28656
|
-
/* import */ var
|
|
28657
|
-
/* import */ var
|
|
28645
|
+
/* import */ var _utilities_getViewSlabDepth_js__rspack_import_24 = __webpack_require__(13054);
|
|
28646
|
+
/* import */ var _utilities_actorCheck_js__rspack_import_25 = __webpack_require__(34455);
|
|
28647
|
+
/* import */ var _utilities_snapFocalPointToSlice_js__rspack_import_26 = __webpack_require__(69780);
|
|
28648
|
+
/* import */ var _utilities_getVoiFromSigmoidRGBTransferFunction_js__rspack_import_27 = __webpack_require__(19394);
|
|
28649
|
+
/* import */ var _utilities_isEqual_js__rspack_import_28 = __webpack_require__(3886);
|
|
28650
|
+
/* import */ var _utilities_applyPreset_js__rspack_import_29 = __webpack_require__(34049);
|
|
28651
|
+
/* import */ var _utilities_uuidv4_js__rspack_import_30 = __webpack_require__(92157);
|
|
28652
|
+
/* import */ var _metaData_js__rspack_import_31 = __webpack_require__(52284);
|
|
28653
|
+
/* import */ var _helpers_getCameraVectors_js__rspack_import_32 = __webpack_require__(22761);
|
|
28654
|
+
/* import */ var _helpers_isContextPoolRenderingEngine_js__rspack_import_33 = __webpack_require__(45413);
|
|
28655
|
+
/* import */ var _constants_mprCameraValues_js__rspack_import_34 = __webpack_require__(18503);
|
|
28656
|
+
/* import */ var _helpers_isInvalidNumber_js__rspack_import_35 = __webpack_require__(76172);
|
|
28657
|
+
/* import */ var _utilities_getVolumeViewReferenceId_js__rspack_import_36 = __webpack_require__(95045);
|
|
28658
|
+
/* import */ var _renderPasses_index_js__rspack_import_37 = __webpack_require__(82484);
|
|
28659
|
+
|
|
28658
28660
|
|
|
28659
28661
|
|
|
28660
28662
|
|
|
@@ -28750,10 +28752,10 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
28750
28752
|
const renderPasses = [];
|
|
28751
28753
|
try {
|
|
28752
28754
|
if (this.smoothing > 0) {
|
|
28753
|
-
renderPasses.push((0,
|
|
28755
|
+
renderPasses.push((0,_renderPasses_index_js__rspack_import_37/* .createSmoothingRenderPass */.y)(this.smoothing));
|
|
28754
28756
|
}
|
|
28755
28757
|
if (this.sharpening > 0) {
|
|
28756
|
-
renderPasses.push((0,
|
|
28758
|
+
renderPasses.push((0,_renderPasses_index_js__rspack_import_37/* .createSharpeningRenderPass */.b)(this.sharpening));
|
|
28757
28759
|
}
|
|
28758
28760
|
return renderPasses.length ? renderPasses : null;
|
|
28759
28761
|
}
|
|
@@ -28794,7 +28796,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
28794
28796
|
const volumeActor = volumeActorEntry.actor;
|
|
28795
28797
|
const cfun = volumeActor.getProperty().getRGBTransferFunction(0);
|
|
28796
28798
|
const [lower, upper] = this.viewportProperties?.VOILUTFunction === 'SIGMOID'
|
|
28797
|
-
? (0,
|
|
28799
|
+
? (0,_utilities_getVoiFromSigmoidRGBTransferFunction_js__rspack_import_27/* ["default"] */.A)(cfun)
|
|
28798
28800
|
: cfun.getRange();
|
|
28799
28801
|
const voiRange = { lower, upper };
|
|
28800
28802
|
const volumeColormap = this.getColormap(volumeId);
|
|
@@ -28865,7 +28867,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
28865
28867
|
vtkCamera.setIsPerformingCoordinateTransformation?.(true);
|
|
28866
28868
|
const renderer = this.getRenderer();
|
|
28867
28869
|
const devicePixelRatio = window.devicePixelRatio || 1;
|
|
28868
|
-
const { width, height } = this.
|
|
28870
|
+
const { width, height } = this.getRenderedCanvasSize();
|
|
28869
28871
|
const aspectRatio = width / height;
|
|
28870
28872
|
const [xMin, yMin, xMax, yMax] = renderer.getViewport();
|
|
28871
28873
|
const viewportWidth = xMax - xMin;
|
|
@@ -28908,7 +28910,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
28908
28910
|
canvasPos[1] * devicePixelRatio,
|
|
28909
28911
|
];
|
|
28910
28912
|
const renderer = this.getRenderer();
|
|
28911
|
-
const { width, height } = this.
|
|
28913
|
+
const { width, height } = this.getRenderedCanvasSize();
|
|
28912
28914
|
const [xMin, yMin, xMax, yMax] = renderer.getViewport();
|
|
28913
28915
|
const viewportWidth = xMax - xMin;
|
|
28914
28916
|
const viewportHeight = yMax - yMin;
|
|
@@ -28942,7 +28944,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
28942
28944
|
const vtkCamera = this.getVtkActiveCamera();
|
|
28943
28945
|
vtkCamera.setIsPerformingCoordinateTransformation?.(true);
|
|
28944
28946
|
const renderer = this.getRenderer();
|
|
28945
|
-
const { width, height } = this.
|
|
28947
|
+
const { width, height } = this.getRenderedCanvasSize();
|
|
28946
28948
|
const aspectRatio = width / height;
|
|
28947
28949
|
const [xMin, yMin, xMax, yMax] = renderer.getViewport();
|
|
28948
28950
|
const viewportWidth = xMax - xMin;
|
|
@@ -28963,7 +28965,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
28963
28965
|
return canvasCoordWithDPR;
|
|
28964
28966
|
};
|
|
28965
28967
|
this.hasImageURI = (imageURI) => {
|
|
28966
|
-
const volumeActors = this.getActors().filter((actorEntry) => (0,
|
|
28968
|
+
const volumeActors = this.getActors().filter((actorEntry) => (0,_utilities_actorCheck_js__rspack_import_25/* .actorIsA */.N)(actorEntry, 'vtkVolume'));
|
|
28967
28969
|
return volumeActors.some(({ uid, referencedId }) => {
|
|
28968
28970
|
const volume = _cache_cache_js__rspack_import_2/* ["default"].getVolume */.Ay.getVolume(referencedId || uid);
|
|
28969
28971
|
if (!volume?.getImageIdIndex) {
|
|
@@ -29233,7 +29235,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29233
29235
|
if (typeof voiRangeToUse === 'undefined') {
|
|
29234
29236
|
throw new Error('voiRangeToUse is undefined, need to implement this in the new volume model');
|
|
29235
29237
|
}
|
|
29236
|
-
if ([voiRangeToUse.lower, voiRangeToUse.upper].some(
|
|
29238
|
+
if ([voiRangeToUse.lower, voiRangeToUse.upper].some(_helpers_isInvalidNumber_js__rspack_import_35/* .isInvalidNumber */.$)) {
|
|
29237
29239
|
log.warn('VOI range contains invalid values, ignoring setVOI request', voiRangeToUse);
|
|
29238
29240
|
return;
|
|
29239
29241
|
}
|
|
@@ -29293,7 +29295,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29293
29295
|
const { sliceRangeInfo } = (0,_utilities_getVolumeViewportScrollInfo_js__rspack_import_23/* ["default"] */.A)(this, volumeId, true);
|
|
29294
29296
|
const { sliceRange, spacingInNormalDirection, camera } = sliceRangeInfo;
|
|
29295
29297
|
const { focalPoint, position } = camera;
|
|
29296
|
-
const { newFocalPoint } = (0,
|
|
29298
|
+
const { newFocalPoint } = (0,_utilities_snapFocalPointToSlice_js__rspack_import_26/* ["default"] */.A)(focalPoint, position, sliceRange, viewPlaneNormal, spacingInNormalDirection, delta);
|
|
29297
29299
|
target.cameraFocalPoint = newFocalPoint;
|
|
29298
29300
|
return target;
|
|
29299
29301
|
}
|
|
@@ -29323,7 +29325,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29323
29325
|
}
|
|
29324
29326
|
const { sliceRange, spacingInNormalDirection, camera } = sliceRangeInfo;
|
|
29325
29327
|
const { focalPoint, viewPlaneNormal, position } = camera;
|
|
29326
|
-
const { newFocalPoint, newPosition } = (0,
|
|
29328
|
+
const { newFocalPoint, newPosition } = (0,_utilities_snapFocalPointToSlice_js__rspack_import_26/* ["default"] */.A)(focalPoint, position, sliceRange, viewPlaneNormal, spacingInNormalDirection, delta);
|
|
29327
29329
|
this.setCamera({
|
|
29328
29330
|
focalPoint: newFocalPoint,
|
|
29329
29331
|
position: newPosition,
|
|
@@ -29345,7 +29347,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29345
29347
|
this.setOrientation(acquisition);
|
|
29346
29348
|
return;
|
|
29347
29349
|
}
|
|
29348
|
-
for (const orientation of (Object.values(
|
|
29350
|
+
for (const orientation of (Object.values(_constants_mprCameraValues_js__rspack_import_34/* ["default"] */.A))) {
|
|
29349
29351
|
if (isCompatible(orientation.viewPlaneNormal, inPlaneVector2) &&
|
|
29350
29352
|
isCompatible(orientation.viewPlaneNormal, inPlaneVector1)) {
|
|
29351
29353
|
this.setOrientation(orientation);
|
|
@@ -29380,8 +29382,8 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29380
29382
|
return this.setViewPlane(planeRestriction);
|
|
29381
29383
|
}
|
|
29382
29384
|
const { focalPoint, viewPlaneNormal, position } = this.getCamera();
|
|
29383
|
-
const isNegativeNormal = (0,
|
|
29384
|
-
const isSameNormal = (0,
|
|
29385
|
+
const isNegativeNormal = (0,_utilities_isEqual_js__rspack_import_28/* .isEqualNegative */.WC)(viewPlaneNormal, refViewPlaneNormal);
|
|
29386
|
+
const isSameNormal = (0,_utilities_isEqual_js__rspack_import_28/* ["default"] */.Ay)(viewPlaneNormal, refViewPlaneNormal);
|
|
29385
29387
|
if (typeof sliceIndex === 'number' &&
|
|
29386
29388
|
volumeId !== undefined &&
|
|
29387
29389
|
viewRef.volumeId === volumeId &&
|
|
@@ -29392,7 +29394,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29392
29394
|
sliceIndex = numScrollSteps - sliceIndex - 1;
|
|
29393
29395
|
}
|
|
29394
29396
|
const delta = sliceIndex - currentStepIndex;
|
|
29395
|
-
const { newFocalPoint, newPosition } = (0,
|
|
29397
|
+
const { newFocalPoint, newPosition } = (0,_utilities_snapFocalPointToSlice_js__rspack_import_26/* ["default"] */.A)(focalPoint, position, sliceRange, viewPlaneNormal, spacingInNormalDirection, delta);
|
|
29396
29398
|
this.setCamera({ focalPoint: newFocalPoint, position: newPosition });
|
|
29397
29399
|
}
|
|
29398
29400
|
else if (refFrameOfReference === this.getFrameOfReferenceUID()) {
|
|
@@ -29402,7 +29404,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29402
29404
|
return;
|
|
29403
29405
|
}
|
|
29404
29406
|
if (referencedImageId && this.isInAcquisitionPlane()) {
|
|
29405
|
-
const imagePlaneModule =
|
|
29407
|
+
const imagePlaneModule = _metaData_js__rspack_import_31.get(_enums_index_js__rspack_import_5.MetadataModules.IMAGE_PLANE, referencedImageId);
|
|
29406
29408
|
const { imagePositionPatient } = imagePlaneModule;
|
|
29407
29409
|
const { focalPoint } = this.getCamera();
|
|
29408
29410
|
const diffVector = gl_matrix__rspack_import_1/* .vec3.subtract */.eR.Re(gl_matrix__rspack_import_1/* .vec3.create */.eR.vt(), focalPoint, imagePositionPatient);
|
|
@@ -29421,7 +29423,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29421
29423
|
const focalDelta = gl_matrix__rspack_import_1/* .vec3.subtract */.eR.Re([0, 0, 0], cameraFocalPoint, focalPoint);
|
|
29422
29424
|
const useNormal = refViewPlaneNormal ?? viewPlaneNormal;
|
|
29423
29425
|
const normalDot = gl_matrix__rspack_import_1/* .vec3.dot */.eR.Om(focalDelta, useNormal);
|
|
29424
|
-
if (!(0,
|
|
29426
|
+
if (!(0,_utilities_isEqual_js__rspack_import_28/* ["default"] */.Ay)(normalDot, 0)) {
|
|
29425
29427
|
gl_matrix__rspack_import_1/* .vec3.scale */.eR.hs(focalDelta, useNormal, normalDot);
|
|
29426
29428
|
}
|
|
29427
29429
|
const newFocal = gl_matrix__rspack_import_1/* .vec3.add */.eR.WQ([0, 0, 0], focalPoint, focalDelta);
|
|
@@ -29505,7 +29507,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29505
29507
|
return !this.useCPURendering;
|
|
29506
29508
|
}
|
|
29507
29509
|
_restoreVolumeRenderingDefaults(volumeActor, volumeId) {
|
|
29508
|
-
if (!(0,
|
|
29510
|
+
if (!(0,_utilities_actorCheck_js__rspack_import_25/* .isImageActor */.e)(volumeActor)) {
|
|
29509
29511
|
return;
|
|
29510
29512
|
}
|
|
29511
29513
|
const properties = this.getDefaultProperties(volumeId);
|
|
@@ -29560,7 +29562,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29560
29562
|
if (!viewportPreset) {
|
|
29561
29563
|
return;
|
|
29562
29564
|
}
|
|
29563
|
-
(0,
|
|
29565
|
+
(0,_utilities_applyPreset_js__rspack_import_29/* ["default"] */.A)(volumeActor, viewportPreset);
|
|
29564
29566
|
this.viewportProperties.preset = viewportPreset.name;
|
|
29565
29567
|
this.render();
|
|
29566
29568
|
if (!suppressEvents) {
|
|
@@ -29590,7 +29592,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29590
29592
|
for (let i = 0; i < volumeInputArray.length; i++) {
|
|
29591
29593
|
const { volumeId, actorUID, slabThickness, ...rest } = volumeInputArray[i];
|
|
29592
29594
|
const actor = await (0,_helpers_createVolumeActor_js__rspack_import_19/* ["default"] */.A)(volumeInputArray[i], this.element, this.id, suppressEvents);
|
|
29593
|
-
const uid = actorUID || (0,
|
|
29595
|
+
const uid = actorUID || (0,_utilities_uuidv4_js__rspack_import_30/* ["default"] */.A)();
|
|
29594
29596
|
volumeActors.push({
|
|
29595
29597
|
uid,
|
|
29596
29598
|
actor,
|
|
@@ -29646,7 +29648,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29646
29648
|
if (!visibility) {
|
|
29647
29649
|
actor.setVisibility(false);
|
|
29648
29650
|
}
|
|
29649
|
-
const uid = actorUID || (0,
|
|
29651
|
+
const uid = actorUID || (0,_utilities_uuidv4_js__rspack_import_30/* ["default"] */.A)();
|
|
29650
29652
|
volumeActors.push({
|
|
29651
29653
|
uid,
|
|
29652
29654
|
actor,
|
|
@@ -29736,7 +29738,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29736
29738
|
}
|
|
29737
29739
|
volumeId ||= this.getVolumeId();
|
|
29738
29740
|
const actorEntry = this.getActors()?.find((actor) => actor.referencedId === volumeId);
|
|
29739
|
-
if (!actorEntry || !(0,
|
|
29741
|
+
if (!actorEntry || !(0,_utilities_actorCheck_js__rspack_import_25/* .actorIsA */.N)(actorEntry, 'vtkVolume')) {
|
|
29740
29742
|
return;
|
|
29741
29743
|
}
|
|
29742
29744
|
const actor = actorEntry.actor;
|
|
@@ -29790,16 +29792,16 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29790
29792
|
_getViewUp(viewPlaneNormal) {
|
|
29791
29793
|
const { viewUp } = this.getCamera();
|
|
29792
29794
|
const dot = gl_matrix__rspack_import_1/* .vec3.dot */.eR.Om(viewUp, viewPlaneNormal);
|
|
29793
|
-
if ((0,
|
|
29795
|
+
if ((0,_utilities_isEqual_js__rspack_import_28/* ["default"] */.Ay)(dot, 0)) {
|
|
29794
29796
|
return viewUp;
|
|
29795
29797
|
}
|
|
29796
|
-
if ((0,
|
|
29798
|
+
if ((0,_utilities_isEqual_js__rspack_import_28/* .isEqualAbs */.Ph)(viewPlaneNormal[0], 1)) {
|
|
29797
29799
|
return [0, 0, 1];
|
|
29798
29800
|
}
|
|
29799
|
-
if ((0,
|
|
29801
|
+
if ((0,_utilities_isEqual_js__rspack_import_28/* .isEqualAbs */.Ph)(viewPlaneNormal[1], 1)) {
|
|
29800
29802
|
return [0, 0, 1];
|
|
29801
29803
|
}
|
|
29802
|
-
if ((0,
|
|
29804
|
+
if ((0,_utilities_isEqual_js__rspack_import_28/* .isEqualAbs */.Ph)(viewPlaneNormal[2], 1)) {
|
|
29803
29805
|
return [0, -1, 0];
|
|
29804
29806
|
}
|
|
29805
29807
|
const vupOrthogonal = (gl_matrix__rspack_import_1/* .vec3.scaleAndAdd */.eR.Ln(gl_matrix__rspack_import_1/* .vec3.create */.eR.vt(), viewUp, viewPlaneNormal, -dot));
|
|
@@ -29823,7 +29825,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29823
29825
|
return this._getAcquisitionPlaneOrientation();
|
|
29824
29826
|
}
|
|
29825
29827
|
else if (orientation === _enums_index_js__rspack_import_5.OrientationAxis.REFORMAT) {
|
|
29826
|
-
return (0,
|
|
29828
|
+
return (0,_helpers_getCameraVectors_js__rspack_import_32/* .getCameraVectors */.S8)(this, {
|
|
29827
29829
|
useViewportNormal: true,
|
|
29828
29830
|
});
|
|
29829
29831
|
}
|
|
@@ -29840,7 +29842,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29840
29842
|
else {
|
|
29841
29843
|
baseOrientation = _enums_index_js__rspack_import_5.OrientationAxis.CORONAL;
|
|
29842
29844
|
}
|
|
29843
|
-
return (0,
|
|
29845
|
+
return (0,_helpers_getCameraVectors_js__rspack_import_32/* .getCameraVectors */.S8)(this, {
|
|
29844
29846
|
useViewportNormal: true,
|
|
29845
29847
|
orientation: baseOrientation,
|
|
29846
29848
|
});
|
|
@@ -29875,16 +29877,11 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29875
29877
|
return slabThickness;
|
|
29876
29878
|
}
|
|
29877
29879
|
getReferencePlaneThickness() {
|
|
29878
|
-
|
|
29879
|
-
if (!Number.isFinite(slabThickness) ||
|
|
29880
|
-
slabThickness <= _constants_index_js__rspack_import_4.RENDERING_DEFAULTS.MINIMUM_SLAB_THICKNESS) {
|
|
29881
|
-
return undefined;
|
|
29882
|
-
}
|
|
29883
|
-
return slabThickness * 2;
|
|
29880
|
+
return (0,_utilities_getViewSlabDepth_js__rspack_import_24/* ["default"] */.A)(this.getSlabThickness() * 2);
|
|
29884
29881
|
}
|
|
29885
29882
|
getIntensityFromWorld(point) {
|
|
29886
29883
|
const actorEntry = this.getDefaultActor();
|
|
29887
|
-
if (!(0,
|
|
29884
|
+
if (!(0,_utilities_actorCheck_js__rspack_import_25/* .actorIsA */.N)(actorEntry, 'vtkVolume')) {
|
|
29888
29885
|
return;
|
|
29889
29886
|
}
|
|
29890
29887
|
const { actor } = actorEntry;
|
|
@@ -29921,7 +29918,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29921
29918
|
const currentIndex = this.getSliceIndex();
|
|
29922
29919
|
sliceIndex ??= currentIndex;
|
|
29923
29920
|
const { viewPlaneNormal } = this.getCamera();
|
|
29924
|
-
return (0,
|
|
29921
|
+
return (0,_utilities_getVolumeViewReferenceId_js__rspack_import_36/* ["default"] */.A)({
|
|
29925
29922
|
sliceIndex,
|
|
29926
29923
|
viewPlaneNormal,
|
|
29927
29924
|
volumeId,
|
|
@@ -29934,7 +29931,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29934
29931
|
return Array.from(this.volumeIds);
|
|
29935
29932
|
}
|
|
29936
29933
|
_configureRenderingPipeline() {
|
|
29937
|
-
const isContextPool = (0,
|
|
29934
|
+
const isContextPool = (0,_helpers_isContextPoolRenderingEngine_js__rspack_import_33/* .isContextPoolRenderingEngine */.q)();
|
|
29938
29935
|
for (const key in this.renderingPipelineFunctions) {
|
|
29939
29936
|
if (Object.prototype.hasOwnProperty.call(this.renderingPipelineFunctions, key)) {
|
|
29940
29937
|
const functions = this.renderingPipelineFunctions[key];
|
|
@@ -29944,7 +29941,7 @@ class BaseVolumeViewport extends _Viewport_js__rspack_import_21/* ["default"] */
|
|
|
29944
29941
|
}
|
|
29945
29942
|
}
|
|
29946
29943
|
function isCompatible(viewPlaneNormal, vector) {
|
|
29947
|
-
return !vector || (0,
|
|
29944
|
+
return !vector || (0,_utilities_isEqual_js__rspack_import_28/* ["default"] */.Ay)(gl_matrix__rspack_import_1/* .vec3.dot */.eR.Om(viewPlaneNormal, vector), 0);
|
|
29948
29945
|
}
|
|
29949
29946
|
/* export default */ __webpack_exports__.A = (BaseVolumeViewport);
|
|
29950
29947
|
|
|
@@ -37286,6 +37283,10 @@ var getImageDataMetadata = __webpack_require__(57804);
|
|
|
37286
37283
|
var getPlaneCubeIntersectionDimensions = __webpack_require__(32367);
|
|
37287
37284
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/core/dist/esm/utilities/getSpacingInNormalDirection.js
|
|
37288
37285
|
var getSpacingInNormalDirection = __webpack_require__(1680);
|
|
37286
|
+
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/core/dist/esm/utilities/voxelSlab/getVoxelThicknessAlongNormal.js
|
|
37287
|
+
var getVoxelThicknessAlongNormal = __webpack_require__(61761);
|
|
37288
|
+
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/core/dist/esm/init.js + 1 modules
|
|
37289
|
+
var init = __webpack_require__(90934);
|
|
37289
37290
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/Viewport.js
|
|
37290
37291
|
var Viewport = __webpack_require__(68840);
|
|
37291
37292
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/core/dist/esm/RenderingEngine/GenericViewport/Planar/planarAdapterCoordinateTransforms.js
|
|
@@ -37347,6 +37348,8 @@ var planarMath = __webpack_require__(81943);
|
|
|
37347
37348
|
|
|
37348
37349
|
|
|
37349
37350
|
|
|
37351
|
+
|
|
37352
|
+
|
|
37350
37353
|
const MIN_CAMERA_DISTANCE = 1;
|
|
37351
37354
|
const MIN_SLICE_SPACING = 1e-6;
|
|
37352
37355
|
const ORTHONORMAL_EPSILON = 1e-6;
|
|
@@ -37499,7 +37502,10 @@ function getVolumeImageIdIndexWorldPoint(imageVolume, imageIdIndex) {
|
|
|
37499
37502
|
function getSliceMetrics(args) {
|
|
37500
37503
|
const { imageVolume, viewPlaneNormal } = args;
|
|
37501
37504
|
const corners = buildImageVolumeCorners(imageVolume);
|
|
37502
|
-
const
|
|
37505
|
+
const measure = (0,init/* .getConfiguration */.D0)().rendering?.sliceStepMeasure === 'l1'
|
|
37506
|
+
? getVoxelThicknessAlongNormal/* ["default"] */.A
|
|
37507
|
+
: getSpacingInNormalDirection/* ["default"] */.A;
|
|
37508
|
+
const spacingInNormalDirection = Math.max(measure(imageVolume, viewPlaneNormal), MIN_SLICE_SPACING);
|
|
37503
37509
|
if (!corners.length) {
|
|
37504
37510
|
return {
|
|
37505
37511
|
min: 0,
|
|
@@ -41805,7 +41811,9 @@ VideoViewport.frameRangeExtractor = /(\/frames\/|[&?]frameNumber=)([^/&?]*)/i;
|
|
|
41805
41811
|
/* import */ var _utilities_updatePlaneRestriction_js__rspack_import_17 = __webpack_require__(49429);
|
|
41806
41812
|
/* import */ var _utilities_voxelSlab_isPlaneDepthViewable_js__rspack_import_18 = __webpack_require__(45827);
|
|
41807
41813
|
/* import */ var _utilities_getPlaneCubeIntersectionDimensions_js__rspack_import_19 = __webpack_require__(32367);
|
|
41808
|
-
/* import */ var
|
|
41814
|
+
/* import */ var _utilities_getNormalizedAspectRatio_js__rspack_import_20 = __webpack_require__(47232);
|
|
41815
|
+
/* import */ var _init_js__rspack_import_21 = __webpack_require__(90934);
|
|
41816
|
+
|
|
41809
41817
|
|
|
41810
41818
|
|
|
41811
41819
|
|
|
@@ -41830,7 +41838,7 @@ VideoViewport.frameRangeExtractor = /(\/frames\/|[&?]frameNumber=)([^/&?]*)/i;
|
|
|
41830
41838
|
const log = _utilities_logger_js__rspack_import_5.coreLog.getLogger('RenderingEngine', 'Viewport');
|
|
41831
41839
|
class Viewport {
|
|
41832
41840
|
constructor(props) {
|
|
41833
|
-
this.insetImageMultiplier = (0,
|
|
41841
|
+
this.insetImageMultiplier = (0,_init_js__rspack_import_21/* .getConfiguration */.D0)().rendering
|
|
41834
41842
|
?.useLegacyCameraFOV
|
|
41835
41843
|
? 1.1
|
|
41836
41844
|
: 1;
|
|
@@ -41967,6 +41975,13 @@ class Viewport {
|
|
|
41967
41975
|
if (this.options?.displayArea) {
|
|
41968
41976
|
this.setDisplayArea(this.options?.displayArea);
|
|
41969
41977
|
}
|
|
41978
|
+
if (this.options?.aspectRatio) {
|
|
41979
|
+
const zoom = this.initialCamera?.parallelScale ? this.getZoom() : null;
|
|
41980
|
+
this.setAspectRatio(this.options.aspectRatio);
|
|
41981
|
+
if (zoom) {
|
|
41982
|
+
this.setZoom(zoom);
|
|
41983
|
+
}
|
|
41984
|
+
}
|
|
41970
41985
|
if (immediate) {
|
|
41971
41986
|
this.render();
|
|
41972
41987
|
}
|
|
@@ -42171,10 +42186,10 @@ class Viewport {
|
|
|
42171
42186
|
});
|
|
42172
42187
|
return;
|
|
42173
42188
|
}
|
|
42174
|
-
resetCameraNoEvent() {
|
|
42189
|
+
resetCameraNoEvent(options) {
|
|
42175
42190
|
const savedValue = this._suppressCameraModifiedEvents;
|
|
42176
42191
|
this._suppressCameraModifiedEvents = true;
|
|
42177
|
-
this.resetCamera();
|
|
42192
|
+
this.resetCamera(options);
|
|
42178
42193
|
this._suppressCameraModifiedEvents = savedValue;
|
|
42179
42194
|
}
|
|
42180
42195
|
setCameraNoEvent(camera) {
|
|
@@ -42239,9 +42254,7 @@ class Viewport {
|
|
|
42239
42254
|
}
|
|
42240
42255
|
setDisplayAreaScale(displayArea) {
|
|
42241
42256
|
const { scale = 1 } = displayArea;
|
|
42242
|
-
const
|
|
42243
|
-
const height = canvas.height;
|
|
42244
|
-
const width = canvas.width;
|
|
42257
|
+
const { width, height } = this.getRenderedCanvasSize();
|
|
42245
42258
|
if (height < 8 || width < 8) {
|
|
42246
42259
|
return;
|
|
42247
42260
|
}
|
|
@@ -42254,10 +42267,10 @@ class Viewport {
|
|
|
42254
42267
|
this.setDisplayAreaFit(displayArea);
|
|
42255
42268
|
const { focalPoint, position, viewUp, viewPlaneNormal } = this.getCamera();
|
|
42256
42269
|
const focalChange = gl_matrix__rspack_import_3/* .vec3.create */.eR.vt();
|
|
42257
|
-
if (
|
|
42270
|
+
if (height % 2) {
|
|
42258
42271
|
gl_matrix__rspack_import_3/* .vec3.scaleAndAdd */.eR.Ln(focalChange, focalChange, viewUp, scale * 0.5 * spacing);
|
|
42259
42272
|
}
|
|
42260
|
-
if (
|
|
42273
|
+
if (width % 2) {
|
|
42261
42274
|
const viewRight = gl_matrix__rspack_import_3/* .vec3.cross */.eR.$A(gl_matrix__rspack_import_3/* .vec3.create */.eR.vt(), viewUp, viewPlaneNormal);
|
|
42262
42275
|
gl_matrix__rspack_import_3/* .vec3.scaleAndAdd */.eR.Ln(focalChange, focalChange, viewRight, scale * 0.5 * spacing);
|
|
42263
42276
|
}
|
|
@@ -42269,7 +42282,7 @@ class Viewport {
|
|
|
42269
42282
|
position: gl_matrix__rspack_import_3/* .vec3.add */.eR.WQ(gl_matrix__rspack_import_3/* .vec3.create */.eR.vt(), position, focalChange),
|
|
42270
42283
|
});
|
|
42271
42284
|
}
|
|
42272
|
-
setDisplayAreaFit(displayArea) {
|
|
42285
|
+
setDisplayAreaFit(displayArea, baseCamera = this.fitToCanvasCamera) {
|
|
42273
42286
|
const { imageArea, imageCanvasPoint } = displayArea;
|
|
42274
42287
|
const devicePixelRatio = window?.devicePixelRatio || 1;
|
|
42275
42288
|
const imageData = this.getDefaultImageData();
|
|
@@ -42290,18 +42303,19 @@ class Viewport {
|
|
|
42290
42303
|
Math.abs(canvasEdge[1] - canvasZero[1]),
|
|
42291
42304
|
];
|
|
42292
42305
|
const [imgWidth, imgHeight] = canvasImage;
|
|
42293
|
-
|
|
42306
|
+
const baseZoom = this.getZoom(baseCamera);
|
|
42307
|
+
if (!Number.isFinite(baseZoom) || baseZoom <= 0) {
|
|
42308
|
+
return;
|
|
42309
|
+
}
|
|
42310
|
+
let zoom = baseZoom / this.insetImageMultiplier;
|
|
42294
42311
|
if (imageArea) {
|
|
42295
42312
|
const [areaX, areaY] = imageArea;
|
|
42296
42313
|
const currentScale = Math.max(Math.abs(imgWidth / canvasWidth), Math.abs(imgHeight / canvasHeight));
|
|
42297
42314
|
const requireX = Math.abs((areaX * imgWidth) / canvasWidth);
|
|
42298
42315
|
const requireY = Math.abs((areaY * imgHeight) / canvasHeight);
|
|
42299
|
-
const initZoom = this.getZoom();
|
|
42300
|
-
const fitZoom = this.getZoom(this.fitToCanvasCamera);
|
|
42301
42316
|
const absZoom = requireX > requireY ? currentScale / requireX : currentScale / requireY;
|
|
42302
|
-
|
|
42303
|
-
zoom
|
|
42304
|
-
this.setZoom(this.insetImageMultiplier * zoom, false);
|
|
42317
|
+
zoom = absZoom * baseZoom;
|
|
42318
|
+
this.setZoom(this.insetImageMultiplier * zoom, false, baseCamera);
|
|
42305
42319
|
}
|
|
42306
42320
|
if (imageCanvasPoint) {
|
|
42307
42321
|
const { imagePoint, canvasPoint = imagePoint || [0.5, 0.5] } = imageCanvasPoint;
|
|
@@ -42309,9 +42323,9 @@ class Viewport {
|
|
|
42309
42323
|
const canvasPanX = canvasWidth * (canvasX - 0.5);
|
|
42310
42324
|
const canvasPanY = canvasHeight * (canvasY - 0.5);
|
|
42311
42325
|
const [imageX, imageY] = imagePoint || canvasPoint;
|
|
42312
|
-
const useZoom = zoom;
|
|
42313
|
-
const imagePanX =
|
|
42314
|
-
const imagePanY =
|
|
42326
|
+
const useZoom = (this.insetImageMultiplier * zoom) / baseZoom;
|
|
42327
|
+
const imagePanX = useZoom * imgWidth * (0.5 - imageX);
|
|
42328
|
+
const imagePanY = useZoom * imgHeight * (0.5 - imageY);
|
|
42315
42329
|
const newPositionX = imagePanX + canvasPanX;
|
|
42316
42330
|
const newPositionY = imagePanY + canvasPanY;
|
|
42317
42331
|
const deltaPoint2 = [newPositionX, newPositionY];
|
|
@@ -42319,9 +42333,48 @@ class Viewport {
|
|
|
42319
42333
|
this.setPan(deltaPoint2, false);
|
|
42320
42334
|
}
|
|
42321
42335
|
}
|
|
42336
|
+
getRenderedCanvasSize() {
|
|
42337
|
+
return {
|
|
42338
|
+
width: this.sWidth || this.canvas.width,
|
|
42339
|
+
height: this.sHeight || this.canvas.height,
|
|
42340
|
+
};
|
|
42341
|
+
}
|
|
42322
42342
|
getDisplayArea() {
|
|
42323
42343
|
return this.options?.displayArea;
|
|
42324
42344
|
}
|
|
42345
|
+
getWorldSizeInView(bounds) {
|
|
42346
|
+
const imageData = this.getDefaultImageData();
|
|
42347
|
+
const activeCamera = this.getVtkActiveCamera();
|
|
42348
|
+
const viewPlaneNormal = activeCamera.getViewPlaneNormal();
|
|
42349
|
+
const viewUp = activeCamera.getViewUp();
|
|
42350
|
+
if (imageData) {
|
|
42351
|
+
return (0,_utilities_getPlaneCubeIntersectionDimensions_js__rspack_import_19/* .getCubeSizeInView */.H)(imageData, viewPlaneNormal, viewUp);
|
|
42352
|
+
}
|
|
42353
|
+
let boundsToUse = bounds;
|
|
42354
|
+
if (!boundsToUse) {
|
|
42355
|
+
const defaultActor = this.getDefaultActor();
|
|
42356
|
+
boundsToUse =
|
|
42357
|
+
defaultActor && (0,_utilities_actorCheck_js__rspack_import_9/* .isImageActor */.e)(defaultActor)
|
|
42358
|
+
? defaultActor.actor.getMapper().getInputData().getBounds()
|
|
42359
|
+
: this.getRenderer().computeVisiblePropBounds();
|
|
42360
|
+
}
|
|
42361
|
+
return this._getWorldDistanceViewUpAndViewRight(boundsToUse, viewUp, viewPlaneNormal);
|
|
42362
|
+
}
|
|
42363
|
+
getFitParallelScale(worldSize, aspectRatio) {
|
|
42364
|
+
const { widthWorld, heightWorld } = worldSize;
|
|
42365
|
+
const [stretchX, stretchY] = (0,_utilities_getNormalizedAspectRatio_js__rspack_import_20/* .getNormalizedAspectRatio */.x)(aspectRatio);
|
|
42366
|
+
const stretchRatio = stretchX / stretchY;
|
|
42367
|
+
const boundsAspectRatio = (widthWorld * stretchRatio) / heightWorld;
|
|
42368
|
+
const canvasAspectRatio = this.sWidth / this.sHeight;
|
|
42369
|
+
const scaleFactor = boundsAspectRatio / canvasAspectRatio;
|
|
42370
|
+
let parallelScale = scaleFactor < 1
|
|
42371
|
+
? (this.insetImageMultiplier * heightWorld) / 2
|
|
42372
|
+
: (this.insetImageMultiplier * heightWorld * scaleFactor) / 2;
|
|
42373
|
+
if (stretchRatio < 1) {
|
|
42374
|
+
parallelScale /= stretchRatio;
|
|
42375
|
+
}
|
|
42376
|
+
return parallelScale;
|
|
42377
|
+
}
|
|
42325
42378
|
resetCamera(options) {
|
|
42326
42379
|
const { resetPan = true, resetZoom = true, resetToCenter = true, storeAsInitialCamera = true, resetAspectRatio = true, } = options || {};
|
|
42327
42380
|
const renderer = this.getRenderer();
|
|
@@ -42353,16 +42406,11 @@ class Viewport {
|
|
|
42353
42406
|
const idx = [middleIJK[0], middleIJK[1], middleIJK[2]];
|
|
42354
42407
|
imageData.indexToWorld(idx, focalPoint);
|
|
42355
42408
|
}
|
|
42356
|
-
const
|
|
42357
|
-
|
|
42358
|
-
|
|
42359
|
-
|
|
42360
|
-
const
|
|
42361
|
-
const canvasAspectRatio = canvasSize[0] / canvasSize[1];
|
|
42362
|
-
const scaleFactor = boundsAspectRatio / canvasAspectRatio;
|
|
42363
|
-
const parallelScale = scaleFactor < 1
|
|
42364
|
-
? (this.insetImageMultiplier * heightWorld) / 2
|
|
42365
|
-
: (this.insetImageMultiplier * heightWorld * scaleFactor) / 2;
|
|
42409
|
+
const worldSize = this.getWorldSizeInView(bounds);
|
|
42410
|
+
const targetAspectRatio = resetAspectRatio
|
|
42411
|
+
? this.options?.aspectRatio || [1, 1]
|
|
42412
|
+
: this.getAspectRatio();
|
|
42413
|
+
const parallelScale = this.getFitParallelScale(worldSize, targetAspectRatio);
|
|
42366
42414
|
const radius = Viewport.boundsRadius(bounds) *
|
|
42367
42415
|
(this.type === _enums_ViewportType_js__rspack_import_7/* ["default"].VOLUME_3D */.A.VOLUME_3D ? 10 : 1);
|
|
42368
42416
|
const distance = this.insetImageMultiplier * radius;
|
|
@@ -42382,9 +42430,6 @@ class Viewport {
|
|
|
42382
42430
|
];
|
|
42383
42431
|
activeCamera.setPhysicalScale(radius);
|
|
42384
42432
|
activeCamera.setPhysicalTranslation(-focalPointToSet[0], -focalPointToSet[1], -focalPointToSet[2]);
|
|
42385
|
-
const targetAspectRatio = resetAspectRatio
|
|
42386
|
-
? this.options?.aspectRatio || [1, 1]
|
|
42387
|
-
: this.getAspectRatio();
|
|
42388
42433
|
this.setCamera({
|
|
42389
42434
|
parallelScale: resetZoom ? parallelScale : previousCamera.parallelScale,
|
|
42390
42435
|
focalPoint: focalPointToSet,
|
|
@@ -42393,7 +42438,6 @@ class Viewport {
|
|
|
42393
42438
|
viewUp: viewUpToSet,
|
|
42394
42439
|
clippingRange: clippingRangeToUse,
|
|
42395
42440
|
aspectRatio: targetAspectRatio,
|
|
42396
|
-
isFitViewportAfterStretch: false,
|
|
42397
42441
|
});
|
|
42398
42442
|
const modifiedCamera = this.getCamera();
|
|
42399
42443
|
this.setFitToCanvasCamera(this.getCamera());
|
|
@@ -42467,17 +42511,44 @@ class Viewport {
|
|
|
42467
42511
|
position: newPosition,
|
|
42468
42512
|
}, storeAsInitialCamera);
|
|
42469
42513
|
}
|
|
42514
|
+
getComparableParallelScale(compareCamera) {
|
|
42515
|
+
const { parallelScale } = compareCamera || {};
|
|
42516
|
+
if (!parallelScale) {
|
|
42517
|
+
return parallelScale;
|
|
42518
|
+
}
|
|
42519
|
+
const currentAspectRatio = this.getAspectRatio();
|
|
42520
|
+
const compareAspectRatio = compareCamera.aspectRatio ?? currentAspectRatio;
|
|
42521
|
+
const getStretchRatio = (value) => {
|
|
42522
|
+
const [stretchX, stretchY] = (0,_utilities_getNormalizedAspectRatio_js__rspack_import_20/* .getNormalizedAspectRatio */.x)(value);
|
|
42523
|
+
return stretchX / stretchY;
|
|
42524
|
+
};
|
|
42525
|
+
if ((0,_utilities_isEqual_js__rspack_import_12/* ["default"] */.Ay)(getStretchRatio(currentAspectRatio), getStretchRatio(compareAspectRatio))) {
|
|
42526
|
+
return parallelScale;
|
|
42527
|
+
}
|
|
42528
|
+
const worldSize = this.getWorldSizeInView();
|
|
42529
|
+
if (!worldSize?.heightWorld) {
|
|
42530
|
+
return parallelScale;
|
|
42531
|
+
}
|
|
42532
|
+
const ratioFactor = this.getFitParallelScale(worldSize, currentAspectRatio) /
|
|
42533
|
+
this.getFitParallelScale(worldSize, compareAspectRatio);
|
|
42534
|
+
return Number.isFinite(ratioFactor) && ratioFactor
|
|
42535
|
+
? parallelScale * ratioFactor
|
|
42536
|
+
: parallelScale;
|
|
42537
|
+
}
|
|
42470
42538
|
getZoom(compareCamera = this.initialCamera) {
|
|
42471
42539
|
if (!compareCamera) {
|
|
42472
42540
|
return 1;
|
|
42473
42541
|
}
|
|
42474
42542
|
const activeCamera = this.getVtkActiveCamera();
|
|
42475
|
-
|
|
42476
|
-
|
|
42543
|
+
return (this.getComparableParallelScale(compareCamera) /
|
|
42544
|
+
activeCamera.getParallelScale());
|
|
42477
42545
|
}
|
|
42478
|
-
setZoom(value, storeAsInitialCamera = false) {
|
|
42546
|
+
setZoom(value, storeAsInitialCamera = false, compareCamera = this.initialCamera) {
|
|
42479
42547
|
const camera = this.getCamera();
|
|
42480
|
-
const
|
|
42548
|
+
const initialParallelScale = this.getComparableParallelScale(compareCamera);
|
|
42549
|
+
if (!initialParallelScale) {
|
|
42550
|
+
return;
|
|
42551
|
+
}
|
|
42481
42552
|
const parallelScale = initialParallelScale / value;
|
|
42482
42553
|
if (camera.parallelScale === parallelScale && !storeAsInitialCamera) {
|
|
42483
42554
|
return;
|
|
@@ -42491,16 +42562,23 @@ class Viewport {
|
|
|
42491
42562
|
const { aspectRatio } = this.getCamera();
|
|
42492
42563
|
return aspectRatio ?? this.options?.aspectRatio ?? [1, 1];
|
|
42493
42564
|
}
|
|
42494
|
-
setAspectRatio(value,
|
|
42565
|
+
setAspectRatio(value, options = {}) {
|
|
42566
|
+
const { fit = false, storeAsInitialCamera = false } = options;
|
|
42495
42567
|
const camera = this.getCamera();
|
|
42496
42568
|
if (storeAsInitialCamera) {
|
|
42497
42569
|
this.options.aspectRatio = value;
|
|
42498
42570
|
}
|
|
42499
|
-
|
|
42571
|
+
const cameraToSet = {
|
|
42500
42572
|
...camera,
|
|
42501
42573
|
aspectRatio: value,
|
|
42502
|
-
|
|
42503
|
-
|
|
42574
|
+
};
|
|
42575
|
+
if (fit) {
|
|
42576
|
+
const worldSize = this.getWorldSizeInView();
|
|
42577
|
+
if (worldSize?.heightWorld) {
|
|
42578
|
+
cameraToSet.parallelScale = this.getFitParallelScale(worldSize, value);
|
|
42579
|
+
}
|
|
42580
|
+
}
|
|
42581
|
+
this.setCamera(cameraToSet, storeAsInitialCamera);
|
|
42504
42582
|
}
|
|
42505
42583
|
_getFocalPointForViewPlaneReset(imageData) {
|
|
42506
42584
|
const { focalPoint, viewPlaneNormal: normal } = this.getCamera();
|
|
@@ -42560,56 +42638,11 @@ class Viewport {
|
|
|
42560
42638
|
rotation: this.getRotation(),
|
|
42561
42639
|
};
|
|
42562
42640
|
}
|
|
42563
|
-
setAspectRatioForVTKCamera(aspectRatio, isFitViewportAfterStretch = true) {
|
|
42564
|
-
const vtkCamera = this.getVtkActiveCamera();
|
|
42565
|
-
if (!isFitViewportAfterStretch) {
|
|
42566
|
-
vtkCamera.setAspectRatio(aspectRatio);
|
|
42567
|
-
return;
|
|
42568
|
-
}
|
|
42569
|
-
const currentAspect = vtkCamera.getAspectRatio() || [1, 1];
|
|
42570
|
-
if (currentAspect[0] === aspectRatio[0] &&
|
|
42571
|
-
currentAspect[1] === aspectRatio[1]) {
|
|
42572
|
-
return;
|
|
42573
|
-
}
|
|
42574
|
-
const getRatioValue = ([x, y]) => x / y;
|
|
42575
|
-
const oldRatioValue = getRatioValue(currentAspect);
|
|
42576
|
-
const newRatioValue = getRatioValue(aspectRatio);
|
|
42577
|
-
vtkCamera.setAspectRatio(aspectRatio);
|
|
42578
|
-
const imageData = this.getDefaultImageData();
|
|
42579
|
-
if (!imageData)
|
|
42580
|
-
return;
|
|
42581
|
-
const getFitScale = (rVal) => {
|
|
42582
|
-
const { widthWorld, heightWorld } = (0,_utilities_getPlaneCubeIntersectionDimensions_js__rspack_import_19/* .getCubeSizeInView */.H)(imageData, vtkCamera.getViewPlaneNormal(), vtkCamera.getViewUp());
|
|
42583
|
-
const canvasAspectRatio = this.sWidth / this.sHeight;
|
|
42584
|
-
const effectiveWidth = widthWorld * rVal;
|
|
42585
|
-
const effectiveImageRatio = effectiveWidth / heightWorld;
|
|
42586
|
-
let fitScale = effectiveImageRatio > canvasAspectRatio
|
|
42587
|
-
? effectiveWidth / (2 * canvasAspectRatio)
|
|
42588
|
-
: heightWorld / 2;
|
|
42589
|
-
if (rVal < 1)
|
|
42590
|
-
fitScale /= rVal;
|
|
42591
|
-
return fitScale;
|
|
42592
|
-
};
|
|
42593
|
-
const ratioFactor = getFitScale(newRatioValue) / getFitScale(oldRatioValue);
|
|
42594
|
-
vtkCamera.setParallelScale(vtkCamera.getParallelScale() * ratioFactor);
|
|
42595
|
-
if (this.initialCamera?.parallelScale) {
|
|
42596
|
-
this.initialCamera = {
|
|
42597
|
-
...this.initialCamera,
|
|
42598
|
-
parallelScale: this.initialCamera.parallelScale * ratioFactor,
|
|
42599
|
-
};
|
|
42600
|
-
}
|
|
42601
|
-
if (this.fitToCanvasCamera?.parallelScale) {
|
|
42602
|
-
this.fitToCanvasCamera = {
|
|
42603
|
-
...this.fitToCanvasCamera,
|
|
42604
|
-
parallelScale: this.fitToCanvasCamera.parallelScale * ratioFactor,
|
|
42605
|
-
};
|
|
42606
|
-
}
|
|
42607
|
-
}
|
|
42608
42641
|
setCamera(cameraInterface, storeAsInitialCamera = false) {
|
|
42609
42642
|
const vtkCamera = this.getVtkActiveCamera();
|
|
42610
42643
|
const previousCamera = this.getCamera();
|
|
42611
42644
|
const updatedCamera = Object.assign({}, previousCamera, cameraInterface);
|
|
42612
|
-
const { viewUp, viewPlaneNormal, position, focalPoint, parallelScale, viewAngle, flipHorizontal, flipVertical, clippingRange, aspectRatio,
|
|
42645
|
+
const { viewUp, viewPlaneNormal, position, focalPoint, parallelScale, viewAngle, flipHorizontal, flipVertical, clippingRange, aspectRatio, } = cameraInterface;
|
|
42613
42646
|
if (flipHorizontal !== undefined) {
|
|
42614
42647
|
const flipH = (flipHorizontal && !this.flipHorizontal) ||
|
|
42615
42648
|
(!flipHorizontal && this.flipHorizontal);
|
|
@@ -42646,7 +42679,7 @@ class Viewport {
|
|
|
42646
42679
|
vtkCamera.setClippingRange(clippingRange);
|
|
42647
42680
|
}
|
|
42648
42681
|
if (aspectRatio) {
|
|
42649
|
-
|
|
42682
|
+
vtkCamera.setAspectRatio(aspectRatio);
|
|
42650
42683
|
}
|
|
42651
42684
|
const prevFocalPoint = previousCamera.focalPoint;
|
|
42652
42685
|
const prevViewUp = previousCamera.viewUp;
|
|
@@ -42915,8 +42948,8 @@ class Viewport {
|
|
|
42915
42948
|
if (displayArea !== this.getDisplayArea()) {
|
|
42916
42949
|
this.setDisplayArea(displayArea);
|
|
42917
42950
|
}
|
|
42918
|
-
this.setZoom(zoom);
|
|
42919
42951
|
this.setAspectRatio(aspectRatio);
|
|
42952
|
+
this.setZoom(zoom);
|
|
42920
42953
|
if (pan) {
|
|
42921
42954
|
const [aspectX, aspectY] = aspectRatio;
|
|
42922
42955
|
this.setPan([pan[0] * zoom * aspectX, pan[1] * zoom * aspectY]);
|
|
@@ -48437,7 +48470,7 @@ var MeshType;
|
|
|
48437
48470
|
},
|
|
48438
48471
|
10234(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
48439
48472
|
"use strict";
|
|
48440
|
-
/* import */ var _cornerstonejs_metadata__rspack_import_0 = __webpack_require__(
|
|
48473
|
+
/* import */ var _cornerstonejs_metadata__rspack_import_0 = __webpack_require__(76368);
|
|
48441
48474
|
|
|
48442
48475
|
/* export default */ __webpack_exports__.A = (_cornerstonejs_metadata__rspack_import_0/* .Enums.MetadataModules */.fX.nb);
|
|
48443
48476
|
|
|
@@ -49801,7 +49834,7 @@ function createMesh(geometryId, meshData) {
|
|
|
49801
49834
|
52284(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
49802
49835
|
"use strict";
|
|
49803
49836
|
__webpack_require__.r(__webpack_exports__);
|
|
49804
|
-
/* import */ var _cornerstonejs_metadata__rspack_import_0 = __webpack_require__(
|
|
49837
|
+
/* import */ var _cornerstonejs_metadata__rspack_import_0 = __webpack_require__(76368);
|
|
49805
49838
|
|
|
49806
49839
|
const { /* addProvider */Zi: addProvider, /* removeProvider */iw: removeProvider, /* removeAllProviders */SD: removeAllProviders, /* getMetaData */YA: getMetaData, /* getTyped */FE: getTyped, /* get */Jt: get, /* getNormalized */Y2: getNormalized, /* toUpperCamelTag */Qy: toUpperCamelTag, /* toLowerCamelTag */Hw: toLowerCamelTag, } = _cornerstonejs_metadata__rspack_import_0/* .metaData */.wx;
|
|
49807
49840
|
|
|
@@ -50307,7 +50340,7 @@ function resetRenderingCapabilities({ clearStorage = false, } = {}) {
|
|
|
50307
50340
|
},
|
|
50308
50341
|
6945() {
|
|
50309
50342
|
"use strict";
|
|
50310
|
-
const version = '5.
|
|
50343
|
+
const version = '5.12.0';
|
|
50311
50344
|
|
|
50312
50345
|
|
|
50313
50346
|
},
|
|
@@ -50420,7 +50453,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
50420
50453
|
|
|
50421
50454
|
|
|
50422
50455
|
},
|
|
50423
|
-
|
|
50456
|
+
76368(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
50424
50457
|
"use strict";
|
|
50425
50458
|
|
|
50426
50459
|
// EXPORTS
|
|
@@ -50511,16 +50544,18 @@ function definedAttributesOf(source) {
|
|
|
50511
50544
|
}
|
|
50512
50545
|
/* export default */ var utilities_definedAttributesOf = ((/* unused pure expression or super */ null && (definedAttributesOf)));
|
|
50513
50546
|
|
|
50514
|
-
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/
|
|
50515
|
-
var
|
|
50547
|
+
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/utils/dist/esm/index.js
|
|
50548
|
+
var esm = __webpack_require__(20325);
|
|
50549
|
+
;// CONCATENATED MODULE: ../../node_modules/@cornerstonejs/metadata/dist/esm/utilities/toNumber.js
|
|
50550
|
+
|
|
50551
|
+
|
|
50552
|
+
|
|
50516
50553
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/metadata/dist/esm/utilities/isVideoTransferSyntax.js
|
|
50517
50554
|
var utilities_isVideoTransferSyntax = __webpack_require__(51915);
|
|
50518
50555
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/metadata/dist/esm/utilities/imageIdToURI.js
|
|
50519
50556
|
var imageIdToURI = __webpack_require__(95595);
|
|
50520
50557
|
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/metadata/dist/esm/utilities/isEqual.js
|
|
50521
50558
|
var utilities_isEqual = __webpack_require__(55332);
|
|
50522
|
-
// EXTERNAL MODULE: ../../node_modules/@cornerstonejs/utils/dist/esm/index.js
|
|
50523
|
-
var esm = __webpack_require__(20325);
|
|
50524
50559
|
;// CONCATENATED MODULE: ../../node_modules/@cornerstonejs/metadata/dist/esm/utilities/getPixelSpacingInformation.js
|
|
50525
50560
|
|
|
50526
50561
|
|
|
@@ -50831,7 +50866,7 @@ function getTagValue(imageId, tag) {
|
|
|
50831
50866
|
}
|
|
50832
50867
|
}
|
|
50833
50868
|
function getFiniteValue(imageId, tag) {
|
|
50834
|
-
return (0,
|
|
50869
|
+
return (0,esm/* .toFiniteNumber */.IQ)(getTagValue(imageId, tag));
|
|
50835
50870
|
}
|
|
50836
50871
|
function getPhilipsPrivateBValue(imageId) {
|
|
50837
50872
|
const value = metaData/* .get */.Jt('20011003', imageId);
|
|
@@ -51869,7 +51904,7 @@ function pixelDataUpdate(next, query, data, options) {
|
|
|
51869
51904
|
result.pixelPaddingValue = pixelPaddingValue & 0xffff;
|
|
51870
51905
|
}
|
|
51871
51906
|
if (pixelPaddingRangeLimit < 0) {
|
|
51872
|
-
result.
|
|
51907
|
+
result.pixelPaddingRangeLimit = pixelPaddingRangeLimit & 0xffff;
|
|
51873
51908
|
}
|
|
51874
51909
|
const { smallestPixelValue, largestPixelValue } = result;
|
|
51875
51910
|
if (smallestPixelValue < 0) {
|
|
@@ -53186,6 +53221,60 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
53186
53221
|
});
|
|
53187
53222
|
|
|
53188
53223
|
|
|
53224
|
+
},
|
|
53225
|
+
15801(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
53226
|
+
"use strict";
|
|
53227
|
+
function isNumberLike(value) {
|
|
53228
|
+
return (typeof value === 'string' ||
|
|
53229
|
+
typeof value === 'number' ||
|
|
53230
|
+
value instanceof String ||
|
|
53231
|
+
value instanceof Number);
|
|
53232
|
+
}
|
|
53233
|
+
function isEntryWise(value) {
|
|
53234
|
+
if (typeof value !== 'object' || value === null) {
|
|
53235
|
+
return false;
|
|
53236
|
+
}
|
|
53237
|
+
return (Symbol.iterator in value ||
|
|
53238
|
+
typeof value.length === 'number');
|
|
53239
|
+
}
|
|
53240
|
+
function toFiniteNumber(value, defaultValue) {
|
|
53241
|
+
if (value === undefined || value === null) {
|
|
53242
|
+
return defaultValue;
|
|
53243
|
+
}
|
|
53244
|
+
if (isNumberLike(value)) {
|
|
53245
|
+
const converted = Number(value);
|
|
53246
|
+
return Number.isFinite(converted) ? converted : defaultValue;
|
|
53247
|
+
}
|
|
53248
|
+
if (!isEntryWise(value)) {
|
|
53249
|
+
return defaultValue;
|
|
53250
|
+
}
|
|
53251
|
+
return Array.from(value, (entry) => {
|
|
53252
|
+
const converted = Number(entry);
|
|
53253
|
+
return Number.isFinite(converted) ? converted : defaultValue;
|
|
53254
|
+
});
|
|
53255
|
+
}
|
|
53256
|
+
function toNumber(val) {
|
|
53257
|
+
if (val === undefined || val === null) {
|
|
53258
|
+
return undefined;
|
|
53259
|
+
}
|
|
53260
|
+
if (isNumberLike(val)) {
|
|
53261
|
+
return Number(val);
|
|
53262
|
+
}
|
|
53263
|
+
if (Array.isArray(val)) {
|
|
53264
|
+
return val.map((entry) => Number(entry));
|
|
53265
|
+
}
|
|
53266
|
+
if (typeof val === 'object' && Symbol.iterator in val) {
|
|
53267
|
+
return Array.from(val, (entry) => Number(entry));
|
|
53268
|
+
}
|
|
53269
|
+
return Number(val);
|
|
53270
|
+
}
|
|
53271
|
+
/* unused export default */ var __rspack_default_export = ((/* unused pure expression or super */ null && (toNumber)));
|
|
53272
|
+
|
|
53273
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
53274
|
+
IQ: () => (toFiniteNumber)
|
|
53275
|
+
});
|
|
53276
|
+
|
|
53277
|
+
|
|
53189
53278
|
},
|
|
53190
53279
|
90655(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
53191
53280
|
"use strict";
|