Print

Print


Hi Annie,

All processing is done in native acquisition space and the tracts are therefore completely aligned with your tensor metrics, so you will not be needing FNIRT for this. The only difference is, as you noted, the resolution at which the images are stored. This means that you can either downsample the tract maps to match your 2.5mm cubic DTI acquisition, or you can supersample the metric images (FA, MD etc) to match the tract images. The choice is up to you.

The FA image that is supersampled in the visualisation script takes the latter approach, you could use the transformation on line 131 of the prepareForDisplay script and alter it so that you warp the other images. You would then get something like (not tested):

while read sub; do
    mkdir -p measurements/$sub
    for im in FA MD L1 L2 L3; do
        $FSLDIR/bin/applywarp --in=preproc/$sub/dti_${im} --out=measurements/$sub/dti_${im} --ref=preproc/$sub/refVol --premat=$FSLDIR/etc/flirtsch/ident.mat
    done
done < preproc/subjectList

Or you do it the other way around if you prefer not to resample your diffusion metrics. You would then get something like this (again untested, and please note the two places to insert a setting and a path indicated with […]):

thresh=[threshold determined in visualization]
while read sub; do
    mkdir -p measurements/$sub
    while read line; do
        struct=`echo $line | awk '{print $1}’`
        $FSLDIR/bin/applywarp --in=tracts/$sub/$struct/tracts/tractsNorm --out=measurements/$sub/${struct}_float --ref=preproc/$sub/dti_FA --premat=$FSLDIR/etc/flirtsch/ident.mat
        $FSLDIR/bin/fslmaths measurements/$sub/${struct}_float -thr $thresh -bin measurements/$sub/${struct}_bin -odt char
    done < [path to autoPtx scripts]/structureList
done < preproc/subjectList

In both cases you (should) get the correct images in a new measurements folder, so from there you can script your measurements.

Cheers, Marius


On 21 Jul 2015, at 23:02 , Annie Yoon <[log in to unmask]> wrote:

> Hi all, 
> 
> I downloaded the AutoPtx and used it to extract the mean FA values for the tracks of my interest.
> 
> However, I am not sure how I could transform/register other diffusion maps (e.g., MD, L1, L2, L3) under preproc folder (dimension: 96x96x68, voxel= 2.5x2.5x2.5) to match the dimension of the binary mask for a track (and dti_FA map) saved under /visualise folder (new dimension: 240x240x170, voxel= 1x1x1). I tried fnirt with the new dti_FA map as a reference image, but the transformed MD map looks distorted. 
> 
> I would appreciate your help me with the scripts. 
> 
> Thank you,
> Annie