Differences between revisions 4 and 5
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

 *To follow this exercise exactly be sure you've downloaded the [wiki:Self:FsTutorial/Data tutorial data set] before you begin. If you choose not to download the data set you can follow these instructions on your own data, but you will have to substitute your own specific paths and subject names.

[wiki:FsTutorial top] | [wiki:FsTutorial/MorphAndRecon previous]

  • To follow this exercise exactly be sure you've downloaded the [wiki:FsTutorial/Data tutorial data set] before you begin. If you choose not to download the data set you can follow these instructions on your own data, but you will have to substitute your own specific paths and subject names.

Correcting Pial Surfaces

The pial surface is created by expanding the white matter surface so that it closely follows the gray-CSF intensity gradient as found in the brain volume. Once an accurate white surface is created then you can work on correcting the pial surface if needed. The pial surface boundary and white matter surface boundary should not cross. After the pial surface has been generated, it's a good idea to visually check it for defects that may have been created during automatic topology fixing. To check the pial surface, it may be loaded into tkmedit and viewed along with the BRAIN volume. If the surface appears not to follow the grey-CSF boundary in the volume, edits may be required.

Editing the VolumeBR Before you begin editing, you will want to set your SUBJECTS_DIR environment variable to the correct path:

cd $FREESURFER_HOME/subjects/buckner_data/tutorial_subjs
setenv SUBJECTS_DIR ${PWD} 

Open the brain and T1 volumes simultaneously in tkmedit:

tkmedit 108_brain_pial_edits_before brain.mgz -aux T1.mgz

In tkmedit, go to File -> Load Main Surface... Click the Browse button, and then select the file named lh.orig. Use the arrow keys to go through the volume slice by slice, and view the pial surface (red line) and white matter surface (yellow line). Notice the bright diagonal line in slice 161 that has caused the pial surface to expand past the actual pial boundary. This is the result of a bad segmentation due to a blood vessel.

attachment:sj108.c161.brain.vessel.before.jpg

In the tkmedit toolbar, go to:

Tools -> Configure Brush Info...

Set Radius to 2, and Shape to "Circle".

Close the configuration menu, and click the "Edit Voxels" button in tkmedit toolbar.

Find a place in the image where the blood vessel is causing errors in the segmentation. Use the right mouse button to delete the voxels, like in the [wiki:Self/FsTutorial/SkullStripTutorial skull stripping tutorial]. It is not necessary to completely remove the blood vessel to get an adequate pial surface, but it is good to do so until you are more familiar with manual editing. When you are finished removing the bright diagonal line in slice 161, it should look like this:

attachment:sj108.c161.brain.vessel.after.jpg

Continue on the other slices until the blood vessel is removed. Save your volume as pial-brain.mgz.

Ctrl-z and Edit -> Undo Last Edit in tkmedit only allow you to go back one edit. If you remove too many voxels, you can use the clone tool to paint areas back in from the original T1 volume, similar to painting in voxels in section 1.1.

You can check your result by viewing the brain.mgz volume in the 108_after directory.

Regenerating the SurfaceBR When you are finished editing the voxels, you will need to regenerate the surfaces. Since the white matter hasn't been changed, you don't need to resegment the volume. You can regenerate the pial surface with:

recon-all -autorecon2-pial -subjid 108_brain_pial_edits_before

FsTutorial/PialEdits_tktools (last edited 2013-11-01 14:27:32 by MaritzaEbling)