

To Slice or Not To Slice (Timing) - Eric Egolf
Purpose:
19 Subjects completed the ap3 experiment, an auditory oddball task. From data
collected by the 19 subjects our lab was interested in determining which parameters
produced the most robust results in voxel activation patterns after random effects
analysis. Specifically we were looking at slice timing and whether random effects
analysis showed more robust voxel activation with or without it. The lab was
also interested in determining which T and T0 timing parameters to use. The
T and T0 timing variables in question were 30 30 and 30 15. The T and T0 values
are located at the bottom of the spm_defaults.m script. For a more detailed
discussion of what T and T0 values are see Appendix below.
Procedure:
To look at voxel activation without slice timing 19 subjects’ data were
individually brought through reorientation -> realignment -> spatial normalization
-> smoothing (12mm kernel) using SPM99. Using each subject’s smoothed
data, we did two statistical analysis on them, using T T0 values of 30 30 for
one of the analysis and 30 15 for the other. Finally, we did random effects
analysis on the 19 subjects, one analysis for each set of the timing values.
To look at slice timing we used the same procedure but did slice timing on the
subjects before reorientation.
Conclusion:
Our lab found that with both slice timing and no slice timing, T and T0 values
of 30 15 gave a more robust voxel activation pattern than 30 30. Furthermore
we concluded that not using slice timing gave a more robust activation than
slice timing.
The results can be found in the “to slice or not to slice (timing) folder in the main lab space on DVD.
Appendix
Quick Summary of T and T0 values, a more detailed discussion follows below.
The T value is the number of slices we take to get one scan of the brain, at
present time the CCNLAB has this set at 30. The T0 value defines exactly when
time zero starts. A T0 value of 1 means that time zero starts at the the beginning
of the first scan, in other words time zero begins when we take the very first
slice of the first scan. A T0 value that is equal to the T value, means that
time zero starts at the last slice of the first scan in other words at the end
of the first scan. If our T value is 30 then we can define time zero to start
in the middle of the first scan, or at slice 15 by setting our T0 value to 15.
For more depth on the subject I have posted 3 emails below that were sent to
Kent.
Email 1: From: Darren Gitelman
Email 2: From: Jesper Andersson
Email 3: From: Christian Buechel
Email 1:
I am forwarding some comments by Rik Henson regarding the slice timing issue.
Rik just got back from holiday and
he may have to go back again (certainly if I bring up the slice timing issue
again... just kidding, :) ).
Although I probably don't have any intellectual right to comment on what Rik
says, that's never stopped me before. I
agree with his comments. Much of the confusion (at least for me) has stemmed
from a misunderstanding of the canonical interleaved sequence included with
spm99. In any case I agree that everything works
as specified if you use that sequence. I believe the code I sent
that Rik has included below provides a simpler approach to slice
specification (simpler is good). It is based on time. That is no matter
what sequence is selected the user would enter the desired time
bin, and it would figure out the correct slice. So entering 1
means slice 10 in a 10 slice descending sequence and slice 1 in an
ascending sequence. If you use the code please let me know if there is
a problem (please Lord let there not be a problem). Be careful of
the carriage returns when extracting from email. I'll post a clean
copy on our ftp site ftp.cnadc.northwestern.edu /pub/spm in a couple
days. As always, hope this doesn't hurt, and thanks
Rik. Darren
Apologies for not replying sooner - I have been
away on holiday. The concept behind slice order specification is
actually very simple, but there appears to be much room for confusion. Let me
try to summarize the development of
spm_slice_timing... When Christian and I wrote the front-end for the
slice-timing code you provided (adapted from Geoff and Eric's
code), we made the following simple assumptions: 1. The temporal order of slices
would be
coded by the left-to-right order of slices in a vector 2. The slices would be
referenced by the
Analyze convention, where 1=bottom slice. If you follow these rules when entering
the
slice order (as user- specified), there is no problem. Thus a
six-slice descending sequence in space (top slice acquired first) would be
coded as: 6 5 4 3 2 1 I repeat: no errors will have been made if you
followed these rules, regardless what sequence you use. The potential for confusion
perhaps arose when
we introduced two further options. The first was the the addition of
various default menu options (descending, ascending, interleaved) that
avoided the need for the user to type in slice order by hand (for the most
common sequences). The second was the default choice of a reference slice
(particularly in relation to interleaved sequences).... 1. Default options:
Interleaving
================================
The ascending/descending options refer to
acquisition order in space, and are equivalent to typing 1:N or N:-1:1
respectively as user- specified (where N=number of slices).
However, there are many possible interleaved
sequences one can use: Odd-even slices, top-to-middle,
bottom-to-middle. Rather than trying to offer all these, we chose one particular
interleaving: top-to-middle. For a six-slice sequence, this would give: 6 3
5 2 4 1
Note for an odd-number of slices, the "odd"
slice is placed first (ie for a five-slice sequence: 3 5 2 4 1, rather
than the alternative: 5 3 4 2 1).
Your scanner may however use a different
sequence. In this case, you should type the sliceorder by hand in the
user-specified option. Thus it is possible that you might have pressed
interleaved thinking it was appropriate for the particular
interleaving used on your scanner when it was not. Our apologies for not making
this clearer in the menu options.
2. Default reference slice
==========================
As detailed in many previous emails to this
list, the default reference slice (to which all other slices are
"synchronised") offered by SPM is
the middle slice in space (in Analyze format).
Remember: if the temporal interpolation were
perfect, the choice of reference slice would not matter. However, the
interpolation will alias frequencies above the Nyquist limit, which may
introduce appreciable noise if your TR is long (eg ~>2s).
The amount of noise introduced will tend to
increase the more the timeseries is shifted (ie the futher away, in
time, a slice is from the reference slice), up to TR/2.
Because we use sequential acquisition
(ascending/descending) here, our rationale for offering the middle slice in
space
was that, because the middle slice in space happens to coincide
with the middle slice in time for sequential acquistions, the maximum
interpolation error would then be "pushed" to the top and bottom
slices, which are usually at the extremes of the field-of-view and of
least interest (eg the top and bottom of the brain, which usually have the
least grey-matter voxels).
If however you are interested in a particular
region within your field-of-view (other than the middle), you might
want to change the reference slice to coincide with that
region.
With interleaved sequences however, the choice
of reference slice is far from clear (on the above rationale). For
example, with a top-to-middle sequence, eg:
10 5 9 4 8 3 7 2 6 1
The middle slice(s) in space (5/6) are not the
middle in time (8/3). This is also true for odd-even sequences, eg:
10 8 6 4 2 9 7 5 3 1
Without an a priori "slice-of-interest", there
seems no principled
reason for choosing the reference slice with
interleaved sequences. In this case, one might as well chose the first
slice in time (10 in the above examples), to avoid the need to
change the default fMRI_T0 in the SPM stats stage (see point 3
below). Thus you must think before accepting the default reference
slice (which was chosen for sequential acquisitions) when using
interleaved acquisitions.
Other points to note:
3. Reference slice and reference time-bin
=========================================
As discussed in many previous emails, the value
of fMRI_T0 in the Defaults-Statistics-fMRI menu should correspond
to your choice of reference slice. fMRI_T0 tells SPM which of the
fMRI_T time-bins (per TR) should be used as the value of the
covariate for that scan.
Namely, if you have interpolated to slice r of N
(where r now refers to time, not Analyse format), then:
fMRI_T0 = fMRI_T * (r/N)
Note that the default value is 1 (ie first slice
acquired). This makes sense for epoch designs (eg boxcars), where
slice-timing is less of a problem. We thought about automatically changing the
value of the global variable fMRI_T0 on the basis of the user's choice of
reference slice during a previous slice-timing correction stage. However,
since this change would only apply if the same matlab session were in
operation, we have decided not change the defaults. Thus it is up to the
user to remember to change the value of fMRI_T0 (if necessary) to match the
reference slice (if slice-timing correction has been used) before
creating a design matrix.
4. TA and TR
> ============
We originally imagined near-continuous scanning,
where the TR (time between first slice of one scan and first slice of the
next) was very close to the TA (time between the first and last slice of one
scan). With N slices, the time-per-slice (which the interpolation
obviously needs to know) is simply:
TR/N
To accommodate significant gaps between scans,
Michael Erb allowed the user to enter a TA smaller than the TR. Matthew
Brett then pointed out a small error in the calculation of
time-per-slice, which should be (and is know):
TA/(N-1)
Note that if your TA is a lot less than your TR,
you might also want to adjust the value of fMRI_T0 appropriately,
because fMRI_T (and fMRI_T0) refer to the number of time-bins per TR (not per
TA).
Thus, if you had TA=3s and TR=4s, and wanted to reference to the middle
slice in time, you would chose:
fMRI_T0 = fMRI_T * 3/4 * 1/2
Eg for the default fMRI_T=16, fMRI_T0 would be 6
(not 8).
Several people have pointed out that you could
change the value of fMRI_T to match the number of slices, N. Then
the reference time-bin could match the reference slice (in time) exactly. This
is
perfectly acceptable; the only reason we chose an fMRI_T value of 16 was
that it seemed a reasonable degree of temporal resolution with typical TRs
of 3-4s: increasing fMRI_T above this will not gain any real sensitivity (with
typical TRs, given the time constants of the HRF and temporal
smoothing), but may slow down computation.
Darren's new code (attached), which you are
welcome to use, addressespoint 1 by changing to default interleaved
option to a top-down odd-even sequence, eg:
6 4 2 5 3 1
(which I repeat, may not be correct for all
users - see point 1), and addresses point 2 by asking for the reference
slice in time rather than space (which I repeat may not be relevant for
interleaved sequences - see point 2 - but does improve correspondence
with the value of fMRI_T0 - see point 3). We may include Darren's
changes in the next release of SPM.
Darren - if you are happy with this summary,
please could you forward it to the SPM mailbase? - done
Many thanks
Rik
Email 2:
Dear Christine and everyone,
the following is a tentative explanation for "better" results in
SPM96 than
SPM99, but I think it may also be of general interest. Therefore, even if
you are not interested in SPM96 vs. SPM99, please read on.
>
>Dear all,
>
>I still have some concerns about the comparability between the results of
>spm96 and spm99.
>I have performed the analysis of different datasets (single subjects,
>simple motor and speech tasks, block design) with spm96 and spm99 with
>identical preprocessing and as similar as possible modelling in the
>statistics section. I always got "better" results using spm96.
>This means the locations of activations were basically the same. However,
>the significance was higher with spm96. At equal thresholds, there were
>(more and especially) larger clusters with spm96 (identical smoothing!).
>Altogether, activation appeared to be more robust with spm96.
>
>Can anyone comment on this impression? Did anybody else compare the
>results of the analysis using spm96 and spm99 respectively?
>
The following may, or may not, be relevant to your specific question.
However I think it may be of some interest/importance both to you and
others doing epoch related fMRI.
The way epochs are specified in SPM99 is slightly counterintuitive, which
may lead to mistakes, which may in turn lead to SPM99 results being "worse"
than SPM96 results, where these mistakes were not as easily made.
It has to do with how times (in scans) of epochs are defined, and require a
little background.
Consider an fMRI experiment with a TR of 5 seconds and descending slice
acquisition. Furthermore consider an event (being either a true event or
onset of an epoch) occuring at time 6*TR after start of first scan. We now
want to create a regressor to put into our design matrix. From the
perspective of the first slice in the 7th image volume the event only just
occurred and the value of our regressor should be zero. On the other hand
from the perspective of the last slice the event occurred 5 seconds ago,
and the activity in the regressor should be close to its peak value (if it
is a true event).
Hence, from the perspective of the ultimate slices the "expected"
value of
the regressor is completely different, but there is only one value that can
actually go into the design matrix. It is easily realised that the "best"
regressor for the last slice is translated one TR backwards in time (up in
the design matrix images) compared with the "best" regressor for the
first
slice. So, which one should we pick?
This didn't use to be too much of in issue (in SPM96) since for epochs of
>~5TR the differential sensitivity between top and bottom slices wasn't
that great. However, for event related designs one TR can make the
difference between reasonable sensitivity and no sensitivity at all so this
had to be carefully addressed in SPM99 (See e.g. Henson et al. NeuroImage,
1999;6:S125).
First of all it had to be possible to specify event/epoch onsets in
fractions of TRs, since the precision of specification would otherwise be
0.5*TR which is clearly insufficent for most TRs. Therefore regressors are
created by a supersampling given by the global variable fMRI_T (which can
be checked/altered
through the default button) whith the "factory setting" 16. This means
that
if you specify an event onset of 7.45TR it will effectively be located at
the nearest 16th of an TR, which in this case is 7.44TR. Conversely, if
fMRI_T was 1 (as implicitly in SPM96) it would effectively be located at 7TR.
Secondly it had to be defined what was meant with time zero.
Should it be defined to mean the start of the first scan (i.e. the
acquisition of the first slice), which would make a lot of intuitive sense?
Should it be defined to mean the middle of the first scan (i.e. the
acquisition of the middle slice), which would also make quite a bit of sense?
Or should it be defined as the end of the first scan (i.e. the acquisition
of the last slice)?
The SPM-authors couldn't make up their mind so it was defined through the
global variable fMRI_T0. However the default value of fMRI_T0 is 1, which
means the BY DEFAULT TIME ZERO IS DEFINED AS THE START OF THE FIRST SCAN.
If fMRI_TO is set equal to fMRI_T it changes the definition to be the end
of the first scan.
This (the default) means that an event occurring 2TR after the start of the
first scan (which is an intuitively appealing time zero for the experiment)
should be specified as having occurred at time 2 (TR). The regressor will
then be ideal for the first slice, and hence implicitly assumes that you
have interpolated to the first slice in the slice timing module.
Here comes the point for the epoch related studies. Assume you have a
variable SOA paradigm with epoch lenghts 5 6 6 6 5 6 alternating between
conditions A (implicit baseline) and B (task). You will now be prompted for
a vector of epoch onsets given in scans. The intuitive (my intuition at
least) way of specifying these would be [6 18 29], i.e. the first epoch has
been preceeded by 5 scans and starts with the sixth. This is WRONG!!!
Remember how an event (true event or onset of epoch) was defined in time
(in TR) since start of first scan. Hence, the first epoch starts at 5TRs,
NOT 6. The vector of onsets should be [5 17 28]. Hence, the definition that
makes specification of event quite intuitive makes the definition of epochs
quite counterintuitive.
Furthermore, as we clarified for the events above, this means that the
regressor is ideal for the first slice, and progressively worse for
consecutive slices. It would seem reasonable to sensitize oneself to the
middle slice, and the vector of onsets therefore becomes [4.5 16.5 27.5].
This is quite different from the "intuitive" vector [6 18 29], and
can make
quite a bit of difference to the t-values.
My, cautious, recommendation is that you change fMRI_T0 to fMRI_T/2 which
means that you are automatically sensitized to the middle slice.
Given that the default in the slice timing module is the middle slice this
means that events should (as is intuitive) be defined in TRs since start of
experiment.
Fixed SOA epoch related studies are defined in an intuitive, and gives you
an automatic sensitization to the middle slice.
Variable SOA epoch related studies should still be defined bearing in mind
that epochs are defined in terms of time since start of first scan (rather
than scan#) and will be senitized to the middle slice.
I appologise for this rather lengthy excursion, but I think there is quite
a bit of scope for mistakes here. Especially since reading help texts seems
increasingly unfashionable in this point and click age. Those especially
interested in event related studies will find an earlier mail regarding
these issues in http://www.mailbase.ac.uk/lists/spm/1999-07/0154.html.
>Thank you, Christine Preibisch
>
Good luck Jesper
Jesper Andersson
Wellcome Dept. of Cognitive Neurology
12 Queen Square
London WC1N 3BG
phone: 44 171 833 7484
fax: 44 171 813 1420
Email 3:
Dear Maria,
> I'm running an spm99 fmri analysis using spm96 snr files. I repeated the
simple
> boxcar, rest task analysis and didn't get any significant clusters whereas
in
> spm96 I had. I have 4 control subjects and 4 patients (8 session) in a
R T R T
> R T paradigm. My contrast in spm99 is 1 1 1 1 -1 -1 -1 -1 with rest being
the
> implicit baseline. In the spm96 analysis the contrast of course was -1
1 -1 1
> -1 1 -1 1 1 -1 1 -1 1 -1 1 -1. The defaults etc are all set to the same
values
> in spm96 and spm99 as far as I know.
In addition to Dave's mail. The only major difference between SPM96 and SPM99
is the
timing. In essence there is a one TR difference between SPM96 and SPM99. This
can be
manipulated by changing the (global) variable fmri_T0. Newer versions of SPM99
have
menu in defaults to change that. It shouldn't be a big problem for a blocked
design,
but can certainly drop Z-scores. Check whether the SPM96 and 99 regressors are
the
same. In 96 you will find them as variable "C" in workspace (eg. after
looking at a
contrast) and in 99 they are in "xX.X" (again load a contrast first).
Note that in
SPM99 the first scan is scan 0. In a R-T design like yours, consider 10 scans
of
each condition. That means the first onset of T is scan #10 and NOT #11.
See also mail
http://www.mailbase.ac.uk/lists/spm/1999-07/0154.html
for details.
-Christian
--
Dr. C. Buechel
Research Fellow
Functional Imaging Laboratory
Wellcome Dept. of Cognitive Neurology
12 Queen Square
WC1N 3BG London
UK
Tel.: +44-171-833-7483
Fax.: +44-171-813-1420
email: c.buechel@fil.ion.ucl.ac.uk