Alisha,
I think we had a similar problem to what you described. Although I am not 100% certain since you said that you converted your field map images into phase and magnitude. Just in case your problem is the same as ours I thought I would share our solution.
For one of our studies, we inadvertantly only saved the phase information for several of our participants. In order to salvage the data we down sampled the T1w image to the same size as our phase field map image. We then used this image as the magnitude image of the field map. We tested this procedure on 5 data sets where the field map was acquired correctly. In all 5 cases this worked extremely well and we could not see a difference between distortion removed with the field map (phase and magnitude) and distortion removed with the (phase and down sampled T1w magnitude image). Of course, this assumes that there is little motion that occurs between the field map and the T1w image. I believe this will be the case for most participants because the field map is used approximate slowly varying changes in the magnetic field.
I have included the script we use for our field map correction below. It follows the same steps that you have outlined in your email. We use antsApplyTransforms to down sample our T1w image to match the field map. I know FLIRT can do the same thing but I found ANTS just as easy for this step. I should also mention that our distortion correction is done by calling FEAT and just doing Pre-Stats.
I hope this helps,
Bob
P.S. If any one has comments about the proposed solution or alternative I would be interested in hearing about them.
#!/bin/bash
fmapDir=${PWD}/${1}/fmap_${2}
linkedDir=${PWD}/${1}/data/linked
antsCtDir=${PWD}/${1}/antsCT
antsBet=${antsCtDir}/act_ExtractedBrain0N4.nii.gz
antsBetMask=${antsCtDir}/act_BrainExtractionMask.nii.gz
if [ ! -d $fmapDir ];
then
mkdir ${fmapDir}
fi
cp -f ${linkedDir}/${2}_fmap*.gz ${fmapDir}
rename ${2}_fmap fmap ${fmapDir}/*.gz
antsApplyTransforms -d 3 -r ${fmapDir}/fmap_phase.nii.gz -i ${antsBet} -o ${fmapDir}/fmap_mag_t1.nii.gz -t identity
antsApplyTransforms -d 3 -r ${fmapDir}/fmap_phase.nii.gz -i ${antsBetMask} -o ${fmapDir}/fmap_mag_t1_mask.nii.gz -t identity
if [ -f ${fmapDir}/fmap_mag.nii.gz ];
then
bet2 ${fmapDir}/fmap_mag.nii.gz ${fmapDir}/fmap_mag_bet2.nii.gz
fslmaths ${fmapDir}/fmap_mag_bet2.nii.gz -mul ${fmapDir}/fmap_mag_t1_mask.nii.gz ${fmapDir}/fmap_mag_brain.nii.gz
else
ln -sf ${fmapDir}/fmap_mag_t1.nii.gz ${fmapDir}/fmap_mag_brain.nii.gz
fi
fmapPhase=${fmapDir}/fmap_phase.nii.gz
fmapMag=${fmapDir}/fmap_mag_brain.nii.gz
fmapRads=${fmapDir}/fmap_rads.nii.gz
fsl_prepare_fieldmap SIEMENS ${fmapPhase} ${fmapMag} ${fmapRads} 2.46
#sed -e "s#<PWD>#${PWD}#" /gandg/infinite3/infinite/icGit/release/ic/studies/infinite/infinite_bold_template.fsf > ${fmapDir}/bold.fsf
echo
ls -l ${fmapDir}
echo
echo "Launch Fslview "
freeview ${fmapDir}/fmap_rads.nii.gz ${fmapDir}/fmap_mag_brain.nii.gz &
On Jul 17, 2015, at 11:59 AM, Alisha Janssen <[log in to unmask]<mailto:[log in to unmask]>> wrote:
Hello FSL experts,
I am having trouble using FUGUE in the command line to correct my EPI images before inputting them into a graph theory toolbox. Here are the steps I am following, according to the FUGUE help page.
I download and convert my SIEMENS dicom fieldmaps into the phase and magnitude images. I have two volumes in my magnitude image, so I chose the "best" one, and deleted the other volume. I then skull stripped this magnitude image and used fsl_prepare_fieldmap to ensure my phase image is in rads/s according to the following usage:
fsl_prepare_fieldmap SIEMENS BAM004_pilot_FM_phase.nii.gz BAM004_pilot_FM_mag_brain.nii.gz BAM004_pilot_FM_rads.nii.gz 2.46
I then used the rads output to conduct FUGUE in the command line according to the following usage:
fugue -i BAM004_pilot_Rest_new.nii.gz -p BAM004_pilot_FM_rads.nii.gz --dwell=0.839 --asym=2.46 -u BAM004_unwrapped.nii.gz
My echo spacing is 838.7 ms and my echo time difference is 2.46 ms. I receive the following error when running this sequence:
Unwrappedphasemaps must contain at least two volumes!
Error detected: try -h for help
My phase image from the scanner only contains one volume. Please advise how I can correct this error. Also, please clarify what the usage for --asym is. In the FUGUE help listed in the terminal, --asym is defined as the "spin echo time (sec)", but on the FUGUE wiki help page, --asym is the "echo time difference". Please confirm which --asym is the correct usage and whether it should be in ms or sec.
Thank you for your time,
Alisha
|