@cornerstonejs/tools 1.71.4 → 1.71.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cornerstonejs/tools",
3
- "version": "1.71.4",
3
+ "version": "1.71.5",
4
4
  "description": "Cornerstone3D Tools",
5
5
  "main": "src/index.ts",
6
6
  "types": "dist/types/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "webpack:watch": "webpack --mode development --progress --watch --config ./.webpack/webpack.dev.js"
30
30
  },
31
31
  "dependencies": {
32
- "@cornerstonejs/core": "^1.71.4",
32
+ "@cornerstonejs/core": "^1.71.5",
33
33
  "@icr/polyseg-wasm": "0.4.0",
34
34
  "@types/offscreencanvas": "2019.7.3",
35
35
  "comlink": "^4.4.1",
@@ -59,5 +59,5 @@
59
59
  "type": "individual",
60
60
  "url": "https://ohif.org/donate"
61
61
  },
62
- "gitHead": "c80a68cc56c7e2c96168051a6e2b8d83dab91cc0"
62
+ "gitHead": "589239e007a87fa5316efa222054c518e6f00098"
63
63
  }
@@ -30,7 +30,7 @@ export default function presentationViewSyncCallback(
30
30
 
31
31
  const presentationView = sViewport.getViewPresentation(options);
32
32
 
33
- tViewport.setView(null, presentationView);
33
+ tViewport.setViewPresentation(presentationView);
34
34
 
35
35
  tViewport.render();
36
36
  }
@@ -1,15 +1,11 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
- import { cache, utilities as csUtils } from '@cornerstonejs/core';
2
+ import { utilities as csUtils } from '@cornerstonejs/core';
3
3
 
4
4
  import { triggerSegmentationDataModified } from '../../../stateManagement/segmentation/triggerSegmentationEvents';
5
5
  import compositions from './compositions';
6
6
  import { getStrategyData } from './utils/getStrategyData';
7
- import { isVolumeSegmentation } from './utils/stackVolumeCheck';
8
7
  import { StrategyCallbacks } from '../../../enums';
9
- import type {
10
- LabelmapToolOperationDataAny,
11
- LabelmapToolOperationDataVolume,
12
- } from '../../../types/LabelmapToolOperationData';
8
+ import type { LabelmapToolOperationDataAny } from '../../../types/LabelmapToolOperationData';
13
9
  import vtkImageData from '@kitware/vtk.js/Common/DataModel/ImageData';
14
10
 
15
11
  const { VoxelManager } = csUtils;
@@ -248,9 +248,11 @@ function _addInterpolatedContour(
248
248
  referencedToolData
249
249
  );
250
250
 
251
- const targetId = viewport.getReferenceId({ sliceIndex });
252
- interpolatedAnnotation.metadata.referencedImageId = targetId;
253
- interpolatedAnnotation.metadata.sliceIndex = sliceIndex;
251
+ const viewRef = viewport.getViewReference({ sliceIndex });
252
+ if (!viewRef) {
253
+ throw new Error(`Can't find slice ${sliceIndex}`);
254
+ }
255
+ Object.assign(interpolatedAnnotation.metadata, viewRef);
254
256
  annotationState.state.addAnnotation(interpolatedAnnotation, viewport.element);
255
257
  referencedToolData.onInterpolationComplete?.(
256
258
  interpolatedAnnotation,