# interp_x2_3D.m

E. Koenig, 08/04/2010

Interpolation by a factor 2 of a 3D field.

The interpolation can be done using 3 methods :

- nearest: the new point values are copies of their left nearest neighboor
- linear: the new point values are linearly interpolated from the neighboors
- splines: the new point values are interpolated using splines. This method is based on the works of Unser et al [1].

Needs the function `mexinterp`, which has to be compiled, and is placed in the folder interpol_2D.

## Contents

- References
- Use
- Inputs
- Outputs
- Example

## References

`[1] Unser, M., Aldroubi, A. Eden, M.: Enlargement or reduction of digital images with minimum loss of information. IEEE Transactions on Image Processing 4(3), 247-258 (1995)`

## Use

I_interp = interp_x2_3D(I, method, conservation);

## Inputs

- I: input 3D field
- method: method used for the interpolation : 'nearest', 'linear' or 'splines'
- conservation: 1 if the interpolation is conservative, 0 if not

By default, the interpolation is made by the linear method with no conservation.

## Outputs

- I_interp: interpolated 3D field. The size of this resulting field is twice the size of I

## Example

Interpolation of a 4x4x4 random field using the splines method :

      I = randn(4,4,4);
      I_interp = interp_x2_3D(I, 'splines', 0);