Friday, September 30, 2011

FSL FEEDS error work around.

Good news:  I did try to work around this.

See the following command.  I 3dcopy the original fmri.nii.gz

yingying@yingying-debian:~/opt/fsl_feeds/data$ 3dcopy fmri.nii.gz fmri_afni.nii.gz
++ 3dcopy: AFNI version=AFNI_2011_05_26_1457 (Aug 19 2011) [64-bit]
*+ WARNING: NO spatial transform (neither qform nor sform), in NIfTI file 'fmri.nii.gz'

yingying@yingying-debian:~/opt/fsl_feeds/data$ /home/yingying/opt/fsl_4_1_8/bin/melodic -i /home/yingying/opt/fsl_feeds/data/fmri_afni -o /home/yingying/opt/fsl_feeds/results/fmri.ica --tr=3 --seed=2

Then, it works.  Error messages are gone.

This question still puzzles me.  Any comments are welcome.

>>> Yingying Wang 09/30/11 11:07 PM >>>
/home/yingying/opt/fsl_4_1_8/bin/melodic -i /home/yingying/opt/fsl_feeds/data/fmri -o /home/yingying/opt/fsl_feeds/results/fmri.ica --tr=3 --seed=2
** ERROR: nifti_convert_nhdr2nim: bad dim[0]
** ERROR (nifti_image_read): cannot create nifti image from header '/home/yingying/opt/fsl_feeds/data/fmri.nii.gz'
** ERROR: nifti_image_open(/home/yingying/opt/fsl_feeds/data/fmri): bad header info
ERROR: failed to open file /home/yingying/opt/fsl_feeds/data/fmri
ERROR: Could not open image /home/yingying/opt/fsl_feeds/data/fmri
Image Exception : #22 :: Failed to read volume /home/yingying/opt/fsl_feeds/data/fmri



An exception has been thrown
Failed to read volume /home/yingying/opt/fsl_feeds/data/fmriTrace: read_volumeROI.


/home/yingying/opt/fsl_4_1_8/bin/fslcc /home/yingying/opt/fsl_feeds/data/fmri.ica/melodic_IC /home/yingying/opt/fsl_feeds/results/fmri.ica/melodic_IC > /home/yingying/opt/fsl_feeds/results/fmri.ica/fslcc.txt
** ERROR (nifti_image_read): failed to find header file for '/home/yingying/opt/fsl_feeds/results/fmri.ica/melodic_IC'
** ERROR: nifti_image_open(/home/yingying/opt/fsl_feeds/results/fmri.ica/melodic_IC): bad header info
ERROR: failed to open file /home/yingying/opt/fsl_feeds/results/fmri.ica/melodic_IC
ERROR: Could not open image /home/yingying/opt/fsl_feeds/results/fmri.ica/melodic_IC
Image Exception : #22 :: Failed to read volume /home/yingying/opt/fsl_feeds/results/fmri.ica/melodic_IC
terminate called after throwing an instance of 'RBD_COMMON::BaseException'
Aborted

==============================================
Yingying Wang
Graduate Student
Biomedical Engineering
University of Cincinnati
Pediatric Neuroimaging Consortium Research Center
Cincinnati Children's Hospital Medical Center
MLC 5033, 3333 Burnet Avenue
Cincinnati, OH 45229-3039
O 513-636-3495
C 513-833-7448

=======================
Dear Matthew,

Here is the message:

Progress Report / Log

Started at Thu Sep 29 01:13:48 EDT 2011 Feat main script
/bin/cp /home/yingying/opt/fsl_feeds/results/design.fsf design.fsf

/home/yingying/opt/fsl_4_1_8/bin/feat_model design 

mkdir .files;cp /home/yingying/opt/fsl_4_1_8/doc/fsl.css .files;ln -s 
/home/yingying/opt/fsl_4_1_8/doc/images .files/images

/home/yingying/opt/fsl_4_1_8/bin/fsl_sub -T 18 -l logs -N feat2_pre -j featModelID 
/home/yingying/opt/fsl_4_1_8/bin/feat 
/home/yingying/opt/fsl_feeds/results/fmri.feat/design.fsf -D 
/home/yingying/opt/fsl_feeds/results/fmri.feat -I 1 -prestats
13124

/home/yingying/opt/fsl_4_1_8/bin/fsl_sub -T 72 -l logs -N feat3_film -j 13124 
/home/yingying/opt/fsl_4_1_8/bin/feat 
/home/yingying/opt/fsl_feeds/results/fmri.feat/design.fsf -D 
/home/yingying/opt/fsl_feeds/results/fmri.feat -I 1 -film
13197

/home/yingying/opt/fsl_4_1_8/bin/fsl_sub -T 2 -l logs -N feat4_post -j 13197 
/home/yingying/opt/fsl_4_1_8/bin/feat 
/home/yingying/opt/fsl_feeds/results/fmri.feat/design.fsf -D 
/home/yingying/opt/fsl_feeds/results/fmri.feat -poststats 0 0
13239

/home/yingying/opt/fsl_4_1_8/bin/fsl_sub -T 30 -l logs -N feat5_reg -j 13124 
/home/yingying/opt/fsl_4_1_8/bin/feat 
/home/yingying/opt/fsl_feeds/results/fmri.feat/design.fsf -D 
/home/yingying/opt/fsl_feeds/results/fmri.feat -I 1 -reg
13280

/home/yingying/opt/fsl_4_1_8/bin/fsl_sub -T 15 -l logs -N feat4_post -j 13239,13280 
/home/yingying/opt/fsl_4_1_8/bin/feat 
/home/yingying/opt/fsl_feeds/results/fmri.feat/design.fsf -D 
/home/yingying/opt/fsl_feeds/results/fmri.feat -poststats 1 0
13559

/home/yingying/opt/fsl_4_1_8/bin/fsl_sub -T 1 -l logs -N feat5_stop -j 13124,13197,13559,13280 
/home/yingying/opt/fsl_4_1_8/bin/feat 
/home/yingying/opt/fsl_feeds/results/fmri.feat/design.fsf -D 
/home/yingying/opt/fsl_feeds/results/fmri.feat -stop

Prestats
/home/yingying/opt/fsl_4_1_8/bin/fslmaths /home/yingying/opt/fsl_feeds/data/fmri prefiltered_func_data -odt float
** ERROR: nifti_convert_nhdr2nim: bad dim[0]
** ERROR (nifti_image_read): cannot create nifti image from header '/home/yingying/opt/fsl_feeds/data/fmri.nii.gz'
** ERROR: nifti_image_open(/home/yingying/opt/fsl_feeds/data/fmri): bad header info
ERROR: failed to open file /home/yingying/opt/fsl_feeds/data/fmri
Cannot open volume /home/yingying/opt/fsl_feeds/data/fmri for reading!
Total original volumes = 0
Error - prefiltered_func_data has a different number of time points to that in FEAT setup

Stats
cat: absbrainthresh.txt: No such file or directory
    while executing
"exec sh -c "cat absbrainthresh.txt" "
    (procedure "feat5:proc_film" line 57)
    invoked from within
"feat5:proc_film $session "
    ("-film" arm line 2)
    invoked from within
"switch -- [ lindex $argv $argindex ] {

 -I {
     incr argindex 1
     set session [ lindex $argv $argindex ]
 }

 -D {
     incr argindex 1
     set..."
    ("for" body line 2)
    invoked from within
"for { set argindex 1 } { $argindex < $argc } { incr argindex 1 } {
    switch -- [ lindex $argv $argindex ] {

 -I {
     incr argindex 1
     set ses..."
    (file "/home/yingying/opt/fsl_4_1_8/bin/feat" line 137)

Post-stats
/home/yingying/opt/fsl_4_1_8/bin/contrast_mgr -f design.fts stats design.con
** ERROR (nifti_image_read): failed to find header file for 'stats/sigmasquareds'
** ERROR: nifti_image_open(stats/sigmasquareds): bad header info
ERROR: failed to open file stats/sigmasquareds
ERROR: Could not open image stats/sigmasquareds
Image Exception : #22 :: Failed to read volume stats/sigmasquareds


An exception has been thrown
Failed to read volume stats/sigmasquaredsTrace: read_volume4DROI; ContrastMgr::Load; ContrastMgr::run.

couldn't change working directory to "/home/yingying/opt/fsl_feeds/results/fmri.feat/stats": no such file or directory
    while executing
"cd ${FD}/stats"
    (procedure "feat5:proc_poststats" line 50)
    invoked from within
"feat5:proc_poststats $RERUNNING $STDSPACE "
    ("-poststats" arm line 6)
    invoked from within
"switch -- [ lindex $argv $argindex ] {

 -I {
     incr argindex 1
     set session [ lindex $argv $argindex ]
 }

 -D {
     incr argindex 1
     set..."
    ("for" body line 2)
    invoked from within
"for { set argindex 1 } { $argindex < $argc } { incr argindex 1 } {
    switch -- [ lindex $argv $argindex ] {

 -I {
     incr argindex 1
     set ses..."
    (file "/home/yingying/opt/fsl_4_1_8/bin/feat" line 137)
couldn't change working directory to "/home/yingying/opt/fsl_feeds/results/fmri.feat/stats": no such file or directory
    while executing
"cd ${FD}/stats"
    (procedure "feat5:proc_poststats" line 50)
    invoked from within
"feat5:proc_poststats $RERUNNING $STDSPACE "
    ("-poststats" arm line 6)
    invoked from within
"switch -- [ lindex $argv $argindex ] {

 -I {
     incr argindex 1
     set session [ lindex $argv $argindex ]
 }

 -D {
     incr argindex 1
     set..."
    ("for" body line 2)
    invoked from within
"for { set argindex 1 } { $argindex < $argc } { incr argindex 1 } {
    switch -- [ lindex $argv $argindex ] {

 -I {
     incr argindex 1
     set ses..."
    (file "/home/yingying/opt/fsl_4_1_8/bin/feat" line 137)

Registration
/bin/mkdir -p reg

/home/yingying/opt/fsl_4_1_8/bin/fslmaths 
/home/yingying/opt/fsl_feeds/data/structural_brain highres
** ERROR: nifti_convert_nhdr2nim: bad dim[0]
** ERROR (nifti_image_read): cannot create nifti image from header 
'/home/yingying/opt/fsl_feeds/data/structural_brain.nii.gz'
** ERROR: nifti_image_open(/home/yingying/opt/fsl_feeds/data/structural_brain): bad header info
ERROR: failed to open file /home/yingying/opt/fsl_feeds/data/structural_brain
Cannot open volume /home/yingying/opt/fsl_feeds/data/structural_brain for reading!

/home/yingying/opt/fsl_4_1_8/bin/fslmaths 
/home/yingying/opt/fsl_4_1_8/data/standard/MNI152_T1_2mm_brain standard

/home/yingying/opt/fsl_4_1_8/bin/flirt -ref highres -in example_func -out 
example_func2highres -omat example_func2highres.mat -cost corratio -dof 6 -searchrx -90 90
-searchry -90 90 -searchrz -90 90 -interp trilinear  
** ERROR (nifti_image_read): failed to find header file for 'highres'
** ERROR: nifti_image_open(highres): bad header info
ERROR: failed to open file highres
ERROR: Could not open image highres
Image Exception : #22 :: Failed to read volume highres
terminate called after throwing an instance of 'RBD_COMMON::BaseException'
Aborted

/home/yingying/opt/fsl_4_1_8/bin/convert_xfm -inverse -omat highres2example_func.mat 
example_func2highres.mat
Could not open matrix file example_func2highres.mat
Cannot read input-matrix

/home/yingying/opt/fsl_4_1_8/bin/slicer example_func2highres highres 
-s 2 -x 0.35 sla.png -x 0.45 slb.png -x 0.55 slc.png -x 0.65 sld.png -y 0.35 sle.png 
-y 0.45 slf.png -y 0.55 slg.png -y 0.65 slh.png -z 0.35 sli.png -z 0.45 slj.png -z 0.55 
slk.png -z 0.65 sll.png ; 
/home/yingying/opt/fsl_4_1_8/bin/pngappend 
sla.png + slb.png + slc.png + sld.png + sle.png + slf.png + slg.png + slh.png + sli.png 
+ slj.png + slk.png + sll.png example_func2highres1.png ; 
/home/yingying/opt/fsl_4_1_8/bin/slicer highres example_func2highres -s 2 -x 0.35 sla.png
-x 0.45 slb.png -x 0.55 slc.png -x 0.65 sld.png -y 0.35 sle.png -y 0.45 slf.png -y 0.55 
slg.png -y 0.65 slh.png -z 0.35 sli.png -z 0.45 slj.png -z 0.55 slk.png -z 0.65 sll.png ; 
/home/yingying/opt/fsl_4_1_8/bin/pngappend sla.png + slb.png + slc.png + sld.png + sle.png
+ slf.png + slg.png + slh.png + sli.png + slj.png + slk.png + sll.png 
example_func2highres2.png ; 
/home/yingying/opt/fsl_4_1_8/bin/pngappend example_func2highres1.png - 
example_func2highres2.png example_func2highres.png; /bin/rm -f sl?.png
** ERROR (nifti_image_read): failed to find header file for 'example_func2highres'
** ERROR: nifti_image_open(example_func2highres): bad header info
ERROR: failed to open file example_func2highres
ERROR: Could not open image example_func2highres
Image Exception : #22 :: Failed to read volume example_func2highres
terminate called after throwing an instance of 'RBD_COMMON::BaseException'
Aborted

 Cannot open sla.png for reading
Segmentation fault
** ERROR (nifti_image_read): failed to find header file for 'highres'
** ERROR: nifti_image_open(highres): bad header info
ERROR: failed to open file highres
ERROR: Could not open image highres
Image Exception : #22 :: Failed to read volume highres
terminate called after throwing an instance of 'RBD_COMMON::BaseException'
Aborted

 Cannot open sla.png for reading
Segmentation fault

 Cannot open example_func2highres1.png for reading
Segmentation fault

/home/yingying/opt/fsl_4_1_8/bin/flirt -ref standard -in highres -out 
highres2standard -omat highres2standard.mat -cost corratio -dof 12 
-searchrx -90 90 -searchry -90 90 -searchrz -90 90 -interp trilinear  
** ERROR (nifti_image_read): failed to find header file for 'highres'
** ERROR: nifti_image_open(highres): bad header info
ERROR: failed to open file highres
ERROR: Could not open image highres
Image Exception : #22 :: Failed to read volume highres
terminate called after throwing an instance of 'RBD_COMMON::BaseException'
Aborted

/home/yingying/opt/fsl_4_1_8/bin/convert_xfm -inverse -omat standard2highres.mat 
highres2standard.mat
Could not open matrix file highres2standard.mat
Cannot read input-matrix

/home/yingying/opt/fsl_4_1_8/bin/slicer highres2standard standard -s 2 -x 0.35 sla.png 
-x 0.45 slb.png -x 0.55 slc.png -x 0.65 sld.png -y 0.35 sle.png -y 0.45 slf.png -y 0.55 
slg.png -y 0.65 slh.png -z 0.35 sli.png -z 0.45 slj.png -z 0.55 slk.png -z 0.65 sll.png ; 
/home/yingying/opt/fsl_4_1_8/bin/pngappend sla.png + slb.png + slc.png + sld.png + sle.png 
+ slf.png + slg.png + slh.png + sli.png + slj.png + slk.png + sll.png highres2standard1.png ; 
/home/yingying/opt/fsl_4_1_8/bin/slicer standard highres2standard -s 2 -x 0.35 sla.png -x 0.45 
slb.png -x 0.55 slc.png -x 0.65 sld.png -y 0.35 sle.png -y 0.45 slf.png -y 0.55 slg.png -y 0.65
slh.png -z 0.35 sli.png -z 0.45 slj.png -z 0.55 slk.png -z 0.65 sll.png ; 
/home/yingying/opt/fsl_4_1_8/bin/pngappend sla.png + slb.png + slc.png + sld.png + sle.png + 
slf.png + slg.png + slh.png + sli.png + slj.png + slk.png + sll.png highres2standard2.png ; 
/home/yingying/opt/fsl_4_1_8/bin/pngappend highres2standard1.png - highres2standard2.png 
highres2standard.png; /bin/rm -f sl?.png
** ERROR (nifti_image_read): failed to find header file for 'highres2standard'
** ERROR: nifti_image_open(highres2standard): bad header info
ERROR: failed to open file highres2standard
ERROR: Could not open image highres2standard
Image Exception : #22 :: Failed to read volume highres2standard
terminate called after throwing an instance of 'RBD_COMMON::BaseException'
Aborted

 Cannot open sla.png for reading
Segmentation fault

 Cannot open highres2standard1.png for reading
Segmentation fault

/home/yingying/opt/fsl_4_1_8/bin/convert_xfm -omat example_func2standard.mat -concat 
highres2standard.mat example_func2highres.mat
Could not open matrix file example_func2highres.mat
Cannot read input-matrix

/home/yingying/opt/fsl_4_1_8/bin/flirt -ref standard -in example_func -out 
example_func2standard -applyxfm -init example_func2standard.mat -interp trilinear
** ERROR (nifti_image_read): failed to find header file for 'example_func'
** ERROR: nifti_image_open(example_func): bad header info
ERROR: failed to open file example_func
ERROR: Could not open image example_func
Image Exception : #22 :: Failed to read volume example_func
terminate called after throwing an instance of 'RBD_COMMON::BaseException'
Aborted

/home/yingying/opt/fsl_4_1_8/bin/convert_xfm -inverse -omat standard2example_func.mat 
example_func2standard.mat
Could not open matrix file example_func2standard.mat
Cannot read input-matrix

/home/yingying/opt/fsl_4_1_8/bin/slicer example_func2standard standard -s 2 -x 0.35 sla.png 
-x 0.45 slb.png -x 0.55 slc.png -x 0.65 sld.png -y 0.35 sle.png -y 0.45 slf.png -y 0.55 
slg.png -y 0.65 slh.png -z 0.35 sli.png -z 0.45 slj.png -z 0.55 slk.png -z 0.65 sll.png ; 
/home/yingying/opt/fsl_4_1_8/bin/pngappend sla.png + slb.png + slc.png + sld.png + sle.png 
+ slf.png + slg.png + slh.png + sli.png + slj.png + slk.png + sll.png 
example_func2standard1.png ; /home/yingying/opt/fsl_4_1_8/bin/slicer standard 
example_func2standard -s 2 -x 0.35 sla.png -x 0.45 slb.png -x 0.55 slc.png -x 0.65 
sld.png -y 0.35 sle.png -y 0.45 slf.png -y 0.55 slg.png -y 0.65 slh.png -z 0.35 sli.png 
-z 0.45 slj.png -z 0.55 slk.png -z 0.65 sll.png ; 
/home/yingying/opt/fsl_4_1_8/bin/pngappend sla.png + slb.png + slc.png + sld.png + 
sle.png + slf.png + slg.png + slh.png + sli.png + slj.png + slk.png + sll.png 
example_func2standard2.png ; /home/yingying/opt/fsl_4_1_8/bin/pngappend 
example_func2standard1.png - example_func2standard2.png example_func2standard.png;
/bin/rm -f sl?.png
** ERROR (nifti_image_read): failed to find header file for 'example_func2standard'
** ERROR: nifti_image_open(example_func2standard): bad header info
ERROR: failed to open file example_func2standard
ERROR: Could not open image example_func2standard
Image Exception : #22 :: Failed to read volume example_func2standard
terminate called after throwing an instance of 'RBD_COMMON::BaseException'
Aborted

 Cannot open sla.png for reading
Segmentation fault

 Cannot open example_func2standard1.png for reading
Segmentation fault

Thanks.
Yingying



==============================================
Yingying Wang
Graduate Student
Biomedical Engineering
University of Cincinnati
Pediatric Neuroimaging Consortium Research Center
Cincinnati Children's Hospital Medical Center
MLC 5033, 3333 Burnet Avenue
Cincinnati, OH 45229-3039
O 513-636-3495
C 513-833-7448

>>> Matthew Webster 09/29/11 6:27 AM >>>
Hello,
          If you check the log files in the generated results/fmri.feat directory, there should hopefully be more specific error-messages related to the FEAT test.

Many Regards

Matthew

P.S.
For debian/Ubuntu systems we recommend installing the precompiled FSL binaries from http://neuro.debian.net/pkgs/fsl.html 
Dear FSL Team,

I had feeds error (I compiled fsl 4.1.8 myself) :

yingying@yingying-debian:~/opt/fsl_feeds$ ./RUN all

FSL Evaluation and Example Data Suite v4.1.8

start time = Wed Sep 28 23:30:34 EDT 2011
hostname = yingying-debian
os = Linux yingying-debian 2.6.32-5-amd64 #1 SMP Fri Sep 9 20:23:16 UTC 2011 x86_64 GNU/Linux


/bin/rm -rf /home/yingying/opt/fsl_feeds/results ; mkdir /home/yingying/opt/fsl_feeds/results


Starting PRELUDE & FUGUE at Wed Sep 28 23:30:34 EDT 2011
% error = 0.0
% error = 0.0

Starting SUSAN at Wed Sep 28 23:30:35 EDT 2011
% error = 0.03

Starting SIENAX (including testing BET and FLIRT and FAST) at Wed Sep 28 23:32:22 EDT 2011
checking error on BET:
% error = 0.0
checking error on FLIRT:
% error = 0.0
checking error on FAST:
checking error on single-image binary segmentation:
% error = 0.37
checking error on partial volume images:
% error = 0.28
% error = 0.41
% error = 0.29
checking error on SIENAX volume outputs:
% error = 0.18
% error = 0.11
% error = 0.49
% error = 0.02
% error = 0.51

Starting BET2 at Wed Sep 28 23:45:15 EDT 2011
checking error on T1 brain extraction:
% error = 0.0
checking error on skull and scalp surfaces:
% error = 0.02
% error = 0.03
% error = 0.14

Starting FEAT at Wed Sep 28 23:53:08 EDT 2011
checking error on filtered functional data:
No output image created
Warning - test failed!
checking error on raw Z stat images:
No output image created
Warning - test failed!
No output image created
Warning - test failed!
No output image created
Warning - test failed!
checking error on thresholded Z stat images:
No output image created
Warning - test failed!
No output image created
Warning - test failed!
No output image created
Warning - test failed!
checking error on registration images:
No output image created
Warning - test failed!
No output image created
Warning - test failed!
checking error on position of largest cluster of Talairached zfstat1:
couldn't open "/home/yingying/opt/fsl_feeds/results/fmri.feat/cluster_zfstat1_std.txt": no such file or directory
    while executing
"open ${FEEDSDIR}/results/fmri.feat/cluster_zfstat1_std.txt r "
    invoked from within
"if { $feeds(feat) } {

puts "\nStarting FEAT at [ exec date ]"

# fix FEAT setup file to use FEEDSDIR and FSLDIR
fsl:exec "cp ${FEEDSDIR}/data/fmri.fe..."
    (file "./RUN" line 285)

Why FEAT will not work?

Thanks a lot.
yingying

FW from http://wiredminds.blogspot.com/2011/06/dti-preprocessing-in-fsl-b-vector.html

DTI preprocessing in FSL: B-vector correction

Using FSL to pre-process DTI data is easy to do, and the use of a standard FMRIB pipeline is ubiquitous in the literature. An ongoing concern with this common pre-processing pipeline is how to appropriately deal with eddy currents. FSL uses a 12 degree of freedom affine registration as a method of eddy current correction. By definition, therefore, it corrects for both eddy currents AND gross subject motion. So far this seems great... however...
It is really important to alter your b-vector file based on subject motion (Leemans and Jones 2009), but one should NEVER correct b-vectors based on eddy currents, since these vary across the brain (randomly) depending on a variety of factors. This can have profound effects on not only tractography, but also general diffusion modelling (DTIfit). Current wisdom on the FSL forum suggests that using the downloadable script “rotbvecs” will solve your b-vector correction issue. The problem is that this will correct for both subject motion AND eddy currents.
Here is a simple solution that will allow you to keep using FSL for preprocessing, and keep you up to date on appropriate b-vector corrections:
1) Create a new eddy_correct script that only uses 6-degrees of freedom, and call it eddy_correct_6dof. To do this, just add “-dof 6” to the following line of code:
${FSLDIR}/bin/flirt –in $i –ref ${output}_ref –nosearch –o $i –paddingsize 1
Then run the rotbvecs script as normal (this changes the bvecs file to reflect subject motion).
If you still want to correct for eddy_currents, simply run the regular eddy_correct script, and don’t touch the b-vector file. This might seem like a time consuming extra step, but probabilistic tractography is incredibly sensitive to the initial quality of the data. If you are looking for more detailed instructions, just send me a quick email (look to http://csl.psychol.cam.ac.uk/people/) for my contact info.
Of course ... one can also simply choose not to use FSL to pre-process the data... some great alternatives are emerging.

Wednesday, September 28, 2011

Recent web links.

http://www.dailymotion.com/video/xjzxat_ismrm-2011-tutorial-group-analysis-atlases_tech

http://caportal.cis.jhu.edu/tutorials

http://www.fmrib.ox.ac.uk/fsl/tbss/index.html

http://caportal.cis.jhu.edu/tutorials

http://www.cabiatl.com/CABI/resources/course/

http://www.fmrib.ox.ac.uk/fsl/tbss/index.html

http://www.colbyimaging.com/wiki/neuroimaging/tractography

http://openwetware.org/wiki/Beauchamp:ProcessDiffTensImgData

http://www.fmrib.ox.ac.uk/fslcourse/lectures/practicals/fdt/index.htm#diffdata

http://rgm2.lab.nig.ac.jp/RGM2/func.php?rd_id=dti:readDWIdata

https://science.nichd.nih.gov/confluence/display/nihpd/Current+Publications

http://afni.nimh.nih.gov/sscc/dglen/DTIQuery

http://brainimaging.waisman.wisc.edu/~tjohnstone/AFNI_connectivity.html

http://wiredminds.blogspot.com/2011/06/dti-preprocessing-in-fsl-b-vector.html

http://en.wikibooks.org/wiki/Basic_Physics_of_Nuclear_Medicine/MRI_%26_Nuclear_Medicine

http://www.fil.ion.ucl.ac.uk/spm/data/face_rep/

http://users.fmrib.ox.ac.uk/~karla/grad_program/fmrib_induction_physics.html

http://dti-tk.sourceforge.net/pmwiki/pmwiki.php?n=Documentation.Install

http://fieldtrip.fcdonders.nl/reference/ft_multiplottfr

http://fieldtrip.fcdonders.nl/example/lcmv-beamformer

http://fieldtrip.fcdonders.nl/example/common_filters_in_beamforming

http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_dipole_fit

http://fieldtrip.fcdonders.nl/example/compute_forward_simulated_data_and_apply_a_beamformer_scan

http://fieldtrip.fcdonders.nl/example/symmetric_dipoles

http://jn.physiology.org/content/early/2011/08/26/jn.00303.2011.abstract

http://openwetware.org/wiki/Beauchamp:InitialAutoVOIforIT

http://openwetware.org/wiki/Beauchamp:DetermineTract

http://fieldtrip.fcdonders.nl/reference/ft_multiplottfr

http://fieldtrip.fcdonders.nl/tutorial/plotting

http://fieldtrip.fcdonders.nl/reference/ft_preprocessing

http://code.google.com/p/tractor/

http://brainimaging.waisman.wisc.edu/~jjo/fieldmap_correction/make_fmap.html

http://www.na-mic.org/Wiki/index.php/Downloads

FW from http://openwetware.org/wiki/Beauchamp:ProcessDiffTensImgData

Notes on Eddy Current Correction

To reduce Eddy Currents, Phillips recommends increasing the partial k-space collected from 0.5 to 0.73; Vips does this as a matter of course. Phillips does not support the double spin-echo method described below, but YuXiang has implemented it and finds that it gives very similar results to the standard Phillips sequence. Note the importance of 12-parameter registration with 3dAllineate:
  1. here, alignment of each DWI to skull stripped anatomy is done with the warp affine_general (12 parameter option)
3dAllineate -base {$ec}anatSS+orig -source {$ec}_DMaps+orig -prefix {$ec}DWIREGtoSSanat -verb -warp affine_general -EPI -cost mutualinfo -1Dfile {$ec}DWIREGtoSSanatXform -master {$ec}_DMaps+orig
  1. compute the diffusion tensors; Daniel Glen says the –reweight option should provide additional help to reduce eddy current distortion
3dDWItoDT -prefix {$ec}_Tensors -automask -reweight -max_iter 10 -max_iter_rw 10 DWGradientVectorsAfter12-21-07.txt {$ec}DWIREGtoSSanat+orig'[0..32]'

Eddy-currents can be a problem, but there aren't that many reliable correction methods out there. The FSL method is just a matter of performing affine registration to the b=0 image, which isn't necessarily the best approach given that the b=0 image has a large CSF contribution, which is absent from the DW images - in certain cases, that's been shown to introduce 'over-stretching' of the DW images to fit the extra ring of CSF. That shouldn't however be a problem with your data, since they seem to have very good SNR.
In general, the most effective approach is to use the so-called 'twice-refocused' acquisition, which is designed to minimise eddy-current effects - it is effectively a double spin-echo sequence. Here's the reference if you need it:
Reese TG, Heid O, Weisskoff RM, Wedeen VJ Reduction of eddy-current-induced distortion in diffusion MRI using a twice-refocused spin echo Magn Reson Med 2003; 49 (1): 177-182
It is the default of Siemens systems, and has been for several years now. I can't tell from the DICOM data you sent me whether your data were acquired with a single or double spin-echo sequence, but I would be surprised if Philips didn't also at least offer that sequence. If your data were acquired with the twice-refocused sequence, then distortions due to eddy-currents should be negligible, or at least sub-voxel. If they were acquired with a single SE sequence, then you do unfortunately need to correct for eddy-currents.
However, what I noticed was that the DICOM data you sent me had a fair bit of motion artefact, which had obviously been corrected in the equivalent NIfTI image. Whatever routine you used to do the motion correction did a very good job, and the resulting images do not seem to have any significant eddy-current artefact in them - you can usually tell by looking at the colour-coded direction maps: with eddy-current artefacts, there's usually a ring of colour around the edges of the brain, where the various DW images don't match. It's possible that your motion correction also performs eddy-current correction as a by-product. This will be the case in particular if you used a full affine registration algorithm (i.e. 12 degrees of freedom, including scaling & shearing), rather than a simpler rigid-body algorithm (i.e. 6 degrees of freedom, only translation & rotation). For example, the eddy-correct routine in FSL uses such an affine registration routine, which explicitly allows scaling, shearing & translation (all possible consequences of eddy-current effects). You might want to check what algorithm you used for the motion correction, and in particular what parameters were used, as you may already be performing eddy-current correction...
Hope that helps,
Donald.

Saturday, September 24, 2011

Fall in love with my DTI data.

FSL GUI problem.

Dear FSL team,


This problem was solved now! For some reason, adding FSLTCLSH and FSLWISH paths in the .bashrc does not work for my debian.


I edited fsl.sh file and set the FSLTCLSH=/usr/bin/tclsh & FSLWISH=/usr/bin/wish instead of adding them in the .bashrc file.


This time it works.  The error message is gone.  YEAH!


Thanks anyway.


Yingying

====================================================

I tried to set up the environmental variables to my locate tcl/tk.  The error messages are still there.  Help.


Application initialization failed: Can't find a usable tk.tcl in the following directories: 
   /home/yingying/opt/fsl_4_1_8/extras/lib/tk8.4 /home/yingying/opt/fsl_4_1_8/extras/lib/tcl8.4/tk8.4 /home/yingying/opt/fsl_4_1_8/lib/tk8.4 /home/yingying/opt/fsl_4_1_8/extras/library /home/yingying/opt/fsl_4_1_8/library /home/yingying/opt/fsl_4_1_8/tk8.4.19/library /home/yingying/opt/tk8.4.19/library


/home/yingying/opt/fsl_4_1_8/extras/lib/tk8.4/tk.tcl: no event type or button # or keysym
no event type or button # or keysym
   while executing
"bind Listbox  {
       %W yview scroll [expr {- (%D / 120) * 4}] units
   }"
   invoked from within
"if {[tk windowingsystem] eq "classic" || [tk windowingsystem] eq "aqua"} {
   bind Listbox  {
       %W yview scroll [expr {- (%D)}] uni..."
   (file "/home/yingying/opt/fsl_4_1_8/extras/lib/tk8.4/listbox.tcl" line 181)
   invoked from within
"source /home/yingying/opt/fsl_4_1_8/extras/lib/tk8.4/listbox.tcl"
   (in namespace eval "::" script line 1)
   invoked from within
"namespace eval :: [list source [file join $::tk_library $file.tcl]]"
   (procedure "SourceLibFile" line 2)
   invoked from within
"SourceLibFile listbox"
   (in namespace eval "::tk" script line 4)
   invoked from within
"namespace eval ::tk {
SourceLibFile button
SourceLibFile entry
SourceLibFile listbox
SourceLibFile menu
SourceLibFile panedwindow
SourceLibFile ..."
   invoked from within
"if {$::tk_library ne ""} {
   if {$tcl_platform(platform) eq "macintosh"} {
proc ::tk::SourceLibFile {file} {
   if {[catch {
namespace eval :: ..."
   (file "/home/yingying/opt/fsl_4_1_8/extras/lib/tk8.4/tk.tcl" line 407)
   invoked from within
"source /home/yingying/opt/fsl_4_1_8/extras/lib/tk8.4/tk.tcl"
   ("uplevel" body line 1)
   invoked from within
"uplevel #0 [list source $file]"

This probably means that tk wasn't installed properly.

=====================
My system
=====================
Compiled from the 4.1.8 source code.
build log:
BUILD successfully made all projects
=========================
lsb_release -a
No LSB modules are available.
Distributor ID:Debian
Description:Debian GNU/Linux 6.0.2 (squeeze)
Release:6.0.2
Codename:squeeze
==========================================

Tuesday, September 20, 2011

Build FSL-4.1.8 from source code.

!!ERROR in BUILD!!
  Could not make the following projects successfully:
    fabber possum

Look into the log file and see if I can fix this two packages.

Error for building fabber tool:

Making project src/fabber

/bin/rm -f /tmp/fslgrot *.o *.a *.exe core depend.mk
/bin/rm -f /tmp/fslgrot fabber mvntool
/home/yingying/opt/fsl_4_1_8/config/common/rules.mk:320: depend.mk: No such file or directory
Building dependency file depend.mk
c++ -Wall -ansi -pedantic -Wno-long-long    -m64 -ggdb -I/home/yingying/opt/fsl_4_1_8/extras/include/newmat -I/home/yingying/opt/fsl_4_1_8/extras/include/libprob -I/home/yingying/opt/fsl_4_1_8/extras/include/boost -I. -I/home/yingying/opt/fsl_4_1_8/include -I/home/yingying/opt/fsl_4_1_8/include   -c -o fwdmodel_flobs.o fwdmodel_flobs.cc
c++ -Wall -ansi -pedantic -Wno-long-long    -m64 -ggdb -I/home/yingying/opt/fsl_4_1_8/extras/include/newmat -I/home/yingying/opt/fsl_4_1_8/extras/include/libprob -I/home/yingying/opt/fsl_4_1_8/extras/include/boost -I. -I/home/yingying/opt/fsl_4_1_8/include -I/home/yingying/opt/fsl_4_1_8/include   -c -o tools.o tools.cc
tools.cc: In member function ‘virtual double DescendingZeroFinder::FindZero() const’:
tools.cc:126: error: ‘numeric_limits’ was not declared in this scope
tools.cc:126: error: expected primary-expression before ‘double’
tools.cc:126: error: expected ‘)’ before ‘double’
tools.cc:126: error: expected ‘)’ before ‘;’ token
make: *** [tools.o] Error 1

Solution to this:

add the line:

#include 
beneath #include "easylog.h" in ${FSLDIR}/src/fabber/tools.cc and then restart the compilation.

Error for building possum:

Making project src/possum

/bin/rm -f /tmp/fslgrot *.o *.a *.exe core depend.mk
/bin/rm -f /tmp/fslgrot possum spharm_rm signal2image pulse systemnoise possum_sum b0calc b0sim test_possum
/home/yingying/opt/fsl_4_1_8/config/common/rules.mk:320: depend.mk: No such file or directory
Building dependency file depend.mk
c++ -Wall -ansi -pedantic -Wno-long-long    -m64 -O3 -fexpensive-optimizations -m64 -I/home/yingying/opt/fsl_4_1_8/extras/include/newmat -I/home/yingying/opt/fsl_4_1_8/extras/include/libprob -I/home/yingying/opt/fsl_4_1_8/extras/include -I. -I/home/yingying/opt/fsl_4_1_8/include -I/home/yingying/opt/fsl_4_1_8/include   -c -o possum.o possum.cc
In file included from possum.cc:84:
possumfns.h:16: error: conflicting declaration ‘const double b0’
possumfns.h:14: error: ‘b0’ has a previous declaration as ‘const double* b0’
possumfns.h:16: error: conflicting declaration ‘const double b0gxx’
possumfns.h:14: error: ‘b0gxx’ has a previous declaration as ‘const double* b0gxx’
possumfns.h:16: error: conflicting declaration ‘const double b0gyy’
possumfns.h:14: error: ‘b0gyy’ has a previous declaration as ‘const double* b0gyy’
possumfns.h:16: error: conflicting declaration ‘const double b0gzz’
possumfns.h:14: error: ‘b0gzz’ has a previous declaration as ‘const double* b0gzz’
possum.cc: In function ‘int compute_volume(int, char**)’:
possum.cc:907: error: cannot convert ‘double’ to ‘const double*’ for argument ‘17’ to ‘void voxel4(double, double, double, const NEWMAT::RowVector&, const NEWMAT::Matrix&, int, int, double, double, double, const double*, const double*, const double*, const double*, const double*, int, const double*, const double*, int, std::string, const double*, double, double, int, double, double, int, int, int, double*, double*)’
make: *** [possum.o] Error 1

Solution to this:


modify the line in ${FSLDIR}/src/possum/possumfns.h which is currently: 

void voxel4(const double x,const double y,const double z, 
            const RowVector& tissue,const Matrix& H,const int nreadp,const int v,
            const double xdim,const double ydim,const double zdim,
            const double* b0, const double* b0gxx,const double* b0gyy,const double* b0gzz,
            const double* b0timecourse,const int Nb0,
            const double b0, const double b0gxx,const double b0gyy,const double b0gzz, 
            const double* timecourse,const double* activation,const int Nact,
     const string outputname, const double* table_slcprof, const double dslcp, const double dslcp_first, const int Nslc,
            const double den,const double RFtrans, const int opt_test,
            const int nospeedup,
            const int save_kcoord,
            double* sreal, double* simag);

 to:

void voxel4(const double x,const double y,const double z, 
            const RowVector& tissue,const Matrix& H,const int nreadp,const int v,
            const double xdim,const double ydim,const double zdim,
     const double* b0time, const double* b0xtime,const double* b0ytime,const double* b0ztime,
            const double* b0timecourse,const int Nb0,
     const double b0, const double b0x,const double b0y,const double b0z, 
            const double* timecourse,const double* activation,const int Nact,
     const string outputname, const double* table_slcprof, const double dslcp, const double dslcp_first, const int Nslc,
            const double den,const double RFtrans, const int opt_test,
            const int nospeedup,
            const int save_kcoord,
            double* sreal, double* simag);


Find which Debian or ubuntu Linux Version you are running

Solution 1
cat /etc/issue
The file /etc/issue holds the version of Ubuntu installed on your system
Solution 2
lsb_release -a
or
cat /etc/lsb-release

 

DTI learning notes

BOOK reading

Two reasons why we need to address and correct motion artifacts in DTI studies.
1) DTI-specific issue
2) Common to all quantitative MRI that requires multiple MR images such as T2 map, magnetization transfer ratio, and perfusion map.

DTI-specific issue:  degradation of diffusion-weighted images by ghosting effect.  DTI is a technique hypersensitive to motion due to its use of strong diffusion gradients.  Using a diffusion constant of normal brain tissue (D=0.8*10-3 mm2/s) and typical gradient separation (delta=30 ms), we can calculate that water molecules move about 7um on average during the measurement (7um=square_root[2Ddelta], based on Einstein's equation).

Two most notable shortcomings of single-shot EPI is the limitation in resolution and image distortion due to B0 susceptibility problems.  The single-shot EPI acquires all phase-encoded lines after one excitation.  As the echo train length gets longer, the extent of image distortion increases; i.e., the higher the resolution, the more distortion we get.  This is an inherent limitation of EPI.  The distortion is caused by magnetic field (B0) inhomogeneity, which is especially severe at the boundary of air and tissue; most notably around the sinus, such as inferior regions of the frontal lobe, the anterior pole of the temporal lobe, and the pons.  The amount of distortion increases as the field strength increases.

First, we can use a lower resolution as much as possible.  Second, there are techniques that measure the B0 field distortion, calculate a map of image distortion, and undo the distortion.  This approach requires and additional scan for the field mapping.  Therefore, it cannot be applied to existing data unless such a scan has been acquired for each study.  This approach should be able to correct low-frequency distortion (global distortion) fairly accurately, but it is a challenging task to correct high-frequency distortion (severe local distortion).  One of the most effective approaches in recent technologies is probably parallel imaging.

B0 images can be used as non distorted reference images to unwrap the distorted DWIs.  12-mode linear transformation (affine transformation) is highly effective.



FW: FA > 1? FSL analysis, why?

Note the areas with high diffusion anisotropy (white matter). Are there any areas where the FA is greater than 1? Why might this happen?
answer

FA (Fractional Anisotropy) is equal to the variance of the 3 tensor eigenvalues, normalised to take values between 0 and 1.

When all the tensor eigenvalues are positive, this is indeed the case.
However, if one of the eigenvalues is negative, then FA can be higher than one.

In theory, a negative eigenvalue means that there is an orientation along which the diffusion coefficient is negative. This is physically impossible. For example, it means that if we were to measure diffusion weighted signal along that direction, then more diffusion weighting increases the signal (instead of decreasing it). This can happen in practice, e.g. if poor SNR or head motion.

In DTIFIT, the tensor is calculated with no positivity constraints on the eigenvalues, so situations where FA>1 may happen in practice. 

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.

All the MRI lectures until 07/22/11.

Presentation Details:
Title: Fundamentals of MRI, Module 5A: Artifacts, Dr. Dumoulin, 2011
Date: Friday, July 22, 2011
Time: 9:00 AM EDT
Duration: 00:50:29
Link: http://seraph.cchmc.org/mediasiteex/Viewer/?peid=cd1752073f7744ac85ee80202f962962


Fundamentals of MRI, Module 4_Parallel Imaging, Charles Dumoulin 2011 ( http://seraph.cchmc.org/mediasiteex/Viewer/?peid=2c5c0614ed4e45b0900fbfc2e2a7c5a5 )
Presenter(s): Charles Dumoulin PhD, Radiology Department, IRC, Scientific Director
Type: On Demand
Air Date: 7/8/2011
Air Time: 9:00 AM EDT
Duration: 48 Minutes

Fundamentals of MRI, Module 3_Imaging Principles, Charles Dumoulin 2011 ( http://seraph.cchmc.org/mediasiteex/Viewer/?peid=7d8599fb9333433098f391764a22734d )
Presenter(s): Charles Dumoulin PhD, Radiology Department, IRC, Scientific Director
Type: On Demand
Air Date: 7/1/2011
Air Time: 9:00 AM EDT
Duration: 1 Hour 3 Minutes 53 Seconds

Fundamentals of MRI, Module 2_Basic Physics, Charles Dumoulin 2011 ( http://seraph.cchmc.org/mediasiteex/Viewer/?peid=8683c292c3834652bc39063a811fb3f1 )
Presenter(s): Charles Dumoulin PhD, Radiology Department, IRC, Scientific Director
Type: On Demand
Air Date: 6/24/2011
Air Time: 9:00 AM EDT
Duration: 55 Minutes 33 Seconds
Module 1 not recorded, but here is last years lecture.

Fundamentals of MRI, Module 1_Quick Overview, Charles Dumoulin 2010 ( http://seraph.cchmc.org/mediasiteex/Viewer/?peid=33445793c98e46eca9da813194a9bac0 )
Presenter(s): Charles Dumoulin PhD, Radiology Department, IRC, Scientific Director
Type: On Demand
Air Date: 6/30/2010
Air Time: 9:00 AM EDT
Duration: 1 Hour

September 9 - Perfusion MR Imaging Methods and applications for imaging cerebral perfusion with Gadolinium contrast bolus injection or with RF labeling of inflowing blood (Arterial Spin Labeling) will be discussed.  A new method for combining simulataneous ASL and BOLD fMRI acquisitions will also be explained.   

All previous lectures are available online at:  http://groups/rad/dil/mri.htm

Note: Fundamentals of MRI, Module 1 2011 was not recorded, but you can view last year's presentation.
Fundamentals of MRI, Module 1_Quick Overview, Charles Dumoulin 2010
Presenter(s): Charles Dumoulin PhD, Radiology Department, IRC, Scientific Director
Type: On Demand
Air Date: 6/30/2010
Air Time: 9:00 AM EDT
Duration: 1 Hour

Fundamentals of MRI
Module 1_Quick Overview
Charles Dumoulin, PhD
Fundamentals of MRI, Module 2_Basic Physics, Charles Dumoulin 2011
Presenter(s): Charles Dumoulin PhD, Radiology Department, IRC, Scientific Director
Type: On Demand
Air Date: 6/24/2011
Air Time: 9:00 AM EDT
Duration: 55 Minutes 33 Seconds

Fundamentals of MRI Series
Module 2: Basic Physics
Fundamentals of MRI, Module 3_Imaging Principles, Charles Dumoulin 2011
Presenter(s): Charles Dumoulin PhD, Radiology Department, IRC, Scientific Director
Type: On Demand
Air Date: 7/1/2011
Air Time: 9:00 AM EDT
Duration: 1 Hour 3 Minutes 53 Seconds

Fundamentals of MRI, Module 3
Imaging Principles
Fundamentals of MRI, Module 4_Parallel Imaging, Charles Dumoulin 2011
Presenter(s): Charles Dumoulin PhD, Radiology Department, IRC, Scientific Director
Type: On Demand
Air Date: 7/8/2011
Air Time: 9:00 AM EDT
Duration: 48 Minutes

Fundamentals of MRI, Module 4
Parallel Imaging
Charles Dumoulin, PhD
Fundamentals of MRI, Module 4_Instrumentation, Chales Dumoulin, 2011
Presenter(s): Charles Dumoulin PhD, Radiology Department, IRC, Scientific Director
Type: On Demand
Air Date: 7/29/2011
Air Time: 7:45 AM EDT
Duration: 1 Hour 7 Minutes 26 Seconds


Fundamentals of MRI, Module 4: Instrumentation
Charles Dumoulin, PhD
Fundamentals of MRI, Module 5A: Artifacts, Dr. Dumoulin, 2011
Presenter(s): Charles Dumoulin PhD, Radiology Department, IRC, Scientific Director
Type: On Demand
Air Date: 7/22/2011
Air Time: 9:00 AM EDT
Duration: 50 Minutes 29 Seconds

Fundamentals of MRI, Module 5A: Artifacts
Charles Dumoulin, PhD
Fundamentals of MRI, Module 7_Flow Imaging, Charles Dumoulin
Presenter(s): Charles Dumoulin PhD, Radiology Department, IRC, Scientific Director
Type: On Demand
Air Date: 8/5/2011
Air Time: 9:00 AM EDT
Duration: 56 Minutes 28 Seconds


Fundamentals of MRI
Module 7: Flow Imaging
Charles Dumoulin, PhD
Fundamentals of MRI, Diffusion Tensor Imaging, Weihong Yuan, 2011
Presenter(s): Weihong Yuan PhD, Imaging Research Center, Neuroimaging Research Consortium
Type: On Demand
Air Date: 8/12/2011
Air Time: 9:00 AM EDT
Duration: 58 Minutes 20 Seconds


Fundamentals of MRI, Diffusion Tensor Imaging
Weihong Yuan, PhD
fMRI Physics and Physiology, Scott Holland, 2011
Presenter(s): Scott K Holland PhD, Professor of Radiology, Pediatrics, Otolaryngology, Neuroscience and Physics, Univ. Cincinnati, Imaging Research Center
Type: On Demand
Air Date: 8/19/2011
Air Time: 9:00 AM EDT
Duration: 50 Minutes 18 Seconds


fMRI Physics and Physiology
Scott Holland, PhD
fMRI Physics and Physiology Part 2, Scott Holland, 2011
Presenter(s): Scott K Holland PhD, Professor of Radiology, Pediatrics, Otolaryngology, Neuroscience and Physics, Univ. Cincinnati, Imaging Research Center
Type: On Demand
Air Date: 8/26/2011
Air Time: 9:00 AM EDT
Duration: 54 Minutes 18 Seconds


fMRI Physics and Physiology
Scott Holland, PhD
fMRI Physics and Physiology Part 3, Scott Holland, 2011
Presenter(s): Scott K Holland PhD, Professor of Radiology, Pediatrics, Otolaryngology, Neuroscience and Physics, Univ. Cincinnati, Imaging Research Center
Type: On Demand
Air Date: 9/2/2011
Air Time: 9:00 AM EDT
Duration: 25 Minutes 29 Seconds


fMRI Physics and Physiology
Scott Holland, PhD
Perfusion MR Imaging, Part 1, Scott Holland, 2011
Presenter(s): Scott K Holland PhD, Professor of Radiology, Pediatrics, Otolaryngology, Neuroscience and Physics, Univ. Cincinnati, Imaging Research Center
Type: On Demand
Air Date: 9/2/2011
Air Time: 9:00 AM EDT
Duration: 27 Minutes 3 Seconds


Perfusion MR Imaging
Part 1
Scott Holland, PhD
Perfusion MR Imaging, Part 2, Scott Holland, 2011
Presenter(s): Scott K Holland PhD, Professor of Radiology, Pediatrics, Otolaryngology, Neuroscience and Physics, Univ. Cincinnati, Imaging Research Center
Type: On Demand
Air Date: 9/9/2011
Air Time: 9:00 AM EDT
Duration: 49 Minutes 50 Seconds


Perfusion MR Imaging
Part 2
Scott Holland, PhD

Saturday, September 10, 2011

Helped Hisako (a former colleague) with MEG data analysis problem

 yw_ft_test('01061792_EPI-SHORT-4KHz_20080317_47_60_03.ds',48,58,30,70,'MLT22');

processing channel { 'MLC11' 'MLC12' 'MLC13' 'MLC14' 'MLC15' 'MLC16' 'MLC17' 'MLC21' 'MLC22' 'MLC23' 'MLC24' 'MLC25' 'MLC31' 'MLC32' 'MLC41' 'MLC42' 'MLC51' 'MLC52' 'MLC53' 'MLC54' 'MLC55' 'MLC61' 'MLC62' 'MLC63' 'MLF11' 'MLF12' 'MLF13' 'MLF14' 'MLF21' 'MLF22' 'MLF23' 'MLF24' 'MLF25' 'MLF31' 'MLF32' 'MLF33' 'MLF34' 'MLF35' 'MLF41' 'MLF42' 'MLF43' 'MLF44' 'MLF45' 'MLF46' 'MLF51' 'MLF52' 'MLF53' 'MLF54' 'MLF55' 'MLF56' 'MLF61' 'MLF62' 'MLF63' 'MLF64' 'MLF65' 'MLF66' 'MLF67' 'MLO11' 'MLO12' 'MLO13' 'MLO14' 'MLO21' 'MLO22' 'MLO23' 'MLO24' 'MLO31' 'MLO32' 'MLO33' 'MLO34' 'MLO41' 'MLO42' 'MLO43' 'MLO44' 'MLO51' 'MLO52' 'MLO53' 'MLP11' 'MLP12' 'MLP21' 'MLP22' 'MLP23' 'MLP31' 'MLP32' 'MLP33' 'MLP34' 'MLP35' 'MLP41' 'MLP42' 'MLP43' 'MLP44' 'MLP45' 'MLP51' 'MLP52' 'MLP53' 'MLP54' 'MLP55' 'MLP56' 'MLP57' 'MLT11' 'MLT12' 'MLT13' 'MLT14' 'MLT15' 'MLT16' 'MLT22' 'MLT23' 'MLT24' 'MLT25' 'MLT26' 'MLT27' 'MLT31' 'MLT32' 'MLT33' 'MLT34' 'MLT35' 'MLT36' 'MLT37' 'MLT41' 'MLT42' 'MLT43' 'MLT44' 'MLT45' 'MLT46' 'MLT47' 'MLT51' 'MLT52' 'MLT53' 'MLT54' 'MLT55' 'MLT56' 'MLT57' 'MRC11' 'MRC12' 'MRC13' 'MRC14' 'MRC15' 'MRC16' 'MRC17' 'MRC21' 'MRC22' 'MRC23' 'MRC24' 'MRC25' 'MRC31' 'MRC32' 'MRC41' 'MRC42' 'MRC52' 'MRC53' 'MRC54' 'MRC55' 'MRC61' 'MRC62' 'MRC63' 'MRF11' 'MRF12' 'MRF13' 'MRF14' 'MRF21' 'MRF22' 'MRF23' 'MRF24' 'MRF25' 'MRF31' 'MRF32' 'MRF33' 'MRF34' 'MRF35' 'MRF41' 'MRF42' 'MRF43' 'MRF44' 'MRF45' 'MRF46' 'MRF51' 'MRF52' 'MRF53' 'MRF54' 'MRF55' 'MRF56' 'MRF61' 'MRF62' 'MRF63' 'MRF64' 'MRF65' 'MRF66' 'MRF67' 'MRO11' 'MRO12' 'MRO13' 'MRO14' 'MRO21' 'MRO22' 'MRO23' 'MRO24' 'MRO31' 'MRO32' 'MRO33' 'MRO34' 'MRO41' 'MRO42' 'MRO43' 'MRO44' 'MRO51' 'MRO52' 'MRO53' 'MRP11' 'MRP12' 'MRP21' 'MRP22' 'MRP23' 'MRP31' 'MRP32' 'MRP33' 'MRP34' 'MRP35' 'MRP41' 'MRP42' 'MRP43' 'MRP44' 'MRP45' 'MRP51' 'MRP52' 'MRP53' 'MRP54' 'MRP55' 'MRP56' 'MRP57' 'MRT11' 'MRT12' 'MRT13' 'MRT14' 'MRT15' 'MRT16' 'MRT21' 'MRT22' 'MRT23' 'MRT24' 'MRT25' 'MRT26' 'MRT27' 'MRT31' 'MRT32' 'MRT33' 'MRT34' 'MRT35' 'MRT36' 'MRT37' 'MRT41' 'MRT42' 'MRT43' 'MRT44' 'MRT45' 'MRT46' 'MRT47' 'MRT52' 'MRT53' 'MRT54' 'MRT55' 'MRT56' 'MRT57' 'MZC01' 'MZC02' 'MZC03' 'MZC04' 'MZF01' 'MZF02' 'MZF03' 'MZO01' 'MZO02' 'MZO03' 'MZP01' }
reading and preprocessing
reading and preprocessing trial 1 from 1
the input is raw data with 272 channels and 1 trials
processing trials
trial 1, frequency 1 (30.00 Hz), 1 tapers
trial 1, frequency 2 (35.00 Hz), 1 tapers
trial 1, frequency 3 (40.00 Hz), 1 tapers
trial 1, frequency 4 (45.00 Hz), 1 tapers
trial 1, frequency 5 (50.00 Hz), 1 tapers
trial 1, frequency 6 (55.00 Hz), 1 tapers
trial 1, frequency 7 (60.00 Hz), 1 tapers
trial 1, frequency 8 (65.00 Hz), 1 tapers
trial 1, frequency 9 (70.00 Hz), 1 tapers
reading layout from file CTF275.lay



function yw_ft_test(ds,begt,endt,lowfq,highfq,chanindx)
% Frequency analysis script sample for Hiskao
%---------------------------------------------------------------
% Copyright (C) 2011 Pediatric Neuroimage Research Center (PNRC)
% Last Modified by Yingying Wang 09-Sep-2011 14:30:00
% Contact information: yingying.wang@cchmc.org
% Phone: 513-636-3495
% Any comments and bug reports are very welcome
% Advisor: Dr. Scott K. Holland
%----------------------------------------------------------------
% How to use it
% For example, your data folder is c:\data\patient01.ds
% put this yw_ft_test.m file in the same folder with patient01.ds
% under c:\data\
% make sure that you change current work path to the c:\data\
% then run yw_ft_test with required variables
% ds: data folder ds name
% begt: start time in second
% endt: end time in second
% lowfq: low frequency limit
% highfq: high frequency limit
% chanindx: single channel you want to plot

% Reference: http://fieldtrip.fcdonders.nl/tutorial/timefrequencyanalysis
% http://fieldtrip.fcdonders.nl/reference/freqanalysis

% check input parameters, none or too many, pop out Error messages
if nargin ~= 6
  fprintf(['Oops, you forgot someting! \n',...
    'function illustration: yw_ft_test(ds,lowfreq,hifreq,startt,endt) \n',...
    'ds: Name of the dataset folder. e.g. patient01.ds \n',...
    'begt: start time in second \n',...
    'endt: end time in second \n',...
    'lowfq: low frequency limit \n',...
    'highfq: high frequency limit \n',...
    'chanindx: single channel you want to plot \n',...
    'This function generate the frequency plot for you. \n\n']);
  return
end

% get MEG data
% find the interesting segments of data
cfg = [];               % empty configuration
cfg.dataset = ds;
cfg.channel = 'MEG';    % defaults: read all MEG channels
% you can change this line to cfg.channel = 'gui'
% then a window will pop up and you can choose your channel
% graphic interface for channel selections
cfg.continuous  = 'yes';
dataFIC = ft_preprocessing(cfg);

% frequency analysis
cfg              = [];
cfg.output       = 'pow';
cfg.method       = 'mtmconvol';
cfg.taper        = 'hanning';
cfg.foi          = lowfq:5:highfq;
cfg.t_ftimwin    = 7./cfg.foi;  % 7 cycles per time window
cfg.toi          = begt:0.2:endt;
TFRhann7 = ft_freqanalysis(cfg, dataFIC);


% display the whole sensor space
cfg              = [];
cfg.xlim         = [begt endt];
cfg.ylim         = [lowfq highfq];
cfg.layout       = 'CTF275.lay';
figure(1);
ft_multiplotTFR(cfg, TFRhann7);

% display one channel
cfg              = [];
cfg.xlim         = [begt endt];
cfg.ylim         = [lowfq highfq];
cfg.channel      = chanindx;
figure(2);
ft_singleplotTFR(cfg, TFRhann7);

end

Thursday, September 8, 2011

DTIquery binary package problem.

dtiquery: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory
go to /usr/lib and /usr/lib32
Then, use the following command.
$ ln -s libexpat.so.1 libexpat.so.0
Bingo!
DTIquery worked. (see pic)

Wednesday, September 7, 2011

Philips 3T scan

.PAR is like .hdr  (header)
.REC stores real data like .img

PAR to NII

/tmp/foo file:

05F003_B1
05M002_B1
05M003_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 ds in `cat /tmp/foo`;do cd ${ds};3dPAR2AFNI.pl -n -s -o ~/tmp *.PAR;cd ../;done


*** WARNING: The number of volumes from the PAR header does not match the number of slices times the number of image                        s!
*** WARNING: Resetting the number of volumes to be the number of slices times the number of images (33).
to3d -session /home/yyw/tmp/  -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:05M0                        02_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
*** WARNING: The number of volumes from the PAR header does not match the number of slices times the number of image                        s!
*** WARNING: Resetting the number of volumes to be the number of slices times the number of images (33).
to3d -session /home/yyw/tmp/  -skip_outliers -prefix 05M003_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_10_1.nii -time:zt 64                         33 12172.998ms zero -xFOV 132.021R-123.979L -yFOV 125.893A-130.107P -zFOV 52.876I-75.124S 3D:-1:0:128:128:2112:05M0                        03_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
*** WARNING: The number of volumes from the PAR header does not match the number of slices times the number of image                        s!
*** WARNING: Resetting the number of volumes to be the number of slices times the number of images (33).
Use of uninitialized value $fileSize in numeric gt (>) at /home/yyw/abin/3dPAR2AFNI.pl line 319.
Skipping 06F001_B1_Reg_-_WIP_DTI_32dir_mimic_NWU_no_stab_031609_SENSE_10_2.PAR: The corresponding REC file is 0 byte                        s in length

*** WARNING: The number of volumes from the PAR header does not match the number of slices times the number of image                        s!
*** WARNING: Resetting the number of volumes to be the number of slices times the number of images (33).
to3d -session /home/yyw/tmp/  -skip_outliers -prefix 06F001_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_10_1.nii -time:zt 64                         33 12172.998ms zero -xFOV 136.396R-119.604L -yFOV 134.063A-121.937P -zFOV 64.466I-63.534S 3D:-1:0:128:128:2112:06F0                        01_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
*** WARNING: The number of volumes from the PAR header does not match the number of slices times the number of image                        s!
*** WARNING: Resetting the number of volumes to be the number of slices times the number of images (33).
Use of uninitialized value $fileSize in numeric gt (>) at /home/yyw/abin/3dPAR2AFNI.pl line 319.
Skipping 06F011_B1_Reg_-_WIP_DTI_32dir_mimic_NWU_no_stab_031609_SENSE_10_2.PAR: The corresponding REC file is 0 byte                        s in length

*** WARNING: The number of volumes from the PAR header does not match the number of slices times the number of image                        s!
*** WARNING: Resetting the number of volumes to be the number of slices times the number of images (33).
to3d -session /home/yyw/tmp/  -skip_outliers -prefix 06F011_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_10_1.nii -time:zt 64                         33 12172.998ms zero -xFOV 134.012R-121.988L -yFOV 131.34A-124.66P -zFOV 44.628I-83.372S 3D:-1:0:128:128:2112:06F011                        _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
*** WARNING: The number of volumes from the PAR header does not match the number of slices times the number of image                        s!
*** WARNING: Resetting the number of volumes to be the number of slices times the number of images (8.25).
to3d -session /home/yyw/tmp/  -skip_outliers -prefix 06M001_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_10_1.nii -time:zt 64                         8.25 12172.998ms zero -xFOV 133.015R-122.985L -yFOV 135.021A-120.979P -zFOV 47.952I-80.048S 3D:-1:0:128:128:528:06M                        001_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=528 2D slices
** Number of slices on command line   = 528
** Number of slices needed for -time: = 512
** Something is wrong with your command line!
*** WARNING: The number of volumes from the PAR header does not match the number of slices times the number of image                        s!
*** WARNING: Resetting the number of volumes to be the number of slices times the number of images (6.703125).
to3d -session /home/yyw/tmp/  -skip_outliers -prefix 06M005_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_10_1.nii -time:zt 64                         6.703125 12172.998ms zero -xFOV 128R-128L -yFOV 146.373A-109.627P -zFOV 27.911I-100.089S 3D:-1:0:128:128:429:06M005                        _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=429 2D slices
** Number of slices on command line   = 429
** Number of slices needed for -time: = 384
** Something is wrong with your command line!
*** WARNING: The number of volumes from the PAR header does not match the number of slices times the number of image                        s!
*** WARNING: Resetting the number of volumes to be the number of slices times the number of images (9.796875).
to3d -session /home/yyw/tmp/  -skip_outliers -prefix 06M012_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_11_1.nii -time:zt 64                         9.796875 12172.998ms zero -xFOV 128R-128L -yFOV 124.564A-131.436P -zFOV 44.527I-83.473S 3D:-1:0:128:128:627:06M012_                        B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_11_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=627 2D slices
** Number of slices on command line   = 627
** Number of slices needed for -time: = 576
** Something is wrong with your command line!
Unable to open *.PAR for reading: No such file or directory.
*** WARNING: The number of volumes from the PAR header does not match the number of slices times the number of image                        s!
*** WARNING: Resetting the number of volumes to be the number of slices times the number of images (33).
to3d -session /home/yyw/tmp/  -skip_outliers -prefix 07F007_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_12_1.nii -time:zt 64                         33 12172.998ms zero -xFOV 132.864R-123.136L -yFOV 129.946A-126.054P -zFOV 26.062I-101.938S 3D:-1:0:128:128:2112:07F                        007_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_12_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
*** WARNING: The number of volumes from the PAR header does not match the number of slices times the number of image                        s!
*** WARNING: Resetting the number of volumes to be the number of slices times the number of images (33).
to3d -session /home/yyw/tmp/  -skip_outliers -prefix 07F009_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_10_1.nii -time:zt 64                         33 12172.998ms zero -xFOV 130.88R-125.12L -yFOV 139.693A-116.307P -zFOV 43.619I-84.381S 3D:-1:0:128:128:2112:07F009                        _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
*** WARNING: The number of volumes from the PAR header does not match the number of slices times the number of image                        s!
*** WARNING: Resetting the number of volumes to be the number of slices times the number of images (33).
to3d -session /home/yyw/tmp/  -skip_outliers -prefix 07F010_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_11_1.nii -time:zt 64                         33 12172.998ms zero -xFOV 133.622R-122.378L -yFOV 124.672A-131.328P -zFOV 28.198I-99.802S 3D:-1:0:128:128:2112:07F0                        10_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_11_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
*** WARNING: The number of volumes from the PAR header does not match the number of slices times the number of image                        s!
*** WARNING: Resetting the number of volumes to be the number of slices times the number of images (5.671875).
to3d -session /home/yyw/tmp/  -skip_outliers -prefix 07F024_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_11_1.nii -time:zt 64                         5.671875 12172.998ms zero -xFOV 134.289R-121.711L -yFOV 132.193A-123.807P -zFOV 27.662I-100.338S 3D:-1:0:128:128:36                        3:07F024_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_11_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=363 2D slices
** Number of slices on command line   = 363
** Number of slices needed for -time: = 320
** Something is wrong with your command line!
*** WARNING: The number of volumes from the PAR header does not match the number of slices times the number of image                        s!
*** WARNING: Resetting the number of volumes to be the number of slices times the number of images (26.125).
to3d -session /home/yyw/tmp/  -skip_outliers -prefix 07M001_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_10_1.nii -time:zt 64                         26.125 12172.998ms zero -xFOV 128.749R-127.251L -yFOV 146.393A-109.607P -zFOV 28.621I-99.379S 3D:-1:0:128:128:1672:                        07M001_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=1672 2D slices
** Number of slices on command line   = 1672
** Number of slices needed for -time: = 1664
** Something is wrong with your command line!
*** WARNING: The number of volumes from the PAR header does not match the number of slices times the number of image                        s!
*** WARNING: Resetting the number of volumes to be the number of slices times the number of images (33).
to3d -session /home/yyw/tmp/  -skip_outliers -prefix 07M005_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_12_1.nii -time:zt 64                         33 12172.998ms zero -xFOV 132.021R-123.979L -yFOV 125.128A-130.872P -zFOV 32.983I-95.017S 3D:-1:0:128:128:2112:07M0                        05_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_12_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
*** WARNING: The number of volumes from the PAR header does not match the number of slices times the number of image                        s!
*** WARNING: Resetting the number of volumes to be the number of slices times the number of images (33).
to3d -session /home/yyw/tmp/  -skip_outliers -prefix 07M006_B1_WIP_IRC19B_DTI_32dir_2x2x2_SENSE_10_1.nii -time:zt 64                         33 12172.998ms zero -xFOV 130.516R-125.484L -yFOV 137.434A-118.566P -zFOV 79.094I-48.906S 3D:-1:0:128:128:2112:07M0                        06_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

Daily logs

Update my AFNI version. @update.afni.binaries -defaults

Convert .PAR file to .NII  http://afni.nimh.nih.gov/pub/dist/doc/program_help/3dPAR2AFNI.pl.html

DTI wiki (helpful for newbie like me):  http://www.topsupportweb.net/psywiki/index.php?title=NeuroWiki:Processing_DTI_%28FSL%29

On the road!