Class NearestWarpingKernel

Nested Relationships

Inheritance Relationships

Base Type

Class Documentation

class NearestWarpingKernel : public lsst::afw::math::SeparableKernel

Nearest neighbor warping: fast; good for undersampled data.

The kernel size is 2 x 2.

For more information about warping kernels see makeWarpingKernel

Public Functions

NearestWarpingKernel()
NearestWarpingKernel(const NearestWarpingKernel&)
NearestWarpingKernel(NearestWarpingKernel&&)
NearestWarpingKernel &operator=(const NearestWarpingKernel&)
NearestWarpingKernel &operator=(NearestWarpingKernel&&)
~NearestWarpingKernel()
std::shared_ptr<Kernel> clone() const

Return a pointer to a deep copy of this kernel

This kernel exists instead of a copy constructor so one can obtain a copy of an actual kernel instead of a useless copy of the base class.

Every kernel subclass must override this method.

Return

a pointer to a deep copy of the kernel

Protected Functions

void setKernelParameter(unsigned int ind, double value) const

Set one kernel parameter

Classes that have kernel parameters must subclass this function.

This function is marked “const”, despite modifying unimportant internals, so that computeImage can be const.

Exceptions
  • lsst::pex::exceptions::InvalidParameterError: always (unless subclassed)

class NearestFunction1 : public lsst::afw::math::Function1<Kernel::Pixel>

1-dimensional nearest neighbor interpolation function.

Optimized for nearest neighbor warping so only accepts two values: 0 and 1 (which is why it defined in the NearestWarpingKernel class instead of being made available as a standalone function).

Public Types

typedef std::shared_ptr<Function1<Kernel::Pixel>> Function1Ptr

Public Functions

NearestFunction1(double fracPos)

Parameters
  • fracPos: fractional position

Construct a Nearest interpolation function

~NearestFunction1()
Function1Ptr clone() const

Return a pointer to a deep copy of this function

This function exists instead of a copy constructor so one can obtain a copy of an actual function instead of a useless copy of the base class.

Every concrete subclass must override this method.

Return

a pointer to a deep copy of the function

Kernel::Pixel operator()(double x) const

Solve nearest neighbor equation

Only the following arguments will give reliably meaningful values:

  • 0.0 or 1.0 if the kernel center index is 0 in this axis

  • -1.0 or 0.0 if the kernel center index is 1 in this axis

std::string toString(std::string const& = "") const

Return string representation.