Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to HSVS parcellation #74

Open
Lestropie opened this issue Apr 24, 2020 · 3 comments
Open

Move to HSVS parcellation #74

Lestropie opened this issue Apr 24, 2020 · 3 comments

Comments

@Lestropie
Copy link
Collaborator

MRtrix3/mrtrix3#1935

Ideally provide a -freesurfer command-line option that can provide the location of FreeSurfer pre-generated outputs, e.g. from fmriprep, or run recon_all internally if necessary.

@Lestropie
Copy link
Collaborator Author

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.

@bwinsto2
Copy link

bwinsto2 commented Aug 6, 2021

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

@Lestropie
Copy link
Collaborator Author

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:

  • If a FreeSurfer 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants