Research Protocols

Cortical Surface Extraction

In Pass1 Orientation

  1. Copy the “pass1” points template into the current directory.
  2. Use the micresample command to transform your native scan into pass1 space using the AC and PC points.
    Note: If you have previously used Paul’s scripts to put the scans into pass1, you will not want to use this protocol becuase the AC and PC coordinates in seg differ from the AC and PC coordinates in Display.

    If you want to use the mincresample command instead of Paul’s pass1 script, make sure that you pick your points in Display and not in seg.

    • ~drex/scripts/to_pass1<AC_x> <AC_y> <AC_z> <PC_x> <PC_y> <PC_z> \
      <MIDLINE_x> <MIDLINE_y> <MIDLINE_z> <MNI_transform_filename>
    • mincresample -like ~drex/models/pass1.mnc.gz -transformation MNI_transform_filename case#_native_nocereb_raw.mnc case#_ss_pass1.mnc
  3. Now, we will place our mnc file (case#_ ss_pass1.mnc) onto a label to be rf corrected (homogenize intensities). Once, you open “register”, click on the yellow tab with no labels (4th yellow tab from the bottom). Then pick “Full Affine 12 Parameter”. Click on Gray for the averaged 305 brains (1st column) and Hot for our scan (second column) We will try to place our brain into the averaged 305 mask in order to apply rf correction by picking tag points.Tag points are chosen as follows: click on a specific MR region and try to pick the corresponding region (as close as possible) on the avg305 scan. Then, click “Record Tag” (yellow tab). It usually takes more than 10 tag points in order to place our scan into avg305 scan.

    Although there are no mandatory locations to pick a tag point, the following locations are preferred:
    On the mid sagittal plane, the posterior inferior end of the occipital lobe. It usually helps to pick the point further outside the brain on the avg305 scan to have a better enclosure. Next, pick a point on at the inferior-orbitofronal area on the mid sagittal plane. Next, scroll through the sagittal plane and pick the most superior area of the brain on both hemispheres. Next, on the horizontal view, pick the level where the brain is extending laterally the most. Pick the lateral ends on both hemispheres. The third column overlays the two images and you can visualize what regions are still outside of the mask. If necessary, click on the most posterior end of the brain on the horizontal plane, and try to fit the brain (you can also use this tag point to align the brain if its tilted). Continue picking points until the brain is fully enclosed within the mask. register /data/ad/mass3/users/mega/
    skull_stripped/AD_ELASTIC_ATLAS/norm_avg_305_mri256x160.mnc.gz case#_ss_pass1.mnc

    Save your work by typing the tag name under “Load Tags”. Then press Enter and “Save Tags”. Also, Type a xfm file on the second white tab and click on the yellow tab directly above it to save the xfm file.
    Save as: case#_pass1.tag; case#_pass1.xfm

  4. Invert the transformation (xfm) file.  xfminvert case#_pass1.xfm INVcase#_pass1.xfm
  5. Reorient the mask into pass1.  mincresample -clobber/data/ad/mass3/users/mega/skull_stripped/AD_ELASTIC_ATLAS/avg_305_mask_1.00mm.mnc.gz case#_pass1_mask.mnc -like case#_ss_pass1.mnc -transform INVcase#_pass1.xfm
  6. We now open the mask (in pass1) with the skull stripped brain to make sure the entire brain is covered by the mask. If not, go back and pick new tag points (or modify the existing ones) and run the previous two commands again. Display case#_ss_pass1.mnc -label case#_pass1_mask.mnc
  7. Run the nu-correct command (it takes a few minutes) to rf correct the brain. nu_correct -clobber -mask case#_pass1_mask.mnc case#_ss_pass1.mnc case#_nu_pass1.mnc &
  8. Open the xfm file and change the values on the third column from neg. to positive or from positive to negative values. nedit case#_pass1.xfm
  9. Display your rf corrected mnc file. Display case#_nu_pass1.mncUse the threshold option to pick a value to create a cortical surface object. If you pick a high value, the object will be smooth because CSF will be included in our surface (bad), if you pick a low value, you will eat away into the brain (also bad), but if you pick a value that correctly includes gray matter (usually 60-80) and excludes CSF, you will get a crisp brain (good). Using the threshold plotting option, pick a value half of the first max point on the plot curve.
    “S” Slice View
    “G” Recompute Histogram
  10. You are now ready to create the cortical surface models. Its usually a good idea to run a number of them using different thresholds as to pick the best brain. Make sure to use the batch option because it might take close to an hour. batch -s /bin/csh -Qshort@autarch cortical_surface.pl case#_nu_pass1.mnc case#_pass1_55.obj 55 REVcase#_pass1.xfm > case#_55_log.txtThe “obj” file is the cortical surface model.
    The value after the output file (obj file) is the threshold used to distinguish between gray and CSF.
  11. Open the cortical surface brain with your skull stripped scan. Display case#_pass1_55.obj case#_nu_pass1.mnc

**Now do the same for the Right hemisphere.