RFC: Fix NRRD output axis order#356
Merged
hjmjohnson merged 2 commits intoBRAINSia:masterfrom Nov 29, 2017
Merged
Conversation
Member
|
@ihnorton Thank you very much for doing this testing. I will test as soon as I can. |
Member
|
Tests run and passed. |
Member
|
@ihnorton Thanks for your support. Code confirmed. |
Collaborator
Author
|
Thanks! |
slicerbot
pushed a commit
to Slicer/SlicerGitSVNArchive
that referenced
this pull request
Dec 5, 2017
Thanks: Isaiah Norton <inorton@bwh.harvard.edu> References: * BRAINSia/BRAINSTools#356 * https://discourse.slicer.org/t/dti-nifti-data-import-via-dwi-convert-module/1460/4 List of changes: $ git shortlog 42ac3c3..c1289e6 --no-merges Hans J. Johnson (1): ENH: Need to add allowLossy for file types other than short. Isaiah Norton (2): BUG: ITK is row-major; fix NRRD output with mismatched (x,y) axis sizes BUG: FSL converter should check reader status git-svn-id: http://svn.slicer.org/Slicer4/trunk@26676 3bd1e089-480b-0410-8dfb-8563597acbee
jcfr
added a commit
to Slicer/SlicerGitSVNArchive
that referenced
this pull request
Dec 20, 2017
Thanks: Isaiah Norton <inorton@bwh.harvard.edu> References: * BRAINSia/BRAINSTools#356 * https://discourse.slicer.org/t/dti-nifti-data-import-via-dwi-convert-module/1460/4 List of changes: $ git shortlog 42ac3c3..c1289e6 --no-merges Hans J. Johnson (1): ENH: Need to add allowLossy for file types other than short. Isaiah Norton (2): BUG: ITK is row-major; fix NRRD output with mismatched (x,y) axis sizes BUG: FSL converter should check reader status git-svn-id: http://svn.slicer.org/Slicer4/branches/Slicer-4-8@26767 3bd1e089-480b-0410-8dfb-8563597acbee
jcfr
added a commit
to jcfr/SlicerGitSVNArchive
that referenced
this pull request
Jan 18, 2018
Thanks: Isaiah Norton <inorton@bwh.harvard.edu> References: * BRAINSia/BRAINSTools#356 * https://discourse.slicer.org/t/dti-nifti-data-import-via-dwi-convert-module/1460/4 List of changes: $ git shortlog 42ac3c3..c1289e6 --no-merges Hans J. Johnson (1): ENH: Need to add allowLossy for file types other than short. Isaiah Norton (2): BUG: ITK is row-major; fix NRRD output with mismatched (x,y) axis sizes BUG: FSL converter should check reader status git-svn-id: http://svn.slicer.org/Slicer4/trunk@26676 3bd1e089-480b-0410-8dfb-8563597acbee
jcfr
added a commit
to Slicer/Slicer
that referenced
this pull request
Mar 13, 2020
Thanks: Isaiah Norton <inorton@bwh.harvard.edu> References: * BRAINSia/BRAINSTools#356 * https://discourse.slicer.org/t/dti-nifti-data-import-via-dwi-convert-module/1460/4 List of changes: $ git shortlog 42ac3c3..c1289e6 --no-merges Hans J. Johnson (1): ENH: Need to add allowLossy for file types other than short. Isaiah Norton (2): BUG: ITK is row-major; fix NRRD output with mismatched (x,y) axis sizes BUG: FSL converter should check reader status svn-url: http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=26767 git-svn-id: http://svn.slicer.org/Slicer4/branches/Slicer-4-8@26767 3bd1e089-480b-0410-8dfb-8563597acbee
jcfr
added a commit
to NA-MIC/svn.slicer.org-Slicer4
that referenced
this pull request
Dec 22, 2022
Thanks: Isaiah Norton <inorton@bwh.harvard.edu> References: * BRAINSia/BRAINSTools#356 * https://discourse.slicer.org/t/dti-nifti-data-import-via-dwi-convert-module/1460/4 List of changes: $ git shortlog 42ac3c3..c1289e6 --no-merges Hans J. Johnson (1): ENH: Need to add allowLossy for file types other than short. Isaiah Norton (2): BUG: ITK is row-major; fix NRRD output with mismatched (x,y) axis sizes BUG: FSL converter should check reader status git-svn-id: http://svn.slicer.org/Slicer4/branches/Slicer-4-8@26767 3bd1e089-480b-0410-8dfb-8563597acbee
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOTE: small change -- but please review very carefully and see note below
This turned out to be a little more involved than the pixel precision mismatch I initially suspected: NRRD output size axes appear to be swapped relative to ITK row-major array storage (and have been back at least 5 years or so). In practice, this only matters when x and y axis dimensions are different -- as they happen to be in this particular dataset I was sent after a Slicer forum post.
Input nifti dimensions: 173 207 173 143
Output nrrd - before:
sizes: 207 173 173 143Output nrrd - after:
sizes: 173 207 173 143Apparently such an acquisition is relatively rare, though I'm still surprised this could have persisted for so long. As such, despite fixing read of this particular dataset, there's a chance I missed some underlying assumption elsewhere in the code. So, please review carefully and run the test suite if possible before merging. I'm not set up to run it myself right now, but if needed I can set it up to run on our cluster if it can't otherwise be run.