Reconstruction and Localization

The abbreviated recon/localization procedure is a process used to maximize efficiency in the surface reconstruction and electrode localization process.  It combines most of the steps from both the Reconstruction for FS Analysis and Autocoregistration and Electrode Localization, with the goal of visualizing the electrodes on a reconstructed surface in a timely manner.  At this point, the steps omitted are the steps taken to clarify the image, seeing as a surface is the only thing necessary to obtain this goal.

 

       SHELL COMMANDS

       MATLAB COMMANDS

 

  1. get hospital or NYU CEC dicoms from Callah
  2. identify T1 scan with slicer (Unix) or Dicomworks (Windows)
  3. login in to ip61.ucsd.edu:63 to find or assign the correct NY number
  4. the data will be uploaded to /home/ccarlson/data/eeg
  5. rename the data to the appropriate scheme:

hospital scans get NY###_MRI_NS_mmddyy   where mmddyy is the month day and year.

  1. su nyuproj
  2. cd /home/ccarlson/data/eeg
  3. cp -r NY###_MRI_NS_mmddyy /home/nyuproj/tmp_NYU_MRI/.
  4. matlab

from here on out the >> notation denotes a command to run in matlab

  1. >> NYU_MMIL_PreProcess_Exams
  2. >> run ~/batchdirs/NYU_MMIL_PreProcess_Exams/job_001.

if you get an error at step 11, such as: ‘reference to non-existing field ‘StudyInstanceUID’

cd /home/halgdev/analysis/MRI_NYU

mkdir NY###_MRI_NS_mmddyy

          iii. cd NY###_MRI_NS_mmddyy

  1. mkdir MRIRAWDICOM_NY###_MRI_NS_mmddyy MRIPROCESSED_NY###_MRI_NS_mmddyy
  2. cp /home/nyuproj/tmp_NYU_MRI/NY###_MRI_NS_mmddyy/dicom_folder MRIRAWDICOM_NY###_MRI_NS_mmddyy/. 
  3. ~btquinn/bin/mricron/dcm2nii SD_preop_00004

               setenv SUBJECTS_DIR $PWD

               recon-all -autrecon1 -i MRIPROCESSED_NY###_MRI_NS_mmddyy/c*nii.gz -subjid FREESURFERRECON_NY###_MRI_NS_mmddyy

               setenv SUBJECTS_DIR /space/mdeh3/3/halgdev/projects/nyuproj/subjects

               cd $SUBJECTS_DIR

ln -s /space/mdeh3/4/halgdev/analysis/MRI_NYU/NY###_MRI_NS_mmddyy/FREESURFERRECON_NY###_MRI_NS_mmddyy NY###_MRI_NS_mmddyy

PROCEED TO 12. (SKIP b. below)

  1. if you are error free at step 11, consider yourself lucky.  run:

>> NYU_MMIL_Process_Exams

>> !grep NY### ~/batchdirs/NYU_MMIL_Process_Exams/job_*

this should return a file name, we’ll call it job_#.m,

>> run job_#.m

>> NYU_MMIL_Freesurfer_Recon_Exams

>> !grep NY### ~batchdirs/NYU_MMIL_Freesurfer_Recon_Exams/job_*.csh

in the terminal, run the .csh script you grepped for:

~/batchdirs/NYU_MMIL_Freesurfer_Recon_Exams/job_###.csh

>> NYU_MMIL_Link_FS_Subs

  1. CHECK T1.mgz

tkmedit NY###_MRI_NS_121509 T1.mgz

white matter should have an intensity value of 110.  if it seems noisy (salt & pepper), or has intensity drop-offs:

  1. insert controls points to correct it
  2. recon-all -normalization -subjid NY###_MRI_NS_mmddyy

This takes ~8mins, if you check the T1.mgz quickly after it is created, you can save time.

  1. CHECK brainmask.mgz

tkmedit NY###_MRI_NS_mmddyy T1.mgz -aux brainmask.mgz

  1. Login to mmilcluster

ssh mmilcluster

       btq_fast_recon_ar2.csh NY###_MRI_NS_mmddyy

  1. Come back in 15 hours and it will be done.