make_fmap

  • Creates the field map from two undistorted images collected at different TEs. It uses prelude from FSL to unwrap and subtract phase maps at each TE. It no longer writes a mask file.
    Usage
    make_fmap [-hvnft -m <user_mask>] <input_data> <field_map_file> [<structural_image>
    • input_data: Raw field map data in either GE I-file format or in dicom format. These should consist of two gradient echo images acquired at two echo times, one approximately 3ms longer than the other. The rhrcctrl CV should be set so that the scanner writes the real, imaginary, magnitude, and phase images.
    • field_map_file: Name of the field map file to be created. This will be in nifti n+1 format.
    • structural_image: If this argument is present, the transformation matrix required to register the field map to the structural image(i.e., T1 weighted 3D IR image) is computed. The result as saved in the same directory as the fieldmap as the text file "3drotate_cmd.txt" as a command to AFNI's 3drotate command.
    • -n, --nocleanup: Leave intermediate files. Otherwise delete them.
    • -m <usermask>, --mask=<usermask>: Mask covering the brain.  The default option is to use bet to extract a coarse brain mask. This will only work for human subjects. Any mask covering the brain should work, even an image of all ones. (In that case the phase unwrapping will take a very long time and may fail. )
    • -v, --verbose: verbose mode.
    • -f, --fast: Use previously computed unwrapped phase images if available
    • -t<dir>, --tmp_dir=<temp_dir>: Write temporary files to the directory "dir". Otherwise, temporary files will be written to the /scratch partition or to the current working directory.
    Example
    export DATA=/study/study_name/data/subject_001/anatomicals export PROC=/study/study_name/proc/subject_001 make_fmap ${DATA}/S7_2DFAST ${PROC}/fieldmap/fmap_axial ${PROC}/anat/T1High+orig
    where
    - S7_2DFAST is the name of the directory containing the fieldmap data (i.e., two gradient echo images acquired at TEs of, say, 7ms and 10ms).
    - fieldmap/fmap_axial is the output file name.
    - T1High+orig is the T1 structural image. It can be in either nifti or AFNI format.
    Method

    The method is that described by Jezzard at al. [1]. The phase images from two gradient echo images acquired with at slightly different TEs (usually 8ms and 11ms) are subtracted after their phase is unwrapped using the prelude program from FSL. Regions where the change in phase exceeds the Nyquist rate are set to zero, since the fieldmap is not valid in these regions. (This occurs at boundaries of the head and in the dropout regions near air cavities.) Since there is an indeterminate number of phase wraps at the edge of the map, the phase difference will have an error that is an integral multiple of 2*pi. This is corrected by setting the phase difference at the brains center of mass to zero. This point is somewhate posterior to the brainstem where the field inhomogeneity is low and the correction can be safely assumed to be near zero. Scaling by 2p/DTE yields a fieldmap in units of radians/second.

    1. Peter Jezzard and Stuart Clare, (1995) "Sources of distortion in functional MRI data", Human Brain Mapping, Volume 8, Issue 2-3 , Pages 80 - 85

  • Last modified October 18, 2008