@cornerstonejs/tools 4.15.16 → 4.15.18
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.
|
@@ -56,7 +56,8 @@ function addAnnotation(annotation, annotationGroupSelector) {
|
|
|
56
56
|
annotation.annotationUID = csUtils.uuidv4();
|
|
57
57
|
}
|
|
58
58
|
const manager = getAnnotationManager();
|
|
59
|
-
if (annotationGroupSelector instanceof HTMLDivElement
|
|
59
|
+
if (annotationGroupSelector instanceof HTMLDivElement &&
|
|
60
|
+
!annotation.metadata?.FrameOfReferenceUID) {
|
|
60
61
|
const groupKey = manager.getGroupKey(annotationGroupSelector);
|
|
61
62
|
manager.addAnnotation(annotation, groupKey);
|
|
62
63
|
triggerAnnotationAddedForElement(annotation, annotationGroupSelector);
|
|
@@ -33,7 +33,12 @@ async function render(viewport, contourRepresentation) {
|
|
|
33
33
|
getPolySeg()?.canComputeRequestedRepresentation(segmentationId, Representations.Contour) &&
|
|
34
34
|
!polySegConversionInProgressForViewportId.get(viewport.id)) {
|
|
35
35
|
polySegConversionInProgressForViewportId.set(viewport.id, true);
|
|
36
|
-
|
|
36
|
+
try {
|
|
37
|
+
contourData = await computeAndAddRepresentation(segmentationId, Representations.Contour, () => polySeg.computeContourData(segmentationId, { viewport }));
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
console.warn('Unable to compute contour data for segmentationId', segmentationId, error);
|
|
41
|
+
}
|
|
37
42
|
polySegConversionInProgressForViewportId.set(viewport.id, false);
|
|
38
43
|
}
|
|
39
44
|
else if (!contourData && !getPolySeg()) {
|
|
@@ -113,6 +113,9 @@ export default class LabelmapBaseTool extends BaseTool {
|
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
115
|
const { volumeId } = representationData[SegmentationRepresentations.Labelmap];
|
|
116
|
+
if (!volumeId) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
116
119
|
const actors = viewport.getActors();
|
|
117
120
|
const isStackViewport = viewport instanceof StackViewport;
|
|
118
121
|
if (isStackViewport) {
|
|
@@ -126,7 +129,9 @@ export default class LabelmapBaseTool extends BaseTool {
|
|
|
126
129
|
eventTarget.dispatchEvent(event);
|
|
127
130
|
return null;
|
|
128
131
|
}
|
|
129
|
-
const volumes = actors
|
|
132
|
+
const volumes = actors
|
|
133
|
+
.filter((actorEntry) => actorEntry.referencedId)
|
|
134
|
+
.map((actorEntry) => cache.getVolume(actorEntry.referencedId));
|
|
130
135
|
const segmentationVolume = cache.getVolume(volumeId);
|
|
131
136
|
const referencedVolumeIdToThreshold = volumes.find((volume) => csUtils.isEqual(volume.dimensions, segmentationVolume.dimensions))?.volumeId || volumes[0]?.volumeId;
|
|
132
137
|
return {
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "4.15.
|
|
1
|
+
export declare const version = "4.15.18";
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '4.15.
|
|
1
|
+
export const version = '4.15.18';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.18",
|
|
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.18",
|
|
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": "2198d2e21481dd9f7e77148f98693ef0c2e5bdbc"
|
|
131
131
|
}
|