Skip to content

Commit

Permalink
fix(PlanarFreehandROITool) Issue 1297 - PlanarFreehandROITool decimat…
Browse files Browse the repository at this point in the history
…e configuration parameter not working on annotation update (#1298)
  • Loading branch information
kom482 authored Jun 5, 2024
1 parent 05eaed3 commit d0e9e2e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -452,14 +452,22 @@ function completeClosedContourEdit(element: HTMLDivElement) {
)
: fusedCanvasPoints;

const decimateConfig = this.configuration?.decimate || {};

updateContourPolyline(
annotation,
{
points: updatedPoints,
closed: true,
targetWindingDirection: ContourWindingDirection.Clockwise,
},
viewport
viewport,
{
decimate: {
enabled: !!decimateConfig.enabled,
epsilon: decimateConfig.epsilon,
},
}
);

// If any manual update, triggered on an annotation, then it will be treated as non-autogenerated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,13 +562,21 @@ function completeOpenContourEdit(element: HTMLDivElement) {
)
: fusedCanvasPoints;

const decimateConfig = this.configuration?.decimate || {};

updateContourPolyline(
annotation,
{
points: updatedPoints,
closed: false,
},
viewport
viewport,
{
decimate: {
enabled: !!decimateConfig.enabled,
epsilon: decimateConfig.epsilon,
},
}
);

const worldPoints = annotation.data.contour.polyline;
Expand Down

0 comments on commit d0e9e2e

Please sign in to comment.