First set the FREESURFER_HOME environmental variable to the defacing binaries directory.  You can add the directory to your path if your path as well.  This would source the license file for proper usage of the binaries.  Next a mask file has to be created.  (This took approximately 20 minutes on our machines.)  Next apply the mask to the original volumes.  (This  took no longer than 5 minutes on your machines).

To create the deface mask for the dicom images, start in the parent directory of the images:
 
mri_deface <input_directory/1.dcm> talairach_mixed.gca face.gca <mask_volume.mgh>

To apply the mask to the original volume:

mri_mask <inputput_directory/1.dcm> <mask_volume.mgh> <output_volume.img>


The input directory should have the dicom scans.  The first dicom scan should be entered as the input.  The output of the command above will be a single analyze volume.   


Since mri_deface is based on the conversions from mri_convert, these are the other available format conversions:

  cor           - MGH-NMR COR format
  minc          - MNI's Medical Imaging NetCDF format (output may not work)
  analyze       - 3D analyze (same as spm)
  analyze4d     - 4D analyze
  spm           - SPM Analyze format (same as analyze and analyze3d)
  ge            - GE Genesis format (input only)
  gelx          - GE LX (input only)
  lx            - same as gelx
  siemens       - Siemens IMA (input only)
  dicom         - generic DICOM Format (input only)
  siemens_dicom - Siemens DICOM Format (input only)
  afni          - AFNI format
  brik          - same as afni
  bshort        - MGH-NMR bshort format
  bfloat        - MGH-NMR bfloat format
  sdt           - Varian (?)
  outline       - MGH-NMR Outline format
  otl           - same as outline
  gdf           - GDF volume (requires image stem for output; use -gis)




