Isis Developer Reference
|
#include <Interpolator.h>
Public Types | |
enum | interpType { None = 0 , NearestNeighborType = 1 , BiLinearType = 2 , CubicConvolutionType = 4 } |
The interpolator type, including: None, Nearest Neighbor, BiLinear or Cubic Convultion. More... | |
Public Member Functions | |
Interpolator () | |
Constructs an empty Interpolator object. | |
Interpolator (const interpType &type) | |
Constructs an Interpolator object, and sets the type of interpolation. | |
~Interpolator () | |
Destroys the Interpolator object. | |
double | Interpolate (const double isamp, const double iline, const double buf[]) |
Performs an interpolation on the data according to the parameters set in the constructor. | |
void | SetType (const interpType &type) |
Sets the type of interpolation. | |
int | Samples () |
Returns the number of samples needed by the interpolator. | |
int | Lines () |
Returns the number of lines needed by the interpolator. | |
double | HotSample () |
Returns the sample coordinate of the center pixel in the buffer for the interpolator. | |
double | HotLine () |
Returns the line coordinate of the center pixel in the buffer for the interpolator. | |
Pixel interpolator.
This class is used for interpolating buffers of pixel data. It is usually associated with spacial translation, rotations and scaling in geometric warping algorithums (i.e., rubber sheeting). When special-pixel values are found in the data buffer the current interpolator is abandonded and the next lower interpolator is used instead (i.e.; if Cubic-convolution can not be performed then a bi-linear is used and if the bi-linear can not be performed then nearest-neighbor will be used.
The interpolator type, including: None, Nearest Neighbor, BiLinear or Cubic Convultion.
Enumerator | |
---|---|
None | |
NearestNeighborType | |
BiLinearType | |
CubicConvolutionType |
Isis::Interpolator::Interpolator | ( | ) |
Constructs an empty Interpolator object.
Isis::Interpolator::Interpolator | ( | const interpType & | type | ) |
Constructs an Interpolator object, and sets the type of interpolation.
type | The type of interpolation to be performed. (NearestNeighbor, BiLinear or CubicConvulsion) |
Isis::Interpolator::~Interpolator | ( | ) |
Destroys the Interpolator object.
double Isis::Interpolator::HotLine | ( | ) |
Returns the line coordinate of the center pixel in the buffer for the interpolator.
References _FILEINFO_, BiLinearType, CubicConvolutionType, NearestNeighborType, None, and Isis::IException::Programmer.
Referenced by Isis::DemShape::DemShape().
double Isis::Interpolator::HotSample | ( | ) |
Returns the sample coordinate of the center pixel in the buffer for the interpolator.
References _FILEINFO_, BiLinearType, CubicConvolutionType, NearestNeighborType, None, and Isis::IException::Programmer.
Referenced by Isis::DemShape::DemShape().
double Isis::Interpolator::Interpolate | ( | const double | isamp, |
const double | iline, | ||
const double | buf[] ) |
Performs an interpolation on the data according to the parameters set in the constructor.
If the buffer contains special pixel values then the current interpolation is abandoned and the next lower type of interpolation is attempted. The order from highest to lowest is (Cubic Convolution, Bi-linear and Nearest Neighbor).
isamp | The exact sample position being interpolated within the image. |
iline | The exact line position being interpolated within the image. |
buf[] | The buffer of data to be interpolated. The buffer is assumed to be the correct dimensions for the interpolator. |
References _FILEINFO_, BiLinearType, CubicConvolutionType, NearestNeighborType, None, and Isis::IException::Programmer.
Referenced by Isis::DemShape::localRadius().
int Isis::Interpolator::Lines | ( | ) |
Returns the number of lines needed by the interpolator.
References _FILEINFO_, BiLinearType, CubicConvolutionType, NearestNeighborType, None, and Isis::IException::Programmer.
Referenced by Isis::DemShape::DemShape().
int Isis::Interpolator::Samples | ( | ) |
Returns the number of samples needed by the interpolator.
References _FILEINFO_, BiLinearType, CubicConvolutionType, NearestNeighborType, None, and Isis::IException::Programmer.
Referenced by Isis::DemShape::DemShape().
void Isis::Interpolator::SetType | ( | const interpType & | type | ) |
Sets the type of interpolation.
(NearestNeighbor, BiLinear, CubicConvulsion).
type | The type of interpolation to be set. |