UNFmontreal/Dcm2Bids

Need Ability to Configure dcm2niix Search Depth

wasciutto opened this issue · 4 comments

I've been dealing with DICOM data recently that is in a folder structure deeper than the default provided by dcm2niix (5). Rather than restructure the data, which needs to stay how it is to sync properly with its source, I would much rather be able to just set the search depth higher than 5. This can be configured with dcm2niix's -d argument. However, I could not see a way to pass custom arguments through dcm2bids to dcm2niix.

Unless there is another way to do this that I didn't see, I think adding an option to dcm2bids that allows the user to set a custom search depth would be very helpful.

I could also see a case for adding a more general argument that allows the user to pass a string of arbitrary additional arguments for dcm2niix, much like how the static DEFAULT.dcm2niixOptions is used.

I have proposed a solution via #192

Ok, I just found this: https://unfmontreal.github.io/Dcm2Bids/docs/how-to/use-advanced-commands/#dcm2niixoptions

Which seems to provide what I was looking for. The main difference here is that this seems to overwrite the dcm2niix options rather than adding to them.

So basically I would have to add this to my config file: "dcm2niixOptions": "-b y -ba y -z y -f '%3s_%f_%p_%t' -d 9"

This will work, but I do have to copy everything up to -d 9 just to change one option. Still worth some consideration of allowing user to append to dcm2niix options rather than overwrite?

Hi @wasciutto ,

Did you try this feature ?
https://unfmontreal.github.io/Dcm2Bids/docs/how-to/use-advanced-commands/#dcm2niixoptions

Seems to be exactly what you were looking for.

Yes, that will work, thanks!