DIPlib Documentation - ©1995-2009 Quantitative Imaging Group, Delft University of Technology.

# Resampling

Interpolation function

## SYNOPSIS

`#include "dip_interpolation.h"`

dip_Error dip_Resampling ( in, out, zoom, shift, method )

## DATA TYPES

binary, integer, float

## FUNCTION

This function resmaples the input image `in` to `out` using various interpolation methods. Both a (subpixel) `shift` and a `zoom` factor are supported. The size of the output image is `zoom` times the size of `in`. If `shift` is zero, a shift of zero is assumed. If `zoom` is zero, a zoom of 1.0 is assumed.

## ARGUMENTS

Data type | Name | Description
`dip_Image` | `in` | Input image
`dip_Image` | `out` | Output image
`dip_FloatArray` | `zoom` | Zoom factor
`dip_FloatArray` | `shift` | Shift
`dipf_Interpolation` | `method` | Interpolation method

The `dipf_Interpolation` enumaration consists of the following constants:

Name | Description
`DIP_INTERPOLATION_DEFAULT` | Default interpolation method
`DIP_INTERPOLATION_BSPLINE` | B-Spline interpolation
`DIP_INTERPOLATION_FOURTH_ORDER_CUBIC` | Forth order cubic interpolation
`DIP_INTERPOLATION_THIRD_ORDER_CUBIC` | Third order cubic interpolation
`DIP_INTERPOLATION_LINEAR` | Linear interpolation
`DIP_INTERPOLATION_ZERO_ORDER_HOLD` | Zero order hold interpolation

## SEE ALSO

`Subsampling`

DIPlib on-line documentation | Function reference | Global function index