Inheritance diagram for nipy.algorithms.registration.groupwise_registration:
Bases: nipy.algorithms.registration.groupwise_registration.Realign4d
Methods
estimate | |
resample |
Spatiotemporal realignment class for fMRI series.
Parameters : | images : image or list of images
tr : float
tr_slices : float
start : float
slice_order : str or array-like
interleaved : bool
slice_info : None or tuple, optional
|
---|
Return the resampled run number r as a 4d nipy-like image. Returns all runs as a list of images if r == None.
Bases: object
Class to represent a sequence of 3d scans (possibly acquired on a slice-by-slice basis).
Object remains empty until the data array is actually loaded in memory.
Parameters : | data : nd array or proxy (function that actually gets the array) |
---|
Methods
free_data | |
get_data | |
scanner_time | |
z_to_slice |
Configure fMRI acquisition time parameters.
tv = scanner_time(zv, t) zv, tv are grid coordinates; t is an actual time value.
Account for the fact that slices may be stored in reverse order wrt the scanner coordinate system convention (slice 0 == bottom of the head)
Bases: object
Methods
estimate | |
resample |
Return the resampled run number r as a 4d nipy-like image. Returns all runs as a list of images if r == None.
Bases: object
Methods
align_to_refscan | |
estimate_instant_motion | |
estimate_motion | |
init_instant_motion | |
resample | |
resample_full_data | |
set_fmin | |
set_transform |
The motion_estimate method aligns scans with an online template so that spatial transforms map some average head space to the scanner space. To conventionally redefine the head space as being aligned with some reference scan, we need to right compose each head_average-to-scanner transform with the refscan’s ‘to head_average’ transform.
Estimate motion parameters at a particular time.
Optimize motion parameters for the whole sequence. All the time frames are initially resampled according to the current space/time transformation, the parameters of which are further optimized sequentially.
Pre-compute and cache some constants (at fixed time) for repeated computations of the alignment energy.
The idea is to decompose the average temporal variance via:
V = (n-1)/n V* + (n-1)/n^2 (x-m*)^2
with x the considered volume at time t, and m* the mean of all resampled volumes but x. Only the second term is variable when
one volumes while the others are fixed. A similar decomposition is used for the global variance, so we end up with:
V/V0 = [nV* + (x-m*)^2] / [nV0* + (x-m0*)^2]
Resample a particular time frame on the (sub-sampled) working grid.
x,y,z,t are “head” grid coordinates X,Y,Z,T are “scanner” grid coordinates
Return the minimization function
Parameters : | runs : list of Image4d objects |
---|---|
Returns : | transforms : list
transforms map an ‘ideal’ 4d grid (conventionally aligned with the : first scan of the first run) to the ‘acquisition’ 4d grid for each : run : |
Resample a 4D image according to the specified sequence of spatial transforms, using either 4D interpolation if time_interp is True and 3D interpolation otherwise.
Realign a single run in space and time.
Parameters : | im4d : Image4d instance speedup : int or sequence
|
---|