Table Of Contents

Previous topic

neurospin.neuro.fmri.mini_designmatrix

Next topic

neurospin.neuro.image_classes

This Page

neurospin.neuro.fmri.realign4d

Module: neurospin.neuro.fmri.realign4d

Inheritance diagram for nipy.neurospin.neuro.fmri.realign4d:

Class

Realign4d

class nipy.neurospin.neuro.fmri.realign4d.Realign4d(img, speedup=4, optimizer='powell')
__init__(img, speedup=4, optimizer='powell')
correct_motion()
init_motion_detection(t)

The idea is to compute the global variance using the following decomposition:

V = (n-1)/n V1 + (n-1)/n^2 (x1-m1)^2
= alpha + beta d2,

with alpha=(n-1)/n V1, beta = (n-1)/n^2, d2 = (x1-m1)^2.

Only the second term is variable when one image moves while all other images are fixed.

msid(t)
resample(transforms=None)
resample_all_inmask()
resample_inmask(t)
safe_variance(t)
No need to invoke self.init_motion_detection.
variance(t)

Functions

nipy.neurospin.neuro.fmri.realign4d.grid_coords(xyz, params, r2v, v2r, transform=None)
nipy.neurospin.neuro.fmri.realign4d.params_to_mat44(transfo_run, transform=None)
nipy.neurospin.neuro.fmri.realign4d.realign4d(runs, within_loops=2, bewteen_loops=5, speedup=4, optimizer='powell')
Assumes runs is a list of fff2.neuro.fmri_image instance.