DTI ANALYSIS from Harvey
if you are not logged into harvey, type ssh harvey
and enter your password
cd to /lab research/FMRI/patients/AG_####/DTI
1. copy the raw DTI “I” files to your subject’s DTI directory; you should have eight “I” files for every slice you acquired; the DTI “I” files are in the subject’s 
/raw/0####/### directory (0#### denotes the scanning exam number, and ### is the scanner series number for the DTI data); to copy the “I” files from the 
subject’s DTI directory, type (without the quotation marks) “cp ../raw/0####/###/* .
2. in the subject’s DTI directory, copy two files from the /home/lab/research/DTI/templates directory: LSDIrecon_par; and mytemplate.xml;
type (without the quotation marks) “cp /home/lab/research/DTI/templates/* .
3. change the read-write permissions for these two new files;
type chmod o+rw LSDIrecon_par;
then type chmod o+rw mytemplate.xml
4. LSDIrecon_par is the parameter file for the LSDIrecon script; type LSDIrecon to execute the script
5. execute the lsdi_t2dwi2slicer.py script by typing lsdi_t2dwi2slicer.py
after the script runs you should now have seven “anon_t2dwi” files for every slice you acquired
6. edit the mytemplate.xml file in a text editor (e.g., pico; vi)
you will need to change four items:
filePrefix
enter the path to your DTI data (e.g., /home/lab/research/FMRI/controls/AG_5000/DTI/) in front of   /anon_t2dwi’
imageRange
change the number after “1” to the total number of “anon_t2dwi” files you have, leaving the space in between the two numbers
spacing
look at the header of one “I” file
there are two ways to view an image file header: MRIcro, or the print_header command, depending upon what machine you are working from
to use MRIcro, type startmricro
in the dialog box, click Import from the menu and choose Open foreign
type the path to your “I” files in the “Look in” box and hit return
select an “I” file and click Open; the image will appear in the dialog box
click on Import and choose Display/hide foreign header
enter the two values of “XY mm”  and "5" as the third value here, in that order, separated by a space
to use the print_header command, type print_header
enter the values of “pixel_xsize”, “pixel_ysize”, and "5" as the third value here, in that order, separated by a space
scanOrder
set this value to ‘PA’
7. load slicer with your data; type golbyslicer mytemplate.xml
you now see three separate windows: the small gray Main window; the Modules window in the upper left-hand corner of your screen;
and the large 3D Viewer window
after the anon_t2dwi data is fully loaded, go to the Modules window and click on the More button and choose the DTMRI module
in the DTMRI module, click the gray Convert tab; then click the button marked None, next to Protocol:, and choose BWH_6g.1bSlice as your protocol
then click Convert Volume
8.  in the Modules window, click on the Volumes button, then click the Display tab
 in the Active Volume box, click and choose noGradient6_anon_t2dwi
go to the 3D viewer window and click on the Bg button just above the axial view image and choose noGradient6_anon_t2dwi as well
go back to the Modules window and in the Window/Level box, move the Win and Lev sliders to simultaneously adjust the contrast of your axial, 
sagittal, and coronal images in the 3D viewer window
9. Displaying DTI Glyphs
in the Modules window, click on the More button and choose the DTMRI module from the list; then click the Display tab
in the 3D Viewer window, choose the orientation (axial, sagittal, coronal) you want to display in the 3D pane, and move that slider to choose 
a particular slice of interest
go back to the 3D viewer window, and in the Display Glyphs tab, choose the Glyphs on Slice colored button that corresponds to the orientation 
you’ve chosen in the 3D Viewer window (pink=axial,  yellow=sagittal, green=coronal)
click the Display Glyphs “On” button and they will appear in the 3D Viewer window
to remove the R-L, A-P, I-S letters in the 3D pane, click the More button and choose the Anno module; then press the 3D Letters button so 
that it changes from white to beige
10. DTI Tractography
in the Modules window, click on the More button and choose the DTMRI module from the list; then click the Display tab, and then the Tractography tab
choose the orientation and slice of interest in the 3D Viewer window, and then click the Display Tracts “On” button in the Modules window
position the mouse pointer in the 3D Viewer pane (or in the axial, sagittal, or coronal views below), on a point of anatomical interest, and press  
the “L” key to display the tracts; repeat this action to continue displaying tracts on a particular slice
Saving an Image Snapshot
when you’re ready to save an image in the 3D Viewer window, go to the Modules window and click on View from the top menu, and choose 3D; then 
maximize the size of the 3D Viewer window
now go to the Modules window and choose File from the top menu, and choose Set Save 3D View Parameters; type the path to your data in the Directory box 
so your snapshots will be stored here; click Close; then go back to File menu and choose Save 3D View
cd to where you saved your snapshots; the files are named slicer-#####.png; to view the file, type display and the filename; to print the image, type print and the filename