Skip to content

Commit 43cc291

Browse files
committed
chore: convert angle in ellipse from rad to degrees
1 parent 9a7e5be commit 43cc291

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/roi/Roi.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
FeretDiameter,
1313
} from '../maskAnalysis';
1414
import { getAngle } from '../maskAnalysis/utils/getAngle';
15+
import { toDegrees } from '../utils/geometry/angles';
1516
import { Point } from '../utils/geometry/points';
1617

1718
import { RoiMap } from './RoiMapManager';
@@ -743,12 +744,12 @@ function getEllipse(roi: Roi, scale: number): Ellipse {
743744
majorAxis: {
744745
points: [majorAxisPoint1, majorAxisPoint2],
745746
length: majorLength,
746-
angle: getAngle(majorAxisPoint1, majorAxisPoint2),
747+
angle: toDegrees(getAngle(majorAxisPoint1, majorAxisPoint2)),
747748
},
748749
minorAxis: {
749750
points: [minorAxisPoint1, minorAxisPoint1],
750751
length: minorLength,
751-
angle: getAngle(minorAxisPoint1, minorAxisPoint2),
752+
angle: toDegrees(getAngle(minorAxisPoint1, minorAxisPoint2)),
752753
},
753754
surface: ellipseSurface,
754755
};

0 commit comments

Comments
 (0)