From 7353f7f069446f8484278c2cff5b09149cfa23eb Mon Sep 17 00:00:00 2001 From: Joeycho Date: Thu, 17 Oct 2024 15:39:48 +0200 Subject: [PATCH] fix(sr): load existing point, if there is 2nd point in renderableData (Fix rotation in arrow annotation) (#4356) --- .../cornerstone-dicom-sr/src/tools/DICOMSRDisplayTool.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/extensions/cornerstone-dicom-sr/src/tools/DICOMSRDisplayTool.ts b/extensions/cornerstone-dicom-sr/src/tools/DICOMSRDisplayTool.ts index 99679d5e8..60d1c4714 100644 --- a/extensions/cornerstone-dicom-sr/src/tools/DICOMSRDisplayTool.ts +++ b/extensions/cornerstone-dicom-sr/src/tools/DICOMSRDisplayTool.ts @@ -230,7 +230,11 @@ export default class DICOMSRDisplayTool extends AnnotationTool { // This gives us one point for arrow canvasCoordinates.push(viewport.worldToCanvas(point)); - // We get the other point for the arrow by using the image size + if (data[1] !== undefined) { + canvasCoordinates.push(viewport.worldToCanvas(data[1])); + } + else{ + // We get the other point for the arrow by using the image size const imagePixelModule = metaData.get('imagePixelModule', referencedImageId); let xOffset = 10; @@ -249,6 +253,9 @@ export default class DICOMSRDisplayTool extends AnnotationTool { ]); canvasCoordinates.push(viewport.worldToCanvas(arrowEnd)); + + } + const arrowUID = `${index}`;