IP - Interpolate/Resize using bilinear/trilinear interpolation

(09/07/11)

PURPOSE

Takes input image/volume of any dimension and creates interpolated image/volume of any dimension. Uses bilinear interpolation for images and trilinear interpolation on volumes.   Example.

SEE ALSO

IP FS [Interpolate/resize image/volume - using Fourier based cubic spline ||]
IP FT [Interpolate/Resize - using Fourier Transform ||]
IP T [Interpolate/Resize - using Triangular interpolation]
DC [Decimate image/volume]

USAGE

.OPERATION: IP

.INPUT FILE: PIC001
[Enter the name of the file to be interpolated.]

.OUTPUT FILE: IMG024
[Enter the file where the interpolated image is to be placed.]

If input file is an image, SPIDER asks:


.OUTPUT DIMENSIONS, NX & NY: 72, 48,
[Enter interpolated X & Y dimensions for the output image.]

If input file is a volume, SPIDER asks:


.OUTPUT DIMENSIONS, NX, NY, & NZ): 72, 48, 50
[Enter interpolated X, Y, and Z dimensions for the output volume.]

NOTES

  1. This operation can be used for either interpolation or extrapolation.

  2. The output image does not have to have the same proportions (ratio NX/NY) as the input image.

  3. Only the new X dimension (NX) of the output image needs be entered. The other dimension(s) will then be computed assuming the same proportions as the input image. For example, let the input image have the size 60x40. Then the sequence
    .OUTPUT DIMENSIONS, NX & NY: 120 will have the same effect as:
    .OUTPUT DIMENSIONS, NX & NY: 120, 80

  4. The program works by throwing a new grid onto the image/volume whose boundaries coincide with those of the old grid. Each pixel of the new grid is computed from its old neighbors by bilinear/trilinear interpolation.

  5. Note that for raw data, a reduction in scale by 'IP' results in a loss of S/N ratio, since only a subset of the original points may be used for interpolation. The proper procedure maintaining the original information as much as possible is to apply an appropriate low-pass filtration to the original image (either 'FQ', or for large images design a Remez filter using 'FF PLOT' and use 'RC'), and decimate it using 'DC' operation.

  6. Pixel size in header is updated.

SUBROUTINES

INTERP, INTERPS, INTERP3, IRP3

CALLER

UTIL2