@cornerstonejs/tools 3.7.6 → 3.7.8
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/esm/tools/annotation/ArrowAnnotateTool.js +4 -2
- package/dist/esm/tools/segmentation/strategies/compositions/ensureSegmentationVolume.js +3 -0
- package/dist/esm/tools/segmentation/strategies/utils/getStrategyData.js +1 -1
- package/dist/esm/utilities/segmentation/getStatistics.js +3 -0
- package/package.json +3 -3
|
@@ -151,6 +151,7 @@ class ArrowAnnotateTool extends AnnotationTool {
|
|
|
151
151
|
return;
|
|
152
152
|
}
|
|
153
153
|
annotation.data.text = text;
|
|
154
|
+
triggerAnnotationModified(annotation, element, ChangeTypes.HandlesUpdated);
|
|
154
155
|
triggerAnnotationCompleted(annotation);
|
|
155
156
|
this.createMemo(element, annotation, { newAnnotation: !!this.memo });
|
|
156
157
|
setAnnotationLabel(annotation, element, text);
|
|
@@ -199,9 +200,10 @@ class ArrowAnnotateTool extends AnnotationTool {
|
|
|
199
200
|
annotation.invalidated = true;
|
|
200
201
|
}
|
|
201
202
|
this.editData.hasMoved = true;
|
|
202
|
-
const enabledElement = getEnabledElement(element);
|
|
203
|
-
const { renderingEngine } = enabledElement;
|
|
204
203
|
triggerAnnotationRenderForViewportIds(viewportIdsToRender);
|
|
204
|
+
if (annotation.invalidated) {
|
|
205
|
+
triggerAnnotationModified(annotation, element, ChangeTypes.HandlesUpdated);
|
|
206
|
+
}
|
|
205
207
|
};
|
|
206
208
|
this.touchTapCallback = (evt) => {
|
|
207
209
|
if (evt.detail.taps == 2) {
|
|
@@ -13,6 +13,9 @@ export default {
|
|
|
13
13
|
throw new Error('Volume is not reconstructable for sphere manipulation');
|
|
14
14
|
}
|
|
15
15
|
const segVolume = getOrCreateSegmentationVolume(segmentationId);
|
|
16
|
+
if (!segVolume) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
16
19
|
operationData.segmentationVoxelManager = segVolume.voxelManager;
|
|
17
20
|
operationData.segmentationImageData = segVolume.imageData;
|
|
18
21
|
return;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cache, Enums, eventTarget } from '@cornerstonejs/core';
|
|
2
2
|
import { getCurrentLabelmapImageIdForViewport } from '../../../../stateManagement/segmentation/segmentationState';
|
|
3
3
|
import { getLabelmapActorEntry } from '../../../../stateManagement/segmentation/helpers';
|
|
4
4
|
import { getReferenceVolumeForSegmentationVolume } from '../../../../utilities/segmentation/getReferenceVolumeForSegmentationVolume';
|
|
@@ -33,6 +33,9 @@ async function getStatistics({ segmentationId, segmentIndices, mode = 'collectiv
|
|
|
33
33
|
async function calculateVolumeStatistics({ operationData, indices, unit, mode, }) {
|
|
34
34
|
const strategyData = prepareVolumeStrategyDataForWorker(operationData);
|
|
35
35
|
const { segmentationVoxelManager, imageVoxelManager, segmentationImageData, imageData, } = strategyData;
|
|
36
|
+
if (!segmentationVoxelManager || !segmentationImageData) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
36
39
|
const spacing = segmentationImageData.getSpacing();
|
|
37
40
|
const { boundsIJK: boundsOrig } = segmentationVoxelManager;
|
|
38
41
|
if (!boundsOrig) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.8",
|
|
4
4
|
"description": "Cornerstone3D Tools",
|
|
5
5
|
"types": "./dist/esm/index.d.ts",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"canvas": "^2.11.2"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
|
-
"@cornerstonejs/core": "^3.7.
|
|
106
|
+
"@cornerstonejs/core": "^3.7.8",
|
|
107
107
|
"@kitware/vtk.js": "32.12.1",
|
|
108
108
|
"@types/d3-array": "^3.0.4",
|
|
109
109
|
"@types/d3-interpolate": "^3.0.1",
|
|
@@ -122,5 +122,5 @@
|
|
|
122
122
|
"type": "individual",
|
|
123
123
|
"url": "https://ohif.org/donate"
|
|
124
124
|
},
|
|
125
|
-
"gitHead": "
|
|
125
|
+
"gitHead": "50a709f450227defbf8d49a11c2f12be110bbdf1"
|
|
126
126
|
}
|