Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimpleITK LabelShapeStatisticsFilter GetOrientedBoundingBox Coordinates Appear Incorrect #1128

Open
kevinalexbrown opened this issue Jul 31, 2019 · 1 comment

Comments

@kevinalexbrown
Copy link

commented Jul 31, 2019

@blowekamp asked me to submit this issue.

Vertices produced by sitk.LabelShapeStatisticsFilter()'s GetOrientedBoundingBoxVertices() are properly in real-world coordinates of the label image only after applying a rotation.

Here is a minimal example that reproduces and solves the issue: https://gist.github.com/kevinalexbrown/d2474bc8245f9aa36af64fcc7c52e8f1

@blowekamp

This comment has been minimized.

Copy link
Member

commented Jul 31, 2019

Thanks for reporting the issue. I looked at the ITK code: https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Filtering/LabelMap/include/itkShapeLabelObject.h#L565-L598

The code clearly does not take into consideration the directions matrix for orientation when generating the vertices list.

I am not sure of the current method should be corrected so that the vertices are in physical space, or if a new method should be created with the corrected coordinates. It's not clear to me if or if not the current implementation would be useful and be producing the correct results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.