@cornerstonejs/tools 3.26.0 → 3.26.1
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.
|
@@ -467,40 +467,42 @@ class CircleROITool extends AnnotationTool {
|
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
renderStatus = true;
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
470
|
+
if (this.configuration.calculateStats) {
|
|
471
|
+
const options = this.getLinkedTextBoxStyle(styleSpecifier, annotation);
|
|
472
|
+
if (!options.visibility) {
|
|
473
|
+
data.handles.textBox = {
|
|
474
|
+
hasMoved: false,
|
|
475
|
+
worldPosition: [0, 0, 0],
|
|
476
|
+
worldBoundingBox: {
|
|
477
|
+
topLeft: [0, 0, 0],
|
|
478
|
+
topRight: [0, 0, 0],
|
|
479
|
+
bottomLeft: [0, 0, 0],
|
|
480
|
+
bottomRight: [0, 0, 0],
|
|
481
|
+
},
|
|
482
|
+
};
|
|
483
|
+
continue;
|
|
484
|
+
}
|
|
485
|
+
const textLines = this.configuration.getTextLines(data, targetId);
|
|
486
|
+
if (!textLines || textLines.length === 0) {
|
|
487
|
+
continue;
|
|
488
|
+
}
|
|
489
|
+
let canvasTextBoxCoords;
|
|
490
|
+
if (!data.handles.textBox.hasMoved) {
|
|
491
|
+
canvasTextBoxCoords = getTextBoxCoordsCanvas(canvasCorners);
|
|
492
|
+
data.handles.textBox.worldPosition =
|
|
493
|
+
viewport.canvasToWorld(canvasTextBoxCoords);
|
|
494
|
+
}
|
|
495
|
+
const textBoxPosition = viewport.worldToCanvas(data.handles.textBox.worldPosition);
|
|
496
|
+
const textBoxUID = '1';
|
|
497
|
+
const boundingBox = drawLinkedTextBoxSvg(svgDrawingHelper, annotationUID, textBoxUID, textLines, textBoxPosition, [center, canvasCoordinates[1]], {}, options);
|
|
498
|
+
const { x: left, y: top, width, height } = boundingBox;
|
|
499
|
+
data.handles.textBox.worldBoundingBox = {
|
|
500
|
+
topLeft: viewport.canvasToWorld([left, top]),
|
|
501
|
+
topRight: viewport.canvasToWorld([left + width, top]),
|
|
502
|
+
bottomLeft: viewport.canvasToWorld([left, top + height]),
|
|
503
|
+
bottomRight: viewport.canvasToWorld([left + width, top + height]),
|
|
481
504
|
};
|
|
482
|
-
continue;
|
|
483
|
-
}
|
|
484
|
-
const textLines = this.configuration.getTextLines(data, targetId);
|
|
485
|
-
if (!textLines || textLines.length === 0) {
|
|
486
|
-
continue;
|
|
487
|
-
}
|
|
488
|
-
let canvasTextBoxCoords;
|
|
489
|
-
if (!data.handles.textBox.hasMoved) {
|
|
490
|
-
canvasTextBoxCoords = getTextBoxCoordsCanvas(canvasCorners);
|
|
491
|
-
data.handles.textBox.worldPosition =
|
|
492
|
-
viewport.canvasToWorld(canvasTextBoxCoords);
|
|
493
505
|
}
|
|
494
|
-
const textBoxPosition = viewport.worldToCanvas(data.handles.textBox.worldPosition);
|
|
495
|
-
const textBoxUID = '1';
|
|
496
|
-
const boundingBox = drawLinkedTextBoxSvg(svgDrawingHelper, annotationUID, textBoxUID, textLines, textBoxPosition, [center, canvasCoordinates[1]], {}, options);
|
|
497
|
-
const { x: left, y: top, width, height } = boundingBox;
|
|
498
|
-
data.handles.textBox.worldBoundingBox = {
|
|
499
|
-
topLeft: viewport.canvasToWorld([left, top]),
|
|
500
|
-
topRight: viewport.canvasToWorld([left + width, top]),
|
|
501
|
-
bottomLeft: viewport.canvasToWorld([left, top + height]),
|
|
502
|
-
bottomRight: viewport.canvasToWorld([left + width, top + height]),
|
|
503
|
-
};
|
|
504
506
|
}
|
|
505
507
|
return renderStatus;
|
|
506
508
|
};
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "3.26.
|
|
1
|
+
export declare const version = "3.26.1";
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '3.26.
|
|
1
|
+
export const version = '3.26.1';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "3.26.
|
|
3
|
+
"version": "3.26.1",
|
|
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.1.0"
|
|
109
109
|
},
|
|
110
110
|
"peerDependencies": {
|
|
111
|
-
"@cornerstonejs/core": "^3.26.
|
|
111
|
+
"@cornerstonejs/core": "^3.26.1",
|
|
112
112
|
"@kitware/vtk.js": "32.12.1",
|
|
113
113
|
"@types/d3-array": "^3.0.4",
|
|
114
114
|
"@types/d3-interpolate": "^3.0.1",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"type": "individual",
|
|
128
128
|
"url": "https://ohif.org/donate"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "36745015409a9516e8df43a1a7b126e7770ac776"
|
|
131
131
|
}
|