@cornerstonejs/tools 3.9.1 → 3.9.3
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.
|
@@ -29,6 +29,7 @@ class CircleROITool extends AnnotationTool {
|
|
|
29
29
|
preventHandleOutsideImage: false,
|
|
30
30
|
storePointData: false,
|
|
31
31
|
centerPointRadius: 0,
|
|
32
|
+
calculateStats: true,
|
|
32
33
|
getTextLines: defaultGetTextLines,
|
|
33
34
|
statsCalculator: BasicStatsCalculator,
|
|
34
35
|
},
|
|
@@ -462,6 +463,9 @@ class CircleROITool extends AnnotationTool {
|
|
|
462
463
|
return renderStatus;
|
|
463
464
|
};
|
|
464
465
|
this._calculateCachedStats = (annotation, viewport, renderingEngine, enabledElement) => {
|
|
466
|
+
if (!this.configuration.calculateStats) {
|
|
467
|
+
return;
|
|
468
|
+
}
|
|
465
469
|
const data = annotation.data;
|
|
466
470
|
const { element } = viewport;
|
|
467
471
|
const wasInvalidated = annotation.invalidated;
|
|
@@ -28,6 +28,7 @@ class EllipticalROITool extends AnnotationTool {
|
|
|
28
28
|
preventHandleOutsideImage: false,
|
|
29
29
|
storePointData: false,
|
|
30
30
|
centerPointRadius: 0,
|
|
31
|
+
calculateStats: true,
|
|
31
32
|
getTextLines: defaultGetTextLines,
|
|
32
33
|
statsCalculator: BasicStatsCalculator,
|
|
33
34
|
},
|
|
@@ -539,6 +540,9 @@ class EllipticalROITool extends AnnotationTool {
|
|
|
539
540
|
return renderStatus;
|
|
540
541
|
};
|
|
541
542
|
this._calculateCachedStats = (annotation, viewport, renderingEngine) => {
|
|
543
|
+
if (!this.configuration.calculateStats) {
|
|
544
|
+
return;
|
|
545
|
+
}
|
|
542
546
|
const data = annotation.data;
|
|
543
547
|
const { element } = viewport;
|
|
544
548
|
const { points } = data.handles;
|
|
@@ -27,6 +27,7 @@ class RectangleROITool extends AnnotationTool {
|
|
|
27
27
|
storePointData: false,
|
|
28
28
|
shadow: true,
|
|
29
29
|
preventHandleOutsideImage: false,
|
|
30
|
+
calculateStats: true,
|
|
30
31
|
getTextLines: defaultGetTextLines,
|
|
31
32
|
statsCalculator: BasicStatsCalculator,
|
|
32
33
|
},
|
|
@@ -59,6 +60,7 @@ class RectangleROITool extends AnnotationTool {
|
|
|
59
60
|
},
|
|
60
61
|
},
|
|
61
62
|
},
|
|
63
|
+
cachedStats: {},
|
|
62
64
|
},
|
|
63
65
|
});
|
|
64
66
|
addAnnotation(annotation, element);
|
|
@@ -437,6 +439,9 @@ class RectangleROITool extends AnnotationTool {
|
|
|
437
439
|
};
|
|
438
440
|
};
|
|
439
441
|
this._calculateCachedStats = (annotation, viewPlaneNormal, viewUp, renderingEngine, enabledElement) => {
|
|
442
|
+
if (!this.configuration.calculateStats) {
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
440
445
|
const { data } = annotation;
|
|
441
446
|
const { viewport } = enabledElement;
|
|
442
447
|
const { element } = viewport;
|
|
@@ -555,7 +560,7 @@ class RectangleROITool extends AnnotationTool {
|
|
|
555
560
|
function defaultGetTextLines(data, targetId) {
|
|
556
561
|
const cachedVolumeStats = data.cachedStats[targetId];
|
|
557
562
|
const { area, mean, max, stdDev, areaUnit, modalityUnit } = cachedVolumeStats;
|
|
558
|
-
if (mean === undefined) {
|
|
563
|
+
if (mean === undefined || mean === null) {
|
|
559
564
|
return;
|
|
560
565
|
}
|
|
561
566
|
const textLines = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.3",
|
|
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": "^3.1.0"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
|
-
"@cornerstonejs/core": "^3.9.
|
|
106
|
+
"@cornerstonejs/core": "^3.9.3",
|
|
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": "2f5fb013e50c6ac1f9a683ed32e67c28227c6333"
|
|
126
126
|
}
|