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

BUG: Fix incorrect reading of MINC2 files, convert RAS coordinates to LPS #4864

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

gdevenyi
Copy link
Contributor

@gdevenyi gdevenyi commented Sep 27, 2024

Replaces #147

PR Checklist

  • No API changes were made (or the changes have been approved)
  • No major design changes were made (or the changes have been approved)
  • Added test (or behavior not changed)
  • Updated API documentation (or API not changed)
  • Added license to new files (if any)
  • Added Python wrapping to new files (if any) as described in ITK Software Guide Section 9.5
  • Added ITK examples for all new major features (if any)

Refer to the ITK Software Guide for
further development details if necessary.

@github-actions github-actions bot added type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances area:IO Issues affecting the IO module labels Sep 27, 2024
@gdevenyi
Copy link
Contributor Author

gdevenyi commented Sep 27, 2024

TODO:

  • port TransformMINC fixes
  • add tests
    • read in MINC file, read in NIFTI file, confirm identical with internal representation
  • wrap in some kind of ITK legacy warning

@seanm
Copy link
Contributor

seanm commented Oct 8, 2024

I'd be interested to try this in our app when you think it's in shape...

@vfonov
Copy link
Contributor

vfonov commented Oct 9, 2024

I'll try to make changes....

@vfonov
Copy link
Contributor

vfonov commented Oct 18, 2024

TODO:

  • port TransformMINC fixes

  • add tests

    • read in MINC file, read in NIFTI file, confirm identical with internal representation
  • wrap in some kind of ITK legacy warning

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...

@blowekamp
Copy link
Member

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.

@vfonov
Copy link
Contributor

vfonov commented Oct 21, 2024

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?

@vfonov
Copy link
Contributor

vfonov commented Oct 22, 2024

OK, How do i push my changes here from https://github.com/vfonov/ITK/tree/MINC_IMAGE_RAS_LPS ?

@jhlegarreta
Copy link
Member

Pushing to Gabriel's branch should work:

git push gdevenyi MINC_IMAGE_RAS_LPS

The above assumes that the you have created your MINC_IMAGE_RAS_LPS branch from gdevenyi's branch. If not, I believe

git remote add gdevenyi https://github.com/gdevenyi/ITK.git
git fetch gdevenyi
git checkout MINC_IMAGE_RAS_LPS
git branch -u gdevenyi/MINC_IMAGE_RAS_LPS
git push gdevenyi MINC_IMAGE_RAS_LPS

should have the desired effect. If you run into trouble, you can start a fresh branch (assuming you rename your local MINC_IMAGE_RAS_LPS to something else to avoid issues) and cherry-pick your commit:

git remote add gdevenyi https://github.com/gdevenyi/ITK.git
git fetch gdevenyi
git checkout -b gdevenyi MINC_IMAGE_RAS_LPS
git cherry-pick 7688f522b685eb4ace0b9753f0bbf145fd6389bb
git push gdevenyi MINC_IMAGE_RAS_LPS

@vfonov
Copy link
Contributor

vfonov commented Oct 22, 2024

git push gdevenyi MINC_IMAGE_RAS_LPS

ERROR: Permission to gdevenyi/ITK.git denied to vfonov.

@jhlegarreta
Copy link
Member

ERROR: Permission to gdevenyi/ITK.git denied to vfonov.

@gdevenyi should be able to grant permissions to push to his ITK fork on GitHub, which should fix the issue.

@gdevenyi
Copy link
Contributor Author

I have invited @vfonov

@github-actions github-actions bot added type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct labels Oct 22, 2024
@vfonov
Copy link
Contributor

vfonov commented Oct 23, 2024

So itkSPSAOptimizerTest fails on Windows, do we need to do anything about that?

@blowekamp
Copy link
Member

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

@vfonov
Copy link
Contributor

vfonov commented Oct 23, 2024

so, where does this new class apply in the proposed change?

@blowekamp
Copy link
Member

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.

@vfonov
Copy link
Contributor

vfonov commented Oct 23, 2024

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?

@vfonov
Copy link
Contributor

vfonov commented Oct 23, 2024

@gdevenyi - can you make changes requested by @blowekamp ? I do not understand what's required here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:IO Issues affecting the IO module type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants