-
-
Notifications
You must be signed in to change notification settings - Fork 670
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
BUG: Fix incorrect reading of MINC2 files, convert RAS coordinates to LPS #4864
base: master
Are you sure you want to change the base?
BUG: Fix incorrect reading of MINC2 files, convert RAS coordinates to LPS #4864
Conversation
TODO:
|
0b2f6bc
to
23f65ad
Compare
I'd be interested to try this in our app when you think it's in shape... |
I'll try to make changes.... |
https://github.com/vfonov/ITK/commits/MINC_IMAGE_RAS_LPS_VF/ - here is my work in progress, i am going to add tests for all the new cases... |
Would any of the enums enums for the AnatomicalOrientaion PR be useful here? I am seeing a lot of LPS and RAS terms in this PR which can be little ambiguous. At lease the public interface of "RAS_to_LPS" the setter getter could be clarified and be make unambiguous. |
What would make it less ambiguous? |
OK, How do i push my changes here from https://github.com/vfonov/ITK/tree/MINC_IMAGE_RAS_LPS ? |
Pushing to Gabriel's branch should work:
The above assumes that the you have created your
should have the desired effect. If you run into trouble, you can start a fresh branch (assuming you rename your local
|
|
@gdevenyi should be able to grant permissions to push to his ITK fork on GitHub, which should fix the issue. |
I have invited @vfonov |
So |
This newly merged class should provide some documentation to better describe the coordinate changes in an unambiguous fashion: https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Common/include/itkAnatomicalOrientation.h |
so, where does this new class apply in the proposed change? |
Please document what you mean by RAS in the unambiguous terminology described in that class. |
So, it's a documentation question - i.e I should updated documentation of the MINC reader Module? |
@gdevenyi - can you make changes requested by @blowekamp ? I do not understand what's required here. |
8529adf
to
c170e0f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this @gdevenyi. An in-line style comment.
c170e0f
to
5a46692
Compare
@blowekamp I have enhanced and rewritten the various comments and notes to better match the OrientFilter's language. |
Great. Thank you for the clarity. |
Sorry, @vfonov whatever I did during the rebasing has lost you as author. Not sure how to fix that... |
Commit messages do not comply with the ITK standards: Also, can this commit 9ecb71c be squashed and (its commit message removed) into 5a46692, please? |
9ecb71c
to
ce82048
Compare
I cannot satisfy both the request of @blowekamp for sufficent detail regarding this change and your request for single-line commit messages, as I will just violate the line length limit instead. What do you suggest?
Done. |
Yes, you can. Commit message subjects should be under 72 chars (although KWstyle seems to be more permissive in practice), and should briefly describe the change or proposed fix. The immediate next line should be empty, and the rationale for the change, bug and proposed fix should be in the commit message body: Although many people disregard having a proper commit message body, it allows to explain the rationale of a change, the underlying issue, if any, and the proposed fix (including why other possibilities, if any, were discarded), and hence, it is essential to review a PR, and when inspecting history. Thanks Gabriel. |
ce82048
to
a8811a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some style-related comments. There is a conflict that needs to be resolved since the code base has undergone some extensive style-related changes in the meantime.
While at it, stick to the commit message conventions: use sentence case (capitalize first letter), finish commit message BODY explanation with a period.
@vfonov @gdevenyi It is my understanding that this PR has conflicts due to all the recent activity. Thank you for the contribution and maintaining MINC for ITK. Can I help updating the PR, and trying to address some of these style issues? Also, I think we should do this change in 2 steps. This first is adding the LPS as an option preserving compatibility. And is a second PR, change the default? Maybe introduce an environment variable for this setting too? Let me know if I can help make changes to get this PR through. |
Yes please. I would very much appreciate the help. This contribution to ITK has been 6 years in the making with the original technical solution remaining unchanged. I'm a generalist and ITK is a C++-expert level codebase, I'm a monkey at a typewriter here trying to keep up with the high churn and level of abstraction that this codebase demands. The complexity along with the serial reviews have made it very difficult. I would very much appreciate any help you can offer. |
So, I don't understand - what needs to be done right now. Do we neeed:
|
Yes, I thin that is a summary of what needs to be done. I am also going to separate the change in behavior for another PR, to make review easier. I am going to start working on update the PR branch. |
Glad to see this work. Again, when it's in better shape, I'll give it a try in our app, which has various tests of its own that might exercise some of this. |
convert MINC PositiveCoordinateOrientation RAS coordinates to ITK PositiveCoordinateOrientation LPS coordinates during reading and writing
convert MINC PositiveCoordinateOrientation RAS coordinate system to ITK PositiveCoordinateOrientation LPS
a8811a0
to
d051e5f
Compare
I have updated the PR. For now I removed the CMake option, and have kept the behavior the same as it was. This can be changed in another PR. Is it useful to still write with the the corrected coordinates? I am thinking that the correct cordinates should always be written no, and the flag is used then loading. The "RAStoLPS" flag was not immediately clear to be what it did. Perhaps something line "ApplyCoordiateConversionForITK" would be more descriptive? Also is there meta-data written in the transform to indicate that coordinates have been corrected? |
Replaces #147
PR Checklist
Refer to the ITK Software Guide for
further development details if necessary.