Open Lestropie opened 9 months ago
Same argument can be made for dwinormalise group
.
Not strictly requisite, but would possibly make sense to do together: Extensive use of pathlib
throughout population_template
. Think I may have mentioned this somewhere, but not finding it immediately. This would include removing mrtrix3.path.all_in_dir()
.
As part of #2678 I will have to do a decent amount of refactoring of
population_template
.One thing that came up while this was simmering in my mind is the fundamental nature of the interface. Originally it took an input directory as input, and optionally
-mask
would provide another input directory containing mask images. Now with multi-contrast registration it can take multiple directories as inputs. This means there's a whole lot of cross-checking to make sure that files with identical names are present across all of these input directories.This contrasts against the statistical inference commands, where inputs are text files that contain filesystem paths to images. (I say plural "inputs" deliberately, as with
-column
option one specifies the same form of information as the primary input exploratory variable data)Would transitioning
population_template
to a text-file-based input make sense? If so now might be an appropriate time to do it.There would still be a potential ambiguity in terms of whether the paths within such a text file are absolute paths / relative to the text file / relative to the working directory, similar to what happens with inference command inputs. But conversely it would mean that eg. if someone generates all derivatives for a participant within a participant-specific directory, they would no longer need to construct dummy input directories containing softlinks to the data, they could just construct these text files. Correspondence between input & mask / multiple contrast inputs would be explicit based on the position within the file, rather than having to match file names.