@cornerstonejs/adapters 1.50.3 → 1.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters.es.js +24 -0
- package/dist/adapters.es.js.map +1 -1
- package/package.json +5 -5
package/dist/adapters.es.js
CHANGED
|
@@ -47428,6 +47428,29 @@ function getViewportForAnnotation(annotation) {
|
|
|
47428
47428
|
return enabledElement?.viewport;
|
|
47429
47429
|
}
|
|
47430
47430
|
|
|
47431
|
+
function areCoplanarContours(firstAnnotation, secondAnnotation) {
|
|
47432
|
+
const {
|
|
47433
|
+
viewPlaneNormal: firstViewPlaneNormal
|
|
47434
|
+
} = firstAnnotation.metadata;
|
|
47435
|
+
const {
|
|
47436
|
+
viewPlaneNormal: secondViewPlaneNormal
|
|
47437
|
+
} = secondAnnotation.metadata;
|
|
47438
|
+
const dot = vec3.dot(firstViewPlaneNormal, secondViewPlaneNormal);
|
|
47439
|
+
const parallelPlanes = glMatrix.equals(1, Math.abs(dot));
|
|
47440
|
+
if (!parallelPlanes) {
|
|
47441
|
+
return false;
|
|
47442
|
+
}
|
|
47443
|
+
const {
|
|
47444
|
+
polyline: firstPolyline
|
|
47445
|
+
} = firstAnnotation.data.contour;
|
|
47446
|
+
const {
|
|
47447
|
+
polyline: secondPolyline
|
|
47448
|
+
} = secondAnnotation.data.contour;
|
|
47449
|
+
const firstDistance = vec3.dot(firstViewPlaneNormal, firstPolyline[0]);
|
|
47450
|
+
const secondDistance = vec3.dot(firstViewPlaneNormal, secondPolyline[0]);
|
|
47451
|
+
return glMatrix.equals(firstDistance, secondDistance);
|
|
47452
|
+
}
|
|
47453
|
+
|
|
47431
47454
|
function findNextLink(line, lines, contourPoints) {
|
|
47432
47455
|
let index = -1;
|
|
47433
47456
|
lines.forEach((cell, i) => {
|
|
@@ -49033,6 +49056,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
49033
49056
|
__proto__: null,
|
|
49034
49057
|
AnnotationToPointData: AnnotationToPointData$2,
|
|
49035
49058
|
acceptAutogeneratedInterpolations: acceptAutogeneratedInterpolations,
|
|
49059
|
+
areCoplanarContours: areCoplanarContours,
|
|
49036
49060
|
contourFinder: contourFinder,
|
|
49037
49061
|
detectContourHoles: detectContourHoles,
|
|
49038
49062
|
findHandlePolylineIndex: findHandlePolylineIndex,
|