PCL
pcl::PixelInterpolation::Interpolator< P > Class Template Reference

Generic two-dimensional pixel interpolator. More...

#include <PixelInterpolation.h>

Public Types

using sample = typename P::sample
 

Public Member Functions

 Interpolator (BidimensionalInterpolation< sample > *interpolation, const sample *data, int width, int height, bool unclipped=false)
 
 Interpolator (const Interpolator &)=delete
 
 Interpolator (Interpolator &&)=default
 
virtual ~Interpolator ()
 
BidimensionalInterpolation< sample > & Interpolation ()
 
const BidimensionalInterpolation< sample > & Interpolation () const
 
template<typename T >
sample operator() (const GenericPoint< T > &p) const
 
sample operator() (double x, double y) const
 

Detailed Description

template<class P>
class pcl::PixelInterpolation::Interpolator< P >

Interpolator provides a common pixel interpolation interface that is independent on a particular interpolation algorithm.

Definition at line 109 of file PixelInterpolation.h.

Member Typedef Documentation

◆ sample

template<class P >
using pcl::PixelInterpolation::Interpolator< P >::sample = typename P::sample

Represents a pixel sample value.

Definition at line 116 of file PixelInterpolation.h.

Constructor & Destructor Documentation

◆ Interpolator() [1/3]

template<class P >
pcl::PixelInterpolation::Interpolator< P >::Interpolator ( BidimensionalInterpolation< sample > *  interpolation,
const sample data,
int  width,
int  height,
bool  unclipped = false 
)
inline

Constructs and initializes a new Interpolator object.

Parameters
interpolationPointer to a dynamically allocated instance of the two-dimensional interpolation algorithm. The instance will be owned by this object, which will destroy and deallocate it upon destruction.
dataSource matrix of pixel sample values that will be interpolated.
widthHorizontal dimension (most rapidly varying matrix subscript) of the source data matrix. Must be greater than zero.
heightVertical dimension (most slowly varying matrix subscript) of the source data matrix. Must be greater than zero.
unclippedIf false (default value), the interpolation will constrain interpolated values to the native range of the pixel sample type represented by the template argument P. If true, interpolated pixel values will be returned unmodified. Note that this only makes sense for floating point pixel sample types.

Definition at line 146 of file PixelInterpolation.h.

◆ Interpolator() [2/3]

template<class P >
pcl::PixelInterpolation::Interpolator< P >::Interpolator ( const Interpolator< P > &  )
delete

Disabled copy constructor.

◆ Interpolator() [3/3]

template<class P >
pcl::PixelInterpolation::Interpolator< P >::Interpolator ( Interpolator< P > &&  )
default

Move constructor.

◆ ~Interpolator()

template<class P >
virtual pcl::PixelInterpolation::Interpolator< P >::~Interpolator ( )
inlinevirtual

Virtual destructor. Destroys an Interpolator object and all internal working structures.

Definition at line 169 of file PixelInterpolation.h.

Member Function Documentation

◆ Interpolation() [1/2]

template<class P >
BidimensionalInterpolation<sample>& pcl::PixelInterpolation::Interpolator< P >::Interpolation ( )
inline

Returns a reference to the mutable two-dimensional interpolation being used by this Interpolator object.

Definition at line 187 of file PixelInterpolation.h.

◆ Interpolation() [2/2]

template<class P >
const BidimensionalInterpolation<sample>& pcl::PixelInterpolation::Interpolator< P >::Interpolation ( ) const
inline

Returns a reference to the immutable two-dimensional interpolation being used by this Interpolator object.

Definition at line 177 of file PixelInterpolation.h.

◆ operator()() [1/2]

template<class P >
template<typename T >
sample pcl::PixelInterpolation::Interpolator< P >::operator() ( const GenericPoint< T > &  p) const
inline

Interpolates a pixel sample value at the specified p point.

This is an overloaded member function, provided for convenience. It is equivalent to operator()( p.x, p.y ).

Definition at line 225 of file PixelInterpolation.h.

References pcl::GenericPoint< T >::x, and pcl::GenericPoint< T >::y.

◆ operator()() [2/2]

template<class P >
sample pcl::PixelInterpolation::Interpolator< P >::operator() ( double  x,
double  y 
) const
inline

Interpolates a pixel sample value at the specified x and y image coordinates.

If this is an unclipped interpolator (see the class constructor), the interpolated value will be returned unmodified. If this is a clipped interpolator (default state), the returned value will be constrained to stay within the native range of the pixel sample type represented by the template argument P. Note that unclipped interpolation only makes sense for floating point pixel sample types.

Definition at line 204 of file PixelInterpolation.h.


The documentation for this class was generated from the following file: