See also AdniReconNotes

Notes on how to download ADNI subject data and incorporate into our local copy, which is found here:

cd /autofs/cluster/con_002/users/ADNI

The main ADNI site is here: http://adni.loni.ucla.edu/

It is necessary to obtain an account with them in order to download data from the LONI site, which is here: https://ida.loni.ucla.edu/login.jsp?project=ADNI

T2/PD data

#\! /bin/tcsh -ef

# the adni root dir
set ADNI=(/autofs/cluster/con_002/users/ADNI)

# the month we're working with (be sure to update this var!!!!!!)
set m=(_m6)

foreach f (`ls *.xml`)

# find out which image type this .xml file describes (PD or T2)
set weighting=(`grep Weighting $f | awk 'BEGIN { FS = "[<>]" } ; {printf $3}'`)

# chop-off .xml extension
set ff=(`basename $f .xml`)

# extract subject name
set subjid=(`echo $ff | awk 'BEGIN { FS = "_" } ; {printf $4}'`)

# extract unique identifier for this file
set uid=(`echo $ff | awk 'BEGIN { FS = "_I" } ; {printf $2}'`)

# convert file, storing into main adni dir
set niifile=(`find | grep "_S_${subjid}" | grep "_I${uid}" | grep "\.nii"`)
set origdir=($ADNI/${subjid}${m}/mri/orig)
if ( -e $origdir) then
    mri_convert $niifile $origdir/${weighting}.mgz
endif

end