The following sequence of steps results in a cortical gray and white surface: All .pl scripts model files are in: ~david/Surface_deformation The executables are in (for some there are two versions, one in each of the following directories): ~david/public_bin/IRIX_6 ~david/public_bin print_n_polygons new_fit_3d set_object_colour subdivide_polygons measure_surface_area mask_volume box_filter_volume_nd create_anchor_constraints surface_mask2 The objects referred to are: /nil/david/Surface_deformation/white_model_320.obj /nil/david/Surface_deformation/white_matter_mask.obj /nil/david/Object_models/ellipsoid_{320,1280,5120,20480,81920}.obj.gz ---------------------------------------------------------------------------- To extract the left or right hemisphere only: Note that there are two places in the following instructions where you must place an extra argument on the line, if you wish to extract the left or right hemisphere. ---------------------------------------------------------------------------- --------------------------------------------------------------------------- Step 0: Set up --------------------------------------------------------------------------- cd ~david/Surface_deformation set path = ($path ~david/public_bin) # if not on an Origin OR set path = ($path ~david/public_bin/IRIX_6) # if on an Origin --------------------------------------------------------------------------- Step 1: 1/2 hour Creating a mask surface to chop of non-cortical white matter --------------------------------------------------------------------------- mask_cortical_white_matter.pl in_classified.mnc white_mask.obj 2.5 or if you want one or the other hemisphere only: mask_cortical_white_matter.pl in_classified.mnc white_mask.obj 2.5 ~david/Surface_deformation/left_hemisphere_model.obj mask_cortical_white_matter.pl in_classified.mnc white_mask.obj 2.5 ~david/Surface_deformation/right_hemisphere_model.obj --------------------------------------------------------------------------- Step 2: 2 minutes Masking the classified volume with the white_mask --------------------------------------------------------------------------- surface_mask2 in_classified.mnc white_mask.obj white_masked.mnc mask_volume white_masked.mnc white_masked.mnc white_masked.mnc 1 2.5 0 --------------------------------------------------------------------------- Step 3: 20 hours Shrink wrapping a sphere to the MASKED white matter matter, (note that the second argument below is a prefix) creating white_surface_{320,1280,5120,20480,81920}.obj you can delete the model files that are created: white_surface_m_{320,1280,5120,20480,81920}.obj --------------------------------------------------------------------------- extract_white_surface.pl white_masked.mnc white_surface 2.5 or if you want the left or right hemisphere only extract_white_surface.pl white_masked.mnc white_surface 2.5 ~david/Surface_deformation/left_white_model_320.obj extract_white_surface.pl white_masked.mnc white_surface 2.5 ~david/Surface_deformation/right_white_model_320.obj --------------------------------------------------------------------------- Step 4: 10 hours Expand a copy of the white surface out to the gray boundary. Note that now we can delete the temporary masked white matter (white_masked.mnc), and use the original classified volume for this step. --------------------------------------------------------------------------- expand_from_white.pl in_classified.mnc white_surface_81920.obj \ gray_surface_81920.obj 1.5