Open Lestropie opened 4 years ago
To include in this:
Add command-line option -freesurfer
where a path to a FreeSurfer subject directory / BIDS Derivatives directory can be provided that will be utilised for 5TT image creation and/or for accessing / generating parcellation.
Greetings Rob, the 5ttgen hsvs option has been integral to our present analysis :) Therefore, I am wondering if this has been integrated into the mrtrix3_connectome container as an option (I only see 5ttgen fsl in the code). If this would be relatively simple to implement, I can think about submitting a PR?
Cheers, Brian
Hi Brian,
No idea when I'll find time to do this; my many other obligations continue to take precedence.
It wouldn't be the friendliest change to make. I've turned the code in this tool into a bit of a monster: in part I use it as an exemplar of the kind of analysis complexity that can be achieved using the MRtrix3 Python API---which includes being a single stand-alone file that can be executed outside of a container environment as long as you have all of the requisite dependencies---but this makes the code quite difficult to navigate. Am very much open to contributions; this is more of a pre-emptive "I told you so" :-P
What would be needed is:
A command-line option to elect to use 5ttgen fsl
instead of 5ttgen hsvs
(since the latter is not applicable in all circumstances);
Detect whether or not a FreeSurfer recon-all
run is necessary, based on both selection of parcellation and whether 5ttgen hsvs
is to be used;
Detect whether a pre-existing FreeSurfer recon-all
output already exists for the subject being processed based on new command-line option -freesurfer
(and the code should be compatible with the user providing the root BIDS Derivatives directory, the freesurfer sub-directory within that, or the individual subject sub-directory within that);
If such data are necessary, but are not pre-existing, run recon-all
internally';
Execute the relevant 5ttgen
algorithm (for which the requisite input data differs, and in the case of 5ttgen hsvs
, the location of the data may differ, i.e. it may be inside the scratch directory or at the user-specified location).
A preferable addition would be:
recon-all
output is provided via command-line option -freesurfer
, but those data do not include execution of the hippocampal subfields & amygdala segmentation module, then duplicate the requisite data from that recon-all
execution into the scratch directory, and run that module internally, prior to 5ttgen hsvs
.With code like this the hard part is making sure the code path is correct for all possible usages, rather than just your own specific usage. But if you want to give it a go, go for it, and I can review / amend.
Cheers Rob
MRtrix3/mrtrix3#1935
Ideally provide a
-freesurfer
command-line option that can provide the location of FreeSurfer pre-generated outputs, e.g. fromfmriprep
, or runrecon_all
internally if necessary.