@cornerstonejs/tools 3.16.2 → 3.16.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.
@@ -1,3 +1,4 @@
1
+ import { StackViewport } from '@cornerstonejs/core';
1
2
  import type { Types } from '@cornerstonejs/core';
2
3
  import { BaseTool } from '../base';
3
4
  import type vtkImageData from '@kitware/vtk.js/Common/DataModel/ImageData';
@@ -89,7 +90,7 @@ export default class LabelmapBaseTool extends BaseTool {
89
90
  };
90
91
  centerCanvas: any;
91
92
  segmentIndex: number;
92
- viewport: Types.IStackViewport | import("@cornerstonejs/core").VolumeViewport;
93
+ viewport: StackViewport | import("@cornerstonejs/core").VolumeViewport;
93
94
  segmentationId: string;
94
95
  segmentColor: Types.Color;
95
96
  viewportIdsToRender: string[];
@@ -1,14 +1,13 @@
1
- import { getEnabledElement, cache, utilities as csUtils, Enums, eventTarget, BaseVolumeViewport, } from '@cornerstonejs/core';
1
+ import { getEnabledElement, cache, utilities as csUtils, Enums, eventTarget, BaseVolumeViewport, StackViewport, } from '@cornerstonejs/core';
2
2
  import { BaseTool } from '../base';
3
3
  import SegmentationRepresentations from '../../enums/SegmentationRepresentations';
4
4
  import { getActiveSegmentation } from '../../stateManagement/segmentation/getActiveSegmentation';
5
5
  import { getLockedSegmentIndices } from '../../stateManagement/segmentation/segmentLocking';
6
6
  import { getSegmentation } from '../../stateManagement/segmentation/getSegmentation';
7
- import { getClosestImageIdForStackViewport } from '../../utilities/annotationHydration';
8
7
  import { getCurrentLabelmapImageIdForViewport } from '../../stateManagement/segmentation/getCurrentLabelmapImageIdForViewport';
9
8
  import { getSegmentIndexColor } from '../../stateManagement/segmentation/config/segmentationColor';
10
9
  import { getActiveSegmentIndex } from '../../stateManagement/segmentation/getActiveSegmentIndex';
11
- import { StrategyCallbacks, Events } from '../../enums';
10
+ import { StrategyCallbacks } from '../../enums';
12
11
  import * as LabelmapMemo from '../../utilities/segmentation/createLabelmapMemo';
13
12
  import { getAllAnnotations, removeAnnotation, } from '../../stateManagement/annotation/annotationState';
14
13
  import { filterAnnotationsForDisplay } from '../../utilities/planar';
@@ -105,7 +104,7 @@ export default class LabelmapBaseTool extends BaseTool {
105
104
  if (viewport instanceof BaseVolumeViewport) {
106
105
  const { volumeId } = representationData[SegmentationRepresentations.Labelmap];
107
106
  const actors = viewport.getActors();
108
- const isStackViewport = viewport instanceof getClosestImageIdForStackViewport;
107
+ const isStackViewport = viewport instanceof StackViewport;
109
108
  if (isStackViewport) {
110
109
  const event = new CustomEvent(Enums.Events.ERROR_EVENT, {
111
110
  detail: {
@@ -196,7 +195,7 @@ export default class LabelmapBaseTool extends BaseTool {
196
195
  return;
197
196
  }
198
197
  let previewColor = null, previewSegmentIndex = null;
199
- if (this.configuration.preview.enabled) {
198
+ if (this.configuration.preview?.enabled) {
200
199
  previewColor = configColor || lightenColor(...segmentColor);
201
200
  previewSegmentIndex = 255;
202
201
  }
@@ -1 +1 @@
1
- export declare const version = "3.16.2";
1
+ export declare const version = "3.16.4";
@@ -1 +1 @@
1
- export const version = '3.16.2';
1
+ export const version = '3.16.4';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/tools",
3
- "version": "3.16.2",
3
+ "version": "3.16.4",
4
4
  "description": "Cornerstone3D Tools",
5
5
  "types": "./dist/esm/index.d.ts",
6
6
  "module": "./dist/esm/index.js",
@@ -108,7 +108,7 @@
108
108
  "canvas": "^3.1.0"
109
109
  },
110
110
  "peerDependencies": {
111
- "@cornerstonejs/core": "^3.16.2",
111
+ "@cornerstonejs/core": "^3.16.4",
112
112
  "@kitware/vtk.js": "32.12.1",
113
113
  "@types/d3-array": "^3.0.4",
114
114
  "@types/d3-interpolate": "^3.0.1",
@@ -127,5 +127,5 @@
127
127
  "type": "individual",
128
128
  "url": "https://ohif.org/donate"
129
129
  },
130
- "gitHead": "575c73857dd19b22980ad035c014072e0156ddd0"
130
+ "gitHead": "4f9a983200bcfed54adb9e131a829bfa26af83e4"
131
131
  }