<?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>FmExample</title><revhistory><revision><revnumber>8</revnumber><date>2013-03-07 21:24:05</date><authorinitials>localhost</authorinitials><revremark>converted to 1.6 markup</revremark></revision><revision><revnumber>7</revnumber><date>2006-07-27 14:53:14</date><authorinitials>devel01.mrc-cbu.cam.ac.uk</authorinitials></revision><revision><revnumber>6</revnumber><date>2006-07-27 14:52:56</date><authorinitials>devel01.mrc-cbu.cam.ac.uk</authorinitials><revremark>Revert to revision 3.</revremark></revision><revision><revnumber>5</revnumber><date>2006-07-27 14:50:56</date><authorinitials>devel01.mrc-cbu.cam.ac.uk</authorinitials></revision><revision><revnumber>4</revnumber><date>2006-07-27 14:22:32</date><authorinitials>devel01.mrc-cbu.cam.ac.uk</authorinitials></revision><revision><revnumber>3</revnumber><date>2006-07-27 10:03:07</date><authorinitials>devel01.mrc-cbu.cam.ac.uk</authorinitials></revision><revision><revnumber>2</revnumber><date>2006-07-27 10:01:42</date><authorinitials>devel01.mrc-cbu.cam.ac.uk</authorinitials></revision><revision><revnumber>1</revnumber><date>2006-07-04 15:01:25</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://lsr-wiki-02.mrc-cbu.cam.ac.uk/imaging/FmExample/imaging/FmBackground#">Background</ulink></para><para><ulink url="https://lsr-wiki-02.mrc-cbu.cam.ac.uk/imaging/FmExample/imaging/FmPower#">Improvement in power!</ulink></para><para><ulink url="https://lsr-wiki-02.mrc-cbu.cam.ac.uk/imaging/FmExample/imaging/FmFieldmaps#">Acquiring fieldmaps</ulink></para><para><ulink url="https://lsr-wiki-02.mrc-cbu.cam.ac.uk/imaging/FmExample/imaging/FmDownload#">Download</ulink></para><para><ulink url="https://lsr-wiki-02.mrc-cbu.cam.ac.uk/imaging/FmExample/imaging/FmRequirements#">What you'll need to undistort an EPI data series</ulink></para><para><ulink url="https://lsr-wiki-02.mrc-cbu.cam.ac.uk/imaging/FmExample/imaging/FmReference#">Guide and reference</ulink></para><para><link linkend="">Step-by-step example</link></para><para><ulink url="https://lsr-wiki-02.mrc-cbu.cam.ac.uk/imaging/FmExample/imaging/FmBatch#">Batch mode</ulink></para></entry></row></tbody></tgroup></informaltable><section><title>Siemens step-by-step example</title><para>First, get the <ulink url="http://imaging.mrc-cbu.cam.ac.uk/downloads/fmu/fmu_siemens_exampledataset.tar">Siemens example dataset (2MB)</ulink> (thanks to Michael Benharrosh and Marlene Richter at Princeton University for this). </para><para>Unzip it and you should have three images in analyze format: an EPI, and the phase and magnitude from a gre_fieldmapping sequence. </para><para>When you've installed the tool, at the matlab prompt type </para><para>&gt;&gt; fieldmap_undistort_v3 </para><para>Then, in the SPM window, choose the following options </para><informaltable><tgroup cols="2"><colspec colname="col_0"/><colspec colname="col_1"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1"><para>Accept all defaults</para></entry><entry colsep="1" rowsep="1"><para>No</para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Start at which stage</para></entry><entry colsep="1" rowsep="1"><para>Reco <emphasis>(default)</emphasis></para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Which option?</para></entry><entry colsep="1" rowsep="1"><para>Siemens gre_fieldmapping</para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Realign fieldmaps to com</para></entry><entry colsep="1" rowsep="1"><para>Yes <emphasis>(default)</emphasis></para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Shift EPI forward by</para></entry><entry colsep="1" rowsep="1"><para>0 <emphasis>(default)</emphasis></para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Evolution time</para></entry><entry colsep="1" rowsep="1"><para>2.46 <emphasis>(default)</emphasis></para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Slice angle of EPIs relative to fieldmaps</para></entry><entry colsep="1" rowsep="1"><para>0 <emphasis>(default)</emphasis></para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Bandwidth</para></entry><entry colsep="1" rowsep="1"><para>2604</para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Axis of phase encoding (undistortion)</para></entry><entry colsep="1" rowsep="1"><para>y <emphasis>(default)</emphasis></para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Constrain coregistration</para></entry><entry colsep="1" rowsep="1"><para>Translations only <emphasis>(default)</emphasis></para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Type of interpolation</para></entry><entry colsep="1" rowsep="1"><para>sinc <emphasis>(default)</emphasis></para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Maximum shift allowed</para></entry><entry colsep="1" rowsep="1"><para>9999 <emphasis>(default)</emphasis></para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Adjust mean displacement?</para></entry><entry colsep="1" rowsep="1"><para>Force mean to zero <emphasis>(default)</emphasis></para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Directory for fieldmap files</para></entry><entry colsep="1" rowsep="1"><para>Choose a blank directory (e.g., fieldmaps)</para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Choose GRE phase map</para></entry><entry colsep="1" rowsep="1"><para>PHANTOM_FIELDMAP_PHASE.img</para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Choose GRE magnitude map</para></entry><entry colsep="1" rowsep="1"><para>PHANTOM_FIELDMAP_MAG.img</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>PHANTOM_EPI.img</para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"><para>Choose EPIs to undistort</para></entry><entry colsep="1" rowsep="1"><para>PHANTOM_EPI.img</para></entry></row></tbody></tgroup></informaltable><para>The EPI before and after undistortion should look like this: </para><informaltable><tgroup cols="2"><colspec colname="col_0"/><colspec colname="col_1"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1"><para> <inlinemediaobject><imageobject><imagedata fileref="http://imaging.mrc-cbu.cam.ac.uk/images/fm_phantom_before_undist.jpg"/></imageobject><textobject><phrase>http://imaging.mrc-cbu.cam.ac.uk/images/fm_phantom_before_undist.jpg</phrase></textobject></inlinemediaobject> </para></entry><entry colsep="1" rowsep="1"><para> <inlinemediaobject><imageobject><imagedata fileref="http://imaging.mrc-cbu.cam.ac.uk/images/fm_phantom_after_undist.jpg"/></imageobject><textobject><phrase>http://imaging.mrc-cbu.cam.ac.uk/images/fm_phantom_after_undist.jpg</phrase></textobject></inlinemediaobject> </para></entry></row></tbody></tgroup></informaltable><para>There's nothing that can be done about the dropout, but even the large distortion produced by this mis-shimming is mostly corrected. </para><para>If you are going to collect your own data on a Siemens machine and your system doesn't allow you to reconstruct both mag and phase simultaneously, you'll need to change one line in your pulse sequence. Contact Stefan Thesen at Siemens [his surname] @siemens.com who'll probably be able to help.) </para></section><section><title>Bruker step-by-step example</title><para>First, get the <ulink url="http://imaging.mrc-cbu.cam.ac.uk/downloads/fmu/fmu_exampledataset.tar">Bruker example dataset (34MB)</ulink> </para><para>Run by typing fieldmap_undistort at the SPM prompt, and choose the following options. Where requested, choose the directories and files from your copy of the data. </para><informaltable><tgroup cols="2"><colspec colname="col_0" colwidth="38*"/><colspec colname="col_1" colwidth="62*"/><tbody><row rowsep="1"><entry colsep="1" rowsep="1" valign="top"><para>Accept all defaults: </para></entry><entry colsep="1" rowsep="1" valign="top"><para>Yes </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1" valign="top"><para>Choose Directory of Phase Map: </para></entry><entry colsep="1" rowsep="1" valign="top"><para>example_dataset/phasemaps </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1" valign="top"><para>Choose Directory of Phase 1a: </para></entry><entry colsep="1" rowsep="1" valign="top"><para>example_dataset/rawprereco/10 </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1" valign="top"><para>Choose Directory of Phase 1b: </para></entry><entry colsep="1" rowsep="1" valign="top"><para>example_dataset/rawprereco/11 </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1" valign="top"><para>Choose Directory of Phase 1c: </para></entry><entry colsep="1" rowsep="1" valign="top"><para>example_dataset/rawprereco/12 </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1" valign="top"><para>Choose EPI header file (IMND or brkhdr): </para></entry><entry colsep="1" rowsep="1" valign="top"><para>example_dataset/epis/000484 m03_04_EPI.brkhdr </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1" valign="top"><para>Choose EPI to register to: </para></entry><entry colsep="1" rowsep="1" valign="top"><para>example_dataset/epis/meany000484-m03_04_EPI_0002.img </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1" valign="top"><para>Choose EPI to undistort: </para></entry><entry colsep="1" rowsep="1" valign="top"><para>example_dataset/epis/meany000484-m03_04_EPI_0002.img </para></entry></row></tbody></tgroup></informaltable><para>The undistorted EPIs will be in the same directory as the raw EPIs, with the added suffix ‘u’. </para></section></article>