dwifslpreproc: Changes to slice timing handling#1937
Merged
Conversation
Extracted changes from #1735 in order to apply to dev. In dwifslpreproc, perform a robust parsing of slice timing information from the image header. During DICOM import, separate slice timings by space rather than comma; although the results of JSON export should be the same following #1771 / #1843, use of space delimiter for vector data is more consistent with other multi-dimensional data handling in image headers.
Lestropie
added a commit
that referenced
this pull request
Mar 12, 2020
- Revert slice timing write to image header to use comma delimiter rather than space; this is necessary as parsing of header entries for JSON export is done via MR::parse_floats(), which only considers commas and colons. This was done correctly in 4870c12 / #1175, but erroneously changed to space in 518b053 / #1937. - When reading slice times from Siemens CSA header, do not perform conversion from ms to s using floating-point multiplication. Instead, convert (0.1ms) to integer, then to string, and then insert the decimal point manually. This prevents the creation of erroneously long text strings in the slice timing header field due to limited floating-point precision.
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.
Extracted changes from #1735 in order to apply to dev. In dwifslpreproc, perform a robust parsing of slice timing information from the image header.
During DICOM import, separate slice timings by space rather than comma; although the results of JSON export should be the same following #1771 / #1843, use of space delimiter for vector data is more consistent with other multi-dimensional data handling in image headers.
While #1735 was closed in part because it was targeted at
master, I think that the changes there should nevertheless have been brought intodev. Currentlydwifslpreprocfails ondevwhen utilising S2V due to this line having been tailored for erroneous slice timing data import. Rather than just fix that, might as well bring in the rest of the stuff I did in #1735, which should enable processing of retrospective data where the slice timing is erroneously a list-of-lists.