------------------------------------------------
 The Tools -> Make Final Surface menu item starts
 a two-part background process to create the
 final left and right hemisphere cortical
 surfaces (after removal of topological defects)
------------------------------------------------
(1) Make Final Right Hemisphere Surfaces
(2) Make Final Left Hemisphere Surfaces

The output files written by this procedure are:

 surface: $SUBJECTS_DIR/$name/surf/rh.white
 surface: $SUBJECTS_DIR/$name/surf/rh.graymid
 surface: $SUBJECTS_DIR/$name/surf/rh.pial

 surface: $SUBJECTS_DIR/$name/surf/lh.white
 surface: $SUBJECTS_DIR/$name/surf/lh.graymid
 surface: $SUBJECTS_DIR/$name/surf/lh.pial




























##############################################

##############################################
#define MAX_WHITE             120
#define MAX_BORDER_WHITE      105
#define MIN_BORDER_WHITE       85
#define MIN_GRAY_AT_WHITE_BORDER  70

#define MAX_GRAY               95
#define MIN_GRAY_AT_CSF_BORDER    40
#define MID_GRAY               ((MAX_GRAY + MIN_GRAY_AT_CSF_BORDER) / 2)
#define MAX_GRAY_AT_CSF_BORDER    75
#define MIN_CSF                10
#define MAX_CSF                40

static  int   max_border_white_set = 0,
  min_border_white_set = 0,
  min_gray_at_white_border_set = 0,
  max_gray_set = 0,
  max_gray_at_csf_border_set = 0,
  min_gray_at_csf_border_set = 0,
  min_csf_set = 0,
  max_csf_set = 0 ;

static  float   max_border_white = MAX_BORDER_WHITE,
                min_border_white = MIN_BORDER_WHITE,
                min_gray_at_white_border = MIN_GRAY_AT_WHITE_BORDER,
                max_gray = MAX_GRAY,
                max_gray_at_csf_border = MAX_GRAY_AT_CSF_BORDER,
                min_gray_at_csf_border = MIN_GRAY_AT_CSF_BORDER,
                min_csf = MIN_CSF,
                max_csf = MAX_CSF ;
##############################################

