Back to TroubleshootingData
A segmentation is a volume whose values represent an index of an anatomical structure or label to which the corresponding voxel in the main anatomical volume belongs. The structures are listed in a lookup table. This table also specifies the colors the structures should appear in, and is more commonly called a color table.
Once you have loaded a brainmask or T1 volume, you can load a segmentation volume by clicking the Load Volume button , clicking on the yellow folder and then scrolling in the mri folder until you find the segementation file you want. Click on it and then Open, then click OK. At first the segmentation will obscure the brain volume, but if you change the Color map field to Lookup Table and move the opacity slider to around .25, you will be able to see both the brain and segmentation.
You can create a new segmentation by going to File-> New Volume... or pressing the New Volume button and then choosing Lookup Table.
Segmentations are drawn as a colored overlay in the Display Window. The colors are defined in the color lookup table file specified at load time. The opacity of the overlay can be configured by moving the Opacity slider while the segmentation volume is highlighted. You may also enter the desired number and hit enter. The overlay can be hidden by unchecking the check box next to the volume's name. You can use that or Alt-C to toggle back and forth between the brain and the segmentation to check its accuracy. Hovering you cursor over a certain label or clicking will display the segmentation label value and name next to the volume's in the Cursor and Mouse windows below the main viewing window.
Editing the aseg
The aseg is FreeSurfer's automatic segmentation of the entire brain. The statistics of subcortical structures (such as volume of the hippocampi) are extracted from these segmentations, so it is recommended that users inspect the aseg if they are going to use these measures for analalyses. At times, the region of interest may be inaccurate and edits need to be made.
IMPORTANT NOTE: Due to updates in the recon-all processing stream, the volume called aseg.presurf.mgz should be edited when using FreeSurfer version 6.0 or greater. For versions 5.3 and less, directly edit the aseg.mgz volume. In version 6.0, the aseg.mgz is cleaned up using the surfaces, so that the cortical gray matter in the aseg volume follows the surface boundaries. As such, any edits on the aseg.mgz volume aren't taken into account in the earlier stages of recon-all. The aseg.presurf.mgz volume is the "unclean" version of the aseg, and is equivalent to the aseg.mgz volume in previous FS versions (5.3 or less). This cleanup step is only to improve the visual appearance of the aseg volume; in all versions of FreeSurfer, statistics for cortical gray matter and white matter are calculated using the surfaces.
Load the aseg volume, as described above. This volume is the aseg.mgz file for FreeSurfer 5.3 or less, or the aseg.presurf.mgz file for FreeSurfer 6.0 or greater. A segmentation can be edited by clicking on the Voxel Edit button above the volumes tab. In the Voxel Edit window that pops up, you can change your brush size, then verify that the freehand tool is selected and that "Recon Editing" is NOT selected, then you can begin editing. When the segmentation volume is highlighted and the Lookup Table selected for the color table, you can scroll through all the different label values in the list to the left of the viewing window. You can click on one to use that color. If, for example, the Left-Pallidum is overlabeled into the white matter, you can select 2 Left-Cerebral-White-Matter, then using your left mouse button, click on the voxels in the segmentation volume you wish to change to the white matter label. If you change too many or make a mistake, you can press Ctrl-Z as many times as you like to undo your last edits. You can also hold down the Shift key while clicking with your left mouse button to delete voxels, but you would likely have to replace them with another label. Erasing voxels in a segmentation volume changes them to a value of O, or Unknown.
At any time you can change to "outline mode" for the segmentation by pressing Alt-L. This also helps for viewing the brain and segmentation at the same time. In the popup Voxel Edit window, there is also a Color picker button you can select and then click on a label on your segmentation to speed up changing from one label to another. You will have to again click on the freehand button to continue and use that color to draw.
If you're creating a new segmentation, you can outline the structure you wish to label, making sure there are no gaps in the outline, then hold down the Crtl key and click the left mouse button. This will fill the outline with the new label value. If it fills the whole slice, you have not completely closed the outline. These two functions are essentially a paint brush and paint fill. You will have to do this in each slice you wish to label a structure.
To save changes to a segmentation, make sure the segmentation is highlighted then go to File->Save Volume to overwrite the original segmentation volume or File->Save Volume As... to specify a new volume, such as an .mgh or .mgz volume, or an empty directory in which to save a COR volume. After you have saved all of your edits, you could recreate the final surfaces and recompute statistics with the command:
recon-all -autorecon2-noaseg -autorecon3 -subjid <Subj_ID>
Do not run this command if you are conducting the tutorial! This step will take a long time and there is no need to run it for the tutorial purposes.