ImageScience 3.0.0

imagescience.transform
Class Translate

java.lang.Object
  extended by imagescience.transform.Translate

public class Translate
extends java.lang.Object

Translates an image using different interpolation schemes.

References:
[1]R. G. Keys, "Cubic Convolution Interpolation for Digital Image Processing", IEEE Transactions on Acoustics, Speech, and Signal Processing, vol. 29, no. 6, December 1981, pp. 1153-1160.
[2]M. Unser, "Splines: A Perfect Fit for Signal and Image Processing", IEEE Signal Processing Magazine, vol. 16, no. 6, November 1999, pp. 22-38.
[3]P. Thevenaz, T. Blu, M. Unser, "Interpolation Revisited", IEEE Transactions on Medical Imaging, vol. 19, no. 7, July 2000, pp.739-758.
[4]E. Meijering, W. Niessen, M. Viergever, "Quantitative Evaluation of Convolution-Based Methods for Medical Image Interpolation", Medical Image Analysis, vol. 5, no. 2, June 2001, pp. 111-126.
[5]T. Blu, P. Thevenaz, M. Unser, "MOMS: Maximal-Order Interpolation of Minimal Support", IEEE Transactions on Image Processing, vol. 10, no. 7, July 2001, pp. 1069-1080.


Field Summary
 double background
          The value used for background filling.
static int BSPLINE3
          Cubic B-spline interpolation [2,3,4].
static int BSPLINE5
          Quintic B-spline interpolation [2,3,4].
static int CUBIC
          Cubic convolution interpolation [1].
static int LINEAR
          Linear interpolation.
 Messenger messenger
          The object used for message displaying.
static int NEAREST
          Nearest-neighbor interpolation.
static int OMOMS3
          Cubic O-MOMS interpolation [5].
 Progressor progressor
          The object used for progress displaying.
 
Constructor Summary
Translate()
          Default constructor.
 
Method Summary
 Image run(Image image, double xtrans, double ytrans, double ztrans, int interpolation)
          Translates an image.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NEAREST

public static final int NEAREST
Nearest-neighbor interpolation.

See Also:
Constant Field Values

LINEAR

public static final int LINEAR
Linear interpolation.

See Also:
Constant Field Values

CUBIC

public static final int CUBIC
Cubic convolution interpolation [1].

See Also:
Constant Field Values

BSPLINE3

public static final int BSPLINE3
Cubic B-spline interpolation [2,3,4].

See Also:
Constant Field Values

OMOMS3

public static final int OMOMS3
Cubic O-MOMS interpolation [5].

See Also:
Constant Field Values

BSPLINE5

public static final int BSPLINE5
Quintic B-spline interpolation [2,3,4].

See Also:
Constant Field Values

background

public double background
The value used for background filling. The default value is 0.


messenger

public final Messenger messenger
The object used for message displaying.


progressor

public final Progressor progressor
The object used for progress displaying.

Constructor Detail

Translate

public Translate()
Default constructor.

Method Detail

run

public Image run(Image image,
                 double xtrans,
                 double ytrans,
                 double ztrans,
                 int interpolation)
Translates an image.

Parameters:
image - The input image to be translated. For images of type ColorImage, the color components are processed separately by the method.
xtrans - ytrans - ztrans - The translation distances (in physical units) in the respective dimensions. The translation is applied to every x-y-z subimage in a 5D image.
interpolation - The interpolation scheme to be used. Must be equal to one of the static fields of this class.
Returns:
A new image containing a translated version of the input image. The returned image is of the same type as the input image.
Throws:
java.lang.IllegalArgumentException - If the translation distances are out of range or if the requested interpolation scheme is not supported.
java.lang.IllegalStateException - If the x-, y-, or z-aspect size of image is less than or equal to 0.
java.lang.NullPointerException - If image is null.
java.lang.UnknownError - If for any reason the output image can not be created. In most cases this will be due to insufficient free memory.

ImageScience 3.0.0

Copyright (C) Erik Meijering. Permission to use this software and corresponding documentation for educational, research, and not-for-profit purposes, without a fee and without a signed licensing agreement, is granted, subject to the following terms and conditions.

IT IS NOT ALLOWED TO REDISTRIBUTE, SELL, OR LEASE THIS SOFTWARE, OR DERIVATIVE WORKS THEREOF, WITHOUT PERMISSION IN WRITING FROM THE COPYRIGHT HOLDER. THE COPYRIGHT HOLDER IS FREE TO MAKE VERSIONS OF THE SOFTWARE AVAILABLE FOR A FEE OR COMMERCIALLY ONLY.

IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OF ANY KIND WHATSOEVER, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE EXPRESS OR IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND CORRESPONDING DOCUMENTATION IS PROVIDED "AS IS". THE COPYRIGHT HOLDER HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.