Fieldmap Correction - Examples
Example 1
cd study_dir # study_dir is the directory where the raw data are stored.
make_fmap anatomicals fmap
# "anatomicals" is the directory with the images
reconstructed on the scanner in either I.xxx or dicom format.
Subdirectories are searched for the field map data.
# "fmap" is the output fieldmap.
fieldmap_correction fmap.img .688 . run_1+orig run_2+orig ...
# fmap.img is the field map computed with make_fmap
# .688 is the default time between k-space readouts in ms.
# Use "dump_header filename -v" to read the dwell time (also
called effective echo spacing)
from the header of the raw data, i.e., the P-file, dicom file, or I-file.
# Corrected images will be written to the current working directory.
<\code>
Example 2
# Assume you're current working directory is /study/great_study/great_data/orig
# (using the directory structure defined by Terry Oakes) for subject g01
# First create a fieldmap and compute the rotation required to register the
# fieldmap with the anatomical image (this is done by the third argument to make_fmap.
mkdir fieldmap
cd fieldmap
make_fmap ../../anatomicals/S3_2DFAST fmap_g01 ../anat/T1High+orig
# The fieldmap will be written to fmapg01+orig and a 3drotate command will
# be written to rotcom.txt
#Now cd to the EPIs
cd ../epi
# Reconstruct the images.
epirecon_ex -f Pxxxxx.7 -NAME gstudy_g01 -fmt brik
# Now check registration between the epi and the fieldmap and between the
# fieldmap and the anatomical image using AFNI.
# Do the motion-correction and slice-timing correction:
# If the epi is not in register with the fieldmap, use to3d to convert the EPI
# images in anatomicals/S?_EPI to brik format. Only convert the
# first frame. Use this image as the base image. It is usually acquired
# immediately after the fieldmap and is almost always in register.
# If the functional epis were in register with the fieldmap, do the following:
# If the EPI was acquired
# after the fieldmap (this is the usual case and can be checked by making
# sure that the "S?_EPI" directory comes after the "S?_2DFAST" directory
# in the "anatomicals" subdirectory), use the first frame of the first epi file
# as the base. Otherwise use the last frame of the last epi as the base.
3dvolreg -tshift -Fourier -verbose -twopass -base 0 -1Dfile motion1.txt -prefix bh_epi_te30_p01+orig
# Compute the fieldmap correction. If the images were reconstructed after July 30, 2007, the
# value for dwell-time (.688) will be ignored and the header value will be used. Header values
# will also be used to determine the phase encode axis and phase-encode direction. Default
# values will be used if images reconstructed before July 30 were used.
fieldmap_correction ../fieldmap/fmap_p01+orig .688 . bh_epi_te30_p01_vr+orig
# If the fieldmap images were in register with the anatomicals, the images
# are ready for the statistical analysis. If not, first use the 3drotate
# command written by make_fmap (in the file fieldmap/rotcom.txt) to
# register the EPIs with the anatomical.
Recommendations
- Use a fieldmap acquired in the same plane as the data. If this is not possible, use a sagittal fieldmap. The software will use any valid fieldmap data but these choices will yield the best results.
- Fieldmap correction should be done after motion correction.
- The motion correction program (usually 3dvolreg) should use the image acquired closest to the fieldmaps as the base image. This is specified using the -base argument in 3dvolreg.
- A frequent scanning sequence is to acquire the fieldmap data, then setup the EPI acquisition, acquire the EPIs, and finally, acquire the structural image. There is sometimes significant motion between the time the EPIs are setup and the first functional run is acquired. If this occurs, the single EPI image acquired when the EPI acquisitions are setup should be used for motion correction.
- The fieldmap-corrected EPIs should be regsitered to the anatomical using the 3drotate command saved by make_fmap. This 3drotate commmand can be used after fieldmap correction to register the EPIs with the anatomical image. Although this is not necessary for many subjects, it can appreciably improve image registration, particularly in juvenile subjects.