Differences between revisions 30 and 31
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
'''Code''': Click [[https://martinos.org/lab/lcn/resources/infant_fs_download|here]] to request. '''Code''': Click [[https://lcn.martinos.org/infant-freesurfer-request/|here]] to request.

DOWNLOAD

Code: Click here to request.

  • We have an experimental docker release image as well, so if you are interested in that one, please, make sure to indicate that! (Note, we cannot download FSL in the docker container because their new install process requires signing up or using an FSL license, so you will have to install it on your end.)

Cite:

** Updates 01/12/2021:

We have a new version of the pipeline available that was built against 7.1.1 dev with the below main feature updates:

  • allows start from own segmentation --segfile (currently assumes FS labeling standards)
  • if own segmentation is provided a masked input image is also expected unless --forceskullstrip is used
  • new eTIV computation -- currently turned automatically on for all infants < 12mo age

    • (recomputed model / scaling factor using infants -- full wiki explanation is coming)
  • --ccseg option is available: adds CC label estimation to the final aseg
  • updated thalamus labels for final segmentations (atlas still has the old set of labels)
  • --intnormFSL: offers option to do intensity normalization using fslmaths
  • --cleanup is by default turned on (no tmp dirctory should be present when completed)
  • --gmwm2 is default (force to choose at least one training subject has a GMWM segmentation), does not need to be set
  • --stats is by default set -- computing aseg stats automatically
  • --inputfile can be used to specify the full path to the input volume (default: $SUBJECTS_DIR/$subj/mprage.nii.gz)

A couple of other things

  • You may try the --newborn flag (it automatically grabs all the 5 newborns from the set) instead of estimating the 4 closest ones by age (--age and --kneigh flags in this case are not required)
  • use --force to overwrite all previously computed results
  • with the --segfile option --kneigh is superfluous (age is needed for eTIV correct computations)

** Updates 02/10/2020:

a new version of the infant pipeline has been created for your use. See below for details about the new features.

  • In this release, we are not relying on the PICASSO skullstripping code any more. The new skullstripping tool is fully integrated into the pipeline so no new toolbox needs to be downloaded. Note, the new tool requires about 23GB of memory! At present, the error messages related to lack of sufficient memory are pretty vague, so please, check whether you have enough if you rely on this tool. Also "Your CPU supports instructions that this TensorFlow binary was not compiled to use" is just a warning not an error. It indicates that the process could be faster if you built with a more modern tensorflow, but the computations should be working even with this version.

  • Instead of DRAMMS, the pipeline now used niftyreg (https://sourceforge.net/p/niftyreg), by default, for nonlinear registration. This gets shipped with the pipeline. If you would like to use DRAMMS, there is a flag to enable that, but you will have to install DRAMMS on your own first.

  • The pipeline was packaged with the dev version of the FreeSurfer libraries.

  • The pipeline relies on python 3.6 (and this is shipped with the release). Tensorflow is already enabled.
  • Just like previously, you will still need install FSL [https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation].

EXECUTION

The most basic command line that you can run in order to execute the pipeline is the following.

setenv SUBJECTS_DIR your_data_path      ** OR **    export SUBJECTS_DIR=your_data_path

Make sure that your_data_path is the *absolute* path to your data!

infant_recon_all --s SUBJ --age age_in_months

You can run this release from both tcsh or bash.

Just like before, the script will expect the input file to be located at $SUBJECTS_DIR/$subj/mprage.nii.gz or $SUBJECTS_DIR/$subj/mprage.mgz by default. If the --masked flag is used, we recommend also running intensity normalization. One example would be using

mri_nu_correct.mni --i $infile --o $nufile --n 2


** Below are Notes from the original release **

Current skullstripping code: PICASSO -- need to get it independently, from NITRC. With questions related to this tool, contact Dr Ou ( yangming.ou@childrens.harvard.edu ).

EXECUTION

source set_babydev_packages.csh

setenv SUBJECTS_DIR your_data_path

infant_recon_all --s SUBJ --age age_in_months

Note, run everything from tcsh. Bash scripts are not yet ready for this distribution.

Before execution, you will need install FSL [https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation] and dramms [www.nitrc.org].

The script will expect the input file to be located at $SUBJECTS_DIR/$subj/mprage.nii.gz or $SUBJECTS_DIR/$subj/mprage.mgz by default. If the --masked flag is used, we recommend also running intensity normalization using

mri_nu_correct.mni --i $infile --o $nufile --n 2

Other useful flags:

--masked (using a skullstripped input)

--outdir (redirecting output)

--kneigh (number of training examples to use)

See infant_recon_all --help for more information

NOTES Currently, aparc is provided for sake of completeness, but has not been fully validated. It is a projected version of the adult atlas, so it does not originate from the infant training data set!

FAQs (02/18/2022)

Q: Can we use infantFS for data acquired on 1.5T?

A: Yes, the pipeline can be applied to that data.

Q: Can we rename/reorganize the input file for Infant FS recon all?

A: infantFS expects the input file to be called mprage.nii.gz. If one does not want to rename the original data file, symlinks can be used instead.

Q: What is unit for Age input for infant recon all?

A: The age-at-scan input is expected in months.

Q: What does the Aparc flag do?

A: The --aparc flag will produce cortical parcellations (along with full brain segmentations).

Q: How is –gmwm2 flag used?

A: The --gmwm2 flag would be used to make sure that the GM/WM information is definitely propagated from the training subjects to the test subject. In the most recent version of the code, this option is on by default. If you use an older version of the pipeline, there are scenarios where this might not happen since some of the training subjects do not have a GM/WM separation.

Q: Thalamus region is missing from the aseg stat export. How to fix it?

A: The older pipeline labels thalamus with a label value different from the currently expected one (48 for right thalamus and 9 for left thalamus). The following commands can be run to switch the old labels to the new ones. After this is done, you will need to rerun the stats file generation.

  • mri_binarize --i aseg.mgz --replace 48 49 --replace 9 10 --o aseg.corrected.mgz

    rm aseg.mgz

    ln -s aseg.corrected.mgz aseg.mgz

Q: Can –bigventricle flag be used for infant recon_all?

A: There is no –bigventricle flag in infantFS

Q: Brainstem seems to be split into multiple sub-regions, is it possible to get the entire brainstem volume in the aseg stat export?

A: In order to do so, the brainstem labels of interest would need to first be merged by the user and the stats be generated by running a separate command.

Q: Is corpus callosum out of the Infant FreeSurfer atlases?

A: The Corpus Callosum is a part of the aseg segmentation in the most recent version of the tools.

Q: Is it possible to get the mean cortical thickness for the labels you are providing?

A: The mean cortical thickness for the labels can be found in surface stats files.

Q: Can recon-all be used for pediatric subjects?

A: The (adult) recon all pipeline uses an adult atlas a reference. It has been used in the past by expert users for pediatric subjects down to 4.5 years of age (Ghosh, S.S. et al, 2010). Below this age running the (adult) recon pipeline is not recommended. A better option is to use the infant_recon pipeline.

For LCN Faculty/staff, this information is also documented here: Please refer to this site/make edits here for the most updated information: https://partnershealthcare.sharepoint.com/sites/LCN/SitePages/Infant-FreeSurfer.aspx

infantFS (last edited 2022-12-05 12:13:59 by LillaZollei)