Print

Print


Dear FSL, 
To  try and reduce signal drop out in OFC, we have scanning on the coronal plan with an Epi sequence, this indeed results in better signal from ventral parts of the brain, but results in severe distortions in temporal regions  We have been trying to correct distortion in our Epi images using field maps. However, when we run the distortion correction via Fugue, we don't actually see much change  I am not sure what we maybe doing wrong when we try and correct for the distortions we see, and it is very possible that the parameters for our field maps acquisitions may not be the optimal ones.  I am not sure if there is a way to upload actual data files, for you to examine. I tried to enclose the results (as a jpg picture) but that also exceeded upload limit set. Hence, I just pasted  the script we used to derive the phase and magnitude infomation from our fields maps, which we acquired with two different TE lengths 6600 msec and 7200 msec. 

Your help and advice will be much appreciated, 

Many thanks.

Regards, 

Liat
------------------------------
1. Script for converting our fieldmaps

#! /usr/bin/python

import os, sys

real1 = sys.argv[1]
imag1 = sys.argv[2]
real2 = sys.argv[3]
imag2 = sys.argv[4]
TE = str(sys.argv[5])
fieldmap_out = sys.argv[6]

VERBOSE=True

def runcmd(cmd):
    if VERBOSE:
        print cmd

    return os.system(cmd)

#Step 0, generate complex images from real and imaginary data
runcmd('fslcomplex -complex ' + real1 + ' ' + imag1 + ' temp_complex_acq1')
runcmd('fslcomplex -complex ' + real2 + ' ' + imag2 + ' temp_complex_acq2')

#Step 1, generate magnitude images from complex
runcmd('fslcomplex -realabs temp_complex_acq1.nii.gz temp_fieldmap_mag1')
runcmd('fslcomplex -realabs temp_complex_acq2.nii.gz temp_fieldmap_mag2')

#Step 2, generate phase images in radians
runcmd('fslcomplex -realphase temp_complex_acq1.nii.gz temp_phase0_rad_orig 0 1')
runcmd('fslcomplex -realphase temp_complex_acq2.nii.gz temp_phase1_rad_orig 1 1')

#Step 2b, rescale the phase images to a range 0 - 6.28 (not -3.14 - +3.14)
runcmd('fslmaths temp_phase0_rad_orig.nii.gz -add 3.14159265 temp_phase0_rad.nii.gz')
runcmd('fslmaths temp_phase1_rad_orig.nii.gz -add 3.14159265 temp_phase1_rad.nii.gz')

#Step 3, create phase unwrapped images
runcmd('prelude -v -a temp_fieldmap_mag1.nii.gz -p temp_phase0_rad.nii.gz -o temp_phase0_unwrapped_rad')
runcmd('prelude -v -a temp_fieldmap_mag2.nii.gz -p temp_phase1_rad.nii.gz -o temp_phase1_unwrapped_rad')

#Step 4, generate field maps in rad/s
runcmd('fslmaths temp_phase1_unwrapped_rad.nii.gz -sub temp_phase0_unwrapped_rad.nii.gz -mul 1000 -div '+TE+' temp_fieldmap_rads -odt float')

#Step 5, apply fieldmap regularisation
runcmd('fugue --loadfmap=temp_fieldmap_rads -s 1 --savefmap='+fieldmap_out)
runcmd('fugue --loadfmap='+fieldmap_out+' --despike --savefmap='+fieldmap_out)
runcmd('fugue --loadfmap='+fieldmap_out+' -m --savefmap='+fieldmap_out)

#fugue -i episplit0000.nii.gz --dwell=0.394 --loadfmap=out.nii.gz -u unwarped.nii.gz --saveshift=shift.nii.gz --despike