Skip to content

Fix spatial shift in polygon-to-mask conversion#9

Open
skaliy wants to merge 1 commit intommiv-center:mainfrom
skaliy:main
Open

Fix spatial shift in polygon-to-mask conversion#9
skaliy wants to merge 1 commit intommiv-center:mainfrom
skaliy:main

Conversation

@skaliy
Copy link
Copy Markdown
Collaborator

@skaliy skaliy commented Jan 13, 2026

No description provided.

int y = static_cast<int>(std::round(storage[storageIdx].coords[j + 1]));
// limit the coordinates in pixel to the bounding box
if (x < 0)
x = 0;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It is unclear how this will change the apparent issue of moved masks. The change in pr2mask.cxx should have no effect as storage coordinates returned from PACS are already in integers. They are converted to bounding box coordinates in line 1047. Shouldn't there be a change afterwards if its to fix the issue?

The change in the scanline conversion should introduce an issue at the endpoints of polygons. This could have an effect. Has this been tested?

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