@ohif/app 3.14.0-beta.97 → 3.14.0-beta.99
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/{1645.bundle.a98b9ca6.js → 1645.bundle.1a466b16.js} +600 -600
- package/dist/{1788.bundle.3f1349d2.js → 1788.bundle.962951f9.js} +26 -26
- package/dist/{1793.bundle.27458a55.js → 1793.bundle.30f89e46.js} +5 -3
- package/dist/{1862.bundle.79bfe469.js → 1862.bundle.3ae388c3.js} +2 -2
- package/dist/204.bundle.bc44c201.js +101 -0
- package/dist/204.bundle.css +52 -0
- package/dist/{2748.bundle.eaa94e2e.js → 2103.bundle.1cf348e8.js} +1 -1771
- package/dist/{2478.bundle.fc6ab30b.js → 2478.bundle.68ff1b2d.js} +2 -2
- package/dist/{2717.bundle.d5f58443.js → 2717.bundle.4318f1ee.js} +45 -43
- package/dist/{5989.bundle.f484884a.js → 287.bundle.ee60c370.js} +4570 -832
- package/dist/{2894.bundle.d612efb2.js → 2894.bundle.30c0af5b.js} +20 -14
- package/dist/{2991.bundle.f94892fb.js → 2991.bundle.77642eee.js} +101 -97
- package/dist/{3004.bundle.51919fdc.js → 3004.bundle.5568149a.js} +39 -38
- package/dist/{3255.bundle.13e205ac.js → 3255.bundle.3272671f.js} +29 -27
- package/dist/{3366.bundle.62baeeec.js → 3366.bundle.d9e78e25.js} +57 -53
- package/dist/{3468.bundle.f5dc5e44.js → 3468.bundle.666f2441.js} +37 -27
- package/dist/{347.bundle.397bb252.js → 347.bundle.1323658e.js} +44 -44
- package/dist/{3622.bundle.f4cf2d16.js → 3622.bundle.edb42b96.js} +56 -54
- package/dist/{3723.bundle.eab70100.js → 3723.bundle.43ff1971.js} +1 -1
- package/dist/{3771.bundle.aba09bd7.js → 3771.bundle.a5754f97.js} +8 -8
- package/dist/{4449.bundle.aaa4ab92.js → 4487.bundle.fa0375a4.js} +853 -95
- package/dist/{4606.bundle.a3485206.js → 4606.bundle.6c297e2a.js} +9 -7
- package/dist/{4998.bundle.3aedb48d.js → 4998.bundle.25b8cbfe.js} +5 -3
- package/dist/{5076.bundle.95c07142.js → 5076.bundle.2a14756f.js} +66 -66
- package/dist/{5143.bundle.04f54c00.js → 5143.bundle.53156bb0.js} +358 -226
- package/dist/{5154.bundle.2f460017.js → 5154.bundle.ccd02dd7.js} +5 -3
- package/dist/{5320.bundle.9b05cebb.js → 5320.bundle.c17eb4a7.js} +678 -546
- package/dist/{6212.bundle.e505e123.js → 6212.bundle.c4856be7.js} +48 -46
- package/dist/{6253.bundle.9b473339.js → 6253.bundle.596ce463.js} +1225 -1145
- package/dist/{1153.bundle.51d39e80.js → 6314.bundle.5aadfe48.js} +199 -420
- package/dist/{641.bundle.4627a8e1.js → 641.bundle.8e45751e.js} +89 -89
- package/dist/{6481.bundle.d2fca485.js → 6481.bundle.85093e70.js} +29 -23
- package/dist/{6507.bundle.d52f5e81.js → 6507.bundle.bbcdd01e.js} +76 -76
- package/dist/{6722.bundle.d09a8aad.js → 6722.bundle.3e9a4ef6.js} +4 -4
- package/dist/{6956.bundle.c82fd790.js → 6956.bundle.dc0e8660.js} +33 -33
- package/dist/{7526.bundle.0685dfeb.js → 7526.bundle.3460c3ca.js} +55 -53
- package/dist/{7604.bundle.9eb317c8.js → 7604.bundle.f1eeded4.js} +2 -2
- package/dist/{8312.bundle.2cb75b58.js → 8312.bundle.d67b6f4e.js} +652 -687
- package/dist/{6847.bundle.b2adb444.js → 8729.bundle.e17fe9b2.js} +87 -845
- package/dist/{8788.bundle.4bb4c65b.js → 8788.bundle.83ddf642.js} +21 -20
- package/dist/{8868.bundle.4c357767.js → 8868.bundle.8f3653b3.js} +31 -31
- package/dist/{8923.bundle.9aca06c4.js → 8923.bundle.8b682e96.js} +148 -148
- package/dist/{899.bundle.9a033d16.js → 899.bundle.4e1aee7f.js} +73 -203
- package/dist/{9187.bundle.8f72b4fe.js → 9187.bundle.407afa07.js} +112 -110
- package/dist/9385.bundle.fb0bbf4a.js +1888 -0
- package/dist/{9481.bundle.ccb81f53.js → 9481.bundle.d045ae3a.js} +8 -6
- package/dist/{9517.bundle.1ae74db3.js → 9517.bundle.3e2896ef.js} +31 -17
- package/dist/{9620.bundle.d1dc0be1.js → 9620.bundle.b4cc392c.js} +63 -61
- package/dist/{9841.bundle.0f40f02b.js → 9841.bundle.4f2c401a.js} +93 -91
- package/dist/{9886.bundle.cabb4a24.js → 9886.bundle.b00d5d78.js} +4 -4
- package/dist/{8037.bundle.30a187f7.js → 9889.bundle.bf312047.js} +7743 -1098
- package/dist/{9948.bundle.1172ebca.js → 9948.bundle.fecf81f8.js} +5 -5
- package/dist/{app.bundle.12bfd0b7.js → app.bundle.bb359653.js} +1953 -1245
- package/dist/{compute.bundle.0ed1fe87.js → compute.bundle.9267d449.js} +13 -12
- package/dist/{histogram-worker.bundle.58e60d7c.js → histogram-worker.bundle.29bcdbf6.js} +6 -5
- package/dist/index.html +1 -1
- package/dist/{interpolation.bundle.5a53d112.js → interpolation.bundle.ee9998a4.js} +8 -7
- package/dist/{lib-router.bundle.a5ac870a.js → lib-router.bundle.2a887bc7.js} +334 -201
- package/dist/{polySeg.bundle.b4089601.js → polySeg.bundle.a55f8eee.js} +12 -12
- package/dist/sw.js +11 -1
- package/package.json +14 -19
- package/dist/1566.bundle.d58db206.js +0 -3610
|
@@ -756,8 +756,8 @@ function getVolumeViewportLabelmapImageMapperState(viewport) {
|
|
|
756
756
|
};
|
|
757
757
|
}
|
|
758
758
|
const { viewPlaneNormal, viewUp } = camera;
|
|
759
|
-
const normalizedNormal = gl_matrix__rspack_import_1
|
|
760
|
-
const normalizedViewUp = gl_matrix__rspack_import_1
|
|
759
|
+
const normalizedNormal = gl_matrix__rspack_import_1.vec3.normalize(gl_matrix__rspack_import_1.vec3.create(), viewPlaneNormal);
|
|
760
|
+
const normalizedViewUp = gl_matrix__rspack_import_1.vec3.normalize(gl_matrix__rspack_import_1.vec3.create(), viewUp);
|
|
761
761
|
let sliceIndex;
|
|
762
762
|
if (isLegacyVolumeViewport) {
|
|
763
763
|
try {
|
|
@@ -1405,15 +1405,15 @@ class CircleSculptCursor {
|
|
|
1405
1405
|
if (!this.toolInfo.radius || clearExisting) {
|
|
1406
1406
|
const p0 = viewport.canvasToWorld([0, 0]);
|
|
1407
1407
|
const p1 = viewport.canvasToWorld([this.toolInfo.toolSize, 0]);
|
|
1408
|
-
this.toolInfo.radius = gl_matrix__rspack_import_0
|
|
1408
|
+
this.toolInfo.radius = gl_matrix__rspack_import_0.vec3.length(gl_matrix__rspack_import_0.vec3.sub(gl_matrix__rspack_import_0.vec3.create(), p0, p1));
|
|
1409
1409
|
}
|
|
1410
1410
|
return this.toolInfo.radius;
|
|
1411
1411
|
}
|
|
1412
1412
|
getEdge(viewport, p1, p2, mouseCanvas) {
|
|
1413
|
-
const midPoint = gl_matrix__rspack_import_0
|
|
1414
|
-
gl_matrix__rspack_import_0
|
|
1413
|
+
const midPoint = gl_matrix__rspack_import_0.vec3.add(gl_matrix__rspack_import_0.vec3.create(), p1, p2 || p1);
|
|
1414
|
+
gl_matrix__rspack_import_0.vec3.scale(midPoint, midPoint, 0.5);
|
|
1415
1415
|
const canvasMidPoint = viewport.worldToCanvas(midPoint);
|
|
1416
|
-
const canvasDelta = gl_matrix__rspack_import_0
|
|
1416
|
+
const canvasDelta = gl_matrix__rspack_import_0.vec2.sub(gl_matrix__rspack_import_0.vec2.create(), canvasMidPoint, mouseCanvas);
|
|
1417
1417
|
const angle = Math.atan2(canvasDelta[1], canvasDelta[0]);
|
|
1418
1418
|
const point = this.interpolatePoint(viewport, angle, mouseCanvas);
|
|
1419
1419
|
const canvasPoint = viewport.worldToCanvas(point);
|
|
@@ -1432,7 +1432,7 @@ class CircleSculptCursor {
|
|
|
1432
1432
|
return viewport.canvasToWorld(newPoint2);
|
|
1433
1433
|
}
|
|
1434
1434
|
isInCursor(point, mousePoint) {
|
|
1435
|
-
return gl_matrix__rspack_import_0
|
|
1435
|
+
return gl_matrix__rspack_import_0.vec3.distance(point, mousePoint) < this.toolInfo.radius;
|
|
1436
1436
|
}
|
|
1437
1437
|
}
|
|
1438
1438
|
CircleSculptCursor.shapeName = 'Circle';
|
|
@@ -1586,20 +1586,20 @@ class BidirectionalTool extends _base_index_js__rspack_import_3/* .AnnotationToo
|
|
|
1586
1586
|
const { renderingEngine } = (0,_cornerstonejs_core__rspack_import_1.getEnabledElement)(element);
|
|
1587
1587
|
if (this.editData.handleIndex !== undefined) {
|
|
1588
1588
|
const { points } = data.handles;
|
|
1589
|
-
const firstLineSegmentLength = gl_matrix__rspack_import_0
|
|
1590
|
-
const secondLineSegmentLength = gl_matrix__rspack_import_0
|
|
1589
|
+
const firstLineSegmentLength = gl_matrix__rspack_import_0.vec3.distance(points[0], points[1]);
|
|
1590
|
+
const secondLineSegmentLength = gl_matrix__rspack_import_0.vec3.distance(points[2], points[3]);
|
|
1591
1591
|
if (secondLineSegmentLength > firstLineSegmentLength) {
|
|
1592
1592
|
const longAxis = [[...points[2]], [...points[3]]];
|
|
1593
1593
|
const shortAxisPoint0 = [...points[0]];
|
|
1594
1594
|
const shortAxisPoint1 = [...points[1]];
|
|
1595
|
-
const longAxisVector = gl_matrix__rspack_import_0
|
|
1596
|
-
gl_matrix__rspack_import_0
|
|
1597
|
-
const counterClockWisePerpendicularToLongAxis = gl_matrix__rspack_import_0
|
|
1598
|
-
gl_matrix__rspack_import_0
|
|
1599
|
-
const currentShortAxisVector = gl_matrix__rspack_import_0
|
|
1600
|
-
gl_matrix__rspack_import_0
|
|
1595
|
+
const longAxisVector = gl_matrix__rspack_import_0.vec2.create();
|
|
1596
|
+
gl_matrix__rspack_import_0.vec2.set(longAxisVector, longAxis[1][0] - longAxis[0][0], longAxis[1][1] - longAxis[1][0]);
|
|
1597
|
+
const counterClockWisePerpendicularToLongAxis = gl_matrix__rspack_import_0.vec2.create();
|
|
1598
|
+
gl_matrix__rspack_import_0.vec2.set(counterClockWisePerpendicularToLongAxis, -longAxisVector[1], longAxisVector[0]);
|
|
1599
|
+
const currentShortAxisVector = gl_matrix__rspack_import_0.vec2.create();
|
|
1600
|
+
gl_matrix__rspack_import_0.vec2.set(currentShortAxisVector, shortAxisPoint1[0] - shortAxisPoint0[0], shortAxisPoint1[1] - shortAxisPoint0[0]);
|
|
1601
1601
|
let shortAxis;
|
|
1602
|
-
if (gl_matrix__rspack_import_0
|
|
1602
|
+
if (gl_matrix__rspack_import_0.vec2.dot(currentShortAxisVector, counterClockWisePerpendicularToLongAxis) > 0) {
|
|
1603
1603
|
shortAxis = [shortAxisPoint0, shortAxisPoint1];
|
|
1604
1604
|
}
|
|
1605
1605
|
else {
|
|
@@ -1659,7 +1659,7 @@ class BidirectionalTool extends _base_index_js__rspack_import_3/* .AnnotationToo
|
|
|
1659
1659
|
},
|
|
1660
1660
|
},
|
|
1661
1661
|
};
|
|
1662
|
-
const dist = gl_matrix__rspack_import_0
|
|
1662
|
+
const dist = gl_matrix__rspack_import_0.vec2.distance(canvasCoordPoints[0], canvasCoordPoints[1]);
|
|
1663
1663
|
const shortAxisDistFromCenter = dist / 3;
|
|
1664
1664
|
const dx = canvasCoords.longLineSegment.start.x - canvasCoords.longLineSegment.end.x;
|
|
1665
1665
|
const dy = canvasCoords.longLineSegment.start.y - canvasCoords.longLineSegment.end.y;
|
|
@@ -1759,12 +1759,12 @@ class BidirectionalTool extends _base_index_js__rspack_import_3/* .AnnotationToo
|
|
|
1759
1759
|
if (movingHandleIndex === 0 || movingHandleIndex === 1) {
|
|
1760
1760
|
const fixedHandleIndex = movingHandleIndex === 0 ? 1 : 0;
|
|
1761
1761
|
const fixedHandleCanvasCoord = canvasCoordHandlesCurrent[fixedHandleIndex];
|
|
1762
|
-
const fixedHandleToProposedCoordVec = gl_matrix__rspack_import_0
|
|
1763
|
-
const fixedHandleToOldCoordVec = gl_matrix__rspack_import_0
|
|
1762
|
+
const fixedHandleToProposedCoordVec = gl_matrix__rspack_import_0.vec2.set(gl_matrix__rspack_import_0.vec2.create(), proposedCanvasCoord[0] - fixedHandleCanvasCoord[0], proposedCanvasCoord[1] - fixedHandleCanvasCoord[1]);
|
|
1763
|
+
const fixedHandleToOldCoordVec = gl_matrix__rspack_import_0.vec2.set(gl_matrix__rspack_import_0.vec2.create(), canvasCoordHandlesCurrent[movingHandleIndex][0] -
|
|
1764
1764
|
fixedHandleCanvasCoord[0], canvasCoordHandlesCurrent[movingHandleIndex][1] -
|
|
1765
1765
|
fixedHandleCanvasCoord[1]);
|
|
1766
|
-
gl_matrix__rspack_import_0
|
|
1767
|
-
gl_matrix__rspack_import_0
|
|
1766
|
+
gl_matrix__rspack_import_0.vec2.normalize(fixedHandleToProposedCoordVec, fixedHandleToProposedCoordVec);
|
|
1767
|
+
gl_matrix__rspack_import_0.vec2.normalize(fixedHandleToOldCoordVec, fixedHandleToOldCoordVec);
|
|
1768
1768
|
const proposedFirstLineSegment = {
|
|
1769
1769
|
start: {
|
|
1770
1770
|
x: fixedHandleCanvasCoord[0],
|
|
@@ -1817,22 +1817,22 @@ class BidirectionalTool extends _base_index_js__rspack_import_3/* .AnnotationToo
|
|
|
1817
1817
|
end: secondLineSegment.end,
|
|
1818
1818
|
},
|
|
1819
1819
|
};
|
|
1820
|
-
const longLineSegmentVec = gl_matrix__rspack_import_0
|
|
1820
|
+
const longLineSegmentVec = gl_matrix__rspack_import_0.vec2.subtract(gl_matrix__rspack_import_0.vec2.create(), [
|
|
1821
1821
|
canvasCoordsCurrent.longLineSegment.end.x,
|
|
1822
1822
|
canvasCoordsCurrent.longLineSegment.end.y,
|
|
1823
1823
|
], [
|
|
1824
1824
|
canvasCoordsCurrent.longLineSegment.start.x,
|
|
1825
1825
|
canvasCoordsCurrent.longLineSegment.start.y,
|
|
1826
1826
|
]);
|
|
1827
|
-
const longLineSegmentVecNormalized = gl_matrix__rspack_import_0
|
|
1828
|
-
const proposedToCurrentVec = gl_matrix__rspack_import_0
|
|
1827
|
+
const longLineSegmentVecNormalized = gl_matrix__rspack_import_0.vec2.normalize(gl_matrix__rspack_import_0.vec2.create(), longLineSegmentVec);
|
|
1828
|
+
const proposedToCurrentVec = gl_matrix__rspack_import_0.vec2.subtract(gl_matrix__rspack_import_0.vec2.create(), [proposedCanvasCoord[0], proposedCanvasCoord[1]], [
|
|
1829
1829
|
canvasCoordHandlesCurrent[movingHandleIndex][0],
|
|
1830
1830
|
canvasCoordHandlesCurrent[movingHandleIndex][1],
|
|
1831
1831
|
]);
|
|
1832
|
-
const movementLength = gl_matrix__rspack_import_0
|
|
1832
|
+
const movementLength = gl_matrix__rspack_import_0.vec2.length(proposedToCurrentVec);
|
|
1833
1833
|
const angle = this._getSignedAngle(longLineSegmentVecNormalized, proposedToCurrentVec);
|
|
1834
1834
|
const movementAlongLineSegmentLength = Math.cos(angle) * movementLength;
|
|
1835
|
-
const newTranslatedPoint = gl_matrix__rspack_import_0
|
|
1835
|
+
const newTranslatedPoint = gl_matrix__rspack_import_0.vec2.scaleAndAdd(gl_matrix__rspack_import_0.vec2.create(), [
|
|
1836
1836
|
canvasCoordHandlesCurrent[translateHandleIndex][0],
|
|
1837
1837
|
canvasCoordHandlesCurrent[translateHandleIndex][1],
|
|
1838
1838
|
], longLineSegmentVecNormalized, movementAlongLineSegmentLength);
|
|
@@ -2017,9 +2017,9 @@ class BidirectionalTool extends _base_index_js__rspack_import_3/* .AnnotationToo
|
|
|
2017
2017
|
return renderStatus;
|
|
2018
2018
|
};
|
|
2019
2019
|
this._movingLongAxisWouldPutItThroughShortAxis = (firstLineSegment, secondLineSegment) => {
|
|
2020
|
-
const vectorInSecondLineDirection = gl_matrix__rspack_import_0
|
|
2021
|
-
gl_matrix__rspack_import_0
|
|
2022
|
-
gl_matrix__rspack_import_0
|
|
2020
|
+
const vectorInSecondLineDirection = gl_matrix__rspack_import_0.vec2.create();
|
|
2021
|
+
gl_matrix__rspack_import_0.vec2.set(vectorInSecondLineDirection, secondLineSegment.end.x - secondLineSegment.start.x, secondLineSegment.end.y - secondLineSegment.start.y);
|
|
2022
|
+
gl_matrix__rspack_import_0.vec2.normalize(vectorInSecondLineDirection, vectorInSecondLineDirection);
|
|
2023
2023
|
const extendedSecondLineSegment = {
|
|
2024
2024
|
start: {
|
|
2025
2025
|
x: secondLineSegment.start.x - vectorInSecondLineDirection[0] * 10,
|
|
@@ -2801,14 +2801,14 @@ function _checkContourGeometryMatchViewport(geometryIds, viewportNormal) {
|
|
|
2801
2801
|
const contours = geometryData.contours;
|
|
2802
2802
|
const { points } = contours[0];
|
|
2803
2803
|
const [point] = points;
|
|
2804
|
-
const delta = gl_matrix_esm
|
|
2804
|
+
const delta = gl_matrix_esm.vec3.create();
|
|
2805
2805
|
const { length } = points;
|
|
2806
2806
|
const increment = Math.ceil(length / 25);
|
|
2807
2807
|
for (let i = 1; i < length; i += increment) {
|
|
2808
2808
|
const point2 = points[i];
|
|
2809
|
-
gl_matrix_esm
|
|
2810
|
-
gl_matrix_esm
|
|
2811
|
-
if (gl_matrix_esm
|
|
2809
|
+
gl_matrix_esm.vec3.sub(delta, point, point2);
|
|
2810
|
+
gl_matrix_esm.vec3.normalize(delta, delta);
|
|
2811
|
+
if (gl_matrix_esm.vec3.dot(viewportNormal, delta) > 0.1) {
|
|
2812
2812
|
return false;
|
|
2813
2813
|
}
|
|
2814
2814
|
}
|
|
@@ -2904,7 +2904,7 @@ function applyPlanarOverlayDepthOffset(actor, viewPlaneNormal, overlayOrder) {
|
|
|
2904
2904
|
actor.setPosition(0, 0, 0);
|
|
2905
2905
|
return;
|
|
2906
2906
|
}
|
|
2907
|
-
const [x, y, z] = gl_matrix_esm
|
|
2907
|
+
const [x, y, z] = gl_matrix_esm.vec3.normalize(gl_matrix_esm.vec3.create(), viewPlaneNormal);
|
|
2908
2908
|
const offset = overlayOrder * PLANAR_OVERLAY_DEPTH_EPSILON;
|
|
2909
2909
|
actor.setPosition(x * offset, y * offset, z * offset);
|
|
2910
2910
|
}
|
|
@@ -2912,7 +2912,7 @@ function matchAxis(vector, axes) {
|
|
|
2912
2912
|
let bestAxis = -1;
|
|
2913
2913
|
let bestDot = 0;
|
|
2914
2914
|
axes.forEach((axisVector, axis) => {
|
|
2915
|
-
const dot = gl_matrix_esm
|
|
2915
|
+
const dot = gl_matrix_esm.vec3.dot(vector, axisVector);
|
|
2916
2916
|
if (Math.abs(dot) > Math.abs(bestDot)) {
|
|
2917
2917
|
bestAxis = axis;
|
|
2918
2918
|
bestDot = dot;
|
|
@@ -2978,8 +2978,8 @@ function getSliceState(viewport, volume, camera = getSliceRenderingCamera(viewpo
|
|
|
2978
2978
|
return;
|
|
2979
2979
|
}
|
|
2980
2980
|
const { viewPlaneNormal, viewUp, focalPoint } = camera;
|
|
2981
|
-
const xDirection = gl_matrix_esm
|
|
2982
|
-
const yDirection = gl_matrix_esm
|
|
2981
|
+
const xDirection = gl_matrix_esm.vec3.normalize(gl_matrix_esm.vec3.create(), gl_matrix_esm.vec3.cross(gl_matrix_esm.vec3.create(), viewPlaneNormal, viewUp));
|
|
2982
|
+
const yDirection = gl_matrix_esm.vec3.normalize(gl_matrix_esm.vec3.create(), viewUp);
|
|
2983
2983
|
const axes = getVolumeAxes(volume);
|
|
2984
2984
|
const xAxis = matchAxis(xDirection, axes);
|
|
2985
2985
|
const yAxis = matchAxis(yDirection, axes);
|
|
@@ -3044,7 +3044,7 @@ function createSliceImageData(volume, viewport, camera = getSliceRenderingCamera
|
|
|
3044
3044
|
originIndex[state.yAxis] = state.ySign > 0 ? 0 : height - 1;
|
|
3045
3045
|
const xDirection = axisVectors[state.xAxis].map((value) => value * state.xSign);
|
|
3046
3046
|
const yDirection = axisVectors[state.yAxis].map((value) => value * state.ySign);
|
|
3047
|
-
const zDirection = gl_matrix_esm
|
|
3047
|
+
const zDirection = gl_matrix_esm.vec3.normalize(gl_matrix_esm.vec3.create(), camera.viewPlaneNormal);
|
|
3048
3048
|
const dataType = DataArray/* ["default"].getDataType */.Ay.getDataType(pixelData);
|
|
3049
3049
|
const scalarArray = DataArray/* ["default"].newInstance */.Ay.newInstance({
|
|
3050
3050
|
dataType,
|
|
@@ -3093,13 +3093,13 @@ function getExactSliceAxis(volume, viewPlaneNormal) {
|
|
|
3093
3093
|
return;
|
|
3094
3094
|
}
|
|
3095
3095
|
const axisDirection = axes[sliceAxis.axis];
|
|
3096
|
-
const alignment = Math.abs(gl_matrix_esm
|
|
3097
|
-
(gl_matrix_esm
|
|
3098
|
-
gl_matrix_esm
|
|
3096
|
+
const alignment = Math.abs(gl_matrix_esm.vec3.dot(viewPlaneNormal, axisDirection)) /
|
|
3097
|
+
(gl_matrix_esm.vec3.length(viewPlaneNormal) *
|
|
3098
|
+
gl_matrix_esm.vec3.length(axisDirection));
|
|
3099
3099
|
return alignment >= EXACT_SLICE_ALIGNMENT ? sliceAxis.axis : undefined;
|
|
3100
3100
|
}
|
|
3101
3101
|
function stepAlong(start, direction, distance) {
|
|
3102
|
-
return gl_matrix_esm
|
|
3102
|
+
return gl_matrix_esm.vec3.scaleAndAdd(createVector(), start, direction, distance);
|
|
3103
3103
|
}
|
|
3104
3104
|
function getPlaneVolumeIntersectionPoints(volume, planePoint, planeNormal) {
|
|
3105
3105
|
const { dimensions, imageData } = volume;
|
|
@@ -3112,7 +3112,7 @@ function getPlaneVolumeIntersectionPoints(volume, planePoint, planeNormal) {
|
|
|
3112
3112
|
cornerIndex & 4 ? dimensions[2] - 0.5 : -0.5,
|
|
3113
3113
|
]);
|
|
3114
3114
|
corners.push(corner);
|
|
3115
|
-
distances.push(gl_matrix_esm
|
|
3115
|
+
distances.push(gl_matrix_esm.vec3.dot(gl_matrix_esm.vec3.subtract(createVector(), corner, planePoint), planeNormal));
|
|
3116
3116
|
}
|
|
3117
3117
|
const points = [];
|
|
3118
3118
|
for (let cornerIndex = 0; cornerIndex < 8; cornerIndex++) {
|
|
@@ -3130,7 +3130,7 @@ function getPlaneVolumeIntersectionPoints(volume, planePoint, planeNormal) {
|
|
|
3130
3130
|
points.push(corners[otherIndex]);
|
|
3131
3131
|
}
|
|
3132
3132
|
if (startDistance * endDistance < 0) {
|
|
3133
|
-
points.push(gl_matrix_esm
|
|
3133
|
+
points.push(gl_matrix_esm.vec3.lerp(createVector(), corners[cornerIndex], corners[otherIndex], startDistance / (startDistance - endDistance)));
|
|
3134
3134
|
}
|
|
3135
3135
|
}
|
|
3136
3136
|
}
|
|
@@ -3145,7 +3145,7 @@ function getInPlaneRotatedSliceGeometry(volume, focalPoint, viewPlaneNormal, sli
|
|
|
3145
3145
|
return;
|
|
3146
3146
|
}
|
|
3147
3147
|
const [xAxis, yAxis] = [0, 1, 2].filter((axis) => axis !== sliceAxis);
|
|
3148
|
-
const handedness = gl_matrix_esm
|
|
3148
|
+
const handedness = gl_matrix_esm.vec3.dot(gl_matrix_esm.vec3.cross(createVector(), axes[xAxis], axes[yAxis]), viewPlaneNormal);
|
|
3149
3149
|
const rowsFollowAxis = handedness < 0;
|
|
3150
3150
|
const originIndex = [0, 0, 0];
|
|
3151
3151
|
originIndex[sliceAxis] = sliceIndex;
|
|
@@ -3155,7 +3155,7 @@ function getInPlaneRotatedSliceGeometry(volume, focalPoint, viewPlaneNormal, sli
|
|
|
3155
3155
|
xDirection: axes[xAxis],
|
|
3156
3156
|
yDirection: rowsFollowAxis
|
|
3157
3157
|
? axes[yAxis]
|
|
3158
|
-
: gl_matrix_esm
|
|
3158
|
+
: gl_matrix_esm.vec3.negate(createVector(), axes[yAxis]),
|
|
3159
3159
|
zDirection: viewPlaneNormal,
|
|
3160
3160
|
spacing: [spacing[xAxis], spacing[yAxis]],
|
|
3161
3161
|
width: dimensions[xAxis],
|
|
@@ -3166,8 +3166,8 @@ function getInPlaneRotatedSliceGeometry(volume, focalPoint, viewPlaneNormal, sli
|
|
|
3166
3166
|
function getObliqueSliceGeometry(volume, focalPoint, viewPlaneNormal) {
|
|
3167
3167
|
const { dimensions, imageData } = volume;
|
|
3168
3168
|
const sliceAxisDirection = getVolumeAxes(volume)[2];
|
|
3169
|
-
const xDirection = gl_matrix_esm
|
|
3170
|
-
const yDirection = gl_matrix_esm
|
|
3169
|
+
const xDirection = gl_matrix_esm.vec3.normalize(createVector(), gl_matrix_esm.vec3.cross(createVector(), sliceAxisDirection, viewPlaneNormal));
|
|
3170
|
+
const yDirection = gl_matrix_esm.vec3.normalize(createVector(), gl_matrix_esm.vec3.cross(createVector(), xDirection, viewPlaneNormal));
|
|
3171
3171
|
const points = getPlaneVolumeIntersectionPoints(volume, focalPoint, viewPlaneNormal);
|
|
3172
3172
|
if (points.length < MINIMUM_PLANE_INTERSECTION_POINTS) {
|
|
3173
3173
|
return;
|
|
@@ -3179,9 +3179,9 @@ function getObliqueSliceGeometry(volume, focalPoint, viewPlaneNormal) {
|
|
|
3179
3179
|
maxY: -Infinity,
|
|
3180
3180
|
};
|
|
3181
3181
|
points.forEach((point) => {
|
|
3182
|
-
const offset = gl_matrix_esm
|
|
3183
|
-
const x = gl_matrix_esm
|
|
3184
|
-
const y = gl_matrix_esm
|
|
3182
|
+
const offset = gl_matrix_esm.vec3.subtract(createVector(), point, focalPoint);
|
|
3183
|
+
const x = gl_matrix_esm.vec3.dot(offset, xDirection);
|
|
3184
|
+
const y = gl_matrix_esm.vec3.dot(offset, yDirection);
|
|
3185
3185
|
extent.minX = Math.min(extent.minX, x);
|
|
3186
3186
|
extent.maxX = Math.max(extent.maxX, x);
|
|
3187
3187
|
extent.minY = Math.min(extent.minY, y);
|
|
@@ -3214,7 +3214,7 @@ function getResampledSliceGeometry(viewport, volume, camera = getSliceRenderingC
|
|
|
3214
3214
|
if (!camera) {
|
|
3215
3215
|
return;
|
|
3216
3216
|
}
|
|
3217
|
-
const viewPlaneNormal = gl_matrix_esm
|
|
3217
|
+
const viewPlaneNormal = gl_matrix_esm.vec3.normalize(createVector(), camera.viewPlaneNormal);
|
|
3218
3218
|
const sliceAxis = getExactSliceAxis(volume, viewPlaneNormal);
|
|
3219
3219
|
if (sliceAxis !== undefined) {
|
|
3220
3220
|
return getInPlaneRotatedSliceGeometry(volume, camera.focalPoint, viewPlaneNormal, sliceAxis);
|
|
@@ -5217,14 +5217,14 @@ class BrushTool extends _LabelmapBaseTool_js__rspack_import_9/* ["default"] */.A
|
|
|
5217
5217
|
this._previewData.isDrag = false;
|
|
5218
5218
|
this._previewData.timerStart = Date.now();
|
|
5219
5219
|
this._drawStartTimeStamp = eventData.event?.timeStamp ?? 0;
|
|
5220
|
-
const canvasPoint = gl_matrix__rspack_import_1
|
|
5220
|
+
const canvasPoint = gl_matrix__rspack_import_1.vec2.clone(currentPoints.canvas);
|
|
5221
5221
|
const worldPoint = viewport.canvasToWorld([
|
|
5222
5222
|
canvasPoint[0],
|
|
5223
5223
|
canvasPoint[1],
|
|
5224
5224
|
]);
|
|
5225
5225
|
this._lastDragInfo = {
|
|
5226
5226
|
canvas: canvasPoint,
|
|
5227
|
-
world: gl_matrix__rspack_import_1
|
|
5227
|
+
world: gl_matrix__rspack_import_1.vec3.clone(worldPoint),
|
|
5228
5228
|
};
|
|
5229
5229
|
this._hoverData = this.createHoverData(element, canvasPoint);
|
|
5230
5230
|
if (!this._hoverData) {
|
|
@@ -5265,7 +5265,7 @@ class BrushTool extends _LabelmapBaseTool_js__rspack_import_9/* ["default"] */.A
|
|
|
5265
5265
|
if (isDrag) {
|
|
5266
5266
|
return;
|
|
5267
5267
|
}
|
|
5268
|
-
const delta = gl_matrix__rspack_import_1
|
|
5268
|
+
const delta = gl_matrix__rspack_import_1.vec2.distance(canvas, startPoint);
|
|
5269
5269
|
const time = Date.now() - timerStart;
|
|
5270
5270
|
if (delta > previewMoveDistance ||
|
|
5271
5271
|
(time > previewTimeMs && delta > dragMoveDistance)) {
|
|
@@ -5335,7 +5335,7 @@ class BrushTool extends _LabelmapBaseTool_js__rspack_import_9/* ["default"] */.A
|
|
|
5335
5335
|
}
|
|
5336
5336
|
const { viewportIdsToRender } = this._hoverData;
|
|
5337
5337
|
(0,_utilities_triggerAnnotationRenderForViewportIds_js__rspack_import_8/* ["default"] */.A)(viewportIdsToRender);
|
|
5338
|
-
const delta = gl_matrix__rspack_import_1
|
|
5338
|
+
const delta = gl_matrix__rspack_import_1.vec2.distance(currentPoints.canvas, this._previewData.startPoint);
|
|
5339
5339
|
const { dragTimeMs, dragMoveDistance } = this.configuration.preview;
|
|
5340
5340
|
if (!this._previewData.isDrag &&
|
|
5341
5341
|
Date.now() - this._previewData.timerStart < dragTimeMs &&
|
|
@@ -5353,8 +5353,8 @@ class BrushTool extends _LabelmapBaseTool_js__rspack_import_9/* ["default"] */.A
|
|
|
5353
5353
|
startCanvas[1],
|
|
5354
5354
|
]);
|
|
5355
5355
|
this._lastDragInfo = {
|
|
5356
|
-
canvas: gl_matrix__rspack_import_1
|
|
5357
|
-
world: gl_matrix__rspack_import_1
|
|
5356
|
+
canvas: gl_matrix__rspack_import_1.vec2.clone(startCanvas),
|
|
5357
|
+
world: gl_matrix__rspack_import_1.vec3.clone(startWorld),
|
|
5358
5358
|
};
|
|
5359
5359
|
}
|
|
5360
5360
|
const currentCanvas = currentPoints.canvas;
|
|
@@ -5378,15 +5378,15 @@ class BrushTool extends _LabelmapBaseTool_js__rspack_import_9/* ["default"] */.A
|
|
|
5378
5378
|
return;
|
|
5379
5379
|
}
|
|
5380
5380
|
operationData.strokePointsWorld = [
|
|
5381
|
-
gl_matrix__rspack_import_1
|
|
5382
|
-
gl_matrix__rspack_import_1
|
|
5381
|
+
gl_matrix__rspack_import_1.vec3.clone(this._lastDragInfo.world),
|
|
5382
|
+
gl_matrix__rspack_import_1.vec3.clone(currentWorld),
|
|
5383
5383
|
];
|
|
5384
5384
|
this._setPreview(this.applyActiveStrategy(enabledElement, operationData));
|
|
5385
5385
|
}
|
|
5386
|
-
const currentCanvasClone = gl_matrix__rspack_import_1
|
|
5386
|
+
const currentCanvasClone = gl_matrix__rspack_import_1.vec2.clone(currentCanvas);
|
|
5387
5387
|
this._lastDragInfo = {
|
|
5388
5388
|
canvas: currentCanvasClone,
|
|
5389
|
-
world: gl_matrix__rspack_import_1
|
|
5389
|
+
world: gl_matrix__rspack_import_1.vec3.clone(currentWorld),
|
|
5390
5390
|
};
|
|
5391
5391
|
this._previewData.element = element;
|
|
5392
5392
|
this._previewData.timerStart = Date.now() + dragTimeMs;
|
|
@@ -5411,7 +5411,7 @@ class BrushTool extends _LabelmapBaseTool_js__rspack_import_9/* ["default"] */.A
|
|
|
5411
5411
|
if (isLazyLabelmapEditing && this._previewData.isDrag) {
|
|
5412
5412
|
operationData.strokePointsWorld = this._lazyEdit
|
|
5413
5413
|
.getStrokePointsWorld()
|
|
5414
|
-
.map((point) => gl_matrix__rspack_import_1
|
|
5414
|
+
.map((point) => gl_matrix__rspack_import_1.vec3.clone(point));
|
|
5415
5415
|
this._setPreview(this.applyActiveStrategy(enabledElement, operationData));
|
|
5416
5416
|
}
|
|
5417
5417
|
else if (!this._previewData.preview && !this._previewData.isDrag) {
|
|
@@ -5835,7 +5835,7 @@ function findHandlePolylineIndex(annotation, handleIndex) {
|
|
|
5835
5835
|
}
|
|
5836
5836
|
let closestDistance = Infinity;
|
|
5837
5837
|
return polyline.reduce((closestIndex, point, testIndex) => {
|
|
5838
|
-
const distance = gl_matrix__rspack_import_1
|
|
5838
|
+
const distance = gl_matrix__rspack_import_1.vec3.squaredDistance(point, handle);
|
|
5839
5839
|
if (distance < closestDistance) {
|
|
5840
5840
|
closestDistance = distance;
|
|
5841
5841
|
return testIndex;
|
|
@@ -5863,10 +5863,10 @@ function getCenterAndRadiusInCanvas(points, viewport) {
|
|
|
5863
5863
|
(cBottom[0] + cTop[0]) / 2,
|
|
5864
5864
|
(cBottom[1] + cTop[1]) / 2,
|
|
5865
5865
|
];
|
|
5866
|
-
const worldHeight = gl_matrix__rspack_import_1
|
|
5867
|
-
const worldWidth = gl_matrix__rspack_import_1
|
|
5868
|
-
const canvasHeight = gl_matrix__rspack_import_1
|
|
5869
|
-
const canvasWidth = gl_matrix__rspack_import_1
|
|
5866
|
+
const worldHeight = gl_matrix__rspack_import_1.vec3.distance(points[0], points[1]);
|
|
5867
|
+
const worldWidth = gl_matrix__rspack_import_1.vec3.distance(points[2], points[3]);
|
|
5868
|
+
const canvasHeight = gl_matrix__rspack_import_1.vec2.distance(cBottom, cTop);
|
|
5869
|
+
const canvasWidth = gl_matrix__rspack_import_1.vec2.distance(cLeft, cRight);
|
|
5870
5870
|
const scaleX = canvasWidth / worldWidth;
|
|
5871
5871
|
const scaleY = canvasHeight / worldHeight;
|
|
5872
5872
|
const worldRadius = worldHeight / 2;
|
|
@@ -5893,14 +5893,14 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
5893
5893
|
|
|
5894
5894
|
function getEllipseWorldCoordinates(points, viewport) {
|
|
5895
5895
|
const { viewUp, viewPlaneNormal } = (0,_getViewportICamera_js__rspack_import_1/* ["default"] */.A)(viewport);
|
|
5896
|
-
const viewRight = gl_matrix__rspack_import_0
|
|
5897
|
-
gl_matrix__rspack_import_0
|
|
5896
|
+
const viewRight = gl_matrix__rspack_import_0.vec3.create();
|
|
5897
|
+
gl_matrix__rspack_import_0.vec3.cross(viewRight, viewUp, viewPlaneNormal);
|
|
5898
5898
|
const [centerWorld, endWorld] = points;
|
|
5899
|
-
const centerToEndDistance = gl_matrix__rspack_import_0
|
|
5900
|
-
const bottomWorld = gl_matrix__rspack_import_0
|
|
5901
|
-
const topWorld = gl_matrix__rspack_import_0
|
|
5902
|
-
const leftWorld = gl_matrix__rspack_import_0
|
|
5903
|
-
const rightWorld = gl_matrix__rspack_import_0
|
|
5899
|
+
const centerToEndDistance = gl_matrix__rspack_import_0.vec3.distance(centerWorld, endWorld);
|
|
5900
|
+
const bottomWorld = gl_matrix__rspack_import_0.vec3.create();
|
|
5901
|
+
const topWorld = gl_matrix__rspack_import_0.vec3.create();
|
|
5902
|
+
const leftWorld = gl_matrix__rspack_import_0.vec3.create();
|
|
5903
|
+
const rightWorld = gl_matrix__rspack_import_0.vec3.create();
|
|
5904
5904
|
for (let i = 0; i <= 2; i++) {
|
|
5905
5905
|
bottomWorld[i] = centerWorld[i] - viewUp[i] * centerToEndDistance;
|
|
5906
5906
|
topWorld[i] = centerWorld[i] + viewUp[i] * centerToEndDistance;
|
|
@@ -5934,8 +5934,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
5934
5934
|
const { transformWorldToIndex } = _cornerstonejs_core__rspack_import_0.utilities;
|
|
5935
5935
|
function _getSphereBoundsInfo(circlePoints, imageData, directionVectors) {
|
|
5936
5936
|
const [bottom, top] = circlePoints;
|
|
5937
|
-
const centerWorld = gl_matrix__rspack_import_1
|
|
5938
|
-
const radiusWorld = gl_matrix__rspack_import_1
|
|
5937
|
+
const centerWorld = gl_matrix__rspack_import_1.vec3.fromValues((bottom[0] + top[0]) / 2, (bottom[1] + top[1]) / 2, (bottom[2] + top[2]) / 2);
|
|
5938
|
+
const radiusWorld = gl_matrix__rspack_import_1.vec3.distance(bottom, top) / 2;
|
|
5939
5939
|
const { boundsIJK, topLeftWorld, bottomRightWorld } = _computeBoundsIJK(imageData, directionVectors, circlePoints, centerWorld, radiusWorld);
|
|
5940
5940
|
return {
|
|
5941
5941
|
boundsIJK,
|
|
@@ -5947,10 +5947,10 @@ function _getSphereBoundsInfo(circlePoints, imageData, directionVectors) {
|
|
|
5947
5947
|
}
|
|
5948
5948
|
function getSphereBoundsInfo(circlePoints, imageData) {
|
|
5949
5949
|
const direction = imageData.getDirection();
|
|
5950
|
-
const rowCosine = gl_matrix__rspack_import_1
|
|
5951
|
-
const columnCosine = gl_matrix__rspack_import_1
|
|
5952
|
-
const scanAxis = gl_matrix__rspack_import_1
|
|
5953
|
-
const viewPlaneNormal = gl_matrix__rspack_import_1
|
|
5950
|
+
const rowCosine = gl_matrix__rspack_import_1.vec3.fromValues(direction[0], direction[1], direction[2]);
|
|
5951
|
+
const columnCosine = gl_matrix__rspack_import_1.vec3.fromValues(direction[3], direction[4], direction[5]);
|
|
5952
|
+
const scanAxis = gl_matrix__rspack_import_1.vec3.fromValues(direction[6], direction[7], direction[8]);
|
|
5953
|
+
const viewPlaneNormal = gl_matrix__rspack_import_1.vec3.negate(gl_matrix__rspack_import_1.vec3.create(), scanAxis);
|
|
5954
5954
|
const directionVectors = {
|
|
5955
5955
|
row: rowCosine,
|
|
5956
5956
|
column: columnCosine,
|
|
@@ -5966,28 +5966,28 @@ function getSphereBoundsInfoFromViewport(circlePoints, imageData, viewport) {
|
|
|
5966
5966
|
if (!camera.viewUp || !camera.viewPlaneNormal) {
|
|
5967
5967
|
throw new Error('viewport view plane is required in order to calculate the sphere bounds');
|
|
5968
5968
|
}
|
|
5969
|
-
const viewUp = gl_matrix__rspack_import_1
|
|
5970
|
-
const viewPlaneNormal = gl_matrix__rspack_import_1
|
|
5971
|
-
const viewRight = gl_matrix__rspack_import_1
|
|
5972
|
-
gl_matrix__rspack_import_1
|
|
5969
|
+
const viewUp = gl_matrix__rspack_import_1.vec3.fromValues(camera.viewUp[0], camera.viewUp[1], camera.viewUp[2]);
|
|
5970
|
+
const viewPlaneNormal = gl_matrix__rspack_import_1.vec3.fromValues(camera.viewPlaneNormal[0], camera.viewPlaneNormal[1], camera.viewPlaneNormal[2]);
|
|
5971
|
+
const viewRight = gl_matrix__rspack_import_1.vec3.create();
|
|
5972
|
+
gl_matrix__rspack_import_1.vec3.cross(viewRight, viewUp, viewPlaneNormal);
|
|
5973
5973
|
const directionVectors = {
|
|
5974
5974
|
row: viewRight,
|
|
5975
5975
|
normal: viewPlaneNormal,
|
|
5976
|
-
column: gl_matrix__rspack_import_1
|
|
5976
|
+
column: gl_matrix__rspack_import_1.vec3.negate(gl_matrix__rspack_import_1.vec3.create(), viewUp),
|
|
5977
5977
|
};
|
|
5978
5978
|
return _getSphereBoundsInfo(circlePoints, imageData, directionVectors);
|
|
5979
5979
|
}
|
|
5980
5980
|
function _computeBoundsIJK(imageData, directionVectors, circlePoints, centerWorld, radiusWorld) {
|
|
5981
5981
|
const dimensions = imageData.getDimensions();
|
|
5982
5982
|
const { row: rowCosine, column: columnCosine, normal: vecNormal, } = directionVectors;
|
|
5983
|
-
const topLeftWorld = gl_matrix__rspack_import_1
|
|
5984
|
-
const bottomRightWorld = gl_matrix__rspack_import_1
|
|
5985
|
-
gl_matrix__rspack_import_1
|
|
5986
|
-
gl_matrix__rspack_import_1
|
|
5987
|
-
gl_matrix__rspack_import_1
|
|
5988
|
-
gl_matrix__rspack_import_1
|
|
5989
|
-
gl_matrix__rspack_import_1
|
|
5990
|
-
gl_matrix__rspack_import_1
|
|
5983
|
+
const topLeftWorld = gl_matrix__rspack_import_1.vec3.create();
|
|
5984
|
+
const bottomRightWorld = gl_matrix__rspack_import_1.vec3.create();
|
|
5985
|
+
gl_matrix__rspack_import_1.vec3.scaleAndAdd(topLeftWorld, centerWorld, vecNormal, radiusWorld);
|
|
5986
|
+
gl_matrix__rspack_import_1.vec3.scaleAndAdd(bottomRightWorld, centerWorld, vecNormal, -radiusWorld);
|
|
5987
|
+
gl_matrix__rspack_import_1.vec3.scaleAndAdd(topLeftWorld, topLeftWorld, columnCosine, -radiusWorld);
|
|
5988
|
+
gl_matrix__rspack_import_1.vec3.scaleAndAdd(bottomRightWorld, bottomRightWorld, columnCosine, radiusWorld);
|
|
5989
|
+
gl_matrix__rspack_import_1.vec3.scaleAndAdd(topLeftWorld, topLeftWorld, rowCosine, -radiusWorld);
|
|
5990
|
+
gl_matrix__rspack_import_1.vec3.scaleAndAdd(bottomRightWorld, bottomRightWorld, rowCosine, radiusWorld);
|
|
5991
5991
|
const topLeftIJK = transformWorldToIndex(imageData, topLeftWorld);
|
|
5992
5992
|
const bottomRightIJK = transformWorldToIndex(imageData, bottomRightWorld);
|
|
5993
5993
|
const pointsIJK = circlePoints.map((p) => transformWorldToIndex(imageData, p));
|
|
@@ -6812,7 +6812,7 @@ function isClosed(polyline) {
|
|
|
6812
6812
|
const firstPoint = polyline[0];
|
|
6813
6813
|
const lastPoint = polyline[numPolylinePoints - 1];
|
|
6814
6814
|
const distFirstToLastPoints = (0,_point_index_js__rspack_import_1.distanceToPointSquared)(firstPoint, lastPoint);
|
|
6815
|
-
return gl_matrix__rspack_import_0
|
|
6815
|
+
return gl_matrix__rspack_import_0.glMatrix.equals(0, distFirstToLastPoints);
|
|
6816
6816
|
}
|
|
6817
6817
|
|
|
6818
6818
|
__webpack_require__.d(__webpack_exports__, {
|
|
@@ -6826,21 +6826,21 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
6826
6826
|
|
|
6827
6827
|
const isPlaneIntersectingAABB = (origin, normal, minX, minY, minZ, maxX, maxY, maxZ) => {
|
|
6828
6828
|
const vertices = [
|
|
6829
|
-
gl_matrix__rspack_import_0
|
|
6830
|
-
gl_matrix__rspack_import_0
|
|
6831
|
-
gl_matrix__rspack_import_0
|
|
6832
|
-
gl_matrix__rspack_import_0
|
|
6833
|
-
gl_matrix__rspack_import_0
|
|
6834
|
-
gl_matrix__rspack_import_0
|
|
6835
|
-
gl_matrix__rspack_import_0
|
|
6836
|
-
gl_matrix__rspack_import_0
|
|
6829
|
+
gl_matrix__rspack_import_0.vec3.fromValues(minX, minY, minZ),
|
|
6830
|
+
gl_matrix__rspack_import_0.vec3.fromValues(maxX, minY, minZ),
|
|
6831
|
+
gl_matrix__rspack_import_0.vec3.fromValues(minX, maxY, minZ),
|
|
6832
|
+
gl_matrix__rspack_import_0.vec3.fromValues(maxX, maxY, minZ),
|
|
6833
|
+
gl_matrix__rspack_import_0.vec3.fromValues(minX, minY, maxZ),
|
|
6834
|
+
gl_matrix__rspack_import_0.vec3.fromValues(maxX, minY, maxZ),
|
|
6835
|
+
gl_matrix__rspack_import_0.vec3.fromValues(minX, maxY, maxZ),
|
|
6836
|
+
gl_matrix__rspack_import_0.vec3.fromValues(maxX, maxY, maxZ),
|
|
6837
6837
|
];
|
|
6838
|
-
const normalVec = gl_matrix__rspack_import_0
|
|
6839
|
-
const originVec = gl_matrix__rspack_import_0
|
|
6840
|
-
const planeDistance = -gl_matrix__rspack_import_0
|
|
6838
|
+
const normalVec = gl_matrix__rspack_import_0.vec3.fromValues(normal[0], normal[1], normal[2]);
|
|
6839
|
+
const originVec = gl_matrix__rspack_import_0.vec3.fromValues(origin[0], origin[1], origin[2]);
|
|
6840
|
+
const planeDistance = -gl_matrix__rspack_import_0.vec3.dot(normalVec, originVec);
|
|
6841
6841
|
let initialSign = null;
|
|
6842
6842
|
for (const vertex of vertices) {
|
|
6843
|
-
const distance = gl_matrix__rspack_import_0
|
|
6843
|
+
const distance = gl_matrix__rspack_import_0.vec3.dot(normalVec, vertex) + planeDistance;
|
|
6844
6844
|
if (initialSign === null) {
|
|
6845
6845
|
initialSign = Math.sign(distance);
|
|
6846
6846
|
}
|
|
@@ -9520,11 +9520,11 @@ function _getGrowCutSphereBoundsInfo(referencedVolume, sphereBoundsInfo) {
|
|
|
9520
9520
|
}
|
|
9521
9521
|
function _getSphereBoundsInfo(referencedVolume, sphereInfo) {
|
|
9522
9522
|
const direction = referencedVolume.imageData.getDirection();
|
|
9523
|
-
const vecColumn = gl_matrix__rspack_import_0
|
|
9523
|
+
const vecColumn = gl_matrix__rspack_import_0.vec3.fromValues(direction[3], direction[4], direction[5]);
|
|
9524
9524
|
const { center: sphereCenterPoint, radius: sphereRadius } = sphereInfo;
|
|
9525
9525
|
const refVolImageData = referencedVolume.imageData;
|
|
9526
|
-
const topCirclePoint = gl_matrix__rspack_import_0
|
|
9527
|
-
const bottomCirclePoint = gl_matrix__rspack_import_0
|
|
9526
|
+
const topCirclePoint = gl_matrix__rspack_import_0.vec3.scaleAndAdd(gl_matrix__rspack_import_0.vec3.create(), sphereCenterPoint, vecColumn, -sphereRadius);
|
|
9527
|
+
const bottomCirclePoint = gl_matrix__rspack_import_0.vec3.scaleAndAdd(gl_matrix__rspack_import_0.vec3.create(), sphereCenterPoint, vecColumn, sphereRadius);
|
|
9528
9528
|
const sphereBoundsInfo = (0,_getSphereBoundsInfo_js__rspack_import_4/* .getSphereBoundsInfo */.R)([bottomCirclePoint, topCirclePoint], refVolImageData);
|
|
9529
9529
|
return _getGrowCutSphereBoundsInfo(referencedVolume, sphereBoundsInfo);
|
|
9530
9530
|
}
|
|
@@ -9626,13 +9626,13 @@ function _setNegativeSeedValues(subVolume, labelmap, sphereInfo, viewport, optio
|
|
|
9626
9626
|
const maxNegativePixelValue = referencePixelValue + negativeSeedVarianceValue;
|
|
9627
9627
|
const numCirclePoints = 360;
|
|
9628
9628
|
const rotationAngle = (2 * Math.PI) / numCirclePoints;
|
|
9629
|
-
const worldQuat = gl_matrix__rspack_import_0
|
|
9630
|
-
const vecRotation = gl_matrix__rspack_import_0
|
|
9629
|
+
const worldQuat = gl_matrix__rspack_import_0.quat.setAxisAngle(gl_matrix__rspack_import_0.quat.create(), worldVecSliceDir, rotationAngle);
|
|
9630
|
+
const vecRotation = gl_matrix__rspack_import_0.vec3.clone(worldVecRowDir);
|
|
9631
9631
|
for (let i = 0; i < numCirclePoints; i++) {
|
|
9632
|
-
const worldCircleBorderPoint = gl_matrix__rspack_import_0
|
|
9632
|
+
const worldCircleBorderPoint = gl_matrix__rspack_import_0.vec3.scaleAndAdd(gl_matrix__rspack_import_0.vec3.create(), sphereInfo.center, vecRotation, sphereInfo.radius);
|
|
9633
9633
|
const ijkCircleBorderPoint = transformWorldToIndex(labelmap.imageData, worldCircleBorderPoint);
|
|
9634
9634
|
const [x, y, z] = ijkCircleBorderPoint;
|
|
9635
|
-
gl_matrix__rspack_import_0
|
|
9635
|
+
gl_matrix__rspack_import_0.vec3.transformQuat(vecRotation, vecRotation, worldQuat);
|
|
9636
9636
|
if (x < 0 ||
|
|
9637
9637
|
x >= columns ||
|
|
9638
9638
|
y < 0 ||
|
|
@@ -10897,9 +10897,9 @@ var esm = __webpack_require__(50341);
|
|
|
10897
10897
|
function extractVolumeDirectionVectors(imageData) {
|
|
10898
10898
|
const direction = imageData.getDirection();
|
|
10899
10899
|
return {
|
|
10900
|
-
xDir: esm
|
|
10901
|
-
yDir: esm
|
|
10902
|
-
zDir: esm
|
|
10900
|
+
xDir: esm.vec3.normalize([0, 0, 0], direction.slice(0, 3)),
|
|
10901
|
+
yDir: esm.vec3.normalize([0, 0, 0], direction.slice(3, 6)),
|
|
10902
|
+
zDir: esm.vec3.normalize([0, 0, 0], direction.slice(6, 9)),
|
|
10903
10903
|
};
|
|
10904
10904
|
}
|
|
10905
10905
|
|
|
@@ -10955,7 +10955,7 @@ function getOrientationFromNormal(normal) {
|
|
|
10955
10955
|
SAGITTAL: [1, 0, 0],
|
|
10956
10956
|
};
|
|
10957
10957
|
for (const [key, value] of Object.entries(canonical)) {
|
|
10958
|
-
if (dist_esm.utilities.isEqualAbs(1, esm
|
|
10958
|
+
if (dist_esm.utilities.isEqualAbs(1, esm.vec3.dot(value, normal), (/* inlined export .ORIENTATION_TOLERANCE */0.01))) {
|
|
10959
10959
|
return key;
|
|
10960
10960
|
}
|
|
10961
10961
|
}
|
|
@@ -10973,30 +10973,30 @@ function computePlanePlaneIntersection(clippingPlane, viewPlaneNormal, viewPlane
|
|
|
10973
10973
|
const p1 = clippingPlane.origin;
|
|
10974
10974
|
const n2 = viewPlaneNormal;
|
|
10975
10975
|
const p2 = viewPlanePoint;
|
|
10976
|
-
const dir = esm
|
|
10977
|
-
esm
|
|
10978
|
-
const dirLenSq = esm
|
|
10976
|
+
const dir = esm.vec3.create();
|
|
10977
|
+
esm.vec3.cross(dir, n1, n2);
|
|
10978
|
+
const dirLenSq = esm.vec3.squaredLength(dir);
|
|
10979
10979
|
if (dirLenSq < (/* inlined export .PARALLEL_PLANE_TOLERANCE */1e-10)) {
|
|
10980
10980
|
return null;
|
|
10981
10981
|
}
|
|
10982
10982
|
const d1 = Core_Math/* ["default"].dot */.Ay.dot(n1, p1);
|
|
10983
10983
|
const d2 = Core_Math/* ["default"].dot */.Ay.dot(n2, p2);
|
|
10984
|
-
const term1 = esm
|
|
10985
|
-
const term2 = esm
|
|
10986
|
-
esm
|
|
10987
|
-
esm
|
|
10988
|
-
esm
|
|
10989
|
-
esm
|
|
10990
|
-
const point = esm
|
|
10991
|
-
esm
|
|
10992
|
-
esm
|
|
10984
|
+
const term1 = esm.vec3.create();
|
|
10985
|
+
const term2 = esm.vec3.create();
|
|
10986
|
+
esm.vec3.cross(term1, n2, dir);
|
|
10987
|
+
esm.vec3.scale(term1, term1, d1);
|
|
10988
|
+
esm.vec3.cross(term2, dir, n1);
|
|
10989
|
+
esm.vec3.scale(term2, term2, d2);
|
|
10990
|
+
const point = esm.vec3.create();
|
|
10991
|
+
esm.vec3.add(point, term1, term2);
|
|
10992
|
+
esm.vec3.scale(point, point, 1 / dirLenSq);
|
|
10993
10993
|
if (!Number.isFinite(point[0]) ||
|
|
10994
10994
|
!Number.isFinite(point[1]) ||
|
|
10995
10995
|
!Number.isFinite(point[2])) {
|
|
10996
10996
|
return null;
|
|
10997
10997
|
}
|
|
10998
|
-
const direction = esm
|
|
10999
|
-
esm
|
|
10998
|
+
const direction = esm.vec3.create();
|
|
10999
|
+
esm.vec3.scale(direction, dir, 1 / Math.sqrt(dirLenSq));
|
|
11000
11000
|
return {
|
|
11001
11001
|
direction: direction,
|
|
11002
11002
|
point: point,
|
|
@@ -11011,14 +11011,14 @@ var liangBarksyClip = __webpack_require__(34773);
|
|
|
11011
11011
|
|
|
11012
11012
|
function findLineBoundsIntersection(linePoint, lineDirection, viewport) {
|
|
11013
11013
|
const lineLength = (/* inlined export .LINE_EXTENSION_DISTANCE */100000);
|
|
11014
|
-
const lineStart = esm
|
|
11015
|
-
const lineEnd = esm
|
|
11014
|
+
const lineStart = esm.vec3.scaleAndAdd([0, 0, 0], linePoint, lineDirection, -lineLength);
|
|
11015
|
+
const lineEnd = esm.vec3.scaleAndAdd([0, 0, 0], linePoint, lineDirection, lineLength);
|
|
11016
11016
|
const canvasStart = viewport.worldToCanvas(lineStart);
|
|
11017
11017
|
const canvasEnd = viewport.worldToCanvas(lineEnd);
|
|
11018
11018
|
const { clientWidth, clientHeight } = viewport.canvas;
|
|
11019
11019
|
const canvasBox = [0, 0, clientWidth, clientHeight];
|
|
11020
|
-
const clippedStart = esm
|
|
11021
|
-
const clippedEnd = esm
|
|
11020
|
+
const clippedStart = esm.vec2.clone(canvasStart);
|
|
11021
|
+
const clippedEnd = esm.vec2.clone(canvasEnd);
|
|
11022
11022
|
const startValid = !isNaN(clippedStart[0]) && !isNaN(clippedStart[1]);
|
|
11023
11023
|
const endValid = !isNaN(clippedEnd[0]) && !isNaN(clippedEnd[1]);
|
|
11024
11024
|
if (!startValid || !endValid) {
|
|
@@ -11362,16 +11362,16 @@ function vtkPicker(publicAPI, model) {
|
|
|
11362
11362
|
const propIsFullyTranslucent = prop.getProperty?.().getOpacity?.() === 0;
|
|
11363
11363
|
if (!(prop.getNestedPickable() && prop.getNestedVisibility() && !propIsFullyTranslucent)) return;
|
|
11364
11364
|
model.transformMatrix = prop.getMatrix().slice(0);
|
|
11365
|
-
esm
|
|
11366
|
-
esm
|
|
11367
|
-
esm
|
|
11368
|
-
esm
|
|
11369
|
-
esm
|
|
11370
|
-
esm
|
|
11365
|
+
esm.mat4.transpose(model.transformMatrix, model.transformMatrix);
|
|
11366
|
+
esm.mat4.invert(model.transformMatrix, model.transformMatrix);
|
|
11367
|
+
esm.vec4.transformMat4(p1Mapper, p1World, model.transformMatrix);
|
|
11368
|
+
esm.vec4.transformMat4(p2Mapper, p2World, model.transformMatrix);
|
|
11369
|
+
esm.vec3.scale(p1Mapper, p1Mapper, 1 / p1Mapper[3]);
|
|
11370
|
+
esm.vec3.scale(p2Mapper, p2Mapper, 1 / p2Mapper[3]);
|
|
11371
11371
|
(0,Core_Math/* .subtract */.Re)(p2Mapper, p1Mapper, ray);
|
|
11372
11372
|
const bounds = mapper ? BoundingBox/* ["default"].inflate */.Ay.inflate(mapper.getBounds(), tolerance) : [...BoundingBox/* ["default"].INIT_BOUNDS */.Ay.INIT_BOUNDS];
|
|
11373
11373
|
if (BoundingBox/* ["default"].intersectBox */.Ay.intersectBox(bounds, p1Mapper, ray, hitPosition, [])) {
|
|
11374
|
-
esm
|
|
11374
|
+
esm.mat4.getScaling(transformScale, model.transformMatrix);
|
|
11375
11375
|
const t = model.intersectWithLine(p1Mapper, p2Mapper, tolerance * .333 * (transformScale[0] + transformScale[1] + transformScale[2]), prop, mapper);
|
|
11376
11376
|
if (t < Number.MAX_VALUE) {
|
|
11377
11377
|
pickedPosition[0] = (1 - t) * p1World[0] + t * p2World[0];
|
|
@@ -11411,7 +11411,7 @@ function vtkPicker(publicAPI, model) {
|
|
|
11411
11411
|
model.intersectWithLine = (p1, p2, tolerance, prop, mapper) => {
|
|
11412
11412
|
if (!mapper) return Number.MAX_VALUE;
|
|
11413
11413
|
const center = mapper.getCenter();
|
|
11414
|
-
const ray = esm
|
|
11414
|
+
const ray = esm.vec3.subtract(new Float64Array(3), p2, p1);
|
|
11415
11415
|
const rayFactor = (0,Core_Math/* .dot */.Om)(ray, ray);
|
|
11416
11416
|
if (rayFactor === 0) return 2;
|
|
11417
11417
|
return (ray[0] * (center[0] - p1[0]) + ray[1] * (center[1] - p1[1]) + ray[2] * (center[2] - p1[2])) / rayFactor;
|
|
@@ -11486,7 +11486,7 @@ function vtkPicker(publicAPI, model) {
|
|
|
11486
11486
|
if (!renderer) throw new Error("renderer cannot be null");
|
|
11487
11487
|
initialize();
|
|
11488
11488
|
model.renderer = renderer;
|
|
11489
|
-
esm
|
|
11489
|
+
esm.vec3.copy(model.selectionPoint, selectionPoint);
|
|
11490
11490
|
const dims = renderer.getRenderWindow().getViews()[0].getViewportSize(renderer);
|
|
11491
11491
|
if (dims[1] === 0) {
|
|
11492
11492
|
vtkWarningMacro("vtkPicker.pick3DPoint - viewport area is 0");
|
|
@@ -11687,7 +11687,7 @@ function vtkCellPicker(publicAPI, model) {
|
|
|
11687
11687
|
model.mapperNormal[1] = -plane[1];
|
|
11688
11688
|
model.mapperNormal[2] = -plane[2];
|
|
11689
11689
|
}
|
|
11690
|
-
esm
|
|
11690
|
+
esm.vec3.transformMat4(model.pickPosition, model.mapperPosition, model.transformMatrix);
|
|
11691
11691
|
const mat = model.transformMatrix;
|
|
11692
11692
|
model.mapperNormal[0] = mat[0] * model.pickNormal[0] + mat[4] * model.pickNormal[1] + mat[8] * model.pickNormal[2];
|
|
11693
11693
|
model.mapperNormal[1] = mat[1] * model.pickNormal[0] + mat[5] * model.pickNormal[1] + mat[9] * model.pickNormal[2];
|
|
@@ -11753,8 +11753,8 @@ function vtkCellPicker(publicAPI, model) {
|
|
|
11753
11753
|
0,
|
|
11754
11754
|
0
|
|
11755
11755
|
];
|
|
11756
|
-
esm
|
|
11757
|
-
esm
|
|
11756
|
+
esm.vec4.transformMat4(x1, q1, imageTransform);
|
|
11757
|
+
esm.vec4.transformMat4(x2, q2, imageTransform);
|
|
11758
11758
|
const x = [
|
|
11759
11759
|
0,
|
|
11760
11760
|
0,
|