uk.ac.starlink.ast
Interface Ukern1Calculator


public interface Ukern1Calculator

Interface for user-provided 1-d kernel interpolation functions. An object implementing this class is required in order to perform custom interpolation using a 1-dimensional kernel in the resample* methods of the Mapping class.

Version:
$Id$
Author:
Mark Taylor
See Also:
Mapping.Interpolator

Method Summary
 double ukern1(double offset)
          Calculates the value of a 1-dimensional sub-pixel interpolation kernel.
 

Method Detail

ukern1

double ukern1(double offset)
              throws Exception
Calculates the value of a 1-dimensional sub-pixel interpolation kernel. This determines how the weight given to neighbouring pixels in calculating an interpolated value depends on the pixel's offset from the interpolation point. In more than one dimension, the weight assigned to a pixel is formed by evaluating this 1-dimensional kernel using the offset along each dimension in turn. The product of the returned values is then used as the pixel weight.

Parameters:
offset - the offset of the pixel from the interpolation point, measured in pixels. This value may be positive or negative, but for most practical interpolation schemes its sign should be ignored.
Returns:
the calculated kernel value, which may be positive or negative
Throws:
Exception - The method may throw an exception if any error occurs during the calculation. In this case, resampling will terminate with an exception.


Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.