dwifslpreproc & mrcat: Strides fix #2806
Draft
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.
Traced issue back to here, which ties all the way back to #1541.
Was trying to diagnose an issue with improper correction of susceptibility distortions, and this is the first issue I came across (which unfortunately for me is likely not the only issue...).
applytopup
was doing absolutely nothing to the input data, meaning that theeddy
brain mask was aligned with the distorted data, whereas the whole intention of usingapplytopup
is to produce a processing mask that approximates where the brain will be at completion of processing. It turns out that this is becausedwifslpreproc
was tellingapplytopup
that the phase encoding directions were "k
" and "k-
", and presumably internallyapplytopup
is deeming this unacceptable and either zeroing out that component of the phase encoding vectors or just code branching to a straight copy-input-to-output. Unfortunately it doesn't provide any indication of this at the terminal.The stride manipulation within
concatenate<vector<Header>>()
seems to have been outright incorrect, so I don't think that it should cause any problems, but before merging I might make the same change ondev
and run the additional PNG tests in #2713 just to make sure it doesn't have any unintended consequences (existing CI should cover anything else).