52 #ifndef __PCL_IntegerResample_h
53 #define __PCL_IntegerResample_h
58 #include <pcl/Diagnostics.h>
78 namespace IntegerDownsampleMode
105 using downsample_mode = IntegerDownsampleMode::value_type;
111 IntegerResample(
int zoom = 0, downsample_mode mode = IntegerDownsampleMode::Average )
112 : m_zoomFactor( zoom )
113 , m_downsampleMode( mode )
151 m_zoomFactor = (zoom < -1 || zoom > +1) ? zoom : +1;
161 if ( m_zoomFactor == 0 )
163 return (m_zoomFactor < 0) ? 1.0/(-m_zoomFactor) :
double( m_zoomFactor );
171 return m_downsampleMode;
187 m_downsampleMode = mode;
196 bool SupportsGammaCorrection()
const override
206 int m_zoomFactor = 0;
211 downsample_mode m_downsampleMode = IntegerDownsampleMode::Average;
Implements a generic, two-dimensional, shared or local image.
A geometric transformation to resample images by integer ratios.
void Apply(pcl::UInt32Image &) const override
void Apply(pcl::DImage &) const override
void Apply(pcl::UInt16Image &) const override
IntegerResample(int zoom=0, downsample_mode mode=IntegerDownsampleMode::Average)
void Apply(pcl::Image &) const override
void SetZoomFactor(int zoom)
void SetDownsampleMode(downsample_mode mode)
double ScalingFactor() const
downsample_mode DownsampleMode() const
void Apply(pcl::UInt8Image &) const override
IntegerResample(const IntegerResample &)=default
void GetNewSizes(int &width, int &height) const override
A process using multiple concurrent execution threads.