Saturday, September 17, 2011

DTI process steps.

1) Convert DICOM or .PAR/.REC or other raw images to .nii file which is well supported by most of neuroimaging packages (FSL, AFNI, DTI-Studio ...)

$ mkdir Y3_05M002
$ cd Y3_05M002
$ 3dPAR2AFNI.pl -n -s -o Y3_05M002 05M002_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_10_1.PAR
*** WARNING: The number of volumes from the PAR header does not match the number of slices times the number of images!
*** WARNING: Resetting the number of volumes to be the number of slices times the number of images (33).
to3d -session /media/Langs/IRC_19B_LongitudinalContinuation/RawData/05M002_B1/Y3_05M002/  -skip_outliers -prefix 05M002_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_10_1.nii -time:zt 64 33 12172.998ms zero -xFOV 131.308R-124.692L -yFOV 130.114A-125.886P -zFOV 35.832I-92.168S 3D:-1:0:128:128:2112:05M002_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_10_1.REC
++ to3d: AFNI version=AFNI_2011_05_26_1457 (Aug 31 2011) [32-bit]
++ Authored by: RW Cox
*+ WARNING: TR expressed in milliseconds will be converted to TR=12.172998s
++ Counting images:  total=2112 2D slices
++ Each 2D slice is 128 X 128 pixels
++ Image data type = short
++ Reading images: ..........................................
++ 3D dataset written to disk

bash script:  yw_dti01_conversion.sh
(sh yw_dti01_conversion.sh) 
#! /bin/bash
# Yingying 9.7.2011 wrote this script for DTI analysis
# Advisor: Dr. Scott K. Holland

fdlist="05M002_B1 \
06F001_B1 \
06F011_B1 \
06M001_B1 \
06M005_B1 \
06M012_B1 \
07F002_B1 \
07F007_B1 \
07F009_B1 \
07F010_B1 \
07F024_B1 \
07M001_B1 \
07M005_B1 \
07M006_B1"

for fd in $fdlist;do
    cd ${fd}
    if [ "echo `ls *.PAR`" != "" ]; then
        mkdir Y3_${fd%_B1}      
        3dPAR2AFNI.pl -n -s -o Y3_${fd%_B1}/ *.PAR
        cp Y3_${fd%_B1}/*.nii ../Y3_data_orig_nii/      
    else
       echo "${fd} has no .PAR file"
    fi
    cd ..
done


2)  Run the tbss_pipeline_1.  Succeed!


However, the results are not right.  Need to talk with Boss.

No comments:

Post a Comment