Openalea.Image.Interpolation Package#
Interpolation.Interpolation#
openalea.image.interpolation.interpolation#
This module import functions for Geometric Transformation Filters
- openalea.image.interpolation.interpolation.resampling(img, transformation, order=1, output_shape=None, output_voxels=None, mode='constant', cval=0.0, prefilter=True)[source]#
It resamples a 2-D or 3-D image using a 4*4 transformation matrix or a deformation field .
The value of a point in the result image is determined by spline interpolation of the requested order.
- Parameters:
img
transformation (array) - Matrix 4x4 or deformation field
order (int) - optional
order corresponds to the degree of a polynomial used to the spline interpolation By default, order = 1 (linear interpolation)
output_shape (tuple) - optional
The output shape can optionally be given. By default, it is equal to the input shape
output_type (tuple) - optional
The output data type can optionally be given. By default, it is equal to the input data type
output_voxels (tuple) - optional
The output voxels size can optionally be given. By default, it is equal to the input voxels size
mode (string) - optional
Points outside the boundaries of the input are filled according to the given mode (“constant”, “nearest”, “reflect” or “wrap”) By default, the given mode is “constant”
prefilter (boolean) - optional
The parameter prefilter determines if the input is pre-filtered before interpolation (necessary for spline interpolation of order > 1) If False it is assumed that the input is already filtered
- Returns Type:
image resampled by the transformation