Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dwigradcheck: Enhancements #2902

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Conversation

Lestropie
Copy link
Member

Am currently in the process of generating data & analyses for verifying the handling of DWI metadata, both raw and derivative, both slice / phase encoding and gradient table (especially with the pesky bvec esoterics). Am aiming particularly for resolution of #2477 and for verifying correct interpretation of subsequently derived diffusion model fibre orientations in https://github.com/bids-standard/bids-bep016.

A known limitation of the original implementation of dwigradcheck is that it considered exclusively axis permutations and flips. It failed to consider the prospect of a historically common misunderstanding where a user believed dw_scheme and bvec/bvals to be merely transposes of one another, and would therefore apply that operation erroneously. Here I've finally gotten around to addressing this. In retrospect it was not the most crucial of enhancements for me to put effort into, given that the dataset I'm working with always has image axes aligned with the scanner axes, but it was nevertheless annoying that the command was doing twice as much work as it needed to in that case. Plus I wanted to have the command emit a non-zero return code if it considers the input gradient table to be incorrect, as this allows me to use it for automated verification of metadata handling.

Previously, alterations to the gradient table were evaluated exclusively based on axis permutations and flips, in either the real / scanner space or bvec basis. With this change, the command can additionally consider the prospect where the gradient table has been erroneously interpreted as containing coefficients in one basis when in fact those values should have been interpreted in the other basis. This error can be in addition to possible axis permutations and/or flips in one of the two bases.
Further, the command will now yield a non-zero return code if it is determined to be likely that the input gradient table is inappropriate.
Copy link

clang-tidy review says "All clean, LGTM! 👍"

@dchristiaens
Copy link
Member

I presume the title should say "dwigradcheck" instead of "dwishellmath"?

@Lestropie Lestropie changed the title dwishellmath: Enhancements dwigradcheck: Enhancements May 13, 2024
@Lestropie
Copy link
Member Author

🤦‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants