@cornerstonejs/tools 4.15.5 → 4.15.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/esm/stateManagement/segmentation/segmentIndex.js +3 -0
- package/dist/esm/tools/base/ContourSegmentationBaseTool.js +5 -3
- package/dist/esm/tools/segmentation/strategies/BrushStrategy.js +8 -5
- package/dist/esm/utilities/segmentation/getOrCreateSegmentationVolume.js +3 -0
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +3 -3
|
@@ -92,10 +92,12 @@ class ContourSegmentationBaseTool extends ContourBaseTool {
|
|
|
92
92
|
const { segmentationId } = (annotation).data.segmentation;
|
|
93
93
|
triggerSegmentationDataModified(segmentationId);
|
|
94
94
|
const viewportIds = getViewportIdsWithSegmentation(segmentationId);
|
|
95
|
-
const toolGroupIds = viewportIds
|
|
95
|
+
const toolGroupIds = viewportIds
|
|
96
|
+
.map((viewportId) => {
|
|
96
97
|
const toolGroup = getToolGroupForViewport(viewportId);
|
|
97
|
-
return toolGroup
|
|
98
|
-
})
|
|
98
|
+
return toolGroup?.id;
|
|
99
|
+
})
|
|
100
|
+
.filter((toolGroupId) => toolGroupId != null);
|
|
99
101
|
triggerAnnotationRenderForToolGroupIds(toolGroupIds);
|
|
100
102
|
}
|
|
101
103
|
return renderResult;
|
|
@@ -54,16 +54,16 @@ export default class BrushStrategy {
|
|
|
54
54
|
return initializedData;
|
|
55
55
|
};
|
|
56
56
|
this.configurationName = name;
|
|
57
|
-
const cursorGeometryInitializer = initializers.find(init => init.hasOwnProperty(StrategyCallbacks.CalculateCursorGeometry));
|
|
58
|
-
const renderCursorInitializer = initializers.find(init => init.hasOwnProperty(StrategyCallbacks.RenderCursor));
|
|
57
|
+
const cursorGeometryInitializer = initializers.find((init) => init.hasOwnProperty(StrategyCallbacks.CalculateCursorGeometry));
|
|
58
|
+
const renderCursorInitializer = initializers.find((init) => init.hasOwnProperty(StrategyCallbacks.RenderCursor));
|
|
59
59
|
if (!cursorGeometryInitializer) {
|
|
60
60
|
initializers.push({
|
|
61
|
-
[StrategyCallbacks.CalculateCursorGeometry]: compositions.circularCursor.calculateCursorGeometry
|
|
61
|
+
[StrategyCallbacks.CalculateCursorGeometry]: compositions.circularCursor.calculateCursorGeometry,
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
if (!renderCursorInitializer) {
|
|
65
65
|
initializers.push({
|
|
66
|
-
[StrategyCallbacks.RenderCursor]: compositions.circularCursor.renderCursor
|
|
66
|
+
[StrategyCallbacks.RenderCursor]: compositions.circularCursor.renderCursor,
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
this.compositions = initializers;
|
|
@@ -89,7 +89,10 @@ export default class BrushStrategy {
|
|
|
89
89
|
initialize(enabledElement, operationData, operationName) {
|
|
90
90
|
const { viewport } = enabledElement;
|
|
91
91
|
const data = getStrategyData({ operationData, viewport, strategy: this });
|
|
92
|
-
if (!data
|
|
92
|
+
if (!data ||
|
|
93
|
+
!data.imageVoxelManager ||
|
|
94
|
+
!data.segmentationVoxelManager ||
|
|
95
|
+
!data.segmentationImageData) {
|
|
93
96
|
return null;
|
|
94
97
|
}
|
|
95
98
|
const { imageVoxelManager, segmentationVoxelManager, segmentationImageData, } = data;
|
|
@@ -2,6 +2,9 @@ import { cache, volumeLoader, utilities, ImageVolume, } from '@cornerstonejs/cor
|
|
|
2
2
|
import { getSegmentation } from '../../stateManagement/segmentation/getSegmentation';
|
|
3
3
|
function getOrCreateSegmentationVolume(segmentationId) {
|
|
4
4
|
const { representationData } = getSegmentation(segmentationId);
|
|
5
|
+
if (!representationData.Labelmap) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
5
8
|
let { volumeId } = representationData.Labelmap;
|
|
6
9
|
let segVolume;
|
|
7
10
|
if (volumeId) {
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "4.15.
|
|
1
|
+
export declare const version = "4.15.6";
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '4.15.
|
|
1
|
+
export const version = '4.15.6';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.6",
|
|
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.2.0"
|
|
109
109
|
},
|
|
110
110
|
"peerDependencies": {
|
|
111
|
-
"@cornerstonejs/core": "4.15.
|
|
111
|
+
"@cornerstonejs/core": "4.15.6",
|
|
112
112
|
"@kitware/vtk.js": "34.15.1",
|
|
113
113
|
"@types/d3-array": "3.2.1",
|
|
114
114
|
"@types/d3-interpolate": "3.0.4",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"type": "individual",
|
|
128
128
|
"url": "https://ohif.org/donate"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "91ce6d8dbb2cc3e2c6afe10510a5e04ad5c6ebc3"
|
|
131
131
|
}
|