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
==========================================