<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>FmReference</title><revhistory><revision><revnumber>5</revnumber><date>2013-03-07 21:24:00</date><authorinitials>localhost</authorinitials><revremark>converted to 1.6 markup</revremark></revision><revision><revnumber>4</revnumber><date>2006-07-27 14:50:38</date><authorinitials>devel01.mrc-cbu.cam.ac.uk</authorinitials></revision><revision><revnumber>3</revnumber><date>2006-07-27 14:40:49</date><authorinitials>devel01.mrc-cbu.cam.ac.uk</authorinitials></revision><revision><revnumber>2</revnumber><date>2006-07-25 14:17:15</date><authorinitials>devel03.mrc-cbu.cam.ac.uk</authorinitials></revision><revision><revnumber>1</revnumber><date>2006-07-04 15:00:05</date><authorinitials>Scripting Subsystem</authorinitials></revision></revhistory></articleinfo><informaltable><tgroup cols="1"><colspec colname="col_0" colwidth="100*"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1"><para><emphasis role="strong">Using a field-map to undistort EPIs</emphasis></para><para><ulink url="https://imaging.mrc-cbu.cam.ac.uk/imaging/FmReference/imaging/FmBackground#">Background</ulink></para><para><ulink url="https://imaging.mrc-cbu.cam.ac.uk/imaging/FmReference/imaging/FmPower#">Improvement in power!</ulink></para><para><ulink url="https://imaging.mrc-cbu.cam.ac.uk/imaging/FmReference/imaging/FmFieldmaps#">Acquiring fieldmaps</ulink></para><para><ulink url="https://imaging.mrc-cbu.cam.ac.uk/imaging/FmReference/imaging/FmDownload#">Download</ulink></para><para><ulink url="https://imaging.mrc-cbu.cam.ac.uk/imaging/FmReference/imaging/FmRequirements#">What you'll need to undistort an EPI data series</ulink></para><para><link linkend="">Guide and reference</link></para><para><ulink url="https://imaging.mrc-cbu.cam.ac.uk/imaging/FmReference/imaging/FmExample#">Step-by-step example</ulink></para><para><ulink url="https://imaging.mrc-cbu.cam.ac.uk/imaging/FmReference/imaging/FmBatch#">Batch mode</ulink></para></entry></row></tbody></tgroup></informaltable><section><title>Describing the procedure</title><section><title>References</title><para>If you use the field-map undistortion tool, you'll probably find it easiest to cite the following publications to explain what you've done: </para><para>Cusack, R., Brett, M. &amp; Osswald, K. (2003) &quot;An evaluation of the use of magnetic field maps to undistort echo-planar images&quot; <ulink url="https://imaging.mrc-cbu.cam.ac.uk/imaging/FmReference/imaging/NeuroImage#">NeuroImage</ulink> 18, 127-142. Cusack, R., &amp; Papadakis, N. (2002) &quot;New robust 3-d phase unwrapping algorithms: application to magnetic field mapping and undistorting echoplanar images&quot; <ulink url="https://imaging.mrc-cbu.cam.ac.uk/imaging/FmReference/imaging/NeuroImage#">NeuroImage</ulink> 16, 754-764. Jezzard, P. and Balaban, R.S. (1995). &quot;Correction for Geometric Distortion in Echo Planar Images from B0 Field Variations&quot; Magnetic Resonance in Medicine 34: 65-73. </para><para>You might like to include something like the following. </para></section><section><title>METHODS: general details</title><para>A map of the magnetic field was acquired and then used to correct for distortion to the EPIs resulting from inhomogeneities in the field (Jezzard &amp; Balaban, 1995). This procedure has been shown to improve anatomical localisation and increase the power of group studies by achieving better spatial registration between the data from different subjects (Cusack, Brett &amp; Osswald, 2003). </para></section><section><title>METHODS: acquisition</title><para>The field-map data were acquired using a 3D gradient echo sequence with a matrix size of 64 x 256 x 64 and a field of view 256 x 256 x 256 mm. Two volumes were acquired, differing only in their TE, which was either 1 ms or 10.104 ms. The difference between these maps was chosen to be a whole multiple of the precession time for the fat signal at 3 Tesla. Each acquisition took 2 mins 6 secs. </para></section><section><title>METHODS: processing</title><para>The magnetic field strength at each voxel is encoded in the phase difference between the two field-map acquisitions. Phase unwrapping was performed on this phase difference using the procedure described by Cusack &amp; Papadakis (2002). The unwrapped phase and magnitude of the field maps were then spatially processed and scaled as described in Cusack, Brett &amp; Osswald (2003), and then the EPIs undistorted using the pixel shift method. Undistortion was applied after realignment. </para></section></section><section><title>General guide</title><section><title>First steps</title><orderedlist numeration="arabic"><listitem><para>Make sure you preserve the field map raw data, and the IMND or .brkhdr file from one of the EPI data series </para></listitem><listitem><para>Realign and reslice your EPI data series </para></listitem><listitem><para>For each subject, make an empty directory, which will receive the processed field-map files </para></listitem><listitem><para>Type fieldmap_undistort at the SPM &gt;&gt; prompt, or choose fmundistort from the Toolbox menu. </para></listitem></orderedlist><para>Before trying a dataset of your own, why not follow the <ulink url="https://imaging.mrc-cbu.cam.ac.uk/imaging/FmReference/imaging/FmExample#">step-by-step example</ulink> ? </para></section><section><title>Image orientation</title><para>Your EPIs should be in standard SPM orientation. The voxel sizes should be correct. The latest version of the undistortion code will detect a flip in the .mat file and reverse undistortion appropriately, so you do not have to use yaw180 to reorient images; if you prefer you may use DISPLAY in SPM. However, you must still reslice your images after realignment. </para></section><section><title>Prompts</title><para>You should be able to accept the defaults for all of the options in this section. </para><informaltable><tgroup cols="3"><colspec colname="col_0"/><colspec colname="col_1"/><colspec colname="col_2"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1"><para><emphasis>Prompt given</emphasis></para></entry><entry colsep="1" rowsep="1"><para><emphasis>Options</emphasis></para></entry><entry colsep="1" rowsep="1"><para><emphasis>Description</emphasis></para></entry></row></tbody></tgroup></informaltable><para>||&lt;^&gt;Accept all defaults?||Yes No||Click yes to accept all defaults|| ||&lt;^&gt;Start at which stage?||&lt;^&gt;Reco Unwrapping Skull stripping Expansion Rotation &amp; Reslicing Generate distorted magnitude Coregistration Undistortion||&lt;^&gt;Stage of processing to start at. If you're processing a dataset for the first time, this will be the first option, reco. If you later come back and want to undistort an extra image or two, then choose Undistortion|| </para><informaltable><tgroup cols="3"><colspec colname="col_0"/><colspec colname="col_1"/><colspec colname="col_2"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1" valign="top"><para>Which option</para></entry><entry colsep="1" rowsep="1" valign="top"><para>Locally reconstruct WBIC reconstruction Oxford phase maps</para></entry><entry colsep="1" rowsep="1" valign="top"><para>Specify whether you wish to reconstruct your Cambridge field maps here, whether you wish to use WBIC reconstructed maps (very unusual) or Oxford phase maps.</para></entry></row></tbody></tgroup></informaltable><para>||&lt;^&gt;Phase map pair to use||&lt;^&gt;ab phasemap ac phasemap </para><informaltable><tgroup cols="1"><colspec colname="col_0"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1" valign="top"><para>Choose whether you'd like to use field maps phase1a and phase1b or phase1a and phase1c</para></entry></row></tbody></tgroup></informaltable><para>||&lt;^&gt;Realign to COM||Yes No ||&lt;^&gt;If yes, field maps will be shifted so that their centre of mass is in the middle of image. If you specify no, and your field maps are (unusually) near the edge of the field of view, then when the forward distortion process happens, the image may be shifted outside the field of view.|| </para><informaltable><tgroup cols="3"><colspec colname="col_0"/><colspec colname="col_1"/><colspec colname="col_2"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1" valign="top"><para>Shift EPI forward by</para></entry><entry colsep="1" rowsep="1"><para> [any number] </para></entry><entry colsep="1" rowsep="1" valign="top"/></row></tbody></tgroup></informaltable><para>||&lt;^&gt;Evolution time of map||3 12 2.276 9.104 2.5 </para><informaltable><tgroup cols="1"><colspec colname="col_0"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1" valign="top"><para>Specify the difference in TEs between the two field maps you've chosen</para></entry></row></tbody></tgroup></informaltable><para>||&lt;^&gt;Constrain coregistration?||&lt;^&gt;No Translations only </para><informaltable><tgroup cols="3"><colspec colname="col_0"/><colspec colname="col_1"/><colspec colname="col_2"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1" valign="top"><para>Choose whether to constrain the coregistration of forward distorted field map &amp; EPI. Default is Translations only.</para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1" valign="top"><para>Max shift (mm)</para></entry><entry colsep="1" rowsep="1" valign="top"><para> [any number] </para></entry><entry colsep="1" rowsep="1" valign="top"><para>Specify maximum shift to be applied in undistortion process. Voxels with a shift greater than this will be masked to zero.</para></entry></row></tbody></tgroup></informaltable><para>||&lt;^&gt;Interpolation||&lt;^&gt;Sinc Linear </para><informaltable><tgroup cols="1"><colspec colname="col_0"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1" valign="top"><para>Type of interpolation in undistortion</para></entry></row></tbody></tgroup></informaltable></section><section><title>Files</title><informaltable><tgroup cols="2"><colspec colname="col_0"/><colspec colname="col_1"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1"><para>Directory for field map files.</para></entry><entry colsep="1" rowsep="1"><para>Various processed field map files will be written to this directory. You should create a different directory for each subject - perhaps called fieldmaps.</para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Directory for phase1a</para></entry><entry colsep="1" rowsep="1"><para>The numbered directory that contains the raw data for phase1a</para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Directory for phase1b</para></entry><entry colsep="1" rowsep="1"><para>The numbered directory that contains the raw data for phase1b</para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Directory for phase1c</para></entry><entry colsep="1" rowsep="1"><para>The numbered directory that contains the raw data for phase1c</para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>EPI header file</para></entry><entry colsep="1" rowsep="1"><para>This should be the .brkhdr or IMND file from one of your EPI data series. If you use pvconv, it will make a .brkhdr file for each of your series - choose one with the _EPI suffix. If you use ImageJ, pick the IMND file from the numbered directory that contains your raw data</para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Choose EPI to coregister to</para></entry><entry colsep="1" rowsep="1"><para>This should be the mean EPI file generated by realignment (e.g., meana000484_EPI_0001.img)</para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Choose the EPIs you wish to undistort</para></entry><entry colsep="1" rowsep="1"><para>Choose all of the individual EPI scans, and the mean. Choose the resliced files with the prefix 'r'.</para></entry></row></tbody></tgroup></informaltable></section></section></article>