@cornerstonejs/adapters 1.50.2 → 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.
@@ -28083,6 +28083,7 @@ class Cache {
28083
28083
  }
28084
28084
  this.incrementImageCacheSize(-cachedImage.sizeInBytes);
28085
28085
  const eventDetails = {
28086
+ image: cachedImage,
28086
28087
  imageId
28087
28088
  };
28088
28089
  triggerEvent(eventTarget$1, EVENTS.IMAGE_CACHE_IMAGE_REMOVED, eventDetails);
@@ -47427,6 +47428,29 @@ function getViewportForAnnotation(annotation) {
47427
47428
  return enabledElement?.viewport;
47428
47429
  }
47429
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
+
47430
47454
  function findNextLink(line, lines, contourPoints) {
47431
47455
  let index = -1;
47432
47456
  lines.forEach((cell, i) => {
@@ -49032,6 +49056,7 @@ var index = /*#__PURE__*/Object.freeze({
49032
49056
  __proto__: null,
49033
49057
  AnnotationToPointData: AnnotationToPointData$2,
49034
49058
  acceptAutogeneratedInterpolations: acceptAutogeneratedInterpolations,
49059
+ areCoplanarContours: areCoplanarContours,
49035
49060
  contourFinder: contourFinder,
49036
49061
  detectContourHoles: detectContourHoles,
49037
49062
  findHandlePolylineIndex: findHandlePolylineIndex,