@cornerstonejs/tools 3.21.0 → 3.22.0
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.
|
@@ -78,6 +78,7 @@ class SplineROITool extends ContourSegmentationBaseTool {
|
|
|
78
78
|
},
|
|
79
79
|
type: SplineTypesEnum.CatmullRom,
|
|
80
80
|
drawPreviewEnabled: true,
|
|
81
|
+
enableTwoPointPreview: false,
|
|
81
82
|
lastControlPointDeletionKeys: ['Backspace', 'Delete'],
|
|
82
83
|
},
|
|
83
84
|
actions: {
|
|
@@ -626,16 +627,28 @@ class SplineROITool extends ContourSegmentationBaseTool {
|
|
|
626
627
|
});
|
|
627
628
|
}
|
|
628
629
|
if (drawPreviewEnabled &&
|
|
629
|
-
spline.numControlPoints
|
|
630
|
+
spline.numControlPoints >= 1 &&
|
|
630
631
|
this.editData?.lastCanvasPoint &&
|
|
631
632
|
!spline.closed) {
|
|
632
633
|
const { lastCanvasPoint } = this.editData;
|
|
633
|
-
const
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
634
|
+
const { enableTwoPointPreview } = this.configuration.spline;
|
|
635
|
+
if (spline.numControlPoints === 1 && enableTwoPointPreview) {
|
|
636
|
+
const firstPoint = canvasCoordinates[0];
|
|
637
|
+
const previewPolylinePoints = [firstPoint, lastCanvasPoint];
|
|
638
|
+
drawPolylineSvg(svgDrawingHelper, annotationUID, 'previewSplineChange', previewPolylinePoints, {
|
|
639
|
+
color: '#9EA0CA',
|
|
640
|
+
lineDash: lineDash,
|
|
641
|
+
lineWidth: 1,
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
else if (spline.numControlPoints > 1) {
|
|
645
|
+
const previewPolylinePoints = spline.getPreviewPolylinePoints(lastCanvasPoint, SPLINE_CLICK_CLOSE_CURVE_DIST);
|
|
646
|
+
drawPolylineSvg(svgDrawingHelper, annotationUID, 'previewSplineChange', previewPolylinePoints, {
|
|
647
|
+
color: '#9EA0CA',
|
|
648
|
+
lineDash: lineDash,
|
|
649
|
+
lineWidth: 1,
|
|
650
|
+
});
|
|
651
|
+
}
|
|
639
652
|
}
|
|
640
653
|
if (splineConfig.showControlPointsConnectors) {
|
|
641
654
|
const controlPointsConnectors = [...canvasCoordinates];
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "3.
|
|
1
|
+
export declare const version = "3.22.0";
|
package/dist/esm/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '3.
|
|
1
|
+
export const version = '3.22.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/tools",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.22.0",
|
|
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.
|
|
111
|
+
"@cornerstonejs/core": "^3.22.0",
|
|
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": "eae87d19be6d8bcdb00fa14fc747ab61ede54e1e"
|
|
131
131
|
}
|