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

Add tolerance to gradient table mismatch on header merge #3015

Closed
Lestropie opened this issue Oct 2, 2024 · 0 comments · May be fixed by #3027
Closed

Add tolerance to gradient table mismatch on header merge #3015

Lestropie opened this issue Oct 2, 2024 · 0 comments · May be fixed by #3027
Assignees
Labels

Comments

@Lestropie
Copy link
Member

When running a third party script, I found that for some subjects the gradient table was being dropped where one would expect it to be preserved. This turned out to be happening in an mrcalc call, due to an inconsequential imprecision. One input image had separate gradient table handling via text files, whereas the other was entirely MRtrix3 handling.

Within Header::merge_keyval(), there is already special handling of slice timing vectors where there may be some imprecision between two data paths but the merged header should preserv that information. The same should happen for a gradient table: as long as dw_scheme is close enough between two headers, the resulting merged header should preserve the gradient table; they shouldn't have to be string-equivalent.

@Lestropie Lestropie added the bug label Oct 2, 2024
Lestropie added a commit that referenced this issue Oct 22, 2024
This prevents the diffusion gradient table from being discarded when merging the key-value contents of two image headers (eg. mrcalc, mrmath) due to inconsequential differences in their string representations from floating-point imprecision.
Closes #3015.
@Lestropie Lestropie self-assigned this Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant