@cornerstonejs/tools 1.71.4 → 1.71.6
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/dist/cjs/synchronizers/callbacks/presentationViewSyncCallback.js +1 -1
- package/dist/cjs/synchronizers/callbacks/presentationViewSyncCallback.js.map +1 -1
- package/dist/cjs/tools/ScaleOverlayTool.js +2 -2
- package/dist/cjs/tools/ScaleOverlayTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/strategies/BrushStrategy.js.map +1 -1
- package/dist/cjs/utilities/contours/interpolation/interpolate.js +5 -3
- package/dist/cjs/utilities/contours/interpolation/interpolate.js.map +1 -1
- package/dist/esm/synchronizers/callbacks/presentationViewSyncCallback.js +1 -1
- package/dist/esm/synchronizers/callbacks/presentationViewSyncCallback.js.map +1 -1
- package/dist/esm/tools/ScaleOverlayTool.js +2 -2
- package/dist/esm/tools/ScaleOverlayTool.js.map +1 -1
- package/dist/esm/tools/segmentation/strategies/BrushStrategy.js.map +1 -1
- package/dist/esm/utilities/contours/interpolation/interpolate.js +5 -3
- package/dist/esm/utilities/contours/interpolation/interpolate.js.map +1 -1
- package/dist/types/tools/segmentation/strategies/BrushStrategy.d.ts.map +1 -1
- package/dist/types/utilities/contours/interpolation/interpolate.d.ts.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +3 -3
- package/src/synchronizers/callbacks/presentationViewSyncCallback.ts +1 -1
- package/src/tools/ScaleOverlayTool.ts +2 -2
- package/src/tools/segmentation/strategies/BrushStrategy.ts +2 -6
- package/src/utilities/contours/interpolation/interpolate.ts +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "1.71.
|
|
3
|
+
"version": "1.71.6",
|
|
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.
|
|
32
|
+
"@cornerstonejs/core": "^1.71.6",
|
|
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": "
|
|
62
|
+
"gitHead": "8abef807de438a043258b10395c516fa0cd0541d"
|
|
63
63
|
}
|
|
@@ -204,8 +204,8 @@ class ScaleOverlayTool extends AnnotationDisplayTool {
|
|
|
204
204
|
};
|
|
205
205
|
|
|
206
206
|
const canvasSize = {
|
|
207
|
-
width: canvas.width,
|
|
208
|
-
height: canvas.height,
|
|
207
|
+
width: canvas.width / window.devicePixelRatio || 1,
|
|
208
|
+
height: canvas.height / window.devicePixelRatio || 1,
|
|
209
209
|
};
|
|
210
210
|
|
|
211
211
|
const topLeft = annotation.data.handles.points[0];
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
import {
|
|
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
|
|
252
|
-
|
|
253
|
-
|
|
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,
|