Skip to content

Commit

Permalink
fix(arrow-adapter): save 2nd point for arrow annotation (#1450)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joeycho authored Oct 31, 2024
1 parent 1a1d3b8 commit d66a905
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/adapters/src/adapters/Cornerstone3D/ArrowAnnotate.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,28 @@ class ArrowAnnotate {
const { points, arrowFirst } = data.handles;

let point;
let point2;

if (arrowFirst) {
point = points[0];
point2 = points[1];
} else {
point = points[1];
point2 = points[0];
}

const pointImage = worldToImageCoords(referencedImageId, point);
const pointImage2 = worldToImageCoords(referencedImageId, point2);

const TID300RepresentationArguments = {
points: [
{
x: pointImage[0],
y: pointImage[1]
},
{
x: pointImage2[0],
y: pointImage2[1]
}
],
trackingIdentifierTextValue,
Expand Down

0 comments on commit d66a905

Please sign in to comment.