SliceTimeCorrection Method


Description

Most EPI sequences measure the slices of a functional volume in succession but one often would like to treat the data of one volume as if it were acquired at the same time, particularly in the context of event-related studies. Using linear interpolation, the present method resamples the time series for the different slices in such a way that the resulting slice time courses can be treated as if they were obtained simultaneously.

Syntax

objDocument.SliceTimeCorrection(intTR, intInterSliceTime, intSliceSamplingType)

Remarks

Valid only if objDocument is of type FMR. Slice time correction can only be done in FMR projects because these projects contain the time series data separated with respect to the individually measured slices (STC files); this information is lost in VTC files after spatial transformation.
Slices typically are scanned ascending (i.e., slice 1, slice 2, slice 3 ...) or interleaved (i.e., slice 1, slice 3, slice 5 .. slice 2, slice 4, slice 6 ...). If your data had been scanned interleaved, specify "1" as the third argument, if it had been scanned ascending, specify "0". The first two parameters are necessary to perform the correct resampling of the data. The intTR argument must be specified in msecs; it is the time interval between two successive measurements of the same slice (time-to-repeat, TR). The intInterSliceTime argument has also be specified in msecs; it is the time interval between two successive slices within one volume. While the TR value should be easily obtained from the scanner protocol or from a file header, the inter slice time might be more difficult to get. If scanning ran continously, i..e. if there is no pause between scanning the last slice of volume N and the first slice of volume N+1, then you can simply divide the TR value by the number of slices per volume to get the inter slice time. If scanning ran not continously, you must either get the information about the duration of acquiring all slices or the duration of the pause between volumes. An alternative possibility (used by our group) is to read slice trigger pulses from the scanner measuring the time point when each slice is scanned; by subtracting, for example the time point of slice 1 from the time point of slice 2 results in the inter slice time.
The resulting corrected data is automatically saved to disk. The names for the new FMR project and the new STC prefix is determined as in the GUI version, i.e., if the FMR project "cg_objects.fmr" is used, the resulting new file on disk will be "cg_objects_pp.fmr". In addition, a set of new STC files, actuallly containing the time series data, is stored to disk. If, for example, the prefix in the source FMR project was "slice-" (referencing file slice-1.stc, slice-2.stc etc.), the STC prefix of the new FMR file will be "slice_pp-". If you do not want to use this implicit naming scheme, you might want to use the method SliceTimeCorrectionEx which allows to specify the name of the resulting FMR project and STC prefix.

Example

' VBScript
Set doc = BrainVoyager.
OpenDocument("cg_objects.fmr")
doc.
SliceTimeCorrection 2081, 100, 0

// JScript
doc = BrainVoyager.
OpenDocument("cg_objects.fmr");
doc.
SliceTimeCorrection(2081, 100, 0);

# PerlScript
$doc = $BrainVoyager->
OpenDocument("cg_objects.fmr");
$doc->
SliceTimeCorrection(2081, 100, 0);