fix(sr): load existing point, if there is 2nd point in renderableData (Fix rotation in arrow annotation) (#4356)

This commit is contained in:
Joeycho 2024-10-17 15:39:48 +02:00 committed by GitHub
parent 3dd0666c0c
commit 7353f7f069
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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}`;