Skip to content

dwifslpreproc: Changes to slice timing handling#1937

Merged
Lestropie merged 1 commit intodevfrom
dwifslpreproc_slice_timing
Feb 19, 2020
Merged

dwifslpreproc: Changes to slice timing handling#1937
Lestropie merged 1 commit intodevfrom
dwifslpreproc_slice_timing

Conversation

@Lestropie
Copy link
Member

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 into dev. Currently dwifslpreproc fails on dev when 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.

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 Lestropie merged commit 4f17253 into dev Feb 19, 2020
@Lestropie Lestropie deleted the dwifslpreproc_slice_timing branch February 19, 2020 23:59
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.
Lestropie added a commit that referenced this pull request Mar 20, 2020
Erroneous merge in #1937 failed to account for parallel changes in Python API (#1449).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant