@cornerstonejs/tools 0.10.1 → 0.12.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.
- package/dist/cjs/drawingSvg/_getHash.d.ts +1 -1
- package/dist/cjs/drawingSvg/_getHash.js +2 -2
- package/dist/cjs/drawingSvg/_getHash.js.map +1 -1
- package/dist/cjs/drawingSvg/drawArrow.d.ts +2 -0
- package/dist/cjs/drawingSvg/drawArrow.js +53 -0
- package/dist/cjs/drawingSvg/drawArrow.js.map +1 -0
- package/dist/cjs/drawingSvg/drawCircle.d.ts +1 -1
- package/dist/cjs/drawingSvg/drawCircle.js +2 -2
- package/dist/cjs/drawingSvg/drawCircle.js.map +1 -1
- package/dist/cjs/drawingSvg/drawEllipse.d.ts +1 -1
- package/dist/cjs/drawingSvg/drawEllipse.js +2 -2
- package/dist/cjs/drawingSvg/drawEllipse.js.map +1 -1
- package/dist/cjs/drawingSvg/drawHandles.d.ts +1 -1
- package/dist/cjs/drawingSvg/drawHandles.js +2 -2
- package/dist/cjs/drawingSvg/drawHandles.js.map +1 -1
- package/dist/cjs/drawingSvg/drawLine.d.ts +1 -1
- package/dist/cjs/drawingSvg/drawLine.js +2 -2
- package/dist/cjs/drawingSvg/drawLine.js.map +1 -1
- package/dist/cjs/drawingSvg/drawLink.d.ts +1 -1
- package/dist/cjs/drawingSvg/drawLink.js +2 -2
- package/dist/cjs/drawingSvg/drawLink.js.map +1 -1
- package/dist/cjs/drawingSvg/drawLinkedTextBox.d.ts +1 -1
- package/dist/cjs/drawingSvg/drawLinkedTextBox.js +3 -3
- package/dist/cjs/drawingSvg/drawLinkedTextBox.js.map +1 -1
- package/dist/cjs/drawingSvg/drawPolyline.d.ts +8 -0
- package/dist/cjs/drawingSvg/drawPolyline.js +50 -0
- package/dist/cjs/drawingSvg/drawPolyline.js.map +1 -0
- package/dist/cjs/drawingSvg/drawRect.d.ts +1 -1
- package/dist/cjs/drawingSvg/drawRect.js +2 -2
- package/dist/cjs/drawingSvg/drawRect.js.map +1 -1
- package/dist/cjs/drawingSvg/drawTextBox.d.ts +1 -1
- package/dist/cjs/drawingSvg/drawTextBox.js +4 -4
- package/dist/cjs/drawingSvg/drawTextBox.js.map +1 -1
- package/dist/cjs/drawingSvg/index.d.ts +3 -1
- package/dist/cjs/drawingSvg/index.js +5 -1
- package/dist/cjs/drawingSvg/index.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/stateManagement/annotation/config/annotationStyle.js +1 -1
- package/dist/cjs/tools/CrosshairsTool.js +12 -12
- package/dist/cjs/tools/CrosshairsTool.js.map +1 -1
- package/dist/cjs/tools/annotation/ArrowAnnotateTool.d.ts +36 -0
- package/dist/cjs/tools/annotation/ArrowAnnotateTool.js +403 -0
- package/dist/cjs/tools/annotation/ArrowAnnotateTool.js.map +1 -0
- package/dist/cjs/tools/annotation/BidirectionalTool.js +4 -4
- package/dist/cjs/tools/annotation/BidirectionalTool.js.map +1 -1
- package/dist/cjs/tools/annotation/EllipticalROITool.js +3 -3
- package/dist/cjs/tools/annotation/EllipticalROITool.js.map +1 -1
- package/dist/cjs/tools/annotation/LengthTool.js +4 -3
- package/dist/cjs/tools/annotation/LengthTool.js.map +1 -1
- package/dist/cjs/tools/annotation/PlanarFreehandROITool.d.ts +32 -0
- package/dist/cjs/tools/annotation/PlanarFreehandROITool.js +192 -0
- package/dist/cjs/tools/annotation/PlanarFreehandROITool.js.map +1 -0
- package/dist/cjs/tools/annotation/ProbeTool.js +2 -2
- package/dist/cjs/tools/annotation/ProbeTool.js.map +1 -1
- package/dist/cjs/tools/annotation/RectangleROITool.js +3 -3
- package/dist/cjs/tools/annotation/RectangleROITool.js.map +1 -1
- package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.d.ts +2 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +216 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.js.map +1 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.d.ts +2 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.js +182 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.js.map +1 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/editLoopCommon.d.ts +2 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/editLoopCommon.js +127 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/editLoopCommon.js.map +1 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.d.ts +2 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.js +289 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.js.map +1 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEndEditLoop.d.ts +2 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEndEditLoop.js +43 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEndEditLoop.js.map +1 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/renderMethods.d.ts +2 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/renderMethods.js +99 -0
- package/dist/cjs/tools/annotation/planarFreehandROITool/renderMethods.js.map +1 -0
- package/dist/cjs/tools/index.d.ts +3 -1
- package/dist/cjs/tools/index.js +5 -1
- package/dist/cjs/tools/index.js.map +1 -1
- package/dist/cjs/tools/segmentation/BrushTool.js +1 -1
- package/dist/cjs/tools/segmentation/BrushTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/CircleScissorsTool.js +1 -1
- package/dist/cjs/tools/segmentation/CircleScissorsTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/RectangleROIStartEndThresholdTool.js +2 -2
- package/dist/cjs/tools/segmentation/RectangleROIStartEndThresholdTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/RectangleROIThresholdTool.js +2 -2
- package/dist/cjs/tools/segmentation/RectangleROIThresholdTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/RectangleScissorsTool.js +1 -1
- package/dist/cjs/tools/segmentation/RectangleScissorsTool.js.map +1 -1
- package/dist/cjs/tools/segmentation/SphereScissorsTool.js +1 -1
- package/dist/cjs/tools/segmentation/SphereScissorsTool.js.map +1 -1
- package/dist/cjs/types/AnnotationTypes.d.ts +1 -0
- package/dist/cjs/types/ToolSpecificAnnotationTypes.d.ts +50 -0
- package/dist/cjs/utilities/math/index.d.ts +2 -1
- package/dist/cjs/utilities/math/index.js +3 -1
- package/dist/cjs/utilities/math/index.js.map +1 -1
- package/dist/cjs/utilities/math/polyline/addCanvasPointsToArray.d.ts +4 -0
- package/dist/cjs/utilities/math/polyline/addCanvasPointsToArray.js +36 -0
- package/dist/cjs/utilities/math/polyline/addCanvasPointsToArray.js.map +1 -0
- package/dist/cjs/utilities/math/polyline/calculateAreaOfPoints.d.ts +2 -0
- package/dist/cjs/utilities/math/polyline/calculateAreaOfPoints.js +14 -0
- package/dist/cjs/utilities/math/polyline/calculateAreaOfPoints.js.map +1 -0
- package/dist/cjs/utilities/math/polyline/getIntersectionWithPolyline.d.ts +7 -0
- package/dist/cjs/utilities/math/polyline/getIntersectionWithPolyline.js +110 -0
- package/dist/cjs/utilities/math/polyline/getIntersectionWithPolyline.js.map +1 -0
- package/dist/cjs/utilities/math/polyline/getSubPixelSpacingAndXYDirections.d.ts +7 -0
- package/dist/cjs/utilities/math/polyline/getSubPixelSpacingAndXYDirections.js +67 -0
- package/dist/cjs/utilities/math/polyline/getSubPixelSpacingAndXYDirections.js.map +1 -0
- package/dist/cjs/utilities/math/polyline/index.d.ts +7 -0
- package/dist/cjs/utilities/math/polyline/index.js +20 -0
- package/dist/cjs/utilities/math/polyline/index.js.map +1 -0
- package/dist/cjs/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +22 -0
- package/dist/cjs/utilities/math/polyline/planarFreehandROIInternalTypes.js +3 -0
- package/dist/cjs/utilities/math/polyline/planarFreehandROIInternalTypes.js.map +1 -0
- package/dist/cjs/utilities/math/polyline/pointCanProjectOnLine.d.ts +3 -0
- package/dist/cjs/utilities/math/polyline/pointCanProjectOnLine.js +35 -0
- package/dist/cjs/utilities/math/polyline/pointCanProjectOnLine.js.map +1 -0
- package/dist/cjs/utilities/math/polyline/pointsAreWithinCloseContourProximity.d.ts +3 -0
- package/dist/cjs/utilities/math/polyline/pointsAreWithinCloseContourProximity.js +8 -0
- package/dist/cjs/utilities/math/polyline/pointsAreWithinCloseContourProximity.js.map +1 -0
- package/dist/esm/drawingSvg/_getHash.d.ts +1 -1
- package/dist/esm/drawingSvg/_getHash.js +2 -2
- package/dist/esm/drawingSvg/_getHash.js.map +1 -1
- package/dist/esm/drawingSvg/drawArrow.d.ts +2 -0
- package/dist/esm/drawingSvg/drawArrow.js +47 -0
- package/dist/esm/drawingSvg/drawArrow.js.map +1 -0
- package/dist/esm/drawingSvg/drawCircle.d.ts +1 -1
- package/dist/esm/drawingSvg/drawCircle.js +2 -2
- package/dist/esm/drawingSvg/drawCircle.js.map +1 -1
- package/dist/esm/drawingSvg/drawEllipse.d.ts +1 -1
- package/dist/esm/drawingSvg/drawEllipse.js +2 -2
- package/dist/esm/drawingSvg/drawEllipse.js.map +1 -1
- package/dist/esm/drawingSvg/drawHandles.d.ts +1 -1
- package/dist/esm/drawingSvg/drawHandles.js +2 -2
- package/dist/esm/drawingSvg/drawHandles.js.map +1 -1
- package/dist/esm/drawingSvg/drawLine.d.ts +1 -1
- package/dist/esm/drawingSvg/drawLine.js +2 -2
- package/dist/esm/drawingSvg/drawLine.js.map +1 -1
- package/dist/esm/drawingSvg/drawLink.d.ts +1 -1
- package/dist/esm/drawingSvg/drawLink.js +2 -2
- package/dist/esm/drawingSvg/drawLink.js.map +1 -1
- package/dist/esm/drawingSvg/drawLinkedTextBox.d.ts +1 -1
- package/dist/esm/drawingSvg/drawLinkedTextBox.js +3 -3
- package/dist/esm/drawingSvg/drawLinkedTextBox.js.map +1 -1
- package/dist/esm/drawingSvg/drawPolyline.d.ts +8 -0
- package/dist/esm/drawingSvg/drawPolyline.js +44 -0
- package/dist/esm/drawingSvg/drawPolyline.js.map +1 -0
- package/dist/esm/drawingSvg/drawRect.d.ts +1 -1
- package/dist/esm/drawingSvg/drawRect.js +2 -2
- package/dist/esm/drawingSvg/drawRect.js.map +1 -1
- package/dist/esm/drawingSvg/drawTextBox.d.ts +1 -1
- package/dist/esm/drawingSvg/drawTextBox.js +4 -4
- package/dist/esm/drawingSvg/drawTextBox.js.map +1 -1
- package/dist/esm/drawingSvg/index.d.ts +3 -1
- package/dist/esm/drawingSvg/index.js +3 -1
- package/dist/esm/drawingSvg/index.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/stateManagement/annotation/config/annotationStyle.js +1 -1
- package/dist/esm/tools/CrosshairsTool.js +12 -12
- package/dist/esm/tools/CrosshairsTool.js.map +1 -1
- package/dist/esm/tools/annotation/ArrowAnnotateTool.d.ts +36 -0
- package/dist/esm/tools/annotation/ArrowAnnotateTool.js +379 -0
- package/dist/esm/tools/annotation/ArrowAnnotateTool.js.map +1 -0
- package/dist/esm/tools/annotation/BidirectionalTool.js +4 -4
- package/dist/esm/tools/annotation/BidirectionalTool.js.map +1 -1
- package/dist/esm/tools/annotation/EllipticalROITool.js +3 -3
- package/dist/esm/tools/annotation/EllipticalROITool.js.map +1 -1
- package/dist/esm/tools/annotation/LengthTool.js +4 -3
- package/dist/esm/tools/annotation/LengthTool.js.map +1 -1
- package/dist/esm/tools/annotation/PlanarFreehandROITool.d.ts +32 -0
- package/dist/esm/tools/annotation/PlanarFreehandROITool.js +187 -0
- package/dist/esm/tools/annotation/PlanarFreehandROITool.js.map +1 -0
- package/dist/esm/tools/annotation/ProbeTool.js +2 -2
- package/dist/esm/tools/annotation/ProbeTool.js.map +1 -1
- package/dist/esm/tools/annotation/RectangleROITool.js +3 -3
- package/dist/esm/tools/annotation/RectangleROITool.js.map +1 -1
- package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +211 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js.map +1 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js +177 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js.map +1 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/editLoopCommon.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/editLoopCommon.js +125 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/editLoopCommon.js.map +1 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js +284 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js.map +1 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEndEditLoop.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEndEditLoop.js +41 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/openContourEndEditLoop.js.map +1 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/renderMethods.d.ts +2 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/renderMethods.js +97 -0
- package/dist/esm/tools/annotation/planarFreehandROITool/renderMethods.js.map +1 -0
- package/dist/esm/tools/index.d.ts +3 -1
- package/dist/esm/tools/index.js +3 -1
- package/dist/esm/tools/index.js.map +1 -1
- package/dist/esm/tools/segmentation/BrushTool.js +1 -1
- package/dist/esm/tools/segmentation/BrushTool.js.map +1 -1
- package/dist/esm/tools/segmentation/CircleScissorsTool.js +1 -1
- package/dist/esm/tools/segmentation/CircleScissorsTool.js.map +1 -1
- package/dist/esm/tools/segmentation/RectangleROIStartEndThresholdTool.js +2 -2
- package/dist/esm/tools/segmentation/RectangleROIStartEndThresholdTool.js.map +1 -1
- package/dist/esm/tools/segmentation/RectangleROIThresholdTool.js +2 -2
- package/dist/esm/tools/segmentation/RectangleROIThresholdTool.js.map +1 -1
- package/dist/esm/tools/segmentation/RectangleScissorsTool.js +1 -1
- package/dist/esm/tools/segmentation/RectangleScissorsTool.js.map +1 -1
- package/dist/esm/tools/segmentation/SphereScissorsTool.js +1 -1
- package/dist/esm/tools/segmentation/SphereScissorsTool.js.map +1 -1
- package/dist/esm/types/AnnotationTypes.d.ts +1 -0
- package/dist/esm/types/ToolSpecificAnnotationTypes.d.ts +50 -0
- package/dist/esm/utilities/math/index.d.ts +2 -1
- package/dist/esm/utilities/math/index.js +2 -1
- package/dist/esm/utilities/math/index.js.map +1 -1
- package/dist/esm/utilities/math/polyline/addCanvasPointsToArray.d.ts +4 -0
- package/dist/esm/utilities/math/polyline/addCanvasPointsToArray.js +34 -0
- package/dist/esm/utilities/math/polyline/addCanvasPointsToArray.js.map +1 -0
- package/dist/esm/utilities/math/polyline/calculateAreaOfPoints.d.ts +2 -0
- package/dist/esm/utilities/math/polyline/calculateAreaOfPoints.js +11 -0
- package/dist/esm/utilities/math/polyline/calculateAreaOfPoints.js.map +1 -0
- package/dist/esm/utilities/math/polyline/getIntersectionWithPolyline.d.ts +7 -0
- package/dist/esm/utilities/math/polyline/getIntersectionWithPolyline.js +106 -0
- package/dist/esm/utilities/math/polyline/getIntersectionWithPolyline.js.map +1 -0
- package/dist/esm/utilities/math/polyline/getSubPixelSpacingAndXYDirections.d.ts +7 -0
- package/dist/esm/utilities/math/polyline/getSubPixelSpacingAndXYDirections.js +65 -0
- package/dist/esm/utilities/math/polyline/getSubPixelSpacingAndXYDirections.js.map +1 -0
- package/dist/esm/utilities/math/polyline/index.d.ts +7 -0
- package/dist/esm/utilities/math/polyline/index.js +8 -0
- package/dist/esm/utilities/math/polyline/index.js.map +1 -0
- package/dist/esm/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +22 -0
- package/dist/esm/utilities/math/polyline/planarFreehandROIInternalTypes.js +2 -0
- package/dist/esm/utilities/math/polyline/planarFreehandROIInternalTypes.js.map +1 -0
- package/dist/esm/utilities/math/polyline/pointCanProjectOnLine.d.ts +3 -0
- package/dist/esm/utilities/math/polyline/pointCanProjectOnLine.js +33 -0
- package/dist/esm/utilities/math/polyline/pointCanProjectOnLine.js.map +1 -0
- package/dist/esm/utilities/math/polyline/pointsAreWithinCloseContourProximity.d.ts +3 -0
- package/dist/esm/utilities/math/polyline/pointsAreWithinCloseContourProximity.js +6 -0
- package/dist/esm/utilities/math/polyline/pointsAreWithinCloseContourProximity.js.map +1 -0
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function _getHash(
|
|
1
|
+
declare function _getHash(annotationUID: string, drawingElementType: string, nodeUID: string): string;
|
|
2
2
|
export default _getHash;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function _getHash(
|
|
4
|
-
return `${
|
|
3
|
+
function _getHash(annotationUID, drawingElementType, nodeUID) {
|
|
4
|
+
return `${annotationUID}::${drawingElementType}::${nodeUID}`;
|
|
5
5
|
}
|
|
6
6
|
exports.default = _getHash;
|
|
7
7
|
//# sourceMappingURL=_getHash.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_getHash.js","sourceRoot":"","sources":["../../../src/drawingSvg/_getHash.ts"],"names":[],"mappings":";;AAAA,SAAS,QAAQ,CACf,
|
|
1
|
+
{"version":3,"file":"_getHash.js","sourceRoot":"","sources":["../../../src/drawingSvg/_getHash.ts"],"names":[],"mappings":";;AAAA,SAAS,QAAQ,CACf,aAAqB,EACrB,kBAA0B,EAC1B,OAAe;IAEf,OAAO,GAAG,aAAa,KAAK,kBAAkB,KAAK,OAAO,EAAE,CAAC;AAC/D,CAAC;AAED,kBAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const drawLine_1 = __importDefault(require("./drawLine"));
|
|
7
|
+
function drawArrow(svgDrawingHelper, annotationUID, arrowUID, start, end, options = {}) {
|
|
8
|
+
if (isNaN(start[0]) || isNaN(start[1]) || isNaN(end[0]) || isNaN(end[1])) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const { color, width, lineWidth, lineDash } = Object.assign({
|
|
12
|
+
color: 'dodgerblue',
|
|
13
|
+
width: '2',
|
|
14
|
+
lineWidth: undefined,
|
|
15
|
+
lineDash: undefined,
|
|
16
|
+
}, options);
|
|
17
|
+
(0, drawLine_1.default)(svgDrawingHelper, annotationUID, arrowUID, start, end, {
|
|
18
|
+
color,
|
|
19
|
+
width,
|
|
20
|
+
lineWidth,
|
|
21
|
+
lineDash,
|
|
22
|
+
});
|
|
23
|
+
const headLength = 10;
|
|
24
|
+
const angle = Math.atan2(end[1] - start[1], end[0] - start[0]);
|
|
25
|
+
const firstLine = {
|
|
26
|
+
start: [
|
|
27
|
+
end[0] - headLength * Math.cos(angle - Math.PI / 7),
|
|
28
|
+
end[1] - headLength * Math.sin(angle - Math.PI / 7),
|
|
29
|
+
],
|
|
30
|
+
end: end,
|
|
31
|
+
};
|
|
32
|
+
const secondLine = {
|
|
33
|
+
start: [
|
|
34
|
+
end[0] - headLength * Math.cos(angle + Math.PI / 7),
|
|
35
|
+
end[1] - headLength * Math.sin(angle + Math.PI / 7),
|
|
36
|
+
],
|
|
37
|
+
end: end,
|
|
38
|
+
};
|
|
39
|
+
(0, drawLine_1.default)(svgDrawingHelper, annotationUID, '2', firstLine.start, firstLine.end, {
|
|
40
|
+
color,
|
|
41
|
+
width,
|
|
42
|
+
lineWidth,
|
|
43
|
+
lineDash,
|
|
44
|
+
});
|
|
45
|
+
(0, drawLine_1.default)(svgDrawingHelper, annotationUID, '3', secondLine.start, secondLine.end, {
|
|
46
|
+
color,
|
|
47
|
+
width,
|
|
48
|
+
lineWidth,
|
|
49
|
+
lineDash,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
exports.default = drawArrow;
|
|
53
|
+
//# sourceMappingURL=drawArrow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawArrow.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawArrow.ts"],"names":[],"mappings":";;;;;AACA,0DAAkC;AAElC,SAAwB,SAAS,CAC/B,gBAAqB,EACrB,aAAqB,EACrB,QAAgB,EAChB,KAAmB,EACnB,GAAiB,EACjB,OAAO,GAAG,EAAE;IAGZ,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;QACxE,OAAO;KACR;IAED,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC,MAAM,CACzD;QACE,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,GAAG;QACV,SAAS,EAAE,SAAS;QACpB,QAAQ,EAAE,SAAS;KACpB,EACD,OAAO,CACR,CAAC;IAGF,IAAA,kBAAQ,EAAC,gBAAgB,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;QAC9D,KAAK;QACL,KAAK;QACL,SAAS;QACT,QAAQ;KACT,CAAC,CAAC;IAIH,MAAM,UAAU,GAAG,EAAE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import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
declare function drawCircle(svgDrawingHelper: any,
|
|
2
|
+
declare function drawCircle(svgDrawingHelper: any, annotationUID: string, circleUID: string, center: Types.Point2, radius: number, options?: {}): void;
|
|
3
3
|
export default drawCircle;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const _getHash_1 = __importDefault(require("./_getHash"));
|
|
7
7
|
const _setAttributesIfNecessary_1 = __importDefault(require("./_setAttributesIfNecessary"));
|
|
8
8
|
const _setNewAttributesIfValid_1 = __importDefault(require("./_setNewAttributesIfValid"));
|
|
9
|
-
function drawCircle(svgDrawingHelper,
|
|
9
|
+
function drawCircle(svgDrawingHelper, annotationUID, circleUID, center, radius, options = {}) {
|
|
10
10
|
const { color, fill, width, lineWidth } = Object.assign({
|
|
11
11
|
color: 'dodgerblue',
|
|
12
12
|
fill: 'transparent',
|
|
@@ -15,7 +15,7 @@ function drawCircle(svgDrawingHelper, toolName, annotationUID, circleUID, center
|
|
|
15
15
|
}, options);
|
|
16
16
|
const strokeWidth = lineWidth || width;
|
|
17
17
|
const svgns = 'http://www.w3.org/2000/svg';
|
|
18
|
-
const svgNodeHash = (0, _getHash_1.default)(
|
|
18
|
+
const svgNodeHash = (0, _getHash_1.default)(annotationUID, 'circle', circleUID);
|
|
19
19
|
const existingCircleElement = svgDrawingHelper._getSvgNode(svgNodeHash);
|
|
20
20
|
const attributes = {
|
|
21
21
|
cx: `${center[0]}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawCircle.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawCircle.ts"],"names":[],"mappings":";;;;;AAEA,0DAAkC;AAElC,4FAAoE;AACpE,0FAAkE;AAElE,SAAS,UAAU,CACjB,gBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"drawCircle.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawCircle.ts"],"names":[],"mappings":";;;;;AAEA,0D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AAe,UAAU,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
declare function drawEllipse(svgDrawingHelper: any,
|
|
2
|
+
declare function drawEllipse(svgDrawingHelper: any, annotationUID: string, ellipseUID: string, corner1: Types.Point2, corner2: Types.Point2, options?: {}): void;
|
|
3
3
|
export default drawEllipse;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const _getHash_1 = __importDefault(require("./_getHash"));
|
|
7
7
|
const _setAttributesIfNecessary_1 = __importDefault(require("./_setAttributesIfNecessary"));
|
|
8
8
|
const _setNewAttributesIfValid_1 = __importDefault(require("./_setNewAttributesIfValid"));
|
|
9
|
-
function drawEllipse(svgDrawingHelper,
|
|
9
|
+
function drawEllipse(svgDrawingHelper, annotationUID, ellipseUID, corner1, corner2, options = {}) {
|
|
10
10
|
const { color, width, lineWidth, lineDash } = Object.assign({
|
|
11
11
|
color: 'dodgerblue',
|
|
12
12
|
width: '2',
|
|
@@ -15,7 +15,7 @@ function drawEllipse(svgDrawingHelper, toolName, annotationUID, ellipseUID, corn
|
|
|
15
15
|
}, options);
|
|
16
16
|
const strokeWidth = lineWidth || width;
|
|
17
17
|
const svgns = 'http://www.w3.org/2000/svg';
|
|
18
|
-
const svgNodeHash = (0, _getHash_1.default)(
|
|
18
|
+
const svgNodeHash = (0, _getHash_1.default)(annotationUID, 'ellipse', ellipseUID);
|
|
19
19
|
const existingEllipse = svgDrawingHelper._getSvgNode(svgNodeHash);
|
|
20
20
|
const w = Math.abs(corner1[0] - corner2[0]);
|
|
21
21
|
const h = Math.abs(corner1[1] - corner2[1]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawEllipse.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawEllipse.ts"],"names":[],"mappings":";;;;;AAEA,0DAAkC;AAClC,4FAAoE;AACpE,0FAAkE;AAElE,SAAS,WAAW,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I,GAAG,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5C,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;IACtB,MAAM,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;IAEtB,MAAM,UAAU,GAAG;QACjB,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE;QAClB,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE;QAClB,EAAE,EAAE,GAAG,OAAO,EAAE;QAChB,EAAE,EAAE,GAAG,OAAO,EAAE;QAChB,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,aAAa;QACnB,cAAc,EAAE,WAAW;QAC3B,kBAAkB,EAAE,QAAQ;KAC7B,CAAC;IAEF,IAAI,eAAe,EAAE;QACnB,IAAA,mCAAyB,EAAC,UAAU,EAAE,eAAe,CAAC,CAAC;QAEvD,gBAAgB,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;KAC/C;SAAM;QACL,MAAM,iBAAiB,GAAG,QAAQ,CAAC,eAAe,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QAErE,IAAA,kCAAwB,EAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;QAExD,gBAAgB,CAAC,WAAW,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;KAC9D;AACH,CAAC;AAED,kBAAe,WAAW,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
declare function drawHandles(svgDrawingHelper: any,
|
|
2
|
+
declare function drawHandles(svgDrawingHelper: any, annotationUID: string, handleGroupUID: string, handlePoints: Array<Types.Point2>, options?: {}): void;
|
|
3
3
|
export default drawHandles;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const _getHash_1 = __importDefault(require("./_getHash"));
|
|
7
7
|
const _setNewAttributesIfValid_1 = __importDefault(require("./_setNewAttributesIfValid"));
|
|
8
8
|
const _setAttributesIfNecessary_1 = __importDefault(require("./_setAttributesIfNecessary"));
|
|
9
|
-
function drawHandles(svgDrawingHelper,
|
|
9
|
+
function drawHandles(svgDrawingHelper, annotationUID, handleGroupUID, handlePoints, options = {}) {
|
|
10
10
|
const { color, handleRadius, width, lineWidth, fill, type } = Object.assign({
|
|
11
11
|
color: 'dodgerblue',
|
|
12
12
|
handleRadius: '6',
|
|
@@ -19,7 +19,7 @@ function drawHandles(svgDrawingHelper, toolName, annotationUID, handleGroupUID,
|
|
|
19
19
|
for (let i = 0; i < handlePoints.length; i++) {
|
|
20
20
|
const handle = handlePoints[i];
|
|
21
21
|
const svgns = 'http://www.w3.org/2000/svg';
|
|
22
|
-
const svgNodeHash = (0, _getHash_1.default)(
|
|
22
|
+
const svgNodeHash = (0, _getHash_1.default)(annotationUID, 'handle', `hg-${handleGroupUID}-index-${i}`);
|
|
23
23
|
let attributes;
|
|
24
24
|
if (type === 'circle') {
|
|
25
25
|
attributes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawHandles.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawHandles.ts"],"names":[],"mappings":";;;;;AAEA,0DAAkC;AAClC,0FAAkE;AAClE,4FAAoE;AAEpE,SAAS,WAAW,CAClB,gBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"drawHandles.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawHandles.ts"],"names":[],"mappings":";;;;;AAEA,0DAAkC;AAClC,0FAAkE;AAClE,4FAAoE;AAEpE,SAAS,WAAW,CAClB,gBAAqB,EACrB,aAAqB,EACrB,cAAsB,EACtB,YAAiC,EACjC,OAAO,GAAG,EAAE;IAEZ,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,MAAM,CACzE;QACE,KAAK,EAAE,YAAY;QACnB,YA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AAG,IAAI,EAAE;gBACjB,MAAM,EAAE,KAAK;gBACb,IAAI;gBACJ,cAAc,EAAE,WAAW;gBAC3B,EAAE,EAAE,GAAG,IAAI,GAAG,GAAG,EAAE;aACpB,CAAC;SACH;aAAM;YACL,MAAM,IAAI,KAAK,CAAC,4BAA4B,IAAI,EAAE,CAAC,CAAC;SACrD;QAED,MAAM,qBAAqB,GAAG,gBAAgB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAExE,IAAI,qBAAqB,EAAE;YACzB,IAAA,mCAAyB,EAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC;YAE7D,gBAAgB,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;SAC/C;aAAM;YACL,MAAM,gBAAgB,GAAG,QAAQ,CAAC,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAE/D,IAAA,kCAAwB,EAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;YAEvD,gBAAgB,CAAC,WAAW,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;SAC7D;KACF;AACH,CAAC;AAED,kBAAe,WAAW,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
export default function drawLine(svgDrawingHelper: any,
|
|
2
|
+
export default function drawLine(svgDrawingHelper: any, annotationUID: string, lineUID: string, start: Types.Point2, end: Types.Point2, options?: {}): void;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const _getHash_1 = __importDefault(require("./_getHash"));
|
|
7
7
|
const _setNewAttributesIfValid_1 = __importDefault(require("./_setNewAttributesIfValid"));
|
|
8
8
|
const _setAttributesIfNecessary_1 = __importDefault(require("./_setAttributesIfNecessary"));
|
|
9
|
-
function drawLine(svgDrawingHelper,
|
|
9
|
+
function drawLine(svgDrawingHelper, annotationUID, lineUID, start, end, options = {}) {
|
|
10
10
|
if (isNaN(start[0]) || isNaN(start[1]) || isNaN(end[0]) || isNaN(end[1])) {
|
|
11
11
|
return;
|
|
12
12
|
}
|
|
@@ -18,7 +18,7 @@ function drawLine(svgDrawingHelper, toolName, annotationUID, lineUID, start, end
|
|
|
18
18
|
}, options);
|
|
19
19
|
const strokeWidth = lineWidth || width;
|
|
20
20
|
const svgns = 'http://www.w3.org/2000/svg';
|
|
21
|
-
const svgNodeHash = (0, _getHash_1.default)(
|
|
21
|
+
const svgNodeHash = (0, _getHash_1.default)(annotationUID, 'line', lineUID);
|
|
22
22
|
const existingLine = svgDrawingHelper._getSvgNode(svgNodeHash);
|
|
23
23
|
const attributes = {
|
|
24
24
|
x1: `${start[0]}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawLine.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawLine.ts"],"names":[],"mappings":";;;;;AAEA,0DAAkC;AAClC,0FAAkE;AAClE,4FAAoE;AAEpE,SAAwB,QAAQ,CAC9B,gBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"drawLine.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawLine.ts"],"names":[],"mappings":";;;;;AAEA,0DAAkC;AAClC,0FAAkE;AAClE,4FAAoE;AAEpE,SAAwB,QAAQ,CAC9B,gBAAqB,EACrB,aAAqB,EACrB,OAAe,EACf,KAAmB,EACnB,GAAiB,EACjB,OAAO,GAAG,EAAE;IAGZ,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;QACxE,OAAO;KACR;IAED,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC,MAAM,CACzD;QACE,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,GAAG;QACV,SAAS,EAAE,SAAS;QACpB,QAAQ,EAAE,SAAS;KACpB,EACD,OAAO,CACR,CAAC;IAGF,MAAM,WAAW,GAAG,SAAS,IAAI,KAAK,CAAC;IAEvC,MAAM,KAAK,GAAG,4BAA4B,CAAC;IAC3C,MAAM,WAAW,GAAG,IAAA,kBAAQ,EAAC,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7D,MAAM,YAAY,GAAG,gBAAgB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAE/D,MAAM,UAAU,GAAG;QACjB,EAAE,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE;QACjB,EAAE,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE;QACjB,EAAE,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE;QACf,EAAE,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE;QACf,MAAM,EAAE,KAAK;QACb,cAAc,EAAE,WAAW;QAC3B,kBAAkB,EAAE,QAAQ;KAC7B,CAAC;IAEF,IAAI,YAAY,EAAE;QAEhB,IAAA,mCAAyB,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC;QAEpD,gBAAgB,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;KAC/C;SAAM;QACL,MAAM,OAAO,GAAG,QAAQ,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAExD,IAAA,kCAAwB,EAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAE9C,gBAAgB,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;KACpD;AACH,CAAC;AApDD,2BAoDC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
2
|
import { PlanarBoundingBox } from '../types';
|
|
3
|
-
declare function drawLink(svgDrawingHelper: Record<string, unknown>,
|
|
3
|
+
declare function drawLink(svgDrawingHelper: Record<string, unknown>, annotationUID: string, linkUID: string, annotationAnchorPoints: Array<Types.Point2>, refPoint: Types.Point2, boundingBox: PlanarBoundingBox, options?: {}): void;
|
|
4
4
|
export default drawLink;
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const drawLine_1 = __importDefault(require("./drawLine"));
|
|
7
7
|
const findClosestPoint_1 = __importDefault(require("../utilities/math/vec2/findClosestPoint"));
|
|
8
|
-
function drawLink(svgDrawingHelper,
|
|
8
|
+
function drawLink(svgDrawingHelper, annotationUID, linkUID, annotationAnchorPoints, refPoint, boundingBox, options = {}) {
|
|
9
9
|
const start = annotationAnchorPoints.length > 0
|
|
10
10
|
? (0, findClosestPoint_1.default)(annotationAnchorPoints, refPoint)
|
|
11
11
|
: refPoint;
|
|
@@ -16,7 +16,7 @@ function drawLink(svgDrawingHelper, toolName, annotationUID, linkUID, annotation
|
|
|
16
16
|
lineWidth: '1',
|
|
17
17
|
lineDash: '2,3',
|
|
18
18
|
}, options);
|
|
19
|
-
(0, drawLine_1.default)(svgDrawingHelper,
|
|
19
|
+
(0, drawLine_1.default)(svgDrawingHelper, annotationUID, `link-${linkUID}`, start, end, mergedOptions);
|
|
20
20
|
}
|
|
21
21
|
function _boundingBoxPoints(boundingBox) {
|
|
22
22
|
const { x: left, y: top, height, width } = boundingBox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawLink.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawLink.ts"],"names":[],"mappings":";;;;;AAEA,0DAAkC;AAClC,+FAAuE;AAMvE,SAAS,QAAQ,CACf,gBAAyC,EACzC,
|
|
1
|
+
{"version":3,"file":"drawLink.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawLink.ts"],"names":[],"mappings":";;;;;AAEA,0DAAkC;AAClC,+FAAuE;AAMvE,SAAS,QAAQ,CACf,gBAAyC,EACzC,aAAqB,EACrB,OAAe,EAEf,sBAA2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Y,EAAE,WAAW,CAAC,CAAC;AAC5D,CAAC;AAED,kBAAe,QAAQ,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
declare function drawLinkedTextBox(svgDrawingHelper: Record<string, unknown>,
|
|
2
|
+
declare function drawLinkedTextBox(svgDrawingHelper: Record<string, unknown>, annotationUID: string, textBoxUID: string, textLines: Array<string>, textBoxPosition: Types.Point2, annotationAnchorPoints: Array<Types.Point2>, textBox: unknown, options?: {}): SVGRect;
|
|
3
3
|
export default drawLinkedTextBox;
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const drawTextBox_1 = __importDefault(require("./drawTextBox"));
|
|
7
7
|
const drawLink_1 = __importDefault(require("./drawLink"));
|
|
8
|
-
function drawLinkedTextBox(svgDrawingHelper,
|
|
8
|
+
function drawLinkedTextBox(svgDrawingHelper, annotationUID, textBoxUID, textLines, textBoxPosition, annotationAnchorPoints, textBox, options = {}) {
|
|
9
9
|
const mergedOptions = Object.assign({
|
|
10
10
|
handleRadius: '6',
|
|
11
11
|
centering: {
|
|
@@ -13,8 +13,8 @@ function drawLinkedTextBox(svgDrawingHelper, toolName, annotationUID, textBoxUID
|
|
|
13
13
|
y: true,
|
|
14
14
|
},
|
|
15
15
|
}, options);
|
|
16
|
-
const canvasBoundingBox = (0, drawTextBox_1.default)(svgDrawingHelper,
|
|
17
|
-
(0, drawLink_1.default)(svgDrawingHelper,
|
|
16
|
+
const canvasBoundingBox = (0, drawTextBox_1.default)(svgDrawingHelper, annotationUID, textBoxUID, textLines, textBoxPosition, mergedOptions);
|
|
17
|
+
(0, drawLink_1.default)(svgDrawingHelper, annotationUID, textBoxUID, annotationAnchorPoints, textBoxPosition, canvasBoundingBox, mergedOptions);
|
|
18
18
|
return canvasBoundingBox;
|
|
19
19
|
}
|
|
20
20
|
exports.default = drawLinkedTextBox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawLinkedTextBox.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawLinkedTextBox.ts"],"names":[],"mappings":";;;;;AAEA,gEAAwC;AACxC,0DAAkC;AAElC,SAAS,iBAAiB,CACxB,gBAAyC,
|
|
1
|
+
{"version":3,"file":"drawLinkedTextBox.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawLinkedTextBox.ts"],"names":[],"mappings":";;;;;AAEA,gEAAwC;AACxC,0DAAkC;AAElC,SAAS,iBAAiB,CACxB,gBAAyC,EACzC,aAAqB,EACrB,UAAkB,EAElB,SAAwB,EACxB,eAA6B,EAC7B,sBAA2C,EAC3C,OAAgB,EAChB,OAAO,GAAG,EAAE;IAGZ,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CACjC;QACE,YAAY,EAAE,GAAG;QACjB,SAAS,EAAE;YACT,CAAC,EAAE,KAAK;YACR,CAAC,EAAE,IAAI;SACR;KACF,EACD,OAAO,CACR,CAAC;IAGF,MAAM,iBAAiB,GAAG,IAAA,qBAAW,EACnC,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,SAAS,EACT,eAAe,EACf,aAAa,CACd,CAAC;IAGF,IAAA,kBAAQ,EACN,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,aAAa,CACd,CAAC;IAYF,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,kBAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
|
+
export default function drawPolyline(svgDrawingHelper: any, annotationUID: string, polylineUID: string, points: Types.Point2[], options: {
|
|
3
|
+
color?: string;
|
|
4
|
+
width?: number;
|
|
5
|
+
lineWidth?: number;
|
|
6
|
+
lineDash?: string;
|
|
7
|
+
connectLastToFirst?: boolean;
|
|
8
|
+
}): void;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const _getHash_1 = __importDefault(require("./_getHash"));
|
|
7
|
+
const _setNewAttributesIfValid_1 = __importDefault(require("./_setNewAttributesIfValid"));
|
|
8
|
+
const _setAttributesIfNecessary_1 = __importDefault(require("./_setAttributesIfNecessary"));
|
|
9
|
+
function drawPolyline(svgDrawingHelper, annotationUID, polylineUID, points, options) {
|
|
10
|
+
if (points.length < 2) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const { color, width, lineWidth, lineDash } = Object.assign({
|
|
14
|
+
color: 'dodgerblue',
|
|
15
|
+
width: '2',
|
|
16
|
+
lineWidth: undefined,
|
|
17
|
+
lineDash: undefined,
|
|
18
|
+
connectLastToFirst: false,
|
|
19
|
+
}, options);
|
|
20
|
+
const strokeWidth = lineWidth || width;
|
|
21
|
+
const svgns = 'http://www.w3.org/2000/svg';
|
|
22
|
+
const svgNodeHash = (0, _getHash_1.default)(annotationUID, 'polyline', polylineUID);
|
|
23
|
+
const existingPolyLine = svgDrawingHelper._getSvgNode(svgNodeHash);
|
|
24
|
+
let pointsAttribute = '';
|
|
25
|
+
for (const point of points) {
|
|
26
|
+
pointsAttribute += `${point[0]}, ${point[1]} `;
|
|
27
|
+
}
|
|
28
|
+
if (options.connectLastToFirst) {
|
|
29
|
+
const firstPoint = points[0];
|
|
30
|
+
pointsAttribute += `${firstPoint[0]}, ${firstPoint[1]}`;
|
|
31
|
+
}
|
|
32
|
+
const attributes = {
|
|
33
|
+
points: pointsAttribute,
|
|
34
|
+
stroke: color,
|
|
35
|
+
fill: 'none',
|
|
36
|
+
'stroke-width': strokeWidth,
|
|
37
|
+
'stroke-dasharray': lineDash,
|
|
38
|
+
};
|
|
39
|
+
if (existingPolyLine) {
|
|
40
|
+
(0, _setAttributesIfNecessary_1.default)(attributes, existingPolyLine);
|
|
41
|
+
svgDrawingHelper._setNodeTouched(svgNodeHash);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
const newPolyLine = document.createElementNS(svgns, 'polyline');
|
|
45
|
+
(0, _setNewAttributesIfValid_1.default)(attributes, newPolyLine);
|
|
46
|
+
svgDrawingHelper._appendNode(newPolyLine, svgNodeHash);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.default = drawPolyline;
|
|
50
|
+
//# sourceMappingURL=drawPolyline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawPolyline.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawPolyline.ts"],"names":[],"mappings":";;;;;AACA,0DAAkC;AAClC,0FAAkE;AAClE,4FAAoE;AAQpE,SAAwB,YAAY,CAClC,gBAAqB,EACrB,aAAqB,EACrB,WAAmB,EACnB,MAAsB,EACtB,OAMC;IAED,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QACrB,OAAO;KACR;IAED,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC,MAAM,CACzD;QACE,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,GAAG;QACV,SAAS,EAAE,SAAS;QACpB,QAAQ,EAAE,SAAS;QACnB,kBAAkB,EAAE,KAAK;KAC1B,EACD,OAAO,CACR,CAAC;IAGF,MAAM,WAAW,GAAG,SAAS,IAAI,KAAK,CAAC;IAEvC,MAAM,KAAK,GAAG,4BAA4B,CAAC;IAC3C,MAAM,WAAW,GAAG,IAAA,kBAAQ,EAAC,aAAa,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;IACrE,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAEnE,IAAI,eAAe,GAAG,EAAE,CAAC;IAEzB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE;QAC1B,eAAe,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;KAChD;IAED,IAAI,OAAO,CAAC,kBAAkB,EAAE;QAC9B,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;QAE7B,eAAe,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;KACzD;IAED,MAAM,UAAU,GAAG;QACjB,MAAM,EAAE,eAAe;QACvB,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,MAAM;QACZ,cAAc,EAAE,WAAW;QAC3B,kBAAkB,EAAE,QAAQ;KAC7B,CAAC;IAEF,IAAI,gBAAgB,EAAE;QAEpB,IAAA,mCAAyB,EAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;QAExD,gBAAgB,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;KAC/C;SAAM;QACL,MAAM,WAAW,GAAG,QAAQ,CAAC,eAAe,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QAEhE,IAAA,kCAAwB,EAAC,UAAU,EAAE,WAAW,CAAC,CAAC;QAElD,gBAAgB,CAAC,WAAW,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;KACxD;AACH,CAAC;AAnED,+BAmEC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
export default function drawRect(svgDrawingHelper: any,
|
|
2
|
+
export default function drawRect(svgDrawingHelper: any, annotationUID: string, rectangleUID: string, start: Types.Point2, end: Types.Point2, options?: {}): void;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const _getHash_1 = __importDefault(require("./_getHash"));
|
|
7
7
|
const _setAttributesIfNecessary_1 = __importDefault(require("./_setAttributesIfNecessary"));
|
|
8
8
|
const _setNewAttributesIfValid_1 = __importDefault(require("./_setNewAttributesIfValid"));
|
|
9
|
-
function drawRect(svgDrawingHelper,
|
|
9
|
+
function drawRect(svgDrawingHelper, annotationUID, rectangleUID, start, end, options = {}) {
|
|
10
10
|
const { color, width: _width, lineWidth, lineDash, } = Object.assign({
|
|
11
11
|
color: 'dodgerblue',
|
|
12
12
|
width: '2',
|
|
@@ -15,7 +15,7 @@ function drawRect(svgDrawingHelper, toolName, annotationUID, rectangleUID, start
|
|
|
15
15
|
}, options);
|
|
16
16
|
const strokeWidth = lineWidth || _width;
|
|
17
17
|
const svgns = 'http://www.w3.org/2000/svg';
|
|
18
|
-
const svgNodeHash = (0, _getHash_1.default)(
|
|
18
|
+
const svgNodeHash = (0, _getHash_1.default)(annotationUID, 'rect', rectangleUID);
|
|
19
19
|
const existingRect = svgDrawingHelper._getSvgNode(svgNodeHash);
|
|
20
20
|
const tlhc = [Math.min(start[0], end[0]), Math.min(start[1], end[1])];
|
|
21
21
|
const width = Math.abs(start[0] - end[0]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawRect.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawRect.ts"],"names":[],"mappings":";;;;;AAEA,0DAAkC;AAClC,4FAAoE;AACpE,0FAAkE;AAGlE,SAAwB,QAAQ,CAC9B,gBAAqB,EACrB,
|
|
1
|
+
{"version":3,"file":"drawRect.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawRect.ts"],"names":[],"mappings":";;;;;AAEA,0DAAkC;AAClC,4FAAoE;AACpE,0FAAkE;AAGlE,SAAwB,QAAQ,CAC9B,gBAAqB,EACrB,aAAqB,EACrB,YAAoB,EACpB,KAAmB,EACnB,GAAiB,EACjB,OAAO,GAAG,EAAE;IAEZ,MAAM,EACJ,KAAK,EACL,KAAK,EAAE,MAAM,EACb,SAAS,EACT,QAAQ,GACT,GAAG,MAAM,CAAC,MAAM,CACf;QACE,KAAK,EAAE,YAAY;QACnB,KAAK,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C;SAAM;QACL,MAAM,cAAc,GAAG,QAAQ,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAE/D,IAAA,kCAAwB,EAAC,UAAU,EAAE,cAAc,CAAC,CAAC;QAErD,gBAAgB,CAAC,WAAW,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;KAC3D;AACH,CAAC;AAxDD,2BAwDC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
declare function drawTextBox(svgDrawingHelper: Record<string, unknown>,
|
|
2
|
+
declare function drawTextBox(svgDrawingHelper: Record<string, unknown>, annotationUID: string, textUID: string, textLines: Array<string>, position: Types.Point2, options?: {}): SVGRect;
|
|
3
3
|
export default drawTextBox;
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const _getHash_1 = __importDefault(require("./_getHash"));
|
|
7
7
|
const _setAttributesIfNecessary_1 = __importDefault(require("./_setAttributesIfNecessary"));
|
|
8
|
-
function drawTextBox(svgDrawingHelper,
|
|
8
|
+
function drawTextBox(svgDrawingHelper, annotationUID, textUID, textLines, position, options = {}) {
|
|
9
9
|
const mergedOptions = Object.assign({
|
|
10
10
|
fontFamily: 'Helvetica, Arial, sans-serif',
|
|
11
11
|
fontSize: '14px',
|
|
@@ -15,15 +15,15 @@ function drawTextBox(svgDrawingHelper, toolName, annotationUID, textUID, textLin
|
|
|
15
15
|
centerX: false,
|
|
16
16
|
centerY: true,
|
|
17
17
|
}, options);
|
|
18
|
-
const textGroupBoundingBox = _drawTextGroup(svgDrawingHelper,
|
|
18
|
+
const textGroupBoundingBox = _drawTextGroup(svgDrawingHelper, annotationUID, textUID, textLines, position, mergedOptions);
|
|
19
19
|
return textGroupBoundingBox;
|
|
20
20
|
}
|
|
21
|
-
function _drawTextGroup(svgDrawingHelper,
|
|
21
|
+
function _drawTextGroup(svgDrawingHelper, annotationUID, textUID, textLines, position, options) {
|
|
22
22
|
const { padding, color, fontFamily, fontSize, background } = options;
|
|
23
23
|
let textGroupBoundingBox;
|
|
24
24
|
const [x, y] = [position[0] + padding, position[1] + padding];
|
|
25
25
|
const svgns = 'http://www.w3.org/2000/svg';
|
|
26
|
-
const svgNodeHash = (0, _getHash_1.default)(
|
|
26
|
+
const svgNodeHash = (0, _getHash_1.default)(annotationUID, 'text', textUID);
|
|
27
27
|
const existingTextGroup = svgDrawingHelper._getSvgNode(svgNodeHash);
|
|
28
28
|
if (existingTextGroup) {
|
|
29
29
|
const textElement = existingTextGroup.querySelector('text');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawTextBox.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawTextBox.ts"],"names":[],"mappings":";;;;;AAEA,0DAAkC;AAClC,4FAAoE;AAUpE,SAAS,WAAW,CAClB,gBAAyC,EACzC,
|
|
1
|
+
{"version":3,"file":"drawTextBox.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawTextBox.ts"],"names":[],"mappings":";;;;;AAEA,0DAAkC;AAClC,4FAAoE;AAUpE,SAAS,WAAW,CAClB,gBAAyC,EACzC,aAAqB,EACrB,OAAe,EACf,SAAwB,EACxB,QAAsB,EACtB,OAAO,GAAG,EAAE;IAEZ,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CACjC;QACE,UAAU,EAAE,8BAA8B;QAC1C,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,kBAAkB;QACzB,UAAU,EAAE,EAAE;QACd,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,IAAI;KACd,EACD,OAAO,CACR,CAAC;IAGF,MAAM,oBAAoB,GAAG,cAAc,CACzC,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,SAAS,EACT,QAAQ,EACR,aAAa,CACd,CAAC;IAEF,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAED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AC,OAAO,EAAE,CAAC;KACxB;IAGD,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,GAAG,QAAQ,CAAC,eAAe,CAAC,4BAA4B,EAAE,MAAM,CAAC,CAAC;QACzE,OAAO,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAC5C,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;KAC/C;IAGD,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC;IAE7B,MAAM,UAAU,GAAG;QACjB,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE;QACd,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE;QACd,KAAK,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE;QACtB,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE;QACxB,IAAI,EAAE,KAAK;KACZ,CAAC;IAEF,IAAA,mCAAyB,EAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAE/C,OAAO,IAAI,CAAC;AACd,CAAC;AAED,kBAAe,WAAW,CAAC"}
|
|
@@ -3,7 +3,9 @@ import drawCircle from './drawCircle';
|
|
|
3
3
|
import drawEllipse from './drawEllipse';
|
|
4
4
|
import drawHandles from './drawHandles';
|
|
5
5
|
import drawLine from './drawLine';
|
|
6
|
+
import drawPolyline from './drawPolyline';
|
|
6
7
|
import drawLinkedTextBox from './drawLinkedTextBox';
|
|
7
8
|
import drawRect from './drawRect';
|
|
8
9
|
import drawTextBox from './drawTextBox';
|
|
9
|
-
|
|
10
|
+
import drawArrow from './drawArrow';
|
|
11
|
+
export { draw, drawCircle, drawEllipse, drawHandles, drawLine, drawPolyline, drawLinkedTextBox, drawRect, drawTextBox, drawArrow, };
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.drawTextBox = exports.drawRect = exports.drawLinkedTextBox = exports.drawLine = exports.drawHandles = exports.drawEllipse = exports.drawCircle = exports.draw = void 0;
|
|
6
|
+
exports.drawArrow = exports.drawTextBox = exports.drawRect = exports.drawLinkedTextBox = exports.drawPolyline = exports.drawLine = exports.drawHandles = exports.drawEllipse = exports.drawCircle = exports.draw = void 0;
|
|
7
7
|
const draw_1 = __importDefault(require("./draw"));
|
|
8
8
|
exports.draw = draw_1.default;
|
|
9
9
|
const drawCircle_1 = __importDefault(require("./drawCircle"));
|
|
@@ -14,10 +14,14 @@ const drawHandles_1 = __importDefault(require("./drawHandles"));
|
|
|
14
14
|
exports.drawHandles = drawHandles_1.default;
|
|
15
15
|
const drawLine_1 = __importDefault(require("./drawLine"));
|
|
16
16
|
exports.drawLine = drawLine_1.default;
|
|
17
|
+
const drawPolyline_1 = __importDefault(require("./drawPolyline"));
|
|
18
|
+
exports.drawPolyline = drawPolyline_1.default;
|
|
17
19
|
const drawLinkedTextBox_1 = __importDefault(require("./drawLinkedTextBox"));
|
|
18
20
|
exports.drawLinkedTextBox = drawLinkedTextBox_1.default;
|
|
19
21
|
const drawRect_1 = __importDefault(require("./drawRect"));
|
|
20
22
|
exports.drawRect = drawRect_1.default;
|
|
21
23
|
const drawTextBox_1 = __importDefault(require("./drawTextBox"));
|
|
22
24
|
exports.drawTextBox = drawTextBox_1.default;
|
|
25
|
+
const drawArrow_1 = __importDefault(require("./drawArrow"));
|
|
26
|
+
exports.drawArrow = drawArrow_1.default;
|
|
23
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/drawingSvg/index.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/drawingSvg/index.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAYxB,eAZK,cAAI,CAYL;AAXN,8DAAsC;AAYpC,qBAZK,oBAAU,CAYL;AAXZ,gEAAwC;AAYtC,sBAZK,qBAAW,CAYL;AAXb,gEAAwC;AAYtC,sBAZK,qBAAW,CAYL;AAXb,0DAAkC;AAYhC,mBAZK,kBAAQ,CAYL;AAXV,kEAA0C;AAYxC,uBAZK,sBAAY,CAYL;AAXd,4EAAoD;AAYlD,4BAZK,2BAAiB,CAYL;AAXnB,0DAAkC;AAYhC,mBAZK,kBAAQ,CAYL;AAXV,gEAAwC;AAYtC,sBAZK,qBAAW,CAYL;AAXb,4DAAoC;AAYlC,oBAZK,mBAAS,CAYL"}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ import * as cursors from './cursors';
|
|
|
8
8
|
import * as Types from './types';
|
|
9
9
|
import * as annotation from './stateManagement/annotation';
|
|
10
10
|
import * as segmentation from './stateManagement/segmentation';
|
|
11
|
-
import { BaseTool, AnnotationTool, PanTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, CrosshairsTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, SegmentationDisplayTool, BrushTool } from './tools';
|
|
11
|
+
import { BaseTool, AnnotationTool, PanTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, CrosshairsTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, SegmentationDisplayTool, BrushTool } from './tools';
|
|
12
12
|
import * as Enums from './enums';
|
|
13
|
-
export { init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, PanTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, CrosshairsTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, synchronizers, Synchronizer, SynchronizerManager, Types, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, };
|
|
13
|
+
export { init, destroy, addTool, removeTool, cancelActiveManipulations, BaseTool, AnnotationTool, PanTool, WindowLevelTool, ZoomTool, StackScrollTool, StackScrollMouseWheelTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, CrosshairsTool, ProbeTool, RectangleROITool, EllipticalROITool, BidirectionalTool, PlanarFreehandROITool, ArrowAnnotateTool, SegmentationDisplayTool, RectangleScissorsTool, CircleScissorsTool, SphereScissorsTool, RectangleROIThresholdTool, RectangleROIStartEndThresholdTool, BrushTool, synchronizers, Synchronizer, SynchronizerManager, Types, ToolGroupManager, Enums, CONSTANTS, drawing, annotation, segmentation, utilities, cursors, };
|
package/dist/cjs/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.cursors = exports.utilities = exports.segmentation = exports.annotation = exports.drawing = exports.CONSTANTS = exports.Enums = exports.ToolGroupManager = exports.Types = exports.SynchronizerManager = exports.Synchronizer = exports.synchronizers = exports.BrushTool = exports.RectangleROIStartEndThresholdTool = exports.RectangleROIThresholdTool = exports.SphereScissorsTool = exports.CircleScissorsTool = exports.RectangleScissorsTool = exports.SegmentationDisplayTool = exports.BidirectionalTool = exports.EllipticalROITool = exports.RectangleROITool = exports.ProbeTool = exports.CrosshairsTool = exports.LengthTool = exports.MIPJumpToClickTool = exports.VolumeRotateMouseWheelTool = exports.StackScrollMouseWheelTool = exports.StackScrollTool = exports.ZoomTool = exports.WindowLevelTool = exports.PanTool = exports.AnnotationTool = exports.BaseTool = exports.cancelActiveManipulations = exports.removeTool = exports.addTool = exports.destroy = exports.init = void 0;
|
|
22
|
+
exports.cursors = exports.utilities = exports.segmentation = exports.annotation = exports.drawing = exports.CONSTANTS = exports.Enums = exports.ToolGroupManager = exports.Types = exports.SynchronizerManager = exports.Synchronizer = exports.synchronizers = exports.BrushTool = exports.RectangleROIStartEndThresholdTool = exports.RectangleROIThresholdTool = exports.SphereScissorsTool = exports.CircleScissorsTool = exports.RectangleScissorsTool = exports.SegmentationDisplayTool = exports.ArrowAnnotateTool = exports.PlanarFreehandROITool = exports.BidirectionalTool = exports.EllipticalROITool = exports.RectangleROITool = exports.ProbeTool = exports.CrosshairsTool = exports.LengthTool = exports.MIPJumpToClickTool = exports.VolumeRotateMouseWheelTool = exports.StackScrollMouseWheelTool = exports.StackScrollTool = exports.ZoomTool = exports.WindowLevelTool = exports.PanTool = exports.AnnotationTool = exports.BaseTool = exports.cancelActiveManipulations = exports.removeTool = exports.addTool = exports.destroy = exports.init = void 0;
|
|
23
23
|
const init_1 = require("./init");
|
|
24
24
|
Object.defineProperty(exports, "init", { enumerable: true, get: function () { return init_1.init; } });
|
|
25
25
|
Object.defineProperty(exports, "destroy", { enumerable: true, get: function () { return init_1.destroy; } });
|
|
@@ -61,6 +61,8 @@ Object.defineProperty(exports, "ProbeTool", { enumerable: true, get: function ()
|
|
|
61
61
|
Object.defineProperty(exports, "RectangleROITool", { enumerable: true, get: function () { return tools_1.RectangleROITool; } });
|
|
62
62
|
Object.defineProperty(exports, "EllipticalROITool", { enumerable: true, get: function () { return tools_1.EllipticalROITool; } });
|
|
63
63
|
Object.defineProperty(exports, "BidirectionalTool", { enumerable: true, get: function () { return tools_1.BidirectionalTool; } });
|
|
64
|
+
Object.defineProperty(exports, "PlanarFreehandROITool", { enumerable: true, get: function () { return tools_1.PlanarFreehandROITool; } });
|
|
65
|
+
Object.defineProperty(exports, "ArrowAnnotateTool", { enumerable: true, get: function () { return tools_1.ArrowAnnotateTool; } });
|
|
64
66
|
Object.defineProperty(exports, "CrosshairsTool", { enumerable: true, get: function () { return tools_1.CrosshairsTool; } });
|
|
65
67
|
Object.defineProperty(exports, "RectangleScissorsTool", { enumerable: true, get: function () { return tools_1.RectangleScissorsTool; } });
|
|
66
68
|
Object.defineProperty(exports, "CircleScissorsTool", { enumerable: true, get: function () { return tools_1.CircleScissorsTool; } });
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAuC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAuC;AAoDrC,qFApDO,WAAI,OAoDP;AACJ,wFArDa,cAAO,OAqDb;AApDT,mCAOiB;AA8Cf,wFApDA,eAAO,OAoDA;AACP,2FApDA,kBAAU,OAoDA;AAqCV,iGAxFA,wBAAgB,OAwFA;AAHhB,oGApFA,2BAAmB,OAoFA;AADnB,6FAlFA,oBAAY,OAkFA;AAhCZ,0GAjDA,iCAAyB,OAiDA;AA9C3B,uDAAyC;AAsFvC,8BAAS;AAnFX,+DAAiD;AA0E/C,sCAAa;AAzEf,sDAAwC;AAoFtC,0BAAO;AAnFT,uDAAyC;AAyFvC,8BAAS;AAxFX,mDAAqC;AAyFnC,0BAAO;AAxFT,+CAAiC;AAyE/B,sBAAK;AAxEP,yEAA2D;AAkFzD,gCAAU;AAjFZ,6EAA+D;AAmF7D,oCAAY;AAjFd,mCAyBiB;AAYf,yFApCA,gBAAQ,OAoCA;AACR,+FApCA,sBAAc,OAoCA;AAEd,wFArCA,eAAO,OAqCA;AACP,gGArCA,uBAAe,OAqCA;AACf,yFArCA,gBAAQ,OAqCA;AACR,gGArCA,uBAAe,OAqCA;AACf,0GArCA,iCAAyB,OAqCA;AACzB,2GArCA,kCAA0B,OAqCA;AAC1B,mGArCA,0BAAkB,OAqCA;AAElB,2FAtCA,kBAAU,OAsCA;AAEV,0FAvCA,iBAAS,OAuCA;AACT,iGAvCA,wBAAgB,OAuCA;AAChB,kGAvCA,yBAAiB,OAuCA;AACjB,kGAvCA,yBAAiB,OAuCA;AACjB,sGAvCA,6BAAqB,OAuCA;AACrB,kGAvCA,yBAAiB,OAuCA;AANjB,+FAhCA,sBAAc,OAgCA;AAUd,sGAzCA,6BAAqB,OAyCA;AACrB,mGAzCA,0BAAkB,OAyCA;AAClB,mGAzCA,0BAAkB,OAyCA;AAClB,0GAzCA,iCAAyB,OAyCA;AACzB,kHAzCA,yCAAiC,OAyCA;AANjC,wGAlCA,+BAAuB,OAkCA;AAOvB,0FAxCA,iBAAS,OAwCA;AArCX,+CAAiC;AA8C/B,sBAAK"}
|
|
@@ -6,7 +6,7 @@ const enums_1 = require("../../../enums");
|
|
|
6
6
|
core_1.Settings.getDefaultSettings().set('tool.style', {
|
|
7
7
|
color: 'rgb(255, 255, 0)',
|
|
8
8
|
colorHighlighted: 'rgb(0, 255, 0)',
|
|
9
|
-
colorSelected: 'rgb(0,
|
|
9
|
+
colorSelected: 'rgb(0, 220, 0)',
|
|
10
10
|
colorLocked: 'rgb(255, 255, 0)',
|
|
11
11
|
lineWidth: '1',
|
|
12
12
|
lineDash: '',
|