Skip to content

Conversation

@Lestropie
Copy link
Member

@Lestropie Lestropie commented Aug 5, 2025

Initial work on resolving #3142. Committing to GitHub so that I can run testing on another system.

  • Make sure that all dwifslpreproc tests (which don't get run as part of CI) pass.
  • Double-check all testing logs (dwifslpreproc and everything else) for any excess of warning messages.

- renamed phaseencoding.save() to phaseencoding.save_table() to disambiguate from FSL topup format.
- dwifslpreproc: Do not attempt to write FSL eddy format phase encoding data from a piped image; force write of a NIfTI image here, even if it is somewhat redundant.
- Docs: More description on ambiguity between phase encoding "table" and FSL topup format phase encoding file.
- On inability to merge diffusion gradient tables, issue message at info level rather than warning.
- Suppress warning message on inability to modify phase encoding ifnromation to match image realignment tinformation only occur if such phase encoding information is both present and otherwise not explicitly flagged as being no longer valid.
- For import / export of phase encoding information in external metadata files alongside different image formats, issue warning-level messages rather than exceptions, and do so across the full spectrum of potentially erroneous usages.
- Docs: Full section in phase encoding handling page on the distinction between "table" and "topup" formats.
Because the section of code responsible for running FSL applytopupup now makes use of a temporary NIfTI image, diffusion and phase encoding data are absent. This resulted in failure of the subsequent dwi2mask call. Here the diffusion gradient table and other header key-value metadata are explicitly tracked for each individual volume group defined by phase encoding, so that they can be later suitably combined during image concatenation.
Additionally fixes typo in dwifslpreproc test added in #2722.
With up-to-date FSL, it appears that not only "standard_space_roi" depends on Unix command "dc", but also "bet".
Lestropie added a commit that referenced this pull request Aug 13, 2025
Tests observed to fail on MacOS in #3146.
Lestropie added a commit that referenced this pull request Aug 13, 2025
Tests observed to fail on MacOS in #3146.
@Lestropie Lestropie marked this pull request as ready for review August 13, 2025 03:39
@Lestropie Lestropie requested a review from a team August 13, 2025 03:39
@Lestropie
Copy link
Member Author

Ready for review. Have checked test logs for erroneous error messages. Python command tests pass with the exception of some 5ttgen calls that are off by one voxel presumably due to FSL changes.

Copy link
Member

@bjeurissen bjeurissen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on the workshop single-subject data and appears to fix the issue.

@Lestropie Lestropie added this pull request to the merge queue Aug 25, 2025
Merged via the queue into master with commit 39ef6e6 Aug 25, 2025
5 checks passed
@Lestropie Lestropie deleted the fix_pehandling_307 branch August 25, 2025 04:10
@jdtournier jdtournier mentioned this pull request Oct 20, 2025
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.

3 participants