NIPY logo

Site Navigation

NIPY Community

Table Of Contents

Next topic

algorithms.registration.similarity_measures

This Page

algorithms.registration.resample

Module: algorithms.registration.resample

nipy.algorithms.registration.resample.resample(moving, transform, grid_coords=False, reference=None, dtype=None, interp_order=3)

Apply a transformation to the image considered as ‘moving’ to bring it into the same grid as a given ‘reference’ image. For technical reasons, the transformation is assumed to go from the ‘reference’ to the ‘moving’.

This function uses scipy.ndimage except for the case interp_order==3, where a fast cubic spline implementation is used.

Parameters :

moving: nipy-like image :

Image to be resampled.

transform: nd array :

either a 4x4 matrix describing an affine transformation or a 3xN array describing voxelwise displacements of the reference grid points

grid_coords : boolean

True if the transform maps to grid coordinates, False if it maps to world coordinates

reference: nipy-like image :

Reference image, defaults to input.

interp_order: number :

spline interpolation order, defaults to 3.