Brain Masking (Automatic)


You can create a rough mask of your brain prior to using Display by using a recently developed software called “BrainSuite2.” In order to use BrainSuite, you will need to install it in your home pathway (i.e. ~username). BrainSuite, however, only works on raw scans in native space in analyze format and then the transformation file (i.e. xfm) can be applied to take the mask into reslice space.

To do automatic brain masking, follow the instructions below:

 

  1. Change the format of your raw (in native space) file from mnc to img: minctoraw -short -unsigned -normalize case#raw_16bit.mnc > case#raw_16bit.img
  2.  

  3. Create a header file for your img file/data/warp/AIR3.0/makeaheader case#raw_16bit.img 1 256 256 124 -0.78125 -0.78125 1.5
     
    The parameters needed to make the header file can be obtained from your case#raw_16bit.mnc.gz by typing “mincinfo case#raw_16bit.mnc.gz”
  4.  

  5. Type: “~drex/bin/xbse”
  6.  

  7. Select your input image file (img) and the name of your output file. In the “Processing Parameters” box, click on “Anisotropic Filter” and pick the following parameters:
    Diffusison=2.5;
    Iterations=5;
    Edge Kernel=0.8(These are general parameters; they might vary based upon scan type and project).
  8.  

  9. Click on “Generate Smoothed Mask” and type the name of the output mask. The output file has a “bin” suffix.
  10.  

  11. Click on “Process” – It takes a few minutes to create the mask.
  12.  

  13. Transfer the “bin” file back into mnc format so we can view it using Display.
    rawtominc -unsigned -scan_range -byte -coronal -yzx -unsigned -scan_range -xstep -0.78125 -ystep 1.5 -zstep -0.78125 Output.mnc 124 256 256 < 1137mask.bin
  14.  

  15. Transform the newly created mask into a different space, namely reslice space.
    mincresample -short native_mask.mnc reslice_mask.mnc -like /icbm/MNI_DATA/templates/
    icbm_template_1.00mm.mnc -transformation reslice.xfm
  16.  

  17. Open the mask with the raw (in reslice space) scan:
    Display 1137_reslice_raw.mnc.gz -label reslice_mask.mnc

    “F”- to open the segmentation menu
    “U” – To change lables from “2 255” to 4

    Enter the min and max value from the contrast bar on the left.

    Save the mask as: case#_mask.mnc