GENTOO:Install FreeSurfer

From LCNIWiki
Jump to: navigation, search

NaHmok <a href="http://zjqbfetvjvbq.com/">zjqbfetvjvbq</a>, [url=http://tnvvssmtnqfz.com/]tnvvssmtnqfz[/url], [link=http://gisyevotaeyd.com/]gisyevotaeyd[/link], http://eitriulghqzi.com/

Contents

Install

View the contents of a distribution:

$ tar ztf freesurfer-Linux-rh9-dev-full.tar.gz
# tar zxvf freesurfer-Linux-rh9-dev-full.tar.gz -C /usr/local

Configure

$ setenv FREESURFER_HOME /usr/local/freesurfer
$ source $FREESURFER_HOME/SetUpFreeSurfer.csh
 Setting up environment for FreeSurfer/FS-FAST (and FSL)
 FREESURFER_HOME /usr/local/freesurfer
 FSFAST_HOME     /usr/local/freesurfer/fsfast
 SUBJECTS_DIR    /usr/local/freesurfer/subjects
 FUNCTIONALS_DIR /usr/local/freesurfer/sessions
 MINC_BIN_DIR    /usr/local/freesurfer/lib/mni/bin
 MINC_LIB_DIR    /usr/local/freesurfer/lib/mni/lib
 PERL5LIB        /usr/local/freesurfer/lib/mni/lib/perl5/5.8.0
 GSL_DIR         /usr/local/freesurfer/lib/gsl
 QTDIR           /usr/local/freesurfer/lib/qt
 TCLLIBPATH      /usr/local/freesurfer/lib/tcltktixblt/lib

Some of the MNI tools currently contain hard-coded paths to perl. To fix this situation, type:

$ fixup_mni_paths

Now the MNI tools will find the perl binary on your platform. You can confirm this by typing 'nu_correct', which should return version information (v1.10).

Install missing libraries

ldd bin/tkmedit

       linux-gate.so.1 =>  (0xffffe000)
       libtix8.1.8.3.so => not found
       libtk8.4.so => not found
       libtcl8.4.so => not found
       libglut.so.3 => not found
       libSM.so.6 => /usr/lib/libSM.so.6 (0xb7f41000)
       libICE.so.6 => /usr/lib/libICE.so.6 (0xb7f28000)
       libXmu.so.6 => /usr/lib/libXmu.so.6 (0xb7f13000)
       libXi.so.6 => /usr/lib/libXi.so.6 (0xb7f0b000)
       libGLU.so.1 => /usr/lib/libGLU.so.1 (0xb7e92000)
       libGL.so.1 => /usr/lib/opengl/nvidia/lib/libGL.so.1 (0xb7e24000)
       libX11.so.6 => /usr/lib/libX11.so.6 (0xb7d58000)
       libgsl.so.0 => not found
       libgslcblas.so.0 => not found
       libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb7d38000)
       libtiff.so.3 => /usr/lib/libtiff.so.3 (0xb7ce7000)
       libz.so.1 => /lib/libz.so.1 (0xb7cd6000)
       libm.so.6 => /lib/libm.so.6 (0xb7cb2000)
       libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7c84000)
       libc.so.6 => /lib/libc.so.6 (0xb7b6c000)
       libXt.so.6 => /usr/lib/libXt.so.6 (0xb7b19000)
       libXext.so.6 => /usr/lib/libXext.so.6 (0xb7b0b000)
       libstdc++.so.6 => /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6 (0xb7a3d000)
       libgcc_s.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libgcc_s.so.1 (0xb7a33000)
       libGLcore.so.1 => /usr/lib/opengl/nvidia/lib/libGLcore.so.1 (0xb7342000)
       libnvidia-tls.so.1 => /usr/lib/opengl/nvidia/lib/libnvidia-tls.so.1 (0xb7340000)
       libdl.so.2 => /lib/libdl.so.2 (0xb733c000)
       /lib/ld-linux.so.2 (0xb7f5f000)

Install missing libraries

# emerge glut    # gets libglut.so

Enter License

A license file is required to enable the tools. One can be obtained for free by registering at:

http://surfer.nmr.mgh.harvard.edu/registration.html

Upon receiving the license information by email, copy the three lines of the license information to a file named .license (thats DOT license) and copy that file to your $FREESURFER_HOME.

Test

$recon-all --help

will print text on the overall functionality of Freesurfer.

There is a sample subject, called 'bert', found in the freesurfer/subjects directory, which contains pre-processed data stored in .mgz files (not in COR formatted files, which is a deprecated format).

To view a volume, type:

$ tkmedit bert orig.mgz

To view the subcortical segmentation results, type:

$ tkmedit -segmentation mri/aseg.mgz \
 $FREESURFER_HOME/FreeSurferColorLUT.txt bert norm.mgz

As you move the mouse over areas of the brain, the label info is found in the 'Sgmtn label' box.

To view a surface, type:

$ tksurfer bert rh pial

To increase brightness on that surface, in tksurfer:

$ View->Configure->Lighting->Brightness

To view cortical parcellation labels, in tksurfer:

$ File->Label->Import Annotation
 Browse to file rh.aparc.annot and select OK
 Redraw View icon is the one with the up/down arrows

To re-create all volume and surface files, on the command-line type:

$ recon-all -autorecon-all -subjid bert

Note that this operation may take 24 hours to complete. Consult recon-all --help for instructions on how to conduct multi-stage processing (eg. -autorecon1, -autorecon2 and -autorecon3).

Use

Given a subject having three sets of DICOMS (three runs of structural scans), do the following to setup a subject, where <subjid> is replaced with whatever name or id you want to give to that subject:

 cd $SUBJECTS_DIR  
 mksubjdirs <subjid>
 cd <subjid>
 cd mri/orig
 mkdir 001
 mkdir 002
 mkdir 003
 cp -r <path_to_dicoms>/95555-2-*.dcm 001/  
 cp -r <path_to_dicoms>/95555-3-*.dcm 002/
 cp -r <path_to_dicoms>/95555-7-*.dcm 003/
 mri_convert -it dicom -ot mgz 001/ 001.mgz
 mri_convert -it dicom -ot mgz 002/ 002.mgz
 mri_convert -it dicom -ot mgz 003/ 003.mgz

Now you will have three .mgz files in mri/orig, and recon-all will automatically take these three structural scans and average/motion- correct them. Note that in your own case, the name of the dicom files will be different (in this example, 95555-2-*.dcm consisted of 128 files).

Tutorial

Download and install Tutorial data

# cd /tmp
# wget ftp://surfer.nmr.mgh.harvard.edu/pub/dist/buckner_data-tutorial_subjs.tar.gz
# wget ftp://surfer.nmr.mgh.harvard.edu/pub/dist/buckner_data-group_study.tar.gz
# tar xzvf buckner_data-tutorial_subjs.tar.gz -C /usr/local/freesurfer/subjects
# tar xzvf buckner_data-group_study.tar.gz -C /usr/local/freesurfer/subjects
# rm /tmp/buckner_data-tutorial_subjs.tar.gz
# rm /tmp/buckner_data-group_study.tar.gz

Setup Morphometry and Reconstruction Tutorial

# source $FREESURFER_HOME/subjects/buckner_data/tutorial_subjs/scripts/setup_subjects.csh

Setup Group Study Analysis and Visualization

# source $FREESURFER_HOME/subjects/buckner_data/group_study/scripts/setup_subjects.csh

You can only source one setup_subjects.csh file at a time.

Help

Send email to: freesurfer AT nmr DOT mgh DOT harvard DOT edu Bug reports: analysis-bugs AT nmr DOT mgh DOT harvard DOT edu The Freesurfer website is: https://surfer.nmr.mgh.harvard.edu/

Personal tools