top



Contents

  1. General
    1. Q. How can I help this FAQ?
    2. Q. What are the advantages of FreeSurfer over VBM?
    3. Q. How do I know the version of FreeSurfer I'm running?
    4. Q. Is the FreeSurfer source code available?
  2. Computing
    1. Q. How long does it take to finish a reconstruction?
    2. Q. How can I reduce the time of recon-all in a group of patients?
    3. Q. I want to use freesurfer to quantify cortical thickness, and I want to use the software under Linux. What equipment for computer do you recommend?
    4. Q. Is it possible to run FreeSurfer in Ubuntu Linux?
    5. Q. Could I run multiple instances of Freesurfer (on my virtual box)?
  3. Acquisition
    1. Q. Is it recommended that people use memprage? How are they analyzed? Just sqrt sum sqr of the echoes? Or is there something more elaborate?
    2. Q. Are there suggested scan sequences which you recommend I use with Freesurfer?
    3. Q. Is it possible to analyze clincial structural MRI exams with help of Freesurfer?
  4. Processing/Re-processing Data in FreeSurfer
    1. Q. Can I run some cases in my dataset using one version of FreeSurfer and others using a different version of FreeSurfer?
    2. Q. How to run recon-all in a ssh terminal
    3. Q. I had a [Power Outage|Computer Failure|Spilled coffee on computer|etc], how can I resume the recon-all?
    4. Q. I have a subject which has been running for a really long time in recon-all, how can I tell if there is something wrong?
    5. Q. I have already skull-stripped data. Can I submit it to recon-all?
    6. Q. I made white matter and pial edits to my volume. Do I need to run -autorecon2-wm and when that is finished run -autorecon2-pial?
    7. Q. One of my cases doesn't have the cerebellum so I adjusted the watershed threshold to fix it. However, at one threshold, the cerebellum is still not included, and at the next the entire skull is there. What should I do?
    8. Q. One or more of the files in a subject's directory was accidentally deleted or has become corrupted. How do I recreate the missing file(s)?
  5. Common Error messages
    1. Q. Help! I got this error message: "mri_watershed error: GLOBAL region of the brain empty!" - what should I do?
    2. Q. I get an error message from the Talairach Failure Detection. What does this mean?
    3. Q. I get an error during the mri_ca_label step while running recon-all. The last thing it says is: "saving intensity scales to aseg.auto_noCCseg.label_intensities.txt". What's wrong?
    4. Q. I get an error during the Talairach transform step when running recon-all on ANALYZE images. Why is this happening?
  6. FreeSurfer Output Questions
    1. Q. The surfaces near the medial wall, hippocampus, and amygdala aren't accurately following the structures there. How can I fix this?
    2. Q: It seems that there is a 5mm thickness upper limit in my volumes. Is it normal? How can I change this?
    3. Q. Why in many subjects the insular cortical surface seems so thick? Is the convoluted nature of the Insula that causes that?
    4. Q. Why would the orientation of my scans look wrong after processing my Siemens DICOM files with 'mri_convert'?
    5. Q. What are the sulc and curv overlays (in QDEC) showing us?
    6. Q. How would I put a FreeSurfer output volume and/or segmentation back into the same space as my original anatomical input (native space)?
    7. Q. How do I transform coordinates in one space to those in another space (eg, a point on the surface to MNI305 space or to the col, row, slice of a functional volume)?
    8. Q. How can I measure the distance along the cortical surface between two points located on the cortical surface?
    9. Q. The pial surface includes some cerebellum. How can I fix this?
    10. Q. How do I get the cortical thickness maps for several subjects into the same template space (fsaverage)?
    11. Q. How can I get a high resolution atlas of the cortex in Freesurfer?
    12. Q. Where can I find V1 labels?
  7. Analysis of FreeSurfer Data
    1. Q. I am trying to measure the cortical thickness of a specific ROI. How can I do this?
    2. Q. I am using QDEC to examine the anatomical differences between two groups of subjects. The surface-based measures I can select are thickness, area, area.pial, sulc, curv, and jacobian_white. Could anybody tell me what anatomical features the later three (sulc, curv, and jacobian_white) actually measure?
    3. Q. I am trying to measure the global mean cortical thickness (i.e combined across hemispheres). How would I do this?
    4. Q: How can I get measurements of the lobes (parietal, temporal, frontal, & occipital)?
    5. Q. How would I calculate the total CSF volume?
    6. Q. What is the unit measure of mean curvature and Gaussian curvature?
    7. Q. I want to run make_average_subject in order to prepare my data for GLM analysis, which file should I specify for the -xform flag, and what are the differences between my options?
    8. Q. What goes into the calculation of subcortical volume? We have tried adding volumes of individual subcortical areas but the total does not equal the subcortical volume provided by aseg. Is the subcortical volume calculation accurate?
    9. Q. How would you perform a power analysis for a whole brain group comparison QDEC analysis?
    10. Q. How can I get the volume of the different lobes of the brain (occipital, parietal, temporal, etc) ? White matter and gray matter? Labels ?
    11. Q. Why do I get different results when scanning the same person twice?
  8. FreeSurfer & Matlab
    1. Q. How can I use the Freesurfer Matlab commands if I have a copy of Matlab installed on a Windows machine?
    2. Q. Can I load FreeSurfer output in Matlab?
    3. Q. How can I make a histogram of cortical thickness?
    4. Q. How can I obtain the thickness of each vertex, and how can you identify which structure each vertex belongs to?
  9. FreeSurfer GUI
    1. Q. How can I troubleshoot rendering problems when using TKsurfer?

General

Q. How can I help this FAQ?

A: If you are able to edit pages, go ahead! If you don't have permission to write on the Wiki, send an e-mail to ppj at netfilter dot com dot br

Q. What are the advantages of FreeSurfer over VBM?

A:

  1. FS uses geometry to do inter-subject registration, which experience has shown results in a much better matching of homologous cortical regions than volumetric techniques.
  2. FS allows you to look at the two components of volume separately (thickness and surface area). It has been found that these two do not necessarily track one another, and in the worst case where one is increasing and the other decreasing the volume change can be 0.
  3. The target that FS uses for registration (the white matter surface geometry) is completely invariant to gm atrophy, so gm changes won't result in a different registration.

Q. How do I know the version of FreeSurfer I'm running?

A: Run:

Q. Is the FreeSurfer source code available?

A: Yes, the source code is accessible via GitHub.

It is also recommended that you subscribe to the freesurfer mailing list to post questions and monitor solutions from other users.


Computing

Q. How long does it take to finish a reconstruction?

A: It depends on your processor speed and machine performance (notice that dual/quad/hex core or hyperthead won't speed up one analysis significantly), give a look at the link below in the section "Step-wise directives": http://surfer.nmr.mgh.harvard.edu/fswiki/recon-all

Also you can contribute to our running time statistics: https://surfer.nmr.mgh.harvard.edu/fswiki/ReconAllRunTimes

Q. How can I reduce the time of recon-all in a group of patients?

A: FreeSurfer run its process in a non-parallel environment, so you won't have benefit from a dual/quad/hex core machine for a single case analysis. However if you have many cases you can start two FreeSurfer recon-all process in the same machine and theoretically you can reduce by half the time to analyze your group of cases. A similar procedure can also be used in quad/hex-core environment. Note that to take benefit of a multi-core environment you need to use a SMP kernel in your OS.

Q. I want to use freesurfer to quantify cortical thickness, and I want to use the software under Linux. What equipment for computer do you recommend?

This answer requires constant updates:

For Best Performances:

Use a multi-Core processor Intel (a i7-900 or newer series processor or Xeon 6500/7500 Series)

Install at Least 8GB of Memory

If you prefer AMD you can use:

AMD Opteron 12-Core or Phenon II X6

Other alternative much more expensive is: Mac Pro with 12 cores and 16GB RAM.

The number of cores is roughly the number of studies you can process simultaneously. Notice that each process will take 20-24 hrs.

Keep in mind that you need to use the fastest memory in order to achieve maximum benefit from multi-core architecture.

Q. Is it possible to run FreeSurfer in Ubuntu Linux?

A: Yes. Ubuntu Linux is basically a Debian distro, so you should use FreeSurfer RH9 version. Depending on your video card you should disable the DRI using the option NoDRI in the Device section of your X configuration file. Notice that in older Ubuntu version there's a bug that prevents NoDRI from working.

Q. Could I run multiple instances of Freesurfer (on my virtual box)?

A: Yes, it is certainly possible (even advisable) to run more than one copy of Freesurfer on a machine. It depends on how many processor cores you have. You'll need at least 2Gb per process if not 3Gb, one core per process. It may be possible to run one process using 1Gb if you use the 'no-gcut' flag. Open one terminal window for each instance of FreeSurfer, using serperate commands in each terminal window. When running four individual recon-all jobs on four cores, we have found that they will all complete in about 110% of the time of a single run.

When using a virtual box, assign N-1 cores to your virtual box, where N is the total number of processor cores you have, along with at least (N-1) x 2Gb of RAM.


Acquisition

Q. Is it recommended that people use memprage? How are they analyzed? Just sqrt sum sqr of the echoes? Or is there something more elaborate?

A: Yes, particularly for longitudinal. The increased bandwidth makes a huge difference in being able to register across time. And at the moment we do use the rms. An optimal combo would maybe be a tiny bit better, but probably not much difference.

Q. Are there suggested scan sequences which you recommend I use with Freesurfer?

A: Yes, Custom multiecho sequences for Siemens scanners are available from the Martinos Center. The multiecho FLASH is available as a standard sequence on the Siemens platform and we distribute a slightly modified version that makes it more convenient to set up the echo timing and allows a little more flexibility w.r.t. geometry and spoiling but this isn't critical. We also distribute a multiecho version of the MPRAGE sequence that isn't a product sequence yet.

We are happy to send you binaries but MGH and Siemens requires that you sign a "C2P" agreement, which is an indemnification document, before we can provide you with the sequences and protocols for free.

Q. Is it possible to analyze clincial structural MRI exams with help of Freesurfer?

A: Yes, if the resolution is around 1mm, it should be possible. If the resolution is greater than 1.3mm, then surfaces will probably not be valid, but subcortical structures might be valid.


Processing/Re-processing Data in FreeSurfer

Q. Can I run some cases in my dataset using one version of FreeSurfer and others using a different version of FreeSurfer?

A: No, mixing versions is never a good idea as results are expected to differ, if only slightly. The same version of FreeSurfer should be used to process all cases within a dataset. Another consideration is that someone editing data run with an older version of FreeSurfer will probably have more edits to do than if the same case was run with the most recent version.

If you are sourcing the stable or dev version of FreeSurfer from within the NMR center, you are strongly encouraged to created a frozen copy of FreeSurfer for your study. To do that, just download the public distribution from our site and install it in your SUBJECTS_DIR or some other project-appropriate place.

Q. How to run recon-all in a ssh terminal

A: This is tricky, because recon-all spawns many process and redirect I/O to the terminal that opened it. Run

Q. I had a [Power Outage|Computer Failure|Spilled coffee on computer|etc], how can I resume the recon-all?

A: You can try

recon-all -make all -s subject

Also, depending on your version, there might be a file in the scripts directory called "IsRunning". You should delete this if it is there.

Q. I have a subject which has been running for a really long time in recon-all, how can I tell if there is something wrong?

A: Assuming you have processed other subjects in considerably less time, this probably means that there is a giant defect that will not be corrected properly (eg. cerebellum or skull attached). You should check the ?h.inflated.nofix or ?h.orig.nofix surfaces for any large defects. If you load the filled.mgz you should be able to see whether the cerebellum is still attached, and if so you would want to edit the wm.mgz. Also, verify that the pons and corpus collosum were properly detected.

Q. I have already skull-stripped data. Can I submit it to recon-all?

A: If your skull-stripped volume does not have the cerebellum, then no. If it does, then yes, however you will have to run the data a bit differently.

First you must run only -autorecon1 like this:
recon-all -autorecon1 -noskullstrip -s <subjid>

Then you will have to make a symbolic link or copy T1.mgz to brainmask.auto.mgz and a link from brainmask.auto.mgz to brainmask.mgz. Finally, open this brainmask.mgz file and check that it looks okay (there is no skull, cerebellum is intact; use the sample subject bert that comes with your FreeSurfer installation to make sure it looks comparable). From there you can run the final stages of recon-all:
recon-all -autrecon2 -autorecon3 -s <subjid>

Q. I made white matter and pial edits to my volume. Do I need to run -autorecon2-wm and when that is finished run -autorecon2-pial?

A: No. If you made both white matter and pial edits, you only need to run -autorecon2-wm which is higher up in the processing stream (before the steps of -autorecon2-pial). By running -autorecon2-wm, it will perform the steps necessary to fix a white matter edit and then all the remaining steps in -autorecon2 including those steps that -autorecon2-pial would run. The OtherUsefulFlags wiki shows the hierarchy of the -autorecon2 flag shortcuts (-autorecon2-cp starts before -autorecon2-wm which starts before -autorecon2-pial). In general, you should start the processing stream at the earliest step where you made an manual intervention and the rest will be taken care of. Don't forget to run -autorecon3!

Q. One of my cases doesn't have the cerebellum so I adjusted the watershed threshold to fix it. However, at one threshold, the cerebellum is still not included, and at the next the entire skull is there. What should I do?

A: Removal of cerebellum is always bad and must be fixed (cerebellum is included in the subcortical segmentation portion and is needed for a proper atlas alignment). Including skull is not good, but leaving skull is acceptable. The problem being sometimes the wm seg catches skull. So make adjustments till you get cerebellum, then just see what happens with the surfaces given remaining skull, and edit out skull in brainmask.mgz if it hurts it.

For the command line below, try it with and without the -no-wgcaatlas flag. Generally the -wsthresh only needs to be varied.

If that still doesn't work, try using the multistrip command with the watershed method. This will give an output of 4 sets of different thresholds each for the orig, nu, and T1 volume. You can choose the best one from the set and copy it to brainmask.auto.mgz and run the last step of -skullstrip. More info can be found here: http://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/SkullStripFix

Q. One or more of the files in a subject's directory was accidentally deleted or has become corrupted. How do I recreate the missing file(s)?

A: You will need to rerun the recon-all step in which that file is first created. For example, to recreate the norm.mgz volume you would need to run recon-all -canorm -s <subjid>. Click here to find out in which step a certain file is created in the version 5.3 recon-all process flow.


Common Error messages

Q. Help! I got this error message: "mri_watershed error: GLOBAL region of the brain empty!" - what should I do?

A: Run this:
recon-all -skullstrip -no-wsgcaatlas -s <subjid>

If that goes through without error, you can finish processing your data by running:
recon-all -autorecon2 -autorecon3 -s <subjid>

Q. I get an error message from the Talairach Failure Detection. What does this mean?

A: In certain versions of FreeSurfer, the talairach failure detection is too conservative so this may not be a problem. First, you will want to check the talairach transform to make sure it looks okay. Directions on how to do that are here: https://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/Talairach

Essentially, you want to use the command:

tkregister2 --mgz --s <subjid> --fstal

and see if the green lines line up with the anatomy of the blurry brain image. If so, then you can run this subject as you did before, just add -notal-check to your command. For example, recon-all -all -s subjid -notal-check. If the green lines do not line up well with the anatomy, you will want to follow directions on the wiki page mentioned above to fix it. If the images you passed to recon-all are in Analyze format, verify that the orientation is correct.

Q. I get an error during the mri_ca_label step while running recon-all. The last thing it says is: "saving intensity scales to aseg.auto_noCCseg.label_intensities.txt". What's wrong?

A: This is a bug in v.4.5. A fixed mri_ca_label can be downloaded from here:
ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/misc/linux-centos4_x86_64/

copy it your $FREESURFER_HOME/bin

We would advise rerunning all subjects with this fixed version.

Q. I get an error during the Talairach transform step when running recon-all on ANALYZE images. Why is this happening?

A: Images in the ANALYZE format do not retain orientation information (left/right). You can bypass the Talairach check by including the '-notal-check' flag in your recon-all command. Alternatively, you can specify the orientation (neurological or radiological) using mri_convert. Run 'mri_convert --help' to get info on specifying volume orientation in the description section. Lastly, you can manually register your brain volume in Talairach space by following this tutorial.


FreeSurfer Output Questions

Q. The surfaces near the medial wall, hippocampus, and amygdala aren't accurately following the structures there. How can I fix this?

A: The good news is you don't have to! These areas are generally unreliable for a thickness study so you would want to exclude them from your analysis. If you use glmfit, it calls the ?h.cortex.label file in order to determine thickness. This file automatically has set these areas to zero so they will not be included in your analysis. To see what area ?h.cortex.label excludes you can load it in tksurfer on top of the inflated surface. If you have tkmedit open at the same time for the same subject, you can use the Go To Saved Point function to make sure areas of concern are in this excluded section. *Note: If you are using a FreeSurfer version older than 4.3.0, the excluded region includes the insula. If you are using an analysis program other than glmfit, just be sure to use the ?h.cortex.label file to get your thickness measurements.

Several reasons make it difficult to generate pial/wm surfaces in the medial temporal lobe area. This region tends to be furthest away from the coils receiving the MR signal, potentially late to myelinate in individuals under 20 years old, very thin white matter in general, and is in close proximity to regions of susceptibility.

The picture below shows the ?h.cortex.label (outlined in yellow) over the ?h.aparc.annot. Notice how the ?h.cortex.label includes some of the ?h.unknown.label:
cortex_label_over_aparc.jpeg

As always, use the example subject bert that comes with the FreeSurfer installation to see what we define as acceptable surfaces.

Q: It seems that there is a 5mm thickness upper limit in my volumes. Is it normal? How can I change this?

A: We did this to prevent noncortical regions such as the basal ganglia from corrupting the thickness measure through averaging. With the ?h.cortex.label it is probably no longer needed, however you can use mris_thickness -max <max thick> to generate a thickness with a different max. Take a look in the example below:

mris_thickness -max 10 bert lh newlh.thickness

The file newlh.thickness will be created inside the surf directory of your subject. But we don't think the true thickness is ever that much except in pathological cases like dysplasia and other disorders of cortical development.

Q. Why in many subjects the insular cortical surface seems so thick? Is the convoluted nature of the Insula that causes that?

A: It's not the convoluted nature of the Insula. It's the fact that extreme capsule is so thin that it frequently isn't very apparent on MR, and so there appears to be continuous gray matter from the basal ganglia into the cortex. We think version 4.0 fixes this.

Q. Why would the orientation of my scans look wrong after processing my Siemens DICOM files with 'mri_convert'?

A: It can be misleading to check orientation using FSLVIEW because it orients volumes based on the way they are on disk so you often get things looking pretty strange (e.g., upside-down). FSLVIEW does dispaly little letters to indicate what it thinks the orientation is, so if you stick to those, then you can properly judge whether the orientation is correct.

Q. What are the sulc and curv overlays (in QDEC) showing us?

A: The 'sulc' conveys information on how far removed a particular vertex point on a surface is from a hypothetical "mid-surface" that exists between the gyri and sulci. This surface is chosen so that the "mean" of all these displacements is zero. The 'sulc' gives a indication then of linear distance and displacements: how "deep" and how "high" are brain folds

In FreeSurfer, gyri have negative 'sulc' values, are colored green, and indicate how far "down" a point has to travel to reach this "mid-surface". Sulci have positive 'sulc' values, are colored red, and indicate how far "up" a point needs to travel to reach the mid-surface.

The 'curv' conveys information on the curvature (not distance) at a specific vertex point. The color conveys the sign, and is just an arbitrary choice. The sharper the curve, the higher the value (positive or negative). Areas with positive curvature, are colored red, and correspond to curvatures in sulci, i.e. curving "up". Areas with negative curvature are colored green, and correspond to curves pointing "down", i.e. gyri.

So, in a nutshell, the difference is that the 'curv' files contain information about curvatures, and the 'sulc' files contain information about displacement.

Q. How would I put a FreeSurfer output volume and/or segmentation back into the same space as my original anatomical input (native space)?

A: Please see directions on how to do this here, and also on this page http://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems

Q. How do I transform coordinates in one space to those in another space (eg, a point on the surface to MNI305 space or to the col, row, slice of a functional volume)?

A: Directions on how to do this are on this page: http://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems

Q. How can I measure the distance along the cortical surface between two points located on the cortical surface?

A: There is a tool which allows you to do this called 'mris_pmake'. Please read the associated help file for details on how to use it ('mris_pmake --help').

Q. The pial surface includes some cerebellum. How can I fix this?

A: This fix only works for v4.3 and up. If you are using an earlier version, please contact us for help.

In order to fix this problem, you will have to edit the brain.finalsurfs.mgz (and not the brainmask.mgz). Remove the parts of the cerebellum that are affecting the surfaces. Save your changes and then run:
recon-all -make all -s subjid

Q. How do I get the cortical thickness maps for several subjects into the same template space (fsaverage)?

A: Include the '-qcache -measure thickness' flags in your recon-all command for each subject. This will create files in the /surf directory which sample the thickness data at different smoothing levels onto the fsaverage subject space. If the '-measure' flag is not included, all cortical measurements will be sampled onto fsaverage and smoothed (thickness, sulc, area, curv, etc.).

Q. How can I get a high resolution atlas of the cortex in Freesurfer?

A: This can be accomplished using 'mris_divide_parcellation'. You can pass your preferred max area of a parcellation and it will keep subdividing along the primary eigen-axis until no units are above that surface area.

Q. Where can I find V1 labels?

A: V1 labeling is produced by default in recon-all as part of the Brodmann area set (located in ../fsaverage/label/?h.V1.label). Those labels are described here. The Hind's V1 labeling method must be run seperately by adding the '-label-v1' flag to your recon-all command:

recon-all -all -s bert -label-v1

The accuracy of the Hinds and Fischl V1 labeling method compared to retinotopy depends under what conditions the retinotopy is carried out (field strength, # of coils elements, voxel size, etc.). In our comparision, the folding patterns predict the border location to about 2.5mm, which is probably better than you can get with retinotopy. (click here for tips on creating retinotopy stimuli)


Analysis of FreeSurfer Data

Q. I am trying to measure the cortical thickness of a specific ROI. How can I do this?

A: You can save the ROI to a label file and then use:

Q. I am using QDEC to examine the anatomical differences between two groups of subjects. The surface-based measures I can select are thickness, area, area.pial, sulc, curv, and jacobian_white. Could anybody tell me what anatomical features the later three (sulc, curv, and jacobian_white) actually measure?


sulc = "average convexity" from our 1999 reconII paper(https://surfer.nmr.mgh.harvard.edu/ftp/articles/fischl99b-recon2.pdf).
Essentially measures the depth/height of each point above the average surface.
curv = smoothed mean curvature.
jacobian_white = the jacobian of the spherical transform. Measures the amount of distortion needed to warp a subject into register with the atlas.
You might want to look at the slides downloadable from the top of this page:

http://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial
which contain pictures showing the meaning of 'curv' and 'sulc'.

Q. I am trying to measure the global mean cortical thickness (i.e combined across hemispheres). How would I do this?

A: One suggestion is to use the surface area of each hemisphere as the weighting factor. In which case the global mean thickness including both hemispheres would be given by:

bh.thickness = ( (lh.thickness * lh.surfarea) + (rh.thickness * rh.surfarea) ) / (lh.surfarea + rh.surfarea)

If you use the values in the ?h.aparc.stats, it already factors out the 'unknown' region, so you don't have to do it yourself.

Q: How can I get measurements of the lobes (parietal, temporal, frontal, & occipital)?

A: You can either use the PALS_B12 atlas (mapped to fsaverage in v5.0) or create your own following the directions on the CorticalParcellation wiki.

Q. How would I calculate the total CSF volume?

A: You can add up the various ventricular structures to get total ventricular volume, but we don't segment sulcal CSF, since it's not distinguishible from bone on a T1-weighted MRI.

Q. What is the unit measure of mean curvature and Gaussian curvature?

A: See these wiki pages for more info: Mean curvature, Gaussian curvature

Q. I want to run make_average_subject in order to prepare my data for GLM analysis, which file should I specify for the -xform flag, and what are the differences between my options?

A: Your typical options are talairach.lta, talairach.xfm, and talairach.m3z. The .lta and .xfm are linear transforms to a Talairach coordinate system. The .m3z is a non-linear morph and will give you a much higer anatomical resolution.

Q. What goes into the calculation of subcortical volume? We have tried adding volumes of individual subcortical areas but the total does not equal the subcortical volume provided by aseg. Is the subcortical volume calculation accurate?

A: The aseg.stats file takes into account partial voluming which is not taken into account when you simply sum up the subcortical structures because some of those structures will be partially volumed with white matter.

Q. How would you perform a power analysis for a whole brain group comparison QDEC analysis?

A: For the power analysis, you need four things:

  1. Effect Size
  2. Number of Subjects
  3. Target False Positive Rate (alpha)
  4. Target False Negative Rate (beta)

Given any 3, you can compute the 4th. You can get the Effect Size from the output of the QDEC analysis. Each analysis creates a GLM directory, and there is a directory for each contrast in the GLM dir. In the contrast dir, you will find several files, but the important ones for this are the gamma.mgh and the gammavar.mgh. The gammavar is the square of the error bar (ie, t=gamma/sqrt(gammavar)). The gamma will not change as you add subjects (at least in expectation). The gammavar will drop linearly with the number of subjects (again in expectation). The effect size will then be gamma/sqrt(gammavar*Npilot), where Npilot is the number subjects in the pilot study. In a new study with Nnew subjects, the expected t will be tnew = gamma/sqrt(gammavar*Npilot/Nnew).

Q. How can I get the volume of the different lobes of the brain (occipital, parietal, temporal, etc) ? White matter and gray matter? Labels ?

A: For V5.0 and later, you can run mri_annotation2label with --lobesStrict to get a lobe annotation. If that definition of "lobes" is good for you, then you can run mris_anatomical_stats to get the volume for each lobe. For versions prior to 5.0, you can use mri_annotation2label to break the labels apart, then use mri_mergelabels to combine the individual labels into lobe labels, then use mris_label2annot to create a lobe annotation, then use mris_anatomical_stats.

Q. Why do I get different results when scanning the same person twice?

A: There are a variety of sources of variance. First there are some reasons that affect the images. Different looking images will of course affect the structural estimates. The second set of reasons is related to random noise and processing bias.

a) Acquisition

a) 1. Head Motion during acquisition changes the image and results in smaller GM estimates (even for images that pass QC)
http://reuter.mit.edu/publications/pid/reuter-motion14
http://reuter.mit.edu/publications/pid/tisdall15

a) 2. Hydration levels affect the image and e.g. GM estimates
http://reuter.mit.edu/publications/pid/biller15

a) 3. Different head positions can cause large differences if images are not gradient unwarped (depending on your hardware these effects can be small or large). Also there is of course noise in the images which can lead to different results.

a) 4. Different person: sometimes errors in the de-identification (annonymization) pipeline can causes images with the same subject id to come from different subjects. Also people sometimes send a sibling or friend to a follow-up visit (in order to complete the study and get paid, if they cannot come themselves).

b) Processing

b) 1. Different noise or small changes in the image can trigger processing to do different things (e.g. small skull strip failure, different surface placement, e.g. one time including dura the other time not). Small changes can accumulate. This can produce arbitrary large changes in a single subject. It can be reduced/fixed via manual edits.

b) 2. Processing bias, for example, mapping the follow-up to baseline (which some people do as a pre-processing step), is problematic as follow-ups get interpolated (which looks like smoothing) and so you introduce a change to some of your images (the follow-up only), biasing your measurements of change. See
http://reuter.mit.edu/publications/pid/reuter-long12
http://reuter.mit.edu/publications/pid/reuter-bias11
This problem (and some of b.1) can be improved by using the longitudinal pipeline in FreeSurfer to analyze your data:
https://surfer.nmr.mgh.harvard.edu/fswiki/LongitudinalProcessing

Finally note, that you cannot trust individual cortical thickness values. People usually run studies comparing 10 or 15 subjects per group. There can always be individual outliers. Manual checking and editing can fix some of that, but not all. Especially effects from motion or hydration cannot be removed.


FreeSurfer & Matlab

(In the directory '$FREESURFER_HOME/matlab' you will find several Matlab-based scripts for reading and writing surface- and volume-based data generated in freesurfer.)

Q. How can I use the Freesurfer Matlab commands if I have a copy of Matlab installed on a Windows machine?

A: You can try to transport files from Linux to Windows which will be tedious and things may not work properly. Alternatively, you could install Matlab for Linux or you can try using Octave (a kind of GNU Matlab for Linux).

Q. Can I load FreeSurfer output in Matlab?

A: If you write it as .mgz format then load_mgh (or MRIread) will read it

Q. How can I make a histogram of cortical thickness?

A: In Matlab you can use the read_curv() function, as in the example below.

Q. How can I obtain the thickness of each vertex, and how can you identify which structure each vertex belongs to?

A: You will need to use the read_curv() function to get the thickness estimates, and use the read_annotation() function to assign each index in the surface vector to a specific structure. You can then match up corresponding indices in the the thickness vector and the structure vector to determine the thickness and structure label for each vertex.


FreeSurfer GUI

Q. How can I troubleshoot rendering problems when using TKsurfer?

A: Please refer to TksurferDisplayProblems

UserContributions/FAQ (last edited 2019-12-14 14:15:45 by DougGreve)