@cornerstonejs/adapters 2.0.0-beta.3 → 2.0.0-beta.5

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.
@@ -1,7 +1,6 @@
1
1
  import dcmjs, { data, utilities, derivations, normalizers, log } from 'dcmjs';
2
2
  import { Buffer } from 'buffer';
3
3
  import ndarray from 'ndarray';
4
- import cloneDeep from 'lodash.clonedeep';
5
4
  import { vec3 } from 'gl-matrix';
6
5
 
7
6
  function _iterableToArrayLimit(arr, i) {
@@ -2895,7 +2894,7 @@ function insertOverlappingPixelDataPlanar(segmentsOnFrame, segmentsOnFrameArray,
2895
2894
  var tempBuffer = labelmapBufferArray[m].slice(0);
2896
2895
 
2897
2896
  // temp list for checking overlaps
2898
- var tempSegmentsOnFrame = cloneDeep(segmentsOnFrameArray[m]);
2897
+ var tempSegmentsOnFrame = structuredClone(segmentsOnFrameArray[m]);
2899
2898
 
2900
2899
  /** split overlapping SEGs algorithm for each segment:
2901
2900
  * A) copy the labelmapBuffer in the array with index 0
@@ -2954,7 +2953,7 @@ function insertOverlappingPixelDataPlanar(segmentsOnFrame, segmentsOnFrameArray,
2954
2953
  M++;
2955
2954
  }
2956
2955
  tempBuffer = labelmapBufferArray[m].slice(0);
2957
- tempSegmentsOnFrame = cloneDeep(segmentsOnFrameArray[m]);
2956
+ tempSegmentsOnFrame = structuredClone(segmentsOnFrameArray[m]);
2958
2957
  _i2 = 0;
2959
2958
  break;
2960
2959
  } else {
@@ -2980,12 +2979,12 @@ function insertOverlappingPixelDataPlanar(segmentsOnFrame, segmentsOnFrameArray,
2980
2979
  if (_ret2 === "continue") continue;
2981
2980
  }
2982
2981
  labelmapBufferArray[m] = tempBuffer.slice(0);
2983
- segmentsOnFrameArray[m] = cloneDeep(tempSegmentsOnFrame);
2982
+ segmentsOnFrameArray[m] = structuredClone(tempSegmentsOnFrame);
2984
2983
 
2985
2984
  // reset temp variables/buffers for new segment
2986
2985
  m = 0;
2987
2986
  tempBuffer = labelmapBufferArray[m].slice(0);
2988
- tempSegmentsOnFrame = cloneDeep(segmentsOnFrameArray[m]);
2987
+ tempSegmentsOnFrame = structuredClone(segmentsOnFrameArray[m]);
2989
2988
  }
2990
2989
  }
2991
2990
  var getSegmentIndex = function getSegmentIndex(multiframe, frame) {