algorithms.interpolation

Module: algorithms.interpolation

Inheritance diagram for nipy.algorithms.interpolation:

digraph inheritance9adb4a8c3e { rankdir=LR; size="8.0, 12.0"; "algorithms.interpolation.ImageInterpolator" [URL="#nipy.algorithms.interpolation.ImageInterpolator",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="Interpolate Image instance at arbitrary points in world space"]; }

Image interpolators using ndimage.

ImageInterpolator

class nipy.algorithms.interpolation.ImageInterpolator(image, order=3, mode='constant', cval=0.0)[source]

Bases: object

Interpolate Image instance at arbitrary points in world space

The resampling is done with scipy.ndimage.

__init__(image, order=3, mode='constant', cval=0.0)[source]
Parameters

image : Image

Image to be interpolated.

order : int, optional

order of spline interpolation as used in scipy.ndimage. Default is 3.

mode : str, optional

Points outside the boundaries of the input are filled according to the given mode (‘constant’, ‘nearest’, ‘reflect’ or ‘wrap’). Default is ‘constant’.

cval : scalar, optional

Value used for points outside the boundaries of the input if mode=’constant’. Default is 0.0.

evaluate(points)[source]

Resample image at points in world space

Parameters

points : array

values in self.image.coordmap.output_coords. Each row is a point.

Returns

V : ndarray

interpolator of self.image evaluated at points