diff --git a/advanced_topics/08_fslpy.ipynb b/advanced_topics/08_fslpy.ipynb
index 94680b2bb1909b7474ac69807fb0b355bfac4e07..4e073c4e8bc3f941502bb601a7d6320fa04405ef 100644
--- a/advanced_topics/08_fslpy.ipynb
+++ b/advanced_topics/08_fslpy.ipynb
@@ -31,7 +31,7 @@
     "  * [Working with image data](#working-with-image-data)\n",
     "  * [Loading other file types](#loading-other-file-types)\n",
     "  * [NIfTI coordinate systems](#nifti-coordinate-systems)\n",
-    "  * [Image processing](#image-processing)\n",
+    "  * [Transformations and resampling](#transformations-and-resampling)\n",
     "* [FSL wrapper functions](#fsl-wrapper-functions)\n",
     "  * [In-memory images](#in-memory-images)\n",
     "  * [Loading outputs into Python](#loading-outputs-into-python)\n",
@@ -97,6 +97,8 @@
     "                `fig` argument to plot overlays).\n",
     "    \"\"\"\n",
     "\n",
+    "    voxel = [int(round(v)) for v in voxel]\n",
+    "\n",
     "    data            = np.asanyarray(data, dtype=np.float)\n",
     "    data[data <= 0] = np.nan\n",
     "\n",
@@ -471,12 +473,27 @@
     "\n",
     "# Apply the world->voxel\n",
     "# affine to the coordinates\n",
-    "voxcoords = (np.dot(world2vox[:3, :3], mnicoords.T)).T + world2vox[:3, 3]\n",
-    "\n",
-    "# The code above is a bit fiddly, so\n",
-    "# instead of figuring it out, you can\n",
-    "# just use the transform() function:\n",
+    "voxcoords = (np.dot(world2vox[:3, :3], mnicoords.T)).T + world2vox[:3, 3]"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "The code above is a bit fiddly, so instead of figuring it out, you can just\n",
+    "use the\n",
+    "[`affine.transform`](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.transform.affine.html#fsl.transform.affine.transform)\n",
+    "function:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
     "from fsl.transform.affine import transform\n",
+    "\n",
     "voxcoords = transform(mnicoords, world2vox)\n",
     "\n",
     "# just to double check, let's transform\n",
@@ -622,7 +639,7 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "> Below we will use the\n",
+    "> In the next section we will use the\n",
     "> [`fsl.transform.flirt.fromFlirt`](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.transform.flirt.html#fsl.transform.flirt.fromFlirt)\n",
     "> function, which does all of the above for us.\n",
     "\n",
@@ -648,15 +665,14 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "> Note that in the above example we are only applying a linear transformation\n",
-    "> into MNI space - in reality you would also want to apply your non-linear\n",
-    "> structural-to-standard transformation too. But this is left as [an exercise\n",
-    "> for the\n",
-    "> reader](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.transform.fnirt.html).\n",
+    "Note that in the above example we are only applying a linear transformation\n",
+    "into MNI space - in reality you would also want to apply your non-linear\n",
+    "structural-to-standard transformation too. This is covered in the next\n",
+    "section.\n",
     "\n",
     "\n",
-    "<a class=\"anchor\" id=\"image-processing\"></a>\n",
-    "### Image processing\n",
+    "<a class=\"anchor\" id=\"transformations-and-resampling\"></a>\n",
+    "### Transformations and resampling\n",
     "\n",
     "\n",
     "Now, it's all well and good to look at t-statistic values and voxel\n",
@@ -665,8 +681,13 @@
     "this, we're going to resample our functional image into MNI space, so we can\n",
     "overlay it on the MNI template. This can be done using some handy functions\n",
     "from the\n",
+    "[`fsl.transform.flirt`](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.transform.flirt.html)\n",
+    "and\n",
     "[`fsl.utils.image.resample`](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.utils.image.resample.html)\n",
-    "module:"
+    "modules.\n",
+    "\n",
+    "\n",
+    "Let's make sure we've got our source and reference images loaded:"
    ]
   },
   {
@@ -675,28 +696,51 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "from fsl.transform.flirt import fromFlirt\n",
-    "from fsl.utils.image.resample import resampleToReference\n",
-    "\n",
     "featdir = op.join(op.join('08_fslpy', 'fmri.feat'))\n",
     "tstat1  = Image(op.join(featdir, 'stats', 'tstat1'))\n",
-    "std     = Image(op.expandvars(op.join('$FSLDIR', 'data', 'standard', 'MNI152_T1_2mm')))\n",
+    "std     = Image(op.expandvars(op.join('$FSLDIR', 'data', 'standard', 'MNI152_T1_2mm')))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Now we'll load the `example_func2standard` FLIRT matrix, and adjust it so that\n",
+    "it transforms from functional *world* coordinates into standard *world*\n",
+    "coordinates - this is what is expected by the `resampleToReference` function,\n",
+    "used below:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from fsl.transform.flirt import fromFlirt\n",
     "\n",
-    "# Load the func2standard FLIRT matrix, and adjust it\n",
-    "# so that it transforms from functional *world*\n",
-    "# coordinates into standard *world* coordinates -\n",
-    "# this is what is expected by the resampleToReference\n",
-    "# function, used below\n",
     "func2std = np.loadtxt(op.join(featdir, 'reg', 'example_func2standard.mat'))\n",
-    "func2std = fromFlirt(func2std, tstat1, std, 'world', 'world')\n",
-    "\n",
-    "# All of the functions in the resample module\n",
-    "# return a numpy array containing the resampled\n",
-    "# data, and an adjusted voxel-to-world affine\n",
-    "# transformation. But when using the\n",
-    "# resampleToReference function, the affine will\n",
-    "# be the same as the MNI152 2mm affine, so we\n",
-    "# can ignore it.\n",
+    "func2std = fromFlirt(func2std, tstat1, std, 'world', 'world')"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Now we can use `resampleToReference` to resample our functional data into\n",
+    "MNI152 space. This function returns a `numpy` array containing the resampled\n",
+    "data, and an adjusted voxel-to-world affine transformation. But in this case,\n",
+    "we know that the data will be aligned to MNI152, so we can ignore the affine:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from fsl.utils.image.resample import resampleToReference\n",
+    "\n",
     "std_tstat1 = resampleToReference(tstat1, std, func2std)[0]\n",
     "std_tstat1 = Image(std_tstat1, header=std.header)"
    ]
@@ -725,15 +769,198 @@
     "fig = ortho(std_tstat1,  mnivoxels, cmap=plt.cm.inferno, fig=fig, cursor=True)"
    ]
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "In the example above, we resampled some data from functional space into\n",
+    "standard space using a linear transformation. But we all know that this is not\n",
+    "how things work in the real world - linear transformations are for kids. The\n",
+    "real world is full of lions and tigers and bears and warp fields.\n",
+    "\n",
+    "\n",
+    "The\n",
+    "[`fsl.transform.fnirt`](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.transform.fnirt.html#fsl.transform.fnirt.fromFnirt)\n",
+    "and\n",
+    "[`fsl.transform.nonlinear`](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.transform.nonlinear.html)\n",
+    "modules contain classes and functions for working with FNIRT-style warp fields\n",
+    "(modules for working with lions, tigers, and bears are still under\n",
+    "development).\n",
+    "\n",
+    "\n",
+    "Let's imagine that we have defined an ROI in MNI152 space, and we want to\n",
+    "project it into the space of our functional data.  We can do this by combining\n",
+    "the nonlinear structural to standard registration produced by FNIRT with the\n",
+    "linear functional to structural registration generated by FLIRT.  First of\n",
+    "all, we'll load images from each of the functional, structural, and standard\n",
+    "spaces:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "featdir = op.join('08_fslpy', 'fmri.feat')\n",
+    "func    = Image(op.join(featdir, 'reg', 'example_func'))\n",
+    "struc   = Image(op.join(featdir, 'reg', 'highres'))\n",
+    "std     = Image(op.expandvars(op.join('$FSLDIR', 'data', 'standard', 'MNI152_T1_2mm')))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Now, let's say we have obtained our seed location in MNI152 coordinates. Let's\n",
+    "convert them to MNI152 voxels just to double check:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "seedmni    = [-48, -74, -9]\n",
+    "seedmnivox = transform(seedmni, std.getAffine('world', 'voxel'))\n",
+    "ortho(std.data, seedmnivox, cursor=True)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Now we'll load the FNIRT warp field, which encodes a nonlinear transformation\n",
+    "from structural space to standard space. FNIRT warp fields are often stored as\n",
+    "*coefficient* fields to reduce the file size, but in order to use it, we must\n",
+    "convert the coefficient field into a *deformation* (a.k.a. *displacement*)\n",
+    "field. This takes a few seconds:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from fsl.transform.fnirt     import readFnirt\n",
+    "from fsl.transform.nonlinear import coefficientFieldToDeformationField\n",
+    "\n",
+    "struc2std = readFnirt(op.join(featdir, 'reg', 'highres2standard_warp'), struc, std)\n",
+    "struc2std = coefficientFieldToDeformationField(struc2std)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "We'll also load our FLIRT functional to structural transformation, adjust it\n",
+    "so that it transforms between voxel coordinate systems instead of the FSL\n",
+    "coordinate system, and invert so it can transform from structural voxels to\n",
+    "functional voxels:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from fsl.transform.affine import invert\n",
+    "func2struc = np.loadtxt(op.join(featdir, 'reg', 'example_func2highres.mat'))\n",
+    "func2struc = fromFlirt(func2struc, func, struc, 'voxel', 'voxel')\n",
+    "struc2func = invert(func2struc)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Now we can transform our seed coordinates from MNI152 space into functional\n",
+    "space in two stages. First, we'll use our deformation field to transform from\n",
+    "MNI152 space into structural space:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "seedstruc = struc2std.transform([seedmni], 'world', 'voxel')[0]\n",
+    "seedfunc  = transform(seedstruc, struc2func)\n",
+    "\n",
+    "print('Seed location in MNI coordinates:  ', seedmni)\n",
+    "print('Seed location in functional voxels:', seedfunc)\n",
+    "ortho(func.data, seedfunc, cursor=True)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "> FNIRT warp fields kind of work backwards - we can use them to transform\n",
+    "> reference coordinates into source coordinates, but would need to invert the\n",
+    "> warp field using `invwarp` if we wanted to transform from source coordinates\n",
+    "> into referemce coordinates.\n",
+    "\n",
+    "\n",
+    "Of course, we can also use our deformation field to resample an image from\n",
+    "structural space into MNI152 space. The `applyDeformation` function takes an\n",
+    "`Image` and a `DeformationField`, and returns a `numpy` array containing the\n",
+    "resampled data."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "from fsl.transform.nonlinear import applyDeformation\n",
+    "\n",
+    "strucmni = applyDeformation(struc, struc2std)\n",
+    "\n",
+    "# remove low-valued voxels,\n",
+    "# just for visualisation below\n",
+    "strucmni[strucmni < 1] = 0\n",
+    "\n",
+    "fig = ortho(std.data, [45, 54, 45], cmap=plt.cm.gray)\n",
+    "fig = ortho(strucmni, [45, 54, 45], fig=fig)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "The `premat` option to `applyDeformation` can be used to specify our linear\n",
+    "functional to structural transformation, and hence resample a functional image\n",
+    "into MNI152 space:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "tstatmni = applyDeformation(tstat1, struc2std, premat=func2struc)\n",
+    "tstatmni[tstatmni < 3] = 0\n",
+    "\n",
+    "fig = ortho(std.data, [45, 54, 45], cmap=plt.cm.gray)\n",
+    "fig = ortho(tstatmni, [45, 54, 45], fig=fig)"
+   ]
+  },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "There are a few other useful functions tucked away in the\n",
-    "[fsl.utils.image](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.utils.image.html)\n",
-    "package, with more to be added in the future. The [`fsl.transform`]() package\n",
-    "also contains a wealth of functionality for working with linear (FLIRT) and\n",
-    "non-linear (FNIRT) transformations.\n",
+    "[`fsl.utils.image`](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.utils.image.html)\n",
+    "and\n",
+    "[`fsl.transform`](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.transform.html)\n",
+    "packages, with more to be added in the future.\n",
     "\n",
     "\n",
     "<a class=\"anchor\" id=\"fsl-wrapper-functions\"></a>\n",
diff --git a/advanced_topics/08_fslpy.md b/advanced_topics/08_fslpy.md
index 1db751764b7892b694af22d8dcb463314fa0ea2f..0f54aba30fe55a228a86f75ef5a75396730e7d29 100644
--- a/advanced_topics/08_fslpy.md
+++ b/advanced_topics/08_fslpy.md
@@ -25,7 +25,7 @@ perform analyses and image processing in conjunction with FSL.
   * [Working with image data](#working-with-image-data)
   * [Loading other file types](#loading-other-file-types)
   * [NIfTI coordinate systems](#nifti-coordinate-systems)
-  * [Image processing](#image-processing)
+  * [Transformations and resampling](#transformations-and-resampling)
 * [FSL wrapper functions](#fsl-wrapper-functions)
   * [In-memory images](#in-memory-images)
   * [Loading outputs into Python](#loading-outputs-into-python)
@@ -78,6 +78,8 @@ def ortho(data, voxel, fig=None, cursor=False, **kwargs):
                 `fig` argument to plot overlays).
     """
 
+    voxel = [int(round(v)) for v in voxel]
+
     data            = np.asanyarray(data, dtype=np.float)
     data[data <= 0] = np.nan
 
@@ -364,11 +366,18 @@ vox2world = std2mm.getAffine('voxel', 'world')
 # Apply the world->voxel
 # affine to the coordinates
 voxcoords = (np.dot(world2vox[:3, :3], mnicoords.T)).T + world2vox[:3, 3]
+```
+
+
+The code above is a bit fiddly, so instead of figuring it out, you can just
+use the
+[`affine.transform`](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.transform.affine.html#fsl.transform.affine.transform)
+function:
+
 
-# The code above is a bit fiddly, so
-# instead of figuring it out, you can
-# just use the transform() function:
+```
 from fsl.transform.affine import transform
+
 voxcoords = transform(mnicoords, world2vox)
 
 # just to double check, let's transform
@@ -470,7 +479,7 @@ from fsl.transform.affine import concat
 funcvox2mni = concat(fsl2mni, func2std, vox2fsl)
 ```
 
-> Below we will use the
+> In the next section we will use the
 > [`fsl.transform.flirt.fromFlirt`](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.transform.flirt.html#fsl.transform.flirt.fromFlirt)
 > function, which does all of the above for us.
 
@@ -488,15 +497,14 @@ print('Peak activation (MNI voxels):     ', mnivoxels)
 ```
 
 
-> Note that in the above example we are only applying a linear transformation
-> into MNI space - in reality you would also want to apply your non-linear
-> structural-to-standard transformation too. But this is left as [an exercise
-> for the
-> reader](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.transform.fnirt.html).
+Note that in the above example we are only applying a linear transformation
+into MNI space - in reality you would also want to apply your non-linear
+structural-to-standard transformation too. This is covered in the next
+section.
 
 
-<a class="anchor" id="image-processing"></a>
-### Image processing
+<a class="anchor" id="transformations-and-resampling"></a>
+### Transformations and resampling
 
 
 Now, it's all well and good to look at t-statistic values and voxel
@@ -505,33 +513,44 @@ at some images. Let's display our peak activation location in MNI space. To do
 this, we're going to resample our functional image into MNI space, so we can
 overlay it on the MNI template. This can be done using some handy functions
 from the
+[`fsl.transform.flirt`](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.transform.flirt.html)
+and
 [`fsl.utils.image.resample`](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.utils.image.resample.html)
-module:
+modules.
 
 
-```
-from fsl.transform.flirt import fromFlirt
-from fsl.utils.image.resample import resampleToReference
+Let's make sure we've got our source and reference images loaded:
 
+
+```
 featdir = op.join(op.join('08_fslpy', 'fmri.feat'))
 tstat1  = Image(op.join(featdir, 'stats', 'tstat1'))
 std     = Image(op.expandvars(op.join('$FSLDIR', 'data', 'standard', 'MNI152_T1_2mm')))
+```
+
+
+Now we'll load the `example_func2standard` FLIRT matrix, and adjust it so that
+it transforms from functional *world* coordinates into standard *world*
+coordinates - this is what is expected by the `resampleToReference` function,
+used below:
+
+
+```
+from fsl.transform.flirt import fromFlirt
 
-# Load the func2standard FLIRT matrix, and adjust it
-# so that it transforms from functional *world*
-# coordinates into standard *world* coordinates -
-# this is what is expected by the resampleToReference
-# function, used below
 func2std = np.loadtxt(op.join(featdir, 'reg', 'example_func2standard.mat'))
 func2std = fromFlirt(func2std, tstat1, std, 'world', 'world')
+```
+
+
+Now we can use `resampleToReference` to resample our functional data into
+MNI152 space. This function returns a `numpy` array containing the resampled
+data, and an adjusted voxel-to-world affine transformation. But in this case,
+we know that the data will be aligned to MNI152, so we can ignore the affine:
+
+```
+from fsl.utils.image.resample import resampleToReference
 
-# All of the functions in the resample module
-# return a numpy array containing the resampled
-# data, and an adjusted voxel-to-world affine
-# transformation. But when using the
-# resampleToReference function, the affine will
-# be the same as the MNI152 2mm affine, so we
-# can ignore it.
 std_tstat1 = resampleToReference(tstat1, std, func2std)[0]
 std_tstat1 = Image(std_tstat1, header=std.header)
 ```
@@ -553,11 +572,137 @@ fig = ortho(std_tstat1,  mnivoxels, cmap=plt.cm.inferno, fig=fig, cursor=True)
 ```
 
 
+In the example above, we resampled some data from functional space into
+standard space using a linear transformation. But we all know that this is not
+how things work in the real world - linear transformations are for kids. The
+real world is full of lions and tigers and bears and warp fields.
+
+
+The
+[`fsl.transform.fnirt`](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.transform.fnirt.html#fsl.transform.fnirt.fromFnirt)
+and
+[`fsl.transform.nonlinear`](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.transform.nonlinear.html)
+modules contain classes and functions for working with FNIRT-style warp fields
+(modules for working with lions, tigers, and bears are still under
+development).
+
+
+Let's imagine that we have defined an ROI in MNI152 space, and we want to
+project it into the space of our functional data.  We can do this by combining
+the nonlinear structural to standard registration produced by FNIRT with the
+linear functional to structural registration generated by FLIRT.  First of
+all, we'll load images from each of the functional, structural, and standard
+spaces:
+
+
+```
+featdir = op.join('08_fslpy', 'fmri.feat')
+func    = Image(op.join(featdir, 'reg', 'example_func'))
+struc   = Image(op.join(featdir, 'reg', 'highres'))
+std     = Image(op.expandvars(op.join('$FSLDIR', 'data', 'standard', 'MNI152_T1_2mm')))
+```
+
+
+Now, let's say we have obtained our seed location in MNI152 coordinates. Let's
+convert them to MNI152 voxels just to double check:
+
+
+```
+seedmni    = [-48, -74, -9]
+seedmnivox = transform(seedmni, std.getAffine('world', 'voxel'))
+ortho(std.data, seedmnivox, cursor=True)
+```
+
+
+Now we'll load the FNIRT warp field, which encodes a nonlinear transformation
+from structural space to standard space. FNIRT warp fields are often stored as
+*coefficient* fields to reduce the file size, but in order to use it, we must
+convert the coefficient field into a *deformation* (a.k.a. *displacement*)
+field. This takes a few seconds:
+
+
+```
+from fsl.transform.fnirt     import readFnirt
+from fsl.transform.nonlinear import coefficientFieldToDeformationField
+
+struc2std = readFnirt(op.join(featdir, 'reg', 'highres2standard_warp'), struc, std)
+struc2std = coefficientFieldToDeformationField(struc2std)
+```
+
+We'll also load our FLIRT functional to structural transformation, adjust it
+so that it transforms between voxel coordinate systems instead of the FSL
+coordinate system, and invert so it can transform from structural voxels to
+functional voxels:
+
+
+```
+from fsl.transform.affine import invert
+func2struc = np.loadtxt(op.join(featdir, 'reg', 'example_func2highres.mat'))
+func2struc = fromFlirt(func2struc, func, struc, 'voxel', 'voxel')
+struc2func = invert(func2struc)
+```
+
+
+Now we can transform our seed coordinates from MNI152 space into functional
+space in two stages. First, we'll use our deformation field to transform from
+MNI152 space into structural space:
+
+
+```
+seedstruc = struc2std.transform([seedmni], 'world', 'voxel')[0]
+seedfunc  = transform(seedstruc, struc2func)
+
+print('Seed location in MNI coordinates:  ', seedmni)
+print('Seed location in functional voxels:', seedfunc)
+ortho(func.data, seedfunc, cursor=True)
+```
+
+
+> FNIRT warp fields kind of work backwards - we can use them to transform
+> reference coordinates into source coordinates, but would need to invert the
+> warp field using `invwarp` if we wanted to transform from source coordinates
+> into referemce coordinates.
+
+
+Of course, we can also use our deformation field to resample an image from
+structural space into MNI152 space. The `applyDeformation` function takes an
+`Image` and a `DeformationField`, and returns a `numpy` array containing the
+resampled data.
+
+
+```
+from fsl.transform.nonlinear import applyDeformation
+
+strucmni = applyDeformation(struc, struc2std)
+
+# remove low-valued voxels,
+# just for visualisation below
+strucmni[strucmni < 1] = 0
+
+fig = ortho(std.data, [45, 54, 45], cmap=plt.cm.gray)
+fig = ortho(strucmni, [45, 54, 45], fig=fig)
+```
+
+
+The `premat` option to `applyDeformation` can be used to specify our linear
+functional to structural transformation, and hence resample a functional image
+into MNI152 space:
+
+
+```
+tstatmni = applyDeformation(tstat1, struc2std, premat=func2struc)
+tstatmni[tstatmni < 3] = 0
+
+fig = ortho(std.data, [45, 54, 45], cmap=plt.cm.gray)
+fig = ortho(tstatmni, [45, 54, 45], fig=fig)
+```
+
+
 There are a few other useful functions tucked away in the
-[fsl.utils.image](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.utils.image.html)
-package, with more to be added in the future. The [`fsl.transform`]() package
-also contains a wealth of functionality for working with linear (FLIRT) and
-non-linear (FNIRT) transformations.
+[`fsl.utils.image`](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.utils.image.html)
+and
+[`fsl.transform`](https://users.fmrib.ox.ac.uk/~paulmc/fsleyes/fslpy/latest/fsl.transform.html)
+packages, with more to be added in the future.
 
 
 <a class="anchor" id="fsl-wrapper-functions"></a>
diff --git a/advanced_topics/08_fslpy/fmri.feat/reg/example_func2highres.mat b/advanced_topics/08_fslpy/fmri.feat/reg/example_func2highres.mat
new file mode 100644
index 0000000000000000000000000000000000000000..dd61f138c86baeb47b3200251325c6fb2f661d69
--- /dev/null
+++ b/advanced_topics/08_fslpy/fmri.feat/reg/example_func2highres.mat
@@ -0,0 +1,4 @@
+0.99895165  0.0442250787  -0.01181694611  6.534548061  
+-0.0439203422  0.9987243849  0.02491016319  9.692178016  
+0.01290352651  -0.02436503913  0.9996197946  21.90296924  
+0  0  0  1  
diff --git a/advanced_topics/08_fslpy/fmri.feat/reg/highres.nii.gz b/advanced_topics/08_fslpy/fmri.feat/reg/highres.nii.gz
new file mode 100644
index 0000000000000000000000000000000000000000..0a4f8eb223ecb7605653ed088114dc622e0a810f
Binary files /dev/null and b/advanced_topics/08_fslpy/fmri.feat/reg/highres.nii.gz differ
diff --git a/advanced_topics/08_fslpy/fmri.feat/reg/highres2standard.mat b/advanced_topics/08_fslpy/fmri.feat/reg/highres2standard.mat
new file mode 100644
index 0000000000000000000000000000000000000000..033a907b8a7d549404141c72c2fa348f573da259
--- /dev/null
+++ b/advanced_topics/08_fslpy/fmri.feat/reg/highres2standard.mat
@@ -0,0 +1,4 @@
+1.056802026  -0.01924547726  0.02614687181  -36.51723948  
+0.009055463297  0.9745460053  0.09056277052  -8.771603455  
+-0.04315832679  -0.1680837227  1.136420957  -1.399839791  
+0  0  0  1  
diff --git a/advanced_topics/08_fslpy/fmri.feat/reg/highres2standard_warp.nii.gz b/advanced_topics/08_fslpy/fmri.feat/reg/highres2standard_warp.nii.gz
new file mode 100644
index 0000000000000000000000000000000000000000..df6f8601330538ded1fc12b1d93298b5b327626a
Binary files /dev/null and b/advanced_topics/08_fslpy/fmri.feat/reg/highres2standard_warp.nii.gz differ