@cornerstonejs/tools 2.0.0-beta.3 → 2.0.0-beta.4

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.
Files changed (151) hide show
  1. package/dist/cjs/eventDispatchers/shared/getToolsWithModesForMouseEvent.d.ts +1 -1
  2. package/dist/cjs/eventDispatchers/shared/getToolsWithModesForTouchEvent.d.ts +1 -1
  3. package/dist/cjs/eventListeners/keyboard/keyDownListener.js +1 -2
  4. package/dist/cjs/eventListeners/keyboard/keyDownListener.js.map +1 -1
  5. package/dist/cjs/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.js +4 -8
  6. package/dist/cjs/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.js.map +1 -1
  7. package/dist/cjs/stateManagement/segmentation/SegmentationStateManager.js +2 -3
  8. package/dist/cjs/stateManagement/segmentation/SegmentationStateManager.js.map +1 -1
  9. package/dist/cjs/stateManagement/segmentation/addSegmentationRepresentations.js.map +1 -1
  10. package/dist/cjs/stateManagement/segmentation/addSegmentations.js +1 -5
  11. package/dist/cjs/stateManagement/segmentation/addSegmentations.js.map +1 -1
  12. package/dist/cjs/store/ToolGroupManager/ToolGroup.js +1 -2
  13. package/dist/cjs/store/ToolGroupManager/ToolGroup.js.map +1 -1
  14. package/dist/cjs/store/state.js +1 -5
  15. package/dist/cjs/store/state.js.map +1 -1
  16. package/dist/cjs/synchronizers/synchronizers/createVOISynchronizer.d.ts +1 -1
  17. package/dist/cjs/tools/AdvancedMagnifyViewport.d.ts +2 -2
  18. package/dist/cjs/tools/AdvancedMagnifyViewportManager.d.ts +1 -1
  19. package/dist/cjs/tools/displayTools/Contour/contourConfigCache.d.ts +1 -1
  20. package/dist/cjs/tools/segmentation/strategies/eraseCircle.d.ts +1 -1
  21. package/dist/cjs/tools/segmentation/strategies/eraseRectangle.d.ts +1 -1
  22. package/dist/cjs/tools/segmentation/strategies/eraseSphere.d.ts +1 -1
  23. package/dist/cjs/tools/segmentation/strategies/fillCircle.d.ts +1 -1
  24. package/dist/cjs/tools/segmentation/strategies/fillRectangle.d.ts +1 -1
  25. package/dist/cjs/tools/segmentation/strategies/fillSphere.d.ts +1 -1
  26. package/dist/cjs/types/AnnotationGroupSelector.d.ts +1 -1
  27. package/dist/cjs/types/AnnotationStyle.d.ts +7 -7
  28. package/dist/cjs/types/AnnotationTypes.d.ts +4 -4
  29. package/dist/cjs/types/BoundsIJK.d.ts +1 -1
  30. package/dist/cjs/types/CINETypes.d.ts +2 -2
  31. package/dist/cjs/types/CalculatorTypes.d.ts +1 -1
  32. package/dist/cjs/types/ContourTypes.d.ts +3 -3
  33. package/dist/cjs/types/CursorTypes.d.ts +2 -2
  34. package/dist/cjs/types/EventTypes.d.ts +81 -81
  35. package/dist/cjs/types/FloodFillTypes.d.ts +5 -5
  36. package/dist/cjs/types/IDistance.d.ts +1 -1
  37. package/dist/cjs/types/IPoints.d.ts +1 -1
  38. package/dist/cjs/types/ISetToolModeOptions.d.ts +5 -5
  39. package/dist/cjs/types/IToolClassReference.d.ts +1 -1
  40. package/dist/cjs/types/ITouchPoints.d.ts +1 -1
  41. package/dist/cjs/types/InteractionTypes.d.ts +1 -1
  42. package/dist/cjs/types/InternalToolTypes.d.ts +3 -3
  43. package/dist/cjs/types/JumpToSliceOptions.d.ts +1 -1
  44. package/dist/cjs/types/LabelmapTypes.d.ts +3 -3
  45. package/dist/cjs/types/PlanarBoundingBox.d.ts +1 -1
  46. package/dist/cjs/types/SVGDrawingHelper.d.ts +1 -1
  47. package/dist/cjs/types/ScrollOptions.d.ts +1 -1
  48. package/dist/cjs/types/SegmentationStateTypes.d.ts +15 -15
  49. package/dist/cjs/types/ToolAction.d.ts +1 -1
  50. package/dist/cjs/types/ToolHandle.d.ts +3 -3
  51. package/dist/cjs/types/ToolProps.d.ts +4 -4
  52. package/dist/cjs/utilities/getModalityUnit.d.ts +1 -1
  53. package/dist/cjs/utilities/getToolsWithModesForElement.d.ts +1 -1
  54. package/dist/cjs/utilities/math/angle/angleBetweenLines.d.ts +3 -3
  55. package/dist/cjs/utilities/math/basic/BasicStatsCalculator.js.map +1 -1
  56. package/dist/cjs/utilities/math/circle/_types.d.ts +1 -1
  57. package/dist/cjs/utilities/math/ellipse/getCanvasEllipseCorners.d.ts +1 -1
  58. package/dist/cjs/utilities/math/ellipse/pointInEllipse.d.ts +1 -1
  59. package/dist/cjs/utilities/math/ellipse/pointInEllipsoidWithConstraint.d.ts +1 -1
  60. package/dist/cjs/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +3 -3
  61. package/dist/cjs/utilities/math/sphere/pointInSphere.d.ts +1 -1
  62. package/dist/cjs/utilities/pointInShapeCallback.d.ts +3 -3
  63. package/dist/cjs/utilities/rectangleROITool/getBoundsIJKFromRectangleAnnotations.d.ts +1 -1
  64. package/dist/cjs/utilities/segmentation/createLabelmapVolumeForViewport.d.ts +8 -8
  65. package/dist/cjs/utilities/segmentation/createLabelmapVolumeForViewport.js +1 -2
  66. package/dist/cjs/utilities/segmentation/createLabelmapVolumeForViewport.js.map +1 -1
  67. package/dist/cjs/utilities/segmentation/rectangleROIThresholdVolumeByRange.d.ts +2 -2
  68. package/dist/cjs/utilities/segmentation/thresholdVolumeByRange.d.ts +1 -1
  69. package/dist/cjs/utilities/segmentation/utilities.d.ts +1 -1
  70. package/dist/esm/eventDispatchers/shared/getToolsWithModesForMouseEvent.d.ts +1 -1
  71. package/dist/esm/eventDispatchers/shared/getToolsWithModesForTouchEvent.d.ts +1 -1
  72. package/dist/esm/eventListeners/keyboard/keyDownListener.js +1 -2
  73. package/dist/esm/eventListeners/keyboard/keyDownListener.js.map +1 -1
  74. package/dist/esm/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.js +4 -5
  75. package/dist/esm/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.js.map +1 -1
  76. package/dist/esm/stateManagement/segmentation/SegmentationStateManager.js +2 -3
  77. package/dist/esm/stateManagement/segmentation/SegmentationStateManager.js.map +1 -1
  78. package/dist/esm/stateManagement/segmentation/addSegmentationRepresentations.js.map +1 -1
  79. package/dist/esm/stateManagement/segmentation/addSegmentations.js +1 -2
  80. package/dist/esm/stateManagement/segmentation/addSegmentations.js.map +1 -1
  81. package/dist/esm/store/ToolGroupManager/ToolGroup.js +1 -2
  82. package/dist/esm/store/ToolGroupManager/ToolGroup.js.map +1 -1
  83. package/dist/esm/store/state.js +9 -2
  84. package/dist/esm/store/state.js.map +1 -1
  85. package/dist/esm/synchronizers/synchronizers/createVOISynchronizer.d.ts +1 -1
  86. package/dist/esm/tools/AdvancedMagnifyViewport.d.ts +2 -2
  87. package/dist/esm/tools/AdvancedMagnifyViewportManager.d.ts +1 -1
  88. package/dist/esm/tools/OrientationMarkerTool.js +4 -4
  89. package/dist/esm/tools/OrientationMarkerTool.js.map +1 -1
  90. package/dist/esm/tools/displayTools/Contour/contourConfigCache.d.ts +1 -1
  91. package/dist/esm/tools/segmentation/strategies/eraseCircle.d.ts +1 -1
  92. package/dist/esm/tools/segmentation/strategies/eraseRectangle.d.ts +1 -1
  93. package/dist/esm/tools/segmentation/strategies/eraseSphere.d.ts +1 -1
  94. package/dist/esm/tools/segmentation/strategies/fillCircle.d.ts +1 -1
  95. package/dist/esm/tools/segmentation/strategies/fillRectangle.d.ts +1 -1
  96. package/dist/esm/tools/segmentation/strategies/fillSphere.d.ts +1 -1
  97. package/dist/esm/types/AnnotationGroupSelector.d.ts +1 -1
  98. package/dist/esm/types/AnnotationStyle.d.ts +7 -7
  99. package/dist/esm/types/AnnotationTypes.d.ts +4 -4
  100. package/dist/esm/types/BoundsIJK.d.ts +1 -1
  101. package/dist/esm/types/CINETypes.d.ts +2 -2
  102. package/dist/esm/types/CalculatorTypes.d.ts +1 -1
  103. package/dist/esm/types/ContourTypes.d.ts +3 -3
  104. package/dist/esm/types/CursorTypes.d.ts +2 -2
  105. package/dist/esm/types/EventTypes.d.ts +81 -81
  106. package/dist/esm/types/FloodFillTypes.d.ts +5 -5
  107. package/dist/esm/types/IDistance.d.ts +1 -1
  108. package/dist/esm/types/IPoints.d.ts +1 -1
  109. package/dist/esm/types/ISetToolModeOptions.d.ts +5 -5
  110. package/dist/esm/types/IToolClassReference.d.ts +1 -1
  111. package/dist/esm/types/ITouchPoints.d.ts +1 -1
  112. package/dist/esm/types/InteractionTypes.d.ts +1 -1
  113. package/dist/esm/types/InternalToolTypes.d.ts +3 -3
  114. package/dist/esm/types/JumpToSliceOptions.d.ts +1 -1
  115. package/dist/esm/types/LabelmapTypes.d.ts +3 -3
  116. package/dist/esm/types/PlanarBoundingBox.d.ts +1 -1
  117. package/dist/esm/types/SVGDrawingHelper.d.ts +1 -1
  118. package/dist/esm/types/ScrollOptions.d.ts +1 -1
  119. package/dist/esm/types/SegmentationStateTypes.d.ts +15 -15
  120. package/dist/esm/types/ToolAction.d.ts +1 -1
  121. package/dist/esm/types/ToolHandle.d.ts +3 -3
  122. package/dist/esm/types/ToolProps.d.ts +4 -4
  123. package/dist/esm/utilities/getModalityUnit.d.ts +1 -1
  124. package/dist/esm/utilities/getToolsWithModesForElement.d.ts +1 -1
  125. package/dist/esm/utilities/math/angle/angleBetweenLines.d.ts +3 -3
  126. package/dist/esm/utilities/math/basic/BasicStatsCalculator.js.map +1 -1
  127. package/dist/esm/utilities/math/circle/_types.d.ts +1 -1
  128. package/dist/esm/utilities/math/ellipse/getCanvasEllipseCorners.d.ts +1 -1
  129. package/dist/esm/utilities/math/ellipse/pointInEllipse.d.ts +1 -1
  130. package/dist/esm/utilities/math/ellipse/pointInEllipsoidWithConstraint.d.ts +1 -1
  131. package/dist/esm/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +3 -3
  132. package/dist/esm/utilities/math/sphere/pointInSphere.d.ts +1 -1
  133. package/dist/esm/utilities/pointInShapeCallback.d.ts +3 -3
  134. package/dist/esm/utilities/rectangleROITool/getBoundsIJKFromRectangleAnnotations.d.ts +1 -1
  135. package/dist/esm/utilities/segmentation/createLabelmapVolumeForViewport.d.ts +8 -8
  136. package/dist/esm/utilities/segmentation/createLabelmapVolumeForViewport.js +1 -2
  137. package/dist/esm/utilities/segmentation/createLabelmapVolumeForViewport.js.map +1 -1
  138. package/dist/esm/utilities/segmentation/rectangleROIThresholdVolumeByRange.d.ts +2 -2
  139. package/dist/esm/utilities/segmentation/thresholdVolumeByRange.d.ts +1 -1
  140. package/dist/esm/utilities/segmentation/utilities.d.ts +1 -1
  141. package/dist/umd/index.js +1 -1
  142. package/dist/umd/index.js.map +1 -1
  143. package/package.json +3 -3
  144. package/src/eventListeners/keyboard/keyDownListener.ts +1 -2
  145. package/src/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.ts +4 -5
  146. package/src/stateManagement/segmentation/SegmentationStateManager.ts +2 -3
  147. package/src/stateManagement/segmentation/addSegmentationRepresentations.ts +0 -1
  148. package/src/stateManagement/segmentation/addSegmentations.ts +1 -2
  149. package/src/store/ToolGroupManager/ToolGroup.ts +1 -2
  150. package/src/store/state.ts +9 -3
  151. package/src/utilities/segmentation/createLabelmapVolumeForViewport.ts +9 -10
@@ -1,6 +1,6 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
- declare type AnnotationHandle = Types.Point3;
3
- declare type TextBoxHandle = {
2
+ type AnnotationHandle = Types.Point3;
3
+ type TextBoxHandle = {
4
4
  hasMoved: boolean;
5
5
  worldBoundingBox: {
6
6
  bottomLeft: Types.Point3;
@@ -10,6 +10,6 @@ declare type TextBoxHandle = {
10
10
  };
11
11
  worldPosition: Types.Point3;
12
12
  };
13
- declare type ToolHandle = AnnotationHandle | TextBoxHandle;
13
+ type ToolHandle = AnnotationHandle | TextBoxHandle;
14
14
  export default ToolHandle;
15
15
  export type { AnnotationHandle, TextBoxHandle };
@@ -1,13 +1,13 @@
1
1
  import { Calculator } from '../utilities/math/basic';
2
- declare type SharedToolProp = {
2
+ type SharedToolProp = {
3
3
  supportedInteractionTypes?: Array<string>;
4
4
  configuration?: ToolConfiguration;
5
5
  };
6
- export declare type ToolConfiguration = Record<string, any> & {
6
+ export type ToolConfiguration = Record<string, any> & {
7
7
  statsCalculator?: Calculator;
8
8
  };
9
- export declare type ToolProps = SharedToolProp;
10
- export declare type PublicToolProps = SharedToolProp & {
9
+ export type ToolProps = SharedToolProp;
10
+ export type PublicToolProps = SharedToolProp & {
11
11
  name?: string;
12
12
  };
13
13
  export {};
@@ -1,4 +1,4 @@
1
- declare type ModalityUnitOptions = {
1
+ type ModalityUnitOptions = {
2
2
  isPreScaled: boolean;
3
3
  isSuvScaled: boolean;
4
4
  };
@@ -1,4 +1,4 @@
1
1
  import { ToolModes } from '../enums';
2
- declare type ModesFilter = Array<ToolModes>;
2
+ type ModesFilter = Array<ToolModes>;
3
3
  export default function getToolsWithModesForElement(element: HTMLDivElement, modesFilter: ModesFilter): any[];
4
4
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
- declare type Line2D = [Types.Point2, Types.Point2];
3
- declare type Line3D = [Types.Point3, Types.Point3];
4
- declare type Line = Line2D | Line3D;
2
+ type Line2D = [Types.Point2, Types.Point2];
3
+ type Line3D = [Types.Point3, Types.Point3];
4
+ type Line = Line2D | Line3D;
5
5
  export default function angleBetweenLines(line1: Line, line2: Line): number;
6
6
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"BasicStatsCalculator.js","sourceRoot":"","sources":["../../../../../src/utilities/math/basic/BasicStatsCalculator.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,UAAU;IAC1D,SAAe,QAAG,GAAG,CAAC,QAAQ,CAAC,EAAA;IAC/B,SAAe,eAAU,GAAG,CAAC,CAAC,EAAA;IAC9B,SAAe,QAAG,GAAG,CAAC,CAAC,EAAA;IACvB,SAAe,eAAU,GAAG,CAAC,CAAC,EAAA;IAC9B,SAAe,mBAAc,GAAG,CAAC,CAAC,EAAA;IAClC,SAAe,UAAK,GAAG,CAAC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AAC,KAAK,CAAC;QACnC,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3D,MAAM,mBAAmB,GAAG,IAAI,CAAC,IAAI,CACnC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,IAAI,CAAC,CACzC,CAAC;QAEF,IAAI,CAAC,GAAG,GAAG,CAAC,QAAQ,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;QACb,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QAEf,OAAO;YACL,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE;YACnD,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;YACzC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE;YAC7C,EAAE,IAAI,EAAE,qBAAqB,EAAE,KAAK,EAAE,mBAAmB,EAAE,IAAI,EAAE,IAAI,EAAE;SACxE,CAAC;IACJ,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
- export declare type canvasCoordinates = [
2
+ export type canvasCoordinates = [
3
3
  Types.Point2,
4
4
  Types.Point2
5
5
  ];
@@ -1,5 +1,5 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
- declare type canvasCoordinates = [
2
+ type canvasCoordinates = [
3
3
  Types.Point2,
4
4
  Types.Point2,
5
5
  Types.Point2,
@@ -1,5 +1,5 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
- declare type Ellipse = {
2
+ type Ellipse = {
3
3
  center: Types.Point3;
4
4
  xRadius: number;
5
5
  yRadius: number;
@@ -1,5 +1,5 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
- declare type ellipsoid = {
2
+ type ellipsoid = {
3
3
  center: [number, number, number];
4
4
  width: number;
5
5
  height: number;
@@ -1,10 +1,10 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
2
  import { PlanarFreehandROIAnnotation } from '../../../types/ToolSpecificAnnotationTypes';
3
- declare type PlanarFreehandROIDrawData = {
3
+ type PlanarFreehandROIDrawData = {
4
4
  polylineIndex: number;
5
5
  canvasPoints: Types.Point2[];
6
6
  };
7
- declare type PlanarFreehandROIEditData = {
7
+ type PlanarFreehandROIEditData = {
8
8
  prevCanvasPoints: Types.Point2[];
9
9
  editCanvasPoints: Types.Point2[];
10
10
  fusedCanvasPoints: Types.Point2[];
@@ -12,7 +12,7 @@ declare type PlanarFreehandROIEditData = {
12
12
  editIndex: number;
13
13
  snapIndex?: number;
14
14
  };
15
- declare type PlanarFreehandROICommonData = {
15
+ type PlanarFreehandROICommonData = {
16
16
  annotation: PlanarFreehandROIAnnotation;
17
17
  viewportIdsToRender: string[];
18
18
  spacing: Types.Point2;
@@ -1,6 +1,6 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
2
  import { vec3 } from 'gl-matrix';
3
- declare type Sphere = {
3
+ type Sphere = {
4
4
  center: Types.Point3 | vec3;
5
5
  radius: number;
6
6
  };
@@ -1,17 +1,17 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
2
  import type { vtkImageData } from '@kitware/vtk.js/Common/DataModel/ImageData';
3
3
  import BoundsIJK from '../types/BoundsIJK';
4
- export declare type PointInShape = {
4
+ export type PointInShape = {
5
5
  value: number;
6
6
  index: number;
7
7
  pointIJK: Types.Point3;
8
8
  pointLPS: Types.Point3;
9
9
  };
10
- export declare type PointInShapeCallback = ({ value, index, pointIJK, pointLPS, }: {
10
+ export type PointInShapeCallback = ({ value, index, pointIJK, pointLPS, }: {
11
11
  value: number;
12
12
  index: number;
13
13
  pointIJK: Types.Point3;
14
14
  pointLPS: Types.Point3;
15
15
  }) => void;
16
- export declare type ShapeFnCriteria = (pointIJK: Types.Point3, pointLPS: Types.Point3) => boolean;
16
+ export type ShapeFnCriteria = (pointIJK: Types.Point3, pointLPS: Types.Point3) => boolean;
17
17
  export default function pointInShapeCallback(imageData: vtkImageData | Types.CPUImageData, pointInShapeFn: ShapeFnCriteria, callback?: PointInShapeCallback, boundsIJK?: BoundsIJK): Array<PointInShape>;
@@ -1,4 +1,4 @@
1
- declare type Options = {
1
+ type Options = {
2
2
  numSlicesToProject?: number;
3
3
  };
4
4
  declare function getBoundsIJKFromRectangleAnnotations(annotations: any, referenceVolume: any, options?: Options): any;
@@ -4,15 +4,15 @@ export default function createLabelmapVolumeForViewport(input: {
4
4
  renderingEngineId: string;
5
5
  segmentationId?: string;
6
6
  options?: {
7
- volumeId?: string;
8
- scalarData?: Float32Array | Uint8Array | Uint16Array | Int16Array;
9
- targetBuffer?: {
7
+ volumeId: string;
8
+ scalarData: Float32Array | Uint8Array | Uint16Array | Int16Array;
9
+ targetBuffer: {
10
10
  type: 'Float32Array' | 'Uint8Array' | 'Uint16Array' | 'Int8Array';
11
11
  };
12
- metadata?: any;
13
- dimensions?: Types.Point3;
14
- spacing?: Types.Point3;
15
- origin?: Types.Point3;
16
- direction?: Float32Array;
12
+ metadata: Types.Metadata;
13
+ dimensions: Types.Point3;
14
+ spacing: Types.Point3;
15
+ origin: Types.Point3;
16
+ direction: Types.Mat3;
17
17
  };
18
18
  }): Promise<string>;
@@ -1,4 +1,3 @@
1
- import { _cloneDeep } from 'lodash.clonedeep';
2
1
  import { getEnabledElementByIds, volumeLoader, VolumeViewport, utilities as csUtils, } from '@cornerstonejs/core';
3
2
  export default async function createLabelmapVolumeForViewport(input) {
4
3
  const { viewportId, renderingEngineId, options } = input;
@@ -16,7 +15,7 @@ export default async function createLabelmapVolumeForViewport(input) {
16
15
  segmentationId = `${uid}-based-segmentation-${options?.volumeId ?? csUtils.uuidv4().slice(0, 8)}`;
17
16
  }
18
17
  if (options) {
19
- const properties = _cloneDeep(options);
18
+ const properties = structuredClone(options);
20
19
  await volumeLoader.createLocalVolume(properties, segmentationId);
21
20
  }
22
21
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"createLabelmapVolumeForViewport.js","sourceRoot":"","sources":["../../../../src/utilities/segmentation/createLabelmapVolumeForViewport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,sBAAsB,EACtB,YAAY,EACZ,cAAc,EACd,SAAS,IAAI,OAAO,GACrB,MAAM,qBAAqB,CAAC;AAc7B,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,+BAA+B,CAAC,KAgB7D;IACC,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACzD,IAAI,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAC/B,MAAM,cAAc,GAAG,sBAAsB,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;IAE7E,IAAI,CAAC,cAAc,EAAE;QACnB,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;KACrC;IAED,MAAM,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;IACpC,IAAI,CAAC,CAAC,QAAQ,YAAY,cAAc,CAAC,EAAE;QACzC,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;KAC9D;IAED,MAAM,EAAE,GAAG,EAAE,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC;IAE3C,IAAI,cAAc,KAAK,SAAS,EAAE;QAEhC,cAAc,GAAG,GAAG,GAAG,uBACrB,OAAO,EAAE,QAAQ,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAClD,EAAE,CAAC;KACJ;IAED,IAAI,OAAO,EAAE;QAGX,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;QACvC,MAAM,YAAY,CAAC,iBAAiB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;KAClE;SAAM;QAEL,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC;QACrD,MAAM,YAAY,CAAC,2BAA2B,CAAC,QAAQ,EAAE;YACvD,QAAQ,EAAE,cAAc;SACzB,CAAC,CAAC;KACJ;IAED,OAAO,cAAc,CAAC;AACxB,CAAC"}
1
+ {"version":3,"file":"createLabelmapVolumeForViewport.js","sourceRoot":"","sources":["../../../../src/utilities/segmentation/createLabelmapVolumeForViewport.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,YAAY,EACZ,cAAc,EACd,SAAS,IAAI,OAAO,GACrB,MAAM,qBAAqB,CAAC;AAc7B,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,+BAA+B,CAAC,KAgB7D;IACC,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACzD,IAAI,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAC/B,MAAM,cAAc,GAAG,sBAAsB,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;IAE7E,IAAI,CAAC,cAAc,EAAE;QACnB,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;KACrC;IAED,MAAM,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;IACpC,IAAI,CAAC,CAAC,QAAQ,YAAY,cAAc,CAAC,EAAE;QACzC,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;KAC9D;IAED,MAAM,EAAE,GAAG,EAAE,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC;IAE3C,IAAI,cAAc,KAAK,SAAS,EAAE;QAEhC,cAAc,GAAG,GAAG,GAAG,uBACrB,OAAO,EAAE,QAAQ,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAClD,EAAE,CAAC;KACJ;IAED,IAAI,OAAO,EAAE;QAGX,MAAM,UAAU,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;QAC5C,MAAM,YAAY,CAAC,iBAAiB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;KAClE;SAAM;QAEL,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC;QACrD,MAAM,YAAY,CAAC,2BAA2B,CAAC,QAAQ,EAAE;YACvD,QAAQ,EAAE,cAAc;SACzB,CAAC,CAAC;KACJ;IAED,OAAO,cAAc,CAAC;AACxB,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
2
  import { ThresholdInformation } from './utilities';
3
- export declare type ThresholdOptions = {
3
+ export type ThresholdOptions = {
4
4
  numSlicesToProject?: number;
5
5
  overwrite: boolean;
6
6
  overlapType?: number;
7
7
  };
8
- export declare type AnnotationForThresholding = {
8
+ export type AnnotationForThresholding = {
9
9
  data: {
10
10
  handles: {
11
11
  points: Types.Point3[];
@@ -1,7 +1,7 @@
1
1
  import { Types } from '@cornerstonejs/core';
2
2
  import { BoundsIJK } from '../../types';
3
3
  import { ThresholdInformation } from './utilities';
4
- export declare type ThresholdRangeOptions = {
4
+ export type ThresholdRangeOptions = {
5
5
  overwrite: boolean;
6
6
  boundsIJK: BoundsIJK;
7
7
  overlapType?: number;
@@ -1,5 +1,5 @@
1
1
  import { Types } from '@cornerstonejs/core';
2
- export declare type ThresholdInformation = {
2
+ export type ThresholdInformation = {
3
3
  volume: Types.IImageVolume;
4
4
  lower: number;
5
5
  upper: number;