JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for FSL Archives


FSL Archives

FSL Archives


FSL@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

FSL Home

FSL Home

FSL  April 2009

FSL April 2009

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: problem running FEAT

From:

Matt Glasser <[log in to unmask]>

Reply-To:

FSL - FMRIB's Software Library <[log in to unmask]>

Date:

Wed, 29 Apr 2009 14:31:26 -0500

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (173 lines)

I'm afraid I can't be of much help regarding running this through the FEAT
GUI, but I have gotten it to work quite well using the commandline
utilities.  You have correctly identified that your field map intensities
may be part of the problem.  I am curious what scanner you used to acquire
the field map and what utility you did the DICOM to NIFTI conversion with.
Assuming you have the correct intensities in your real field map, the
following shell function would work for you:

#Do intitial DTI preprocessing including: motion correction and distortion
correction
#Input: DTI data: data1.nii.gz, Magnitude image: Magnitude.nii.gz, Real
Field Map: FieldMap.nii.gz
#Output: data.nii.gz, the raw corrected DTI data.
function Preprocess_DTI {
echo "Preprocessing DTI"
UnwarpDir="y"
DwellTime="0.000720"
bet Magnitude.nii.gz Magnitude_brain.nii.gz -f .3 -m
fslmaths FieldMap.nii.gz -mas Magnitude_brain_mask.nii.gz
FieldMap_brain.nii.gz
fugue --loadfmap=FieldMap_brain -s 4 --savefmap=FieldMap_brain_s4
fslroi data1.nii.gz nodif 0 1
eddy_correct data1.nii.gz data1_corr.nii.gz 0
bet nodif.nii.gz nodif_brain -m -f .3
fugue -v -i Magnitude_brain --unwarpdir="$UnwarpDir" --dwell=$DwellTime
--loadfmap=FieldMap.nii.gz -w Magnitude_brain_warpped
flirt -in Magnitude_brain_warpped.nii.gz -ref nodif_brain.nii.gz -out
Magnitude_brain_warpped_2_nodif_brain -omat fieldmap2diff.mat
flirt -in FieldMap_brain_s4.nii.gz -ref nodif_brain -applyxfm -init
fieldmap2diff.mat -out FieldMap_brain_s4_2_nodif_brain
fugue -v -i nodif_brain --icorr --unwarpdir="$UnwarpDir" --dwell=$DwellTime
--loadfmap=FieldMap_brain_s4_2_nodif_brain.nii.gz -u
nodif_distortion_corrected
fugue -v -i data1_corr.nii.gz --icorr --unwarpdir="$UnwarpDir"
--dwell=$DwellTime --loadfmap=FieldMap_brain_s4_2_nodif_brain.nii.gz -u
data.nii.gz
echo "DTI Preprocessing Done"
}

Preprocess_DTI

The basics of what is happening in the above code are the following:

Extract the brain using the magnitude image and apply that to the field map.
Smooth the field map using a 4mm kernel.  eddy_correct and extract the DTI
data.  Warp the magnitude image according to the field map so that it
accurately matches the distortion in the DTI data.  Register the field map
to the DTI data to generate a transformation matrix.  Apply this
transformation matrix to the field map so that the DTI data and field map
are registered.  Unwarp the b0 and the DTI data using the registered field
map.  It should now be possible to register your FA image to your T1
structural image using only 6 degrees of freedom.  You will need to change
the above script to match your dwell time and phase encoding direction.

Peace,

Matt.

-----Original Message-----
From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf
Of Siewmin Gan
Sent: Wednesday, April 29, 2009 8:36 AM
To: [log in to unmask]
Subject: [FSL] problem running FEAT

Hi,
     I'm trying to use the FEAT GUI prestats to correct my DTI data
distortion with FSL 
4.1.2. It started running fine with the following stated on the feat html
page and folders 
created. However, the status is "still running" after several days. I'm not
sure if the 
problem lies in my input files/parameters or with the fsl I've installed. I
have also used 
the same dataset and tried running it on FSL4.1.0 and 4.1.1 and the same
thing happens. 
The other tools on fsl ( bet, eddy, tbss, fdt and tracking and fslview) have
worked fine. 

I have pasted here the output file/folders and feat report log from running
the FEAT GUI.
On the fsl FEAT GUI, i then turn off all options except the prestats and put
in my 4D 
eddycorrected data.nii.gz, the calculated fieldmap, my
betted_magnitude_brain.nii.gz and 
the required parameters effective EPI echo spacing 0.282ms and EPI TE 102ms.

The output files and folders are:

design.con				mc
design.frf				prefiltered_func_data.nii.gz
design.fsf				prefiltered_func_data_mcf.nii.gz
design.mat				report.html
design.png				report_log.html
design.ppm				report_poststats.html
design.trg				report_prestats.html
design_cov.png				report_reg.html
design_cov.ppm				report_stats.html
example_func.nii.gz			unwarp
logs

The progress report is :

Feat main script


/bin/cp /tmp/feat_AQIvE7.fsf design.fsf

/Applications/fsl/fsl/bin/feat_model design 

mkdir .files;cp /Applications/fsl/fsl/doc/fsl.css .files;ln -s
/Applications/fsl/fsl/doc/images 
.files/images

/Applications/fsl/fsl/bin/fsl_sub -T 11 -l logs -N feat2_pre
/Applications/fsl/fsl/bin/feat 
/Users/siewmingan/Desktop/DATASET/sharon/fsl/trydistortion/data.feat/design.
fsf -D 
/Users/siewmingan/Desktop/DATASET/sharon/fsl/trydistortion/data.feat -I 1
-prestats
Prestats

/Applications/fsl/fsl/bin/fslmaths 
/Users/siewmingan/Desktop/DATASET/sharon/fsl/trydistortion/data
prefiltered_func_data 
-odt float
Total original volumes = 35

/Applications/fsl/fsl/bin/fslroi prefiltered_func_data example_func 17 1

/bin/mkdir -p unwarp

Secondly, I would like to ask if I have done these calc correctly and if it
matters that the 
range of intensity of my fieldmap has changed from (-4096 to 4096)  to (0 to
4094) when 
it is converted from dicom to nii format:

I have a magnitude map and a real field map from the scanner.
The real field map dicom file has intensity -4096 to +4094. 
When the dicom file is converted to nifti, the real field map.nii has
intensity 0 to 4094.
I rescale it 2 ways to try it out as the range of my real fieldmap is not
from -pie to pie.
1. real fieldmap.nii -mul 3.142 -div 4096 fieldmap1.nii -odt float
(this output file has intensity 0 to 3.142)
2. real fieldmap.nii -mul 6.284 -div 4096 fieldmap2.nii -odt float
(this output file has intensity 0 to 6.284)
I did not divide by the TE echo time difference between the phase maps in
seconds (i.e 
real fieldmap.nii -mul 6.284 -div 4096 -div 0.00246 newfieldmap.nii odt
float).

It is recommended to use the FEAT gui to do the distortion correction. If
unfortunately, for 
some reasons I cannot run the FEAT gui, is it possible to run command line
with the 
realfieldmap data and the magnitude map data that I have? I found commands
lines for 
phase maps but am not sure how to do the distortion correction with a
realfieldmap of 
intensity 0 to 4094 and a magnitude map. Is there a sample command line for
me to 
perform the distortion correction? 

Many Thanks

Siewmin



 

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
2006
2005
2004
2003
2002
2001


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager