@ohif/app 3.14.0-beta.98 → 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.f74ac5c2.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.51f0a437.js → app.bundle.bb359653.js} +1926 -1223
- 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
|
@@ -2303,10 +2303,10 @@ function mouseDragClosedContourEditCallback(evt) {
|
|
|
2303
2303
|
this.createMemo(element, annotation);
|
|
2304
2304
|
const lastCanvasPoint = editCanvasPoints[editCanvasPoints.length - 1];
|
|
2305
2305
|
const lastWorldPoint = viewport.canvasToWorld(lastCanvasPoint);
|
|
2306
|
-
const worldPosDiff = gl_matrix__rspack_import_0
|
|
2307
|
-
gl_matrix__rspack_import_0
|
|
2308
|
-
const xDist = Math.abs(gl_matrix__rspack_import_0
|
|
2309
|
-
const yDist = Math.abs(gl_matrix__rspack_import_0
|
|
2306
|
+
const worldPosDiff = gl_matrix__rspack_import_0.vec3.create();
|
|
2307
|
+
gl_matrix__rspack_import_0.vec3.subtract(worldPosDiff, worldPos, lastWorldPoint);
|
|
2308
|
+
const xDist = Math.abs(gl_matrix__rspack_import_0.vec3.dot(worldPosDiff, xDir));
|
|
2309
|
+
const yDist = Math.abs(gl_matrix__rspack_import_0.vec3.dot(worldPosDiff, yDir));
|
|
2310
2310
|
if (xDist <= spacing[0] && yDist <= spacing[1]) {
|
|
2311
2311
|
return;
|
|
2312
2312
|
}
|
|
@@ -2381,10 +2381,10 @@ function fuseEditPointsWithClosedContour(evt) {
|
|
|
2381
2381
|
lowIndex = startCrossingIndex;
|
|
2382
2382
|
highIndex = snapIndex;
|
|
2383
2383
|
}
|
|
2384
|
-
const distanceBetweenLowAndFirstPoint = gl_matrix__rspack_import_0
|
|
2385
|
-
const distanceBetweenLowAndLastPoint = gl_matrix__rspack_import_0
|
|
2386
|
-
const distanceBetweenHighAndFirstPoint = gl_matrix__rspack_import_0
|
|
2387
|
-
const distanceBetweenHighAndLastPoint = gl_matrix__rspack_import_0
|
|
2384
|
+
const distanceBetweenLowAndFirstPoint = gl_matrix__rspack_import_0.vec2.distance(prevCanvasPoints[lowIndex], augmentedEditCanvasPoints[0]);
|
|
2385
|
+
const distanceBetweenLowAndLastPoint = gl_matrix__rspack_import_0.vec2.distance(prevCanvasPoints[lowIndex], augmentedEditCanvasPoints[augmentedEditCanvasPoints.length - 1]);
|
|
2386
|
+
const distanceBetweenHighAndFirstPoint = gl_matrix__rspack_import_0.vec2.distance(prevCanvasPoints[highIndex], augmentedEditCanvasPoints[0]);
|
|
2387
|
+
const distanceBetweenHighAndLastPoint = gl_matrix__rspack_import_0.vec2.distance(prevCanvasPoints[highIndex], augmentedEditCanvasPoints[augmentedEditCanvasPoints.length - 1]);
|
|
2388
2388
|
const pointSet1 = [];
|
|
2389
2389
|
for (let i = 0; i < lowIndex; i++) {
|
|
2390
2390
|
const canvasPoint = prevCanvasPoints[i];
|
|
@@ -2585,10 +2585,10 @@ function mouseDragDrawCallback(evt) {
|
|
|
2585
2585
|
this.createMemo(element, annotation, { newAnnotation });
|
|
2586
2586
|
const lastCanvasPoint = canvasPoints[canvasPoints.length - 1];
|
|
2587
2587
|
const lastWorldPoint = viewport.canvasToWorld(lastCanvasPoint);
|
|
2588
|
-
const worldPosDiff = gl_matrix__rspack_import_4
|
|
2589
|
-
gl_matrix__rspack_import_4
|
|
2590
|
-
const xDist = Math.abs(gl_matrix__rspack_import_4
|
|
2591
|
-
const yDist = Math.abs(gl_matrix__rspack_import_4
|
|
2588
|
+
const worldPosDiff = gl_matrix__rspack_import_4.vec3.create();
|
|
2589
|
+
gl_matrix__rspack_import_4.vec3.subtract(worldPosDiff, worldPos, lastWorldPoint);
|
|
2590
|
+
const xDist = Math.abs(gl_matrix__rspack_import_4.vec3.dot(worldPosDiff, xDir));
|
|
2591
|
+
const yDist = Math.abs(gl_matrix__rspack_import_4.vec3.dot(worldPosDiff, yDir));
|
|
2592
2592
|
if (xDist <= spacing[0] && yDist <= spacing[1]) {
|
|
2593
2593
|
return;
|
|
2594
2594
|
}
|
|
@@ -2838,7 +2838,7 @@ function checkForFirstCrossing(evt, isClosedContour) {
|
|
|
2838
2838
|
const distanceIndexPairs = [];
|
|
2839
2839
|
for (let i = 0; i < prevCanvasPoints.length; i++) {
|
|
2840
2840
|
const prevCanvasPoint = prevCanvasPoints[i];
|
|
2841
|
-
const distance = gl_matrix__rspack_import_0
|
|
2841
|
+
const distance = gl_matrix__rspack_import_0.vec2.distance(prevCanvasPoint, firstEditCanvasPoint);
|
|
2842
2842
|
distanceIndexPairs.push({ distance, index: i });
|
|
2843
2843
|
}
|
|
2844
2844
|
distanceIndexPairs.sort((a, b) => a.distance - b.distance);
|
|
@@ -2850,9 +2850,9 @@ function checkForFirstCrossing(evt, isClosedContour) {
|
|
|
2850
2850
|
this.editData.startCrossingIndex = lowestIndex;
|
|
2851
2851
|
}
|
|
2852
2852
|
else {
|
|
2853
|
-
const dir = gl_matrix__rspack_import_0
|
|
2854
|
-
gl_matrix__rspack_import_0
|
|
2855
|
-
gl_matrix__rspack_import_0
|
|
2853
|
+
const dir = gl_matrix__rspack_import_0.vec2.create();
|
|
2854
|
+
gl_matrix__rspack_import_0.vec2.subtract(dir, editCanvasPoints[1], editCanvasPoints[0]);
|
|
2855
|
+
gl_matrix__rspack_import_0.vec2.normalize(dir, dir);
|
|
2856
2856
|
const proximity = 6;
|
|
2857
2857
|
const extendedPoint = [
|
|
2858
2858
|
editCanvasPoints[0][0] - dir[0] * proximity,
|
|
@@ -2917,7 +2917,7 @@ function findSnapIndex() {
|
|
|
2917
2917
|
const distanceIndexPairs = [];
|
|
2918
2918
|
for (let i = 0; i < prevCanvasPoints.length; i++) {
|
|
2919
2919
|
const prevCanvasPoint = prevCanvasPoints[i];
|
|
2920
|
-
const distance = gl_matrix__rspack_import_0
|
|
2920
|
+
const distance = gl_matrix__rspack_import_0.vec2.distance(prevCanvasPoint, lastEditCanvasPoint);
|
|
2921
2921
|
distanceIndexPairs.push({ distance, index: i });
|
|
2922
2922
|
}
|
|
2923
2923
|
distanceIndexPairs.sort((a, b) => a.distance - b.distance);
|
|
@@ -2976,13 +2976,13 @@ const cs3dLogger = _cornerstonejs_core__rspack_import_1.utilities.logger.toolsLo
|
|
|
2976
2976
|
function findOpenUShapedContourVectorToPeak(canvasPoints, viewport) {
|
|
2977
2977
|
const first = canvasPoints[0];
|
|
2978
2978
|
const last = canvasPoints[canvasPoints.length - 1];
|
|
2979
|
-
const firstToLastUnitVector = gl_matrix__rspack_import_0
|
|
2980
|
-
gl_matrix__rspack_import_0
|
|
2981
|
-
gl_matrix__rspack_import_0
|
|
2982
|
-
const normalVector1 = gl_matrix__rspack_import_0
|
|
2983
|
-
const normalVector2 = gl_matrix__rspack_import_0
|
|
2984
|
-
gl_matrix__rspack_import_0
|
|
2985
|
-
gl_matrix__rspack_import_0
|
|
2979
|
+
const firstToLastUnitVector = gl_matrix__rspack_import_0.vec2.create();
|
|
2980
|
+
gl_matrix__rspack_import_0.vec2.set(firstToLastUnitVector, last[0] - first[0], last[1] - first[1]);
|
|
2981
|
+
gl_matrix__rspack_import_0.vec2.normalize(firstToLastUnitVector, firstToLastUnitVector);
|
|
2982
|
+
const normalVector1 = gl_matrix__rspack_import_0.vec2.create();
|
|
2983
|
+
const normalVector2 = gl_matrix__rspack_import_0.vec2.create();
|
|
2984
|
+
gl_matrix__rspack_import_0.vec2.set(normalVector1, -firstToLastUnitVector[1], firstToLastUnitVector[0]);
|
|
2985
|
+
gl_matrix__rspack_import_0.vec2.set(normalVector2, firstToLastUnitVector[1], -firstToLastUnitVector[0]);
|
|
2986
2986
|
const centerOfFirstToLast = [
|
|
2987
2987
|
(first[0] + last[0]) / 2,
|
|
2988
2988
|
(first[1] + last[1]) / 2,
|
|
@@ -2993,7 +2993,7 @@ function findOpenUShapedContourVectorToPeak(canvasPoints, viewport) {
|
|
|
2993
2993
|
};
|
|
2994
2994
|
for (let i = 0; i < canvasPoints.length; i++) {
|
|
2995
2995
|
const canvasPoint = canvasPoints[i];
|
|
2996
|
-
const distance = gl_matrix__rspack_import_0
|
|
2996
|
+
const distance = gl_matrix__rspack_import_0.vec2.dist(canvasPoint, centerOfFirstToLast);
|
|
2997
2997
|
if (distance > furthest.dist) {
|
|
2998
2998
|
furthest.dist = distance;
|
|
2999
2999
|
furthest.index = i;
|
|
@@ -3026,8 +3026,8 @@ function resolveVectorToPeakOnRender(enabledElement, annotation) {
|
|
|
3026
3026
|
function findOpenUShapedContourVectorToPeakOrthogonal(canvasPoints, viewport) {
|
|
3027
3027
|
const first = canvasPoints[0];
|
|
3028
3028
|
const last = canvasPoints[canvasPoints.length - 1];
|
|
3029
|
-
const firstToLastUnitVector = gl_matrix__rspack_import_0
|
|
3030
|
-
gl_matrix__rspack_import_0
|
|
3029
|
+
const firstToLastUnitVector = gl_matrix__rspack_import_0.vec2.sub(gl_matrix__rspack_import_0.vec2.create(), last, first);
|
|
3030
|
+
gl_matrix__rspack_import_0.vec2.normalize(firstToLastUnitVector, firstToLastUnitVector);
|
|
3031
3031
|
const chordDir = [
|
|
3032
3032
|
firstToLastUnitVector[0],
|
|
3033
3033
|
firstToLastUnitVector[1],
|
|
@@ -3036,13 +3036,13 @@ function findOpenUShapedContourVectorToPeakOrthogonal(canvasPoints, viewport) {
|
|
|
3036
3036
|
(first[0] + last[0]) / 2,
|
|
3037
3037
|
(first[1] + last[1]) / 2,
|
|
3038
3038
|
];
|
|
3039
|
-
const delta = gl_matrix__rspack_import_0
|
|
3039
|
+
const delta = gl_matrix__rspack_import_0.vec2.create();
|
|
3040
3040
|
let prevDp = null;
|
|
3041
3041
|
let prevPoint = null;
|
|
3042
3042
|
let orthogonalPoint = null;
|
|
3043
3043
|
for (const p of canvasPoints) {
|
|
3044
|
-
gl_matrix__rspack_import_0
|
|
3045
|
-
const dp = gl_matrix__rspack_import_0
|
|
3044
|
+
gl_matrix__rspack_import_0.vec2.sub(delta, p, centerOfFirstToLast);
|
|
3045
|
+
const dp = gl_matrix__rspack_import_0.vec2.dot(chordDir, delta);
|
|
3046
3046
|
if (prevDp !== null && prevDp * dp < 0) {
|
|
3047
3047
|
const t = Math.abs(prevDp) / (Math.abs(prevDp) + Math.abs(dp));
|
|
3048
3048
|
orthogonalPoint = [
|
|
@@ -3156,11 +3156,11 @@ function mouseDragOpenContourEditCallback(evt) {
|
|
|
3156
3156
|
const { editIndex, editCanvasPoints, startCrossingIndex } = this.editData;
|
|
3157
3157
|
const lastCanvasPoint = editCanvasPoints[editCanvasPoints.length - 1];
|
|
3158
3158
|
const lastWorldPoint = viewport.canvasToWorld(lastCanvasPoint);
|
|
3159
|
-
const worldPosDiff = gl_matrix__rspack_import_0
|
|
3159
|
+
const worldPosDiff = gl_matrix__rspack_import_0.vec3.create();
|
|
3160
3160
|
this.createMemo(element, this.commonData.annotation);
|
|
3161
|
-
gl_matrix__rspack_import_0
|
|
3162
|
-
const xDist = Math.abs(gl_matrix__rspack_import_0
|
|
3163
|
-
const yDist = Math.abs(gl_matrix__rspack_import_0
|
|
3161
|
+
gl_matrix__rspack_import_0.vec3.subtract(worldPosDiff, worldPos, lastWorldPoint);
|
|
3162
|
+
const xDist = Math.abs(gl_matrix__rspack_import_0.vec3.dot(worldPosDiff, xDir));
|
|
3163
|
+
const yDist = Math.abs(gl_matrix__rspack_import_0.vec3.dot(worldPosDiff, yDir));
|
|
3164
3164
|
if (xDist <= spacing[0] && yDist <= spacing[1]) {
|
|
3165
3165
|
return;
|
|
3166
3166
|
}
|
|
@@ -3228,11 +3228,11 @@ function checkIfShouldOverwriteAnEnd(evt) {
|
|
|
3228
3228
|
const p1 = canvasPos;
|
|
3229
3229
|
const p2 = lastCanvasPos;
|
|
3230
3230
|
const p3 = prevCanvasPoints[snapIndex];
|
|
3231
|
-
const a = gl_matrix__rspack_import_0
|
|
3232
|
-
const b = gl_matrix__rspack_import_0
|
|
3233
|
-
gl_matrix__rspack_import_0
|
|
3234
|
-
gl_matrix__rspack_import_0
|
|
3235
|
-
const aDotb = gl_matrix__rspack_import_0
|
|
3231
|
+
const a = gl_matrix__rspack_import_0.vec2.create();
|
|
3232
|
+
const b = gl_matrix__rspack_import_0.vec2.create();
|
|
3233
|
+
gl_matrix__rspack_import_0.vec2.set(a, p1[0] - p2[0], p1[1] - p2[1]);
|
|
3234
|
+
gl_matrix__rspack_import_0.vec2.set(b, p1[0] - p3[0], p1[1] - p3[1]);
|
|
3235
|
+
const aDotb = gl_matrix__rspack_import_0.vec2.dot(a, b);
|
|
3236
3236
|
const magA = Math.sqrt(a[0] * a[0] + a[1] * a[1]);
|
|
3237
3237
|
const magB = Math.sqrt(b[0] * b[0] + b[1] * b[1]);
|
|
3238
3238
|
const theta = Math.acos(aDotb / (magA * magB));
|
|
@@ -3256,8 +3256,8 @@ function fuseEditPointsForOpenContourEndEdit() {
|
|
|
3256
3256
|
newCanvasPoints.push([canvasPoint[0], canvasPoint[1]]);
|
|
3257
3257
|
}
|
|
3258
3258
|
}
|
|
3259
|
-
const distanceBetweenCrossingIndexAndFirstPoint = gl_matrix__rspack_import_0
|
|
3260
|
-
const distanceBetweenCrossingIndexAndLastPoint = gl_matrix__rspack_import_0
|
|
3259
|
+
const distanceBetweenCrossingIndexAndFirstPoint = gl_matrix__rspack_import_0.vec2.distance(prevCanvasPoints[startCrossingIndex], editCanvasPoints[0]);
|
|
3260
|
+
const distanceBetweenCrossingIndexAndLastPoint = gl_matrix__rspack_import_0.vec2.distance(prevCanvasPoints[startCrossingIndex], editCanvasPoints[editCanvasPoints.length - 1]);
|
|
3261
3261
|
if (distanceBetweenCrossingIndexAndFirstPoint <
|
|
3262
3262
|
distanceBetweenCrossingIndexAndLastPoint) {
|
|
3263
3263
|
for (let i = 0; i < editCanvasPoints.length; i++) {
|
|
@@ -3295,10 +3295,10 @@ function fuseEditPointsWithOpenContour(evt) {
|
|
|
3295
3295
|
lowIndex = startCrossingIndex;
|
|
3296
3296
|
highIndex = snapIndex;
|
|
3297
3297
|
}
|
|
3298
|
-
const distanceBetweenLowAndFirstPoint = gl_matrix__rspack_import_0
|
|
3299
|
-
const distanceBetweenLowAndLastPoint = gl_matrix__rspack_import_0
|
|
3300
|
-
const distanceBetweenHighAndFirstPoint = gl_matrix__rspack_import_0
|
|
3301
|
-
const distanceBetweenHighAndLastPoint = gl_matrix__rspack_import_0
|
|
3298
|
+
const distanceBetweenLowAndFirstPoint = gl_matrix__rspack_import_0.vec2.distance(prevCanvasPoints[lowIndex], augmentedEditCanvasPoints[0]);
|
|
3299
|
+
const distanceBetweenLowAndLastPoint = gl_matrix__rspack_import_0.vec2.distance(prevCanvasPoints[lowIndex], augmentedEditCanvasPoints[augmentedEditCanvasPoints.length - 1]);
|
|
3300
|
+
const distanceBetweenHighAndFirstPoint = gl_matrix__rspack_import_0.vec2.distance(prevCanvasPoints[highIndex], augmentedEditCanvasPoints[0]);
|
|
3301
|
+
const distanceBetweenHighAndLastPoint = gl_matrix__rspack_import_0.vec2.distance(prevCanvasPoints[highIndex], augmentedEditCanvasPoints[augmentedEditCanvasPoints.length - 1]);
|
|
3302
3302
|
const pointsToRender = [];
|
|
3303
3303
|
for (let i = 0; i < lowIndex; i++) {
|
|
3304
3304
|
const canvasPoint = prevCanvasPoints[i];
|
|
@@ -4647,11 +4647,11 @@ var getViewportICamera = __webpack_require__(40196);
|
|
|
4647
4647
|
const threshold = oldThreshold || [Infinity, -Infinity];
|
|
4648
4648
|
const useDeltaSqr = useDelta * useDelta;
|
|
4649
4649
|
const callback = ({ value, pointIJK }) => {
|
|
4650
|
-
const distance = esm
|
|
4650
|
+
const distance = esm.vec3.sqrDist(centerIJK, pointIJK);
|
|
4651
4651
|
if (distance > useDeltaSqr) {
|
|
4652
4652
|
return;
|
|
4653
4653
|
}
|
|
4654
|
-
const gray = Array.isArray(value) ? esm
|
|
4654
|
+
const gray = Array.isArray(value) ? esm.vec3.len(value) : value;
|
|
4655
4655
|
threshold[0] = Math.min(gray, threshold[0]);
|
|
4656
4656
|
threshold[1] = Math.max(gray, threshold[1]);
|
|
4657
4657
|
};
|
|
@@ -5008,7 +5008,7 @@ var labelmapSegmentationState = __webpack_require__(92996);
|
|
|
5008
5008
|
return (index) => {
|
|
5009
5009
|
const voxelValue = imageVoxelManager.getAtIndex(index);
|
|
5010
5010
|
const gray = Array.isArray(voxelValue)
|
|
5011
|
-
? esm
|
|
5011
|
+
? esm.vec3.length(voxelValue)
|
|
5012
5012
|
: voxelValue;
|
|
5013
5013
|
const { threshold } = configuration || {};
|
|
5014
5014
|
if (!threshold?.range?.length) {
|
|
@@ -5060,20 +5060,20 @@ const cs3dLogger = dist_esm.utilities.logger.toolsLog.getLogger('tools.segmentat
|
|
|
5060
5060
|
if (!camera.viewUp || !camera.viewPlaneNormal) {
|
|
5061
5061
|
return;
|
|
5062
5062
|
}
|
|
5063
|
-
const viewUp = esm
|
|
5064
|
-
const viewPlaneNormal = esm
|
|
5065
|
-
const viewRight = esm
|
|
5066
|
-
esm
|
|
5063
|
+
const viewUp = esm.vec3.fromValues(camera.viewUp[0], camera.viewUp[1], camera.viewUp[2]);
|
|
5064
|
+
const viewPlaneNormal = esm.vec3.fromValues(camera.viewPlaneNormal[0], camera.viewPlaneNormal[1], camera.viewPlaneNormal[2]);
|
|
5065
|
+
const viewRight = esm.vec3.create();
|
|
5066
|
+
esm.vec3.cross(viewRight, viewUp, viewPlaneNormal);
|
|
5067
5067
|
const { canvasToWorld } = viewport;
|
|
5068
5068
|
const { centerCanvas } = hoverData;
|
|
5069
5069
|
const centerCursorInWorld = canvasToWorld([
|
|
5070
5070
|
centerCanvas[0],
|
|
5071
5071
|
centerCanvas[1],
|
|
5072
5072
|
]);
|
|
5073
|
-
const bottomCursorInWorld = esm
|
|
5074
|
-
const topCursorInWorld = esm
|
|
5075
|
-
const leftCursorInWorld = esm
|
|
5076
|
-
const rightCursorInWorld = esm
|
|
5073
|
+
const bottomCursorInWorld = esm.vec3.create();
|
|
5074
|
+
const topCursorInWorld = esm.vec3.create();
|
|
5075
|
+
const leftCursorInWorld = esm.vec3.create();
|
|
5076
|
+
const rightCursorInWorld = esm.vec3.create();
|
|
5077
5077
|
for (let i = 0; i <= 2; i++) {
|
|
5078
5078
|
bottomCursorInWorld[i] = centerCursorInWorld[i] - viewUp[i] * brushSize;
|
|
5079
5079
|
topCursorInWorld[i] = centerCursorInWorld[i] + viewUp[i] * brushSize;
|
|
@@ -5264,13 +5264,13 @@ const sphereComposition = {
|
|
|
5264
5264
|
if (!points) {
|
|
5265
5265
|
return;
|
|
5266
5266
|
}
|
|
5267
|
-
const center = gl_matrix__rspack_import_1
|
|
5267
|
+
const center = gl_matrix__rspack_import_1.vec3.create();
|
|
5268
5268
|
if (points.length >= 2) {
|
|
5269
|
-
gl_matrix__rspack_import_1
|
|
5270
|
-
gl_matrix__rspack_import_1
|
|
5269
|
+
gl_matrix__rspack_import_1.vec3.add(center, points[0], points[1]);
|
|
5270
|
+
gl_matrix__rspack_import_1.vec3.scale(center, center, 0.5);
|
|
5271
5271
|
}
|
|
5272
5272
|
else {
|
|
5273
|
-
gl_matrix__rspack_import_1
|
|
5273
|
+
gl_matrix__rspack_import_1.vec3.copy(center, points[0]);
|
|
5274
5274
|
}
|
|
5275
5275
|
operationData.centerWorld = center;
|
|
5276
5276
|
operationData.centerIJK = transformWorldToIndex(segmentationImageData, center);
|
|
@@ -5279,18 +5279,18 @@ const sphereComposition = {
|
|
|
5279
5279
|
const cornersInWorld = corners.map((corner) => viewport.canvasToWorld(corner));
|
|
5280
5280
|
const aspectRatio = getNormalizedAspectRatio(viewport.getAspectRatio());
|
|
5281
5281
|
const yRadius = points.length >= 2
|
|
5282
|
-
? gl_matrix__rspack_import_1
|
|
5282
|
+
? gl_matrix__rspack_import_1.vec3.distance(points[0], points[1]) / 2 / aspectRatio[1]
|
|
5283
5283
|
: 0;
|
|
5284
5284
|
const xRadius = points.length >= 2
|
|
5285
|
-
? gl_matrix__rspack_import_1
|
|
5285
|
+
? gl_matrix__rspack_import_1.vec3.distance(points[2], points[3]) / 2 / aspectRatio[0]
|
|
5286
5286
|
: 0;
|
|
5287
|
-
const normalizedViewUp = gl_matrix__rspack_import_1
|
|
5288
|
-
gl_matrix__rspack_import_1
|
|
5289
|
-
const normalizedPlaneNormal = gl_matrix__rspack_import_1
|
|
5290
|
-
gl_matrix__rspack_import_1
|
|
5291
|
-
const viewRight = gl_matrix__rspack_import_1
|
|
5292
|
-
gl_matrix__rspack_import_1
|
|
5293
|
-
gl_matrix__rspack_import_1
|
|
5287
|
+
const normalizedViewUp = gl_matrix__rspack_import_1.vec3.fromValues(viewUp[0], viewUp[1], viewUp[2]);
|
|
5288
|
+
gl_matrix__rspack_import_1.vec3.normalize(normalizedViewUp, normalizedViewUp);
|
|
5289
|
+
const normalizedPlaneNormal = gl_matrix__rspack_import_1.vec3.fromValues(viewPlaneNormal[0], viewPlaneNormal[1], viewPlaneNormal[2]);
|
|
5290
|
+
gl_matrix__rspack_import_1.vec3.normalize(normalizedPlaneNormal, normalizedPlaneNormal);
|
|
5291
|
+
const viewRight = gl_matrix__rspack_import_1.vec3.create();
|
|
5292
|
+
gl_matrix__rspack_import_1.vec3.cross(viewRight, normalizedViewUp, normalizedPlaneNormal);
|
|
5293
|
+
gl_matrix__rspack_import_1.vec3.normalize(viewRight, viewRight);
|
|
5294
5294
|
const baseExtent = (0,_utilities_getSphereBoundsInfo_js__rspack_import_7/* .getSphereBoundsInfoFromViewport */.l)(points.slice(0, 2), segmentationImageData, viewport);
|
|
5295
5295
|
const strokeCenters = operationData.strokePointsWorld?.length
|
|
5296
5296
|
? operationData.strokePointsWorld
|
|
@@ -5387,8 +5387,8 @@ function volumeFromImageData(imageData) {
|
|
|
5387
5387
|
};
|
|
5388
5388
|
}
|
|
5389
5389
|
function getViewRight(viewUp, viewPlaneNormal) {
|
|
5390
|
-
const right = gl_matrix__rspack_import_0
|
|
5391
|
-
return gl_matrix__rspack_import_0
|
|
5390
|
+
const right = gl_matrix__rspack_import_0.vec3.cross(gl_matrix__rspack_import_0.vec3.create(), viewUp, viewPlaneNormal);
|
|
5391
|
+
return gl_matrix__rspack_import_0.vec3.normalize(right, right);
|
|
5392
5392
|
}
|
|
5393
5393
|
function densifyStrokeCenters(centers, stepWorld) {
|
|
5394
5394
|
if (centers.length <= 1 || !(stepWorld > 0)) {
|
|
@@ -5502,22 +5502,22 @@ function createRectangleBrushFill(operationData) {
|
|
|
5502
5502
|
return null;
|
|
5503
5503
|
}
|
|
5504
5504
|
const [p0, p1, , p3] = cornersWorld;
|
|
5505
|
-
const majorAxis = gl_matrix__rspack_import_0
|
|
5506
|
-
const minorAxis = gl_matrix__rspack_import_0
|
|
5507
|
-
const majorHalfLength = gl_matrix__rspack_import_0
|
|
5508
|
-
const minorHalfLength = gl_matrix__rspack_import_0
|
|
5505
|
+
const majorAxis = gl_matrix__rspack_import_0.vec3.sub(gl_matrix__rspack_import_0.vec3.create(), p1, p0);
|
|
5506
|
+
const minorAxis = gl_matrix__rspack_import_0.vec3.sub(gl_matrix__rspack_import_0.vec3.create(), p3, p0);
|
|
5507
|
+
const majorHalfLength = gl_matrix__rspack_import_0.vec3.length(majorAxis) / 2;
|
|
5508
|
+
const minorHalfLength = gl_matrix__rspack_import_0.vec3.length(minorAxis) / 2;
|
|
5509
5509
|
if (!(majorHalfLength > 0) || !(minorHalfLength > 0)) {
|
|
5510
5510
|
return null;
|
|
5511
5511
|
}
|
|
5512
|
-
const normal = gl_matrix__rspack_import_0
|
|
5513
|
-
if (!(gl_matrix__rspack_import_0
|
|
5512
|
+
const normal = gl_matrix__rspack_import_0.vec3.cross(gl_matrix__rspack_import_0.vec3.create(), majorAxis, minorAxis);
|
|
5513
|
+
if (!(gl_matrix__rspack_import_0.vec3.squaredLength(normal) > 0)) {
|
|
5514
5514
|
if (!operationData.viewPlaneNormal) {
|
|
5515
5515
|
return null;
|
|
5516
5516
|
}
|
|
5517
|
-
gl_matrix__rspack_import_0
|
|
5517
|
+
gl_matrix__rspack_import_0.vec3.copy(normal, operationData.viewPlaneNormal);
|
|
5518
5518
|
}
|
|
5519
|
-
gl_matrix__rspack_import_0
|
|
5520
|
-
const center = gl_matrix__rspack_import_0
|
|
5519
|
+
gl_matrix__rspack_import_0.vec3.normalize(normal, normal);
|
|
5520
|
+
const center = gl_matrix__rspack_import_0.vec3.lerp(gl_matrix__rspack_import_0.vec3.create(), p0, cornersWorld[2], 0.5);
|
|
5521
5521
|
return buildBrushFill({
|
|
5522
5522
|
segmentationImageData,
|
|
5523
5523
|
planePoint: center,
|
|
@@ -6375,16 +6375,16 @@ function selectHandles(polyline, options = {}) {
|
|
|
6375
6375
|
}
|
|
6376
6376
|
function createDotValues(polyline, distance = 6) {
|
|
6377
6377
|
const { length } = polyline;
|
|
6378
|
-
const prevVec3 = gl_matrix_esm
|
|
6379
|
-
const nextVec3 = gl_matrix_esm
|
|
6378
|
+
const prevVec3 = gl_matrix_esm.vec3.create();
|
|
6379
|
+
const nextVec3 = gl_matrix_esm.vec3.create();
|
|
6380
6380
|
const dotValues = new Float32Array(length);
|
|
6381
6381
|
for (let i = 0; i < length; i++) {
|
|
6382
6382
|
const point = polyline.getPoint(i);
|
|
6383
6383
|
const prevPoint = polyline.getPoint(i - distance);
|
|
6384
6384
|
const nextPoint = polyline.getPoint((i + distance) % length);
|
|
6385
|
-
gl_matrix_esm
|
|
6386
|
-
gl_matrix_esm
|
|
6387
|
-
const dot = gl_matrix_esm
|
|
6385
|
+
gl_matrix_esm.vec3.sub(prevVec3, point, prevPoint);
|
|
6386
|
+
gl_matrix_esm.vec3.sub(nextVec3, nextPoint, point);
|
|
6387
|
+
const dot = gl_matrix_esm.vec3.dot(prevVec3, nextVec3) / (gl_matrix_esm.vec3.len(prevVec3) * gl_matrix_esm.vec3.len(nextVec3));
|
|
6388
6388
|
dotValues[i] = dot;
|
|
6389
6389
|
}
|
|
6390
6390
|
return dotValues;
|
|
@@ -6636,8 +6636,8 @@ function _generateInterpolatedOpenContour(c1ir, c2ir, zInterp, c1HasMoreNodes) {
|
|
|
6636
6636
|
const c2 = interpolate_PointsManager.fromXYZ(c2ir);
|
|
6637
6637
|
const { length } = c1;
|
|
6638
6638
|
const cInterp = interpolate_PointsManager.create3(length);
|
|
6639
|
-
const vecSubtract = gl_matrix_esm
|
|
6640
|
-
const vecResult = gl_matrix_esm
|
|
6639
|
+
const vecSubtract = gl_matrix_esm.vec3.create();
|
|
6640
|
+
const vecResult = gl_matrix_esm.vec3.create();
|
|
6641
6641
|
const c1Source = interpolate_PointsManager.create3(length);
|
|
6642
6642
|
c1Source.kIndex = c1ir.kIndex;
|
|
6643
6643
|
const c2Source = interpolate_PointsManager.create3(length);
|
|
@@ -6648,8 +6648,8 @@ function _generateInterpolatedOpenContour(c1ir, c2ir, zInterp, c1HasMoreNodes) {
|
|
|
6648
6648
|
const c2point = c2.getPoint(i);
|
|
6649
6649
|
c1Source.push(c1point);
|
|
6650
6650
|
c2Source.push(c2point);
|
|
6651
|
-
gl_matrix_esm
|
|
6652
|
-
cInterp.push(gl_matrix_esm
|
|
6651
|
+
gl_matrix_esm.vec3.sub(vecSubtract, c2point, c1point);
|
|
6652
|
+
cInterp.push(gl_matrix_esm.vec3.scaleAndAdd(vecResult, c1point, vecSubtract, zInterp));
|
|
6653
6653
|
}
|
|
6654
6654
|
}
|
|
6655
6655
|
cInterp.sources = [c1Source, c2Source];
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(globalThis["rspackChunk_ohif_app"] ||= []).push([[6481], {
|
|
3
3
|
19784(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
4
|
+
// ESM COMPAT FLAG
|
|
5
|
+
__webpack_require__.r(__webpack_exports__);
|
|
4
6
|
|
|
5
7
|
// EXPORTS
|
|
6
8
|
__webpack_require__.d(__webpack_exports__, {
|
|
7
|
-
|
|
9
|
+
customizations: () => (/* binding */ customizations),
|
|
10
|
+
"default": () => (/* binding */ segmentation_src),
|
|
11
|
+
initToolGroups: () => (/* reexport */ src_initToolGroups),
|
|
12
|
+
modeInstance: () => (/* binding */ modeInstance),
|
|
13
|
+
onModeEnter: () => (/* binding */ onModeEnter),
|
|
14
|
+
segmentationLayout: () => (/* binding */ segmentationLayout),
|
|
15
|
+
segmentationRoute: () => (/* binding */ segmentationRoute)
|
|
8
16
|
});
|
|
9
17
|
|
|
10
|
-
// UNUSED EXPORTS: customizations, initToolGroups, modeInstance, onModeEnter, segmentationLayout, segmentationRoute
|
|
11
|
-
|
|
12
18
|
;// CONCATENATED MODULE: ../../modes/segmentation/package.json
|
|
13
19
|
var package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@ohif/mode-segmentation"}')
|
|
14
20
|
;// CONCATENATED MODULE: ../../modes/segmentation/src/id.js
|
|
@@ -398,7 +404,7 @@ var src = __webpack_require__(42252);
|
|
|
398
404
|
* relevant type become active).
|
|
399
405
|
*/
|
|
400
406
|
function onModeEnter(ctx) {
|
|
401
|
-
src
|
|
407
|
+
src.onModeEnter.call(this, ctx);
|
|
402
408
|
const { segmentationService, viewportGridService, panelService } = ctx.servicesManager.services;
|
|
403
409
|
const { unsubscribeAutoTabSwitchEvents } = setUpAutoTabSwitchHandler({
|
|
404
410
|
segmentationService,
|
|
@@ -408,36 +414,36 @@ function onModeEnter(ctx) {
|
|
|
408
414
|
this._unsubscriptions.push(...unsubscribeAutoTabSwitchEvents);
|
|
409
415
|
}
|
|
410
416
|
const segmentationLayout = {
|
|
411
|
-
id: src
|
|
417
|
+
id: src.ohif.layout,
|
|
412
418
|
props: {
|
|
413
419
|
// `leftPanels` / `rightPanels` customizations so `mode` phase
|
|
414
420
|
// blocks and global customizations can modify them.
|
|
415
421
|
leftPanels: [
|
|
416
|
-
src
|
|
422
|
+
src.ohif.thumbnailList
|
|
417
423
|
],
|
|
418
424
|
leftPanelResizable: true,
|
|
419
425
|
rightPanels: [
|
|
420
|
-
src
|
|
421
|
-
src
|
|
426
|
+
src.cornerstone.labelMapSegmentationPanel,
|
|
427
|
+
src.cornerstone.contourSegmentationPanel
|
|
422
428
|
],
|
|
423
429
|
rightPanelResizable: true,
|
|
424
430
|
viewports: [
|
|
425
431
|
{
|
|
426
|
-
namespace: src
|
|
432
|
+
namespace: src.cornerstone.viewport,
|
|
427
433
|
displaySetsToDisplay: [
|
|
428
|
-
src
|
|
434
|
+
src.ohif.sopClassHandler
|
|
429
435
|
]
|
|
430
436
|
},
|
|
431
437
|
{
|
|
432
|
-
namespace: src
|
|
438
|
+
namespace: src.segmentation.viewport,
|
|
433
439
|
displaySetsToDisplay: [
|
|
434
|
-
src
|
|
440
|
+
src.segmentation.sopClassHandler
|
|
435
441
|
]
|
|
436
442
|
},
|
|
437
443
|
{
|
|
438
|
-
namespace: src
|
|
444
|
+
namespace: src.dicomRT.viewport,
|
|
439
445
|
displaySetsToDisplay: [
|
|
440
|
-
src
|
|
446
|
+
src.dicomRT.sopClassHandler
|
|
441
447
|
]
|
|
442
448
|
}
|
|
443
449
|
]
|
|
@@ -445,7 +451,7 @@ const segmentationLayout = {
|
|
|
445
451
|
};
|
|
446
452
|
const segmentationRoute = {
|
|
447
453
|
path: 'template',
|
|
448
|
-
layoutTemplate: src
|
|
454
|
+
layoutTemplate: src.layoutTemplate,
|
|
449
455
|
layoutInstance: segmentationLayout
|
|
450
456
|
};
|
|
451
457
|
const modeInstance = {
|
|
@@ -485,13 +491,13 @@ const modeInstance = {
|
|
|
485
491
|
/**
|
|
486
492
|
* Lifecycle hooks
|
|
487
493
|
*/ onModeEnter,
|
|
488
|
-
onModeExit: src
|
|
494
|
+
onModeExit: src.onModeExit,
|
|
489
495
|
validationTags: {
|
|
490
496
|
study: [],
|
|
491
497
|
series: []
|
|
492
498
|
},
|
|
493
499
|
// segmentation cannot be performed on.
|
|
494
|
-
isValidMode: src
|
|
500
|
+
isValidMode: src.isValidMode,
|
|
495
501
|
nonModeModalities: [
|
|
496
502
|
'SM',
|
|
497
503
|
'ECG',
|
|
@@ -501,14 +507,14 @@ const modeInstance = {
|
|
|
501
507
|
routes: [
|
|
502
508
|
segmentationRoute
|
|
503
509
|
],
|
|
504
|
-
extensions: src
|
|
510
|
+
extensions: src.extensionDependencies,
|
|
505
511
|
hangingProtocol: [
|
|
506
512
|
'@ohif/mnGrid'
|
|
507
513
|
],
|
|
508
514
|
sopClassHandlers: [
|
|
509
|
-
src
|
|
510
|
-
src
|
|
511
|
-
src
|
|
515
|
+
src.ohif.sopClassHandler,
|
|
516
|
+
src.segmentation.sopClassHandler,
|
|
517
|
+
src.dicomRT.sopClassHandler
|
|
512
518
|
]
|
|
513
519
|
}; /**
|
|
514
520
|
* Customizations the mode registers (Default scope) when it loads. The mode's
|
|
@@ -525,9 +531,9 @@ const customizations = {
|
|
|
525
531
|
*/
|
|
526
532
|
const mode = {
|
|
527
533
|
id: id,
|
|
528
|
-
modeFactory: src
|
|
534
|
+
modeFactory: src.modeFactory,
|
|
529
535
|
modeInstance,
|
|
530
|
-
extensionDependencies: src
|
|
536
|
+
extensionDependencies: src.extensionDependencies,
|
|
531
537
|
customizations
|
|
532
538
|
};
|
|
533
539
|
/* export default */ var segmentation_src = (mode);
|