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
- get hospital or NYU CEC dicoms from Callah
- identify T1 scan with slicer (Unix) or Dicomworks (Windows)
- login in to ip61.ucsd.edu:63 to find or assign the correct NY number
- the data will be uploaded to /home/ccarlson/data/eeg
- rename the data to the appropriate scheme:
hospital scans get NY###_MRI_NS_mmddyy where mmddyy is the month day and year.
- su nyuproj
- cd /home/ccarlson/data/eeg
- cp -r NY###_MRI_NS_mmddyy /home/nyuproj/tmp_NYU_MRI/.
- matlab
from here on out the >> notation denotes a command to run in matlab
- >> NYU_MMIL_PreProcess_Exams
- >> 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
- mkdir MRIRAWDICOM_NY###_MRI_NS_mmddyy MRIPROCESSED_NY###_MRI_NS_mmddyy
- cp /home/nyuproj/tmp_NYU_MRI/NY###_MRI_NS_mmddyy/dicom_folder MRIRAWDICOM_NY###_MRI_NS_mmddyy/.
- ~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)
- 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
- 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:
- insert controls points to correct it
- 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.
- CHECK brainmask.mgz
tkmedit NY###_MRI_NS_mmddyy T1.mgz -aux brainmask.mgz
- Login to mmilcluster
ssh mmilcluster
btq_fast_recon_ar2.csh NY###_MRI_NS_mmddyy
- Come back in 15 hours and it will be done.