sdcflows
sdcflows copied to clipboard
Make suffixes and datatypes configurable, if possible
What would you like to see added in this software?
I am trying to replace an internal, outdated copy of SDCFlows in ASLPrep with the current version. However, since asl
and m0scan
are not supported suffixes for PEPOLAR or fieldmap-less distortion correction, I cannot use SDCFlows as a dependency without making changes to the codebase, getting those changes merged in, and getting a new release minted.
It seems like this restriction could be alleviated if suffixes and datatypes could be configured outside of the functions and classes.
Do you have any interest in helping implement the feature?
Yes
Additional information / screenshots
For example, there's a constant in sdcflows.fieldmaps
called MODALITIES
that I could override with a context manager when I use FieldmapFile
in ASLPrep:
https://github.com/nipreps/sdcflows/blob/8ca72803b10f2114482029d06680f4a48215cc6a/sdcflows/fieldmaps.py#L54-L68
However, FieldmapFile
then has suffixes hardcoded throughout, so, even if I modified MODALITIES
it still wouldn't recognize the suffixes I need. For example:
https://github.com/nipreps/sdcflows/blob/8ca72803b10f2114482029d06680f4a48215cc6a/sdcflows/fieldmaps.py#L243-L248
Sounds completely reasonable. I think it will be worth sitting down and thinking through the API at some point, but it does not sound like this will significantly modify our API right now, so full steam ahead.
Once I get ASLPrep working with my branch of SDCFlows, I'll be able to open a PR.
This would be worth bringing up in a TechMon meeting.
@tsalo - the next one will be focused on multi-echo fMRIPrep, but we may have some time for this (at least comment it out so it reaches beyond those who read this issue).