Skip to content

BUG: Fix regression in PolygonSpatialObject::IsInsideInObjectSpace#2453

Merged
dzenanz merged 1 commit intoInsightSoftwareConsortium:releasefrom
dzenanz:PolygonSpatalObjectRegression-fix
Mar 29, 2021
Merged

BUG: Fix regression in PolygonSpatialObject::IsInsideInObjectSpace#2453
dzenanz merged 1 commit intoInsightSoftwareConsortium:releasefrom
dzenanz:PolygonSpatalObjectRegression-fix

Conversation

@dzenanz
Copy link
Copy Markdown
Member

@dzenanz dzenanz commented Mar 29, 2021

This is a slightly cleaned-up clone of #2422.

This is a followup to the bugfix for issue InsightSoftwareConsortium#1082 where there was a
regression in the code on determining the inside/outsideness of points.

There are some cases where the algorithm still fails as there are two
boundary checks in the code which should be identical.
1. Test on adjacent segment pairs from start to finish
2. Test on segment pair from finish point to start point on closed
   polygons.

The previous bugfix fixed the code in item 1, but did not update the
check (which should be identical in item 2).

This should address this issue making both boundary on segments the same.
@dzenanz dzenanz force-pushed the PolygonSpatalObjectRegression-fix branch from f4dda67 to e3bf8e9 Compare March 29, 2021 15:26
@dzenanz
Copy link
Copy Markdown
Member Author

dzenanz commented Mar 29, 2021

Force-push sets the intensity difference tolerance to zero (from default two) to make sure the test fails without the fix. If default inside value of 255 was used, this would not have been necessary. If someone doesn't mind making the change and regenerating the test baseline they are welcome to update my branch.

Copy link
Copy Markdown
Member

@jhlegarreta jhlegarreta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the commit could be drawn from the master branch once it gets merged? (not sure how the sync is handled when it is required)

@dzenanz
Copy link
Copy Markdown
Member Author

dzenanz commented Mar 29, 2021

This commit merges cleanly into master, as PR #2454 shows.

@jhlegarreta jhlegarreta self-requested a review March 29, 2021 15:38
@dzenanz
Copy link
Copy Markdown
Member Author

dzenanz commented Mar 29, 2021

The failures are unrelated. Merging.

@dzenanz dzenanz merged commit b48e6e9 into InsightSoftwareConsortium:release Mar 29, 2021
@dzenanz dzenanz deleted the PolygonSpatalObjectRegression-fix branch March 29, 2021 20:21
hjmjohnson pushed a commit to hjmjohnson/ITK that referenced this pull request May 6, 2026
…nSpatalObjectRegression-fix

BUG: Fix regression in PolygonSpatialObject::IsInsideInObjectSpace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants