@cornerstonejs/adapters 1.61.5 → 1.61.7

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.
@@ -49690,17 +49690,19 @@ function getInterpolationData(viewportData, filterParams = []) {
49690
49690
  originalToolName
49691
49691
  } = annotation.metadata;
49692
49692
  const testToolName = originalToolName || toolName;
49693
- const annotations = getAnnotations(testToolName, viewport.element) || [];
49694
- const modifiedAnnotations = getAnnotations(DEFAULT_CONTOUR_SEG_TOOLNAME, viewport.element);
49695
- if (modifiedAnnotations?.length) {
49696
- modifiedAnnotations.forEach(annotation => {
49697
- const {
49698
- metadata
49699
- } = annotation;
49700
- if (metadata.originalToolName === testToolName && !annotations.find(it => it === annotation)) {
49701
- annotations.push(annotation);
49702
- }
49703
- });
49693
+ const annotations = (getAnnotations(testToolName, viewport.element) || []).filter(annotation => !annotation.metadata.originalToolName || annotation.metadata.originalToolName === testToolName);
49694
+ if (testToolName !== DEFAULT_CONTOUR_SEG_TOOLNAME) {
49695
+ const modifiedAnnotations = getAnnotations(DEFAULT_CONTOUR_SEG_TOOLNAME, viewport.element);
49696
+ if (modifiedAnnotations?.length) {
49697
+ modifiedAnnotations.forEach(annotation => {
49698
+ const {
49699
+ metadata
49700
+ } = annotation;
49701
+ if (metadata.originalToolName === testToolName && metadata.originalToolName !== metadata.toolName) {
49702
+ annotations.push(annotation);
49703
+ }
49704
+ });
49705
+ }
49704
49706
  }
49705
49707
  if (!annotations?.length) {
49706
49708
  return interpolationDatas;
@@ -49751,7 +49753,8 @@ function createPolylineToolData(polyline, handlePoints, referencedToolData) {
49751
49753
  invalidated: true,
49752
49754
  autoGenerated: true,
49753
49755
  annotationUID: undefined,
49754
- cachedStats: {}
49756
+ cachedStats: {},
49757
+ childAnnotationUIDs: []
49755
49758
  });
49756
49759
  Object.assign(annotation.data, {
49757
49760
  handles: {
@@ -50527,7 +50530,6 @@ class InterpolationManager {
50527
50530
  if (!this.toolNames.includes(toolName) && !this.toolNames.includes(originalToolName)) {
50528
50531
  return;
50529
50532
  }
50530
- console.log('Interpolation annotation', annotation.annotationUID);
50531
50533
  const viewport = getViewportForAnnotation(annotation);
50532
50534
  if (!viewport) {
50533
50535
  console.warn('Unable to find viewport for', annotation);