[[UserContributions|top]] ------ . ~+'''FAQ'''+~ ------ . The purpose of this FAQ is to provide a Wiki space where users can add the most frequent questions to avoid asking already answered questions in the support list. <> == 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. 1. 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. 1. 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: . recon-all -version === 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 [[http://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer|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: [[http://www.apple.com/macpro/|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 [[https://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferWiki?action=AttachFile&do=get&target=FreeSurfer_Suggested_Morphometry_Protocols.pdf|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 . '''recon-all -s subjid -all > /dev/null 2>&1 > '''recon-all -autorecon1 -noskullstrip -s ''' 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 ''' === 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. . '''recon-all -skullstrip -wsthresh 35 -clean-bm -no-wsgcaatlas -subjid subjid''' 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 . Click [[ReconAllTableStableV5.1|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 ''' If that goes through without error, you can finish processing your data by running: <
> '''recon-all -autorecon2 -autorecon3 -s ''' === 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 --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 [[FsTutorial/Talairach|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: <
> {{attachment: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 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 [[http://surfer.nmr.mgh.harvard.edu/fswiki/FsAnat-to-NativeAnat|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 [[http://surfer.nmr.mgh.harvard.edu/fswiki/BrodmannAreaMaps|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 [[http://surfer.nmr.mgh.harvard.edu/fswiki/RetinotopyStimuli|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:<
><
> . '''mris_anatomical_stats -l