Installing Infant FreeSurfer

Infant FreeSurfer is a tool for conducting surface-based morphometry on infant structural MRI scans. It is based off of the FreeSurfer software, but is adapted for use with infant brains.

To install Infant FreeSurfer, you must first request the download here: http://freesurfer.net/fswiki/infantFS

You will receive the download link in an email with instructions. It may take a few days to get this email, so plan your analyses accordingly.

The instructions for installation provided on the download website and in the email are straightforward if you have the dependent softwares already installed. Specifically, you will need to install DRAMMS, and in order to install DRAMMS, you will need to install cmake.

A note on PICASSO: The instructions for installation tell you to also install PICASSO. You can find PICASSO on NITRC (https://www.nitrc.org/projects/picasso/) but there is no download link anywhere on this NITRC site. I attempted (with no success) to contact Dr. Ou to get the download. Luckily, you can run Infant FreeSurfer without PICASSO, you just need to use the –masked command and specify a skull stripped brain. I used FSL’s BET command to skull strip the brain and then manually edited it before adding it to Infant FreeSurfer. I will explain that process in another post.

Installing cmake: To install cmake, visit https://cmake.org and download the latest version. Once you download it, follow the ReadMe.txt instructions. For a Mac or Linux, you will open a terminal window within the cmake folder and type ./bootstrap && make && sudo make install If you have trouble, try using sudo in front of all the commands sudo ./bootstrap && sudo make && sudo make install Also, make sure you are inside the cmake folder that you just downloaded. ./bootstrap will not work if you try from outside of the cmake folder

Once it has installed, type cmake just to make sure it works. If you see “command not found,” try installing again using sudo ./bootstrap && sudo make && sudo make install If you see information about using the cmake command, this means you have successfully installed it and can now use it to install DRAMMS.

Installing DRAMMS: To install DRAMMS, visit https://www.nitrc.org/projects/dramms/ and download the latest version. There is a manual available here: https://www.cbica.upenn.edu/sbia/software/dramms/_downloads/DRAMMS_Software_Manual.pdf

You also need to have FSL installed in order to install DRAMMS. In the manual, it states that you need to have NiftiClub, Basis, and FastPD installed as well, but those will be automatically installed when you install DRAMMS, so you don’t need to download them separately. Once you download DRAMMS, open a terminal window inside the dramms/build folder.

On a Mac, you can type ccmake . to open the cmake-gui. From here, you will see a list of settings. Press enter until you find “cmake_install_prefix”. Change this location to the location where you would like to install dramms (possibly your home directory or somewhere where you aren’t likely to accidentally delete it). Then type c until you see the option to type g. Once you have typed g you will be back to the terminal window where you can type make This should install DRAMMS.

On a Linux computer, the instructions may be a bit different. I was unable to use ccmake . on my Linux computer. Instead, I found that typing cmake -i to pull up a list of settings. This is where I could change the “cmake_install_prefix” to my desired location. Then, I typed make and DRAMMS installed. I did run into some issues installing NiftiClub, Basis, and FastPD this way. When I got an error message about being unable to install those softwares, I followed the link provided in the error message, and downloaded the appropriate file into dramms/build/bundle. Then I typed make again to try to install it again. I believe I had to do this three times in order to install all three softwares.

Once you have installed DRAMMS on your Mac or Linux computer, move into the directory where you installed dramms, then into the bin folder, and type dramms This should give you some instructions on using dramms. If not, you may see an error message that says “command not found.” If that is the case, try typing the entire path to dramms/bin/dramms (e.g., ~/Documents/dramms/bin/dramms). If that still does not work, try installing DRAMMS again.

Finally, you will be able to install Infant FreeSurfer. Simply unzip it, make sure you are in a csh/tcsh terminal window, and type source set_babydev_packages.csh; setenv SUBJECTS_DIR your_data_path

You need to also add a path to DRAMMS (e.g., setenv DRAMMSDIR $FREESURFER_HOME/dramms; setenv PATH ${DRAMMSDIR}/bin:${PATH})

Test our your installation using infant_recon_all –s SUBJ –age age_in_months –masked masked_input_image Make sure you have a subject’s data in the SUBJECTS_DIR within a folder for that subject. You should create that folder according to the basic FreeSurfer mksubjdirs command (https://surfer.nmr.mgh.harvard.edu/fswiki/BasicReconstruction). For the masked image, specify a skull-stripped image for that subject. You will need to type the path to that image, even if it is inside the subject’s directory.

If you get an error message about templates or about DRAMMS, you should check that your dramms path is correct by typing dramms into the same terminal window. If you get “command not found,” try to find dramms inside the bin directory of your dramms folder and set the path to that location. If that doesn’t work, try reinstalling dramms. Depending on where you set your dramms directory, you may need additional privileges to access it, so you may wish to move or install it in another directory that you have more access to.

As you can see, installing Infant FreeSurfer is a process if you don’t have cmake and DRAMMS already installed on your computer. The instructions available online for downloading DRAMMS are not exactly correct when you need to install on a Linux machine (i.e., if you cannot use ccmake .), so I had to get creative to install it correctly. DRAMMS was created by Dr. Ou, who also created PICASSO – I was unable to get in touch with him to find out how to install PICASSO, so I did not attempt to reach out for help with installing DRAMMS. Luckily, I found some creative solutions online, and I hope that this post will save others some time and headache when it comes to installing Infant FreeSurfer.

2 thoughts on “Installing Infant FreeSurfer

Leave a reply to Mercedes Cancel reply