This scripts can be used to use FreeSurfer to reconstruct NHP surfaces.
The main problem with macaca mulatta scans is that this species brain is
roughly 8 times smaller than a human brain. Since FreeSurfer (as of version 4.5
the latest version tested with these scripts) instist on all inputs being
1mm isotropic 256^3 voxel volumes, the easiest way is to acquire NHP scans at
0.5 mm isotropic resolution (and 256^3 voxels) and later fake the header to make
FreeSurfer believe the volume to be 1mm isotropic. (In addition at least our subjects 
are scanned in sphinx position and require some fix-up of the header to show up correctly)
    Now, the scripts in ./myscript_anal_func can be used to go from a collection of
T1 weighted scans to surfaces of both cortical hemispheres, with plenty of manual
interventions (read edits).
    Initially, the unpack_CIT.csh script tries to collect the raw data from /space/raw_data/${year}/${sessionID}
and imports them in freesufer compatible way into /space/data/${USER}/cooked/${year}/${sessionID}. It also copies
the ./myscripts_anat_CIT folder in that directory. It is expected that one edits and runs the scripts
from that copy.


Quick Start:

0) IMPORT DICOM DATA
    Import all DICOM files for the current session into /space/raw_data/${year}/${session}. (I typically use
    ${session} names ala YYMMDDName, e.g. 101005Julien). This directory should just contain all the DICOM files without any subfolder


1) IMPORT THE DATA
    Edit ./unpack_CIT.csh to include the session of interest and run this script
    
2) CORRECT DATA FOR NHP POSITION
    Change into the new directory /space/data/${USER}/cooked/${year}/${sessionID}/myscripts_anat_CIT. If the
    animal was in sphinx position during the scans run ./00.05_correct_all_vols_4_sphinx_position.csh (read 
    and edit this script before running it blindly, that advise applies to everything). If the scans were not performed with the animal
    registered in HFS (head first supine) orientation (assuming scanning was done on Siemens gear) you will have to figure out the correct
    correction your self...
    
3) READ, EDIT & RUN all the pother scripts in numerical sequence
    Some scripts are not required some are, just pick the one's you need
    
    
CAVEAT
    These scripts are work in progress, might not do what you expect and or be broken at any time. I only tested them with version 4.5.
    They do however work for me...
    The unpack definitions in  CIT_FS4_cfg will have to be edited and adjusted for each site.
    
    At CIT we have an OpenPBS cluster set up, and some of the scripts can be auto pushed on this cluster. I do not expect this to work
    at any other site without adjusting the scripts...
    At least copy qpeek to /space/usr/bin/qpeek...
    
    
    
    
    
    
    
    

