sdcflows icon indicating copy to clipboard operation
sdcflows copied to clipboard

Make suffixes and datatypes configurable, if possible

Open tsalo opened this issue 9 months ago • 3 comments

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

tsalo avatar Nov 15 '23 15:11 tsalo

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.

effigies avatar Nov 15 '23 15:11 effigies

Once I get ASLPrep working with my branch of SDCFlows, I'll be able to open a PR.

tsalo avatar Nov 20 '23 17:11 tsalo

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).

oesteban avatar Nov 28 '23 09:11 oesteban