@cornerstonejs/tools 2.14.10 → 2.14.12
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.
|
@@ -12,6 +12,7 @@ import { getViewportIdsWithToolToRender } from '../../utilities/viewportFilters'
|
|
|
12
12
|
import triggerAnnotationRenderForViewportIds from '../../utilities/triggerAnnotationRenderForViewportIds';
|
|
13
13
|
import { triggerAnnotationCompleted, triggerAnnotationModified, } from '../../stateManagement/annotation/helpers/state';
|
|
14
14
|
import { resetElementCursor, hideElementCursor, } from '../../cursors/elementCursor';
|
|
15
|
+
import { isAnnotationVisible } from '../../stateManagement/annotation/annotationVisibility';
|
|
15
16
|
class AngleTool extends AnnotationTool {
|
|
16
17
|
constructor(toolProps = {}, defaultToolProps = {
|
|
17
18
|
supportedInteractionTypes: ['Mouse', 'Touch'],
|
|
@@ -315,6 +316,9 @@ class AngleTool extends AnnotationTool {
|
|
|
315
316
|
console.warn('Rendering Engine has been destroyed');
|
|
316
317
|
return renderStatus;
|
|
317
318
|
}
|
|
319
|
+
if (!isAnnotationVisible(annotationUID)) {
|
|
320
|
+
continue;
|
|
321
|
+
}
|
|
318
322
|
if (activeHandleCanvasCoords) {
|
|
319
323
|
const handleGroupUID = '0';
|
|
320
324
|
drawHandlesSvg(svgDrawingHelper, annotationUID, handleGroupUID, canvasCoordinates, {
|
|
@@ -10,6 +10,7 @@ import { getViewportIdsWithToolToRender } from '../../utilities/viewportFilters'
|
|
|
10
10
|
import triggerAnnotationRenderForViewportIds from '../../utilities/triggerAnnotationRenderForViewportIds';
|
|
11
11
|
import { triggerAnnotationCompleted, triggerAnnotationModified, } from '../../stateManagement/annotation/helpers/state';
|
|
12
12
|
import { resetElementCursor, hideElementCursor, } from '../../cursors/elementCursor';
|
|
13
|
+
import { isAnnotationVisible } from '../../stateManagement/annotation/annotationVisibility';
|
|
13
14
|
class ArrowAnnotateTool extends AnnotationTool {
|
|
14
15
|
constructor(toolProps = {}, defaultToolProps = {
|
|
15
16
|
supportedInteractionTypes: ['Mouse', 'Touch'],
|
|
@@ -312,6 +313,13 @@ class ArrowAnnotateTool extends AnnotationTool {
|
|
|
312
313
|
activeHandleIndex !== null) {
|
|
313
314
|
activeHandleCanvasCoords = [canvasCoordinates[activeHandleIndex]];
|
|
314
315
|
}
|
|
316
|
+
if (!viewport.getRenderingEngine()) {
|
|
317
|
+
console.warn('Rendering Engine has been destroyed');
|
|
318
|
+
return renderStatus;
|
|
319
|
+
}
|
|
320
|
+
if (!isAnnotationVisible(annotationUID)) {
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
315
323
|
if (activeHandleCanvasCoords) {
|
|
316
324
|
const handleGroupUID = '0';
|
|
317
325
|
drawHandlesSvg(svgDrawingHelper, annotationUID, handleGroupUID, canvasCoordinates, {
|
|
@@ -335,10 +343,6 @@ class ArrowAnnotateTool extends AnnotationTool {
|
|
|
335
343
|
});
|
|
336
344
|
}
|
|
337
345
|
renderStatus = true;
|
|
338
|
-
if (!viewport.getRenderingEngine()) {
|
|
339
|
-
console.warn('Rendering Engine has been destroyed');
|
|
340
|
-
return renderStatus;
|
|
341
|
-
}
|
|
342
346
|
if (!text) {
|
|
343
347
|
continue;
|
|
344
348
|
}
|
|
@@ -15,6 +15,7 @@ import { getViewportIdsWithToolToRender } from '../../utilities/viewportFilters'
|
|
|
15
15
|
import { getTextBoxCoordsCanvas } from '../../utilities/drawing';
|
|
16
16
|
import triggerAnnotationRenderForViewportIds from '../../utilities/triggerAnnotationRenderForViewportIds';
|
|
17
17
|
import { resetElementCursor, hideElementCursor, } from '../../cursors/elementCursor';
|
|
18
|
+
import { isAnnotationVisible } from '../../stateManagement/annotation/annotationVisibility';
|
|
18
19
|
class CobbAngleTool extends AnnotationTool {
|
|
19
20
|
constructor(toolProps = {}, defaultToolProps = {
|
|
20
21
|
supportedInteractionTypes: ['Mouse', 'Touch'],
|
|
@@ -358,6 +359,9 @@ class CobbAngleTool extends AnnotationTool {
|
|
|
358
359
|
console.warn('Rendering Engine has been destroyed');
|
|
359
360
|
return renderStatus;
|
|
360
361
|
}
|
|
362
|
+
if (!isAnnotationVisible(annotationUID)) {
|
|
363
|
+
continue;
|
|
364
|
+
}
|
|
361
365
|
if (activeHandleCanvasCoords) {
|
|
362
366
|
const handleGroupUID = '0';
|
|
363
367
|
drawHandlesSvg(svgDrawingHelper, annotationUID, handleGroupUID, canvasCoordinates, {
|
|
@@ -139,13 +139,13 @@ class ColorbarCanvas {
|
|
|
139
139
|
const maxValue = isHorizontal ? width : height;
|
|
140
140
|
const { _voiRange: voiRange } = this;
|
|
141
141
|
const range = this._showFullImageRange ? this._imageRange : { ...voiRange };
|
|
142
|
-
const { windowWidth } = utilities.windowLevel.toWindowLevel(voiRange.lower, voiRange.upper);
|
|
143
142
|
let previousColorPoint = undefined;
|
|
144
143
|
let currentColorPoint = getColorPoint(0);
|
|
145
144
|
const incRawPixelValue = (range.upper - range.lower) / (maxValue - 1);
|
|
146
145
|
let rawPixelValue = range.lower;
|
|
147
146
|
for (let i = 0; i < maxValue; i++) {
|
|
148
|
-
const tVoiRange = (rawPixelValue - voiRange.lower) /
|
|
147
|
+
const tVoiRange = (rawPixelValue - voiRange.lower) /
|
|
148
|
+
Math.abs(voiRange.upper - voiRange.lower);
|
|
149
149
|
if (currentColorPoint) {
|
|
150
150
|
for (let i = currentColorPoint.index; i < colorsCount; i++) {
|
|
151
151
|
if (tVoiRange <= currentColorPoint.position) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.12",
|
|
4
4
|
"description": "Cornerstone3D Tools",
|
|
5
5
|
"types": "./dist/esm/index.d.ts",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"canvas": "^2.11.2"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
|
-
"@cornerstonejs/core": "^2.14.
|
|
107
|
+
"@cornerstonejs/core": "^2.14.12",
|
|
108
108
|
"@kitware/vtk.js": "32.1.1",
|
|
109
109
|
"@types/d3-array": "^3.0.4",
|
|
110
110
|
"@types/d3-interpolate": "^3.0.1",
|
|
@@ -123,5 +123,5 @@
|
|
|
123
123
|
"type": "individual",
|
|
124
124
|
"url": "https://ohif.org/donate"
|
|
125
125
|
},
|
|
126
|
-
"gitHead": "
|
|
126
|
+
"gitHead": "3062aecefb4115e44735550afbf9f33996cf8a02"
|
|
127
127
|
}
|