[pymvpa] [Nipy-devel] General fMRI question - coregistering three EPI sequences

Matthew Brett matthew.brett at gmail.com
Wed Aug 24 17:16:38 UTC 2011


On Wed, Aug 24, 2011 at 2:13 AM, Thorsten Kranz
<thorstenkranz at googlemail.com> wrote:
> Hi all,
> I have a question that is a little bit off-topic, please excuse me if
> I exploit this mailing list ;-). I'm even cross-posting on nipy and
> PyMVPA mailing lists...
> We are doing an fMRI experiment consisting of three "blocks", each
> block being a separate fMRI-session with some minutes of break in
> between. We want to do some MVPA on all three blocks together and
> therefore want to coregister all EPIs. Schematically, the schedule
> looks like:
> |Task 1|  -> |Task 2| -> |Task 1+2| -> |Structural T1|
> Each arrow is a break of some minutes (out of the scanner). We are
> trying to do cross-block cross-validation, e.g. train on Block 1+2 and
> validate on Block 3.
> My main question now is: what is the recommended way to coregister all
> three EPIs? Obvious possibilties are:
> 1. Register all three EPIs to T1
>    -> voxel-dimensions increased, not good for MVPA
> 2. Register Block1 and Block2 on Block3
>    -> Block 3 is not transformed and thus not interpolated, thus the
> blocks are not treated equally. 1 and 2 will be blurred, 3 not.
> 3. Register all three blocks to a common "average" of the three blocks
>    -> how to choose the best coordinate system for this? Using T1? We
> want to keep voxel-dimensions low, see 1.
> Maybe somebody already had similar problems and knows a simple
> solution. We used FSL for our previous tries, but if there is a better
> choice, we're happy to switch. Maybe it would be possible to use nipy
> for this? AffineImage?

To get the best coregistration you want to coregister images which are
most similar.

I this case I would do what SPM does (with SPM or FSL or - Alexis'
stuff ?) which is:

Register Block1-scan N to block 1 scan 0
Take a mean, of registered block 1 scans
Register block 1 scan N to block 1 mean.
Take a mean, of re-registered block 1 scans.
(repeat for block 2, 3)
Register block 2, block 3 re-registered mean to block 1 re-registered
mean; apply registration parameters to block 2 scan N, block 3 scan N.

SPM (probably FSL) distinguishes between coregistration (that is,
calculating registration transformations, and writing them into the
4x4 affines for the images that have been registered), and reslicing
(creating a new image matched to the target image with the
registration applied).

In the case above, the creation of the means would involve
_reslicing_, the rest of the steps just involve coregistration
(calculation, and / or modification of the 4x4 affines for images).

Typically, in SPM, you would then register (without reslicing) the T1
to the mean of (block1, block2, block3 means).  Yes, that means
rewriting the 4x4 for the _T1_ to match the EPIs.   This is only
because you can avoid rewriting 4x4s for all the EPIs.

Then you do further analysis, generating t maps for instance, or
perhaps calculating the T1 transformation to the template (the T1
starting point being the space as registered to the EPIs now).  After
this you would reslice all the EPIs and the T1 using the T1->template

For slice timing, I don't know much formal written stuff.  As usual,
unless people write stuff up, it's difficult to know whether it's
right or not - I've often been wrong in my instincts about these
things when I got to test them.

There's a reasonable page here: http://mindhive.mit.edu/node/109
Rik Henson's investigations (an abstract):

Some discussion including problems:

Personally I always do slice timing, on the basis that I want to give
events at different parts of the sequence a more equal chance of
detection.  Using the temporal derivative in the model (as suggested
in the abstract above) has the disadvantage of being more complex to
analyze, and still gives better detection power for events (that may
have hemodynamic onset/offset shifts) nearer the designated time of
the acquisition (usually the center of the TR in time).

The classic recommendation is to do slice-timing before realignment +
reslicing for interleaved (because the time shifts induced by a
one-plane realignment spatial shift are large) and after realignment
for sequential.

See you,


More information about the Pkg-ExpPsy-PyMVPA mailing list