PCL
pcl::IntegerResample Class Reference

A geometric transformation to resample images by integer ratios. More...

#include <IntegerResample.h>

+ Inheritance diagram for pcl::IntegerResample:

Public Types

using downsample_mode = IntegerDownsampleMode::value_type
 

Public Member Functions

 IntegerResample (const IntegerResample &)=default
 
 IntegerResample (int zoom=0, downsample_mode mode=IntegerDownsampleMode::Average)
 
downsample_mode DownsampleMode () const
 
void GetNewSizes (int &width, int &height) const override
 
double ScalingFactor () const
 
void SetDownsampleMode (downsample_mode mode)
 
void SetZoomFactor (int zoom)
 
int ZoomFactor () const
 
- Public Member Functions inherited from pcl::GeometricTransformation
 GeometricTransformation ()=default
 
 GeometricTransformation (const GeometricTransformation &)=default
 
 GeometricTransformation (GeometricTransformation &&)=default
 
 ~GeometricTransformation () override
 
GeometricTransformationoperator= (const GeometricTransformation &)=default
 
GeometricTransformationoperator= (GeometricTransformation &&)=default
 
- Public Member Functions inherited from pcl::ImageTransformation
 ImageTransformation ()=default
 
 ImageTransformation (const ImageTransformation &)=default
 
virtual ~ImageTransformation ()
 
template<class P >
GenericImage< P > & operator>> (GenericImage< P > &image) const
 
ImageVariantoperator>> (ImageVariant &image) const
 
- Public Member Functions inherited from pcl::ParallelProcess
 ParallelProcess ()=default
 
 ParallelProcess (const ParallelProcess &)=default
 
virtual ~ParallelProcess ()
 
void DisableParallelProcessing (bool disable=true) noexcept
 
void EnableParallelProcessing (bool enable=true, int maxProcessors=0) noexcept
 
bool IsParallelProcessingEnabled () const noexcept
 
int MaxProcessors () const noexcept
 
ParallelProcessoperator= (const ParallelProcess &)=default
 
void SetMaxProcessors (int maxProcessors) noexcept
 
void Swap (ParallelProcess &process) noexcept
 

Protected Member Functions

void Apply (pcl::DImage &) const override
 
void Apply (pcl::Image &) const override
 
void Apply (pcl::UInt16Image &) const override
 
void Apply (pcl::UInt32Image &) const override
 
void Apply (pcl::UInt8Image &) const override
 
- Protected Member Functions inherited from pcl::ImageTransformation
virtual void Apply (pcl::ComplexImage &image) const
 
virtual void Apply (pcl::DComplexImage &image) const
 

Additional Inherited Members

- Static Public Member Functions inherited from pcl::GeometricTransformation
template<class P >
static void ApplyGammaExponentCorrection (typename P::sample *samples, size_type length, double gamma, AbstractImage::ThreadData &threadData, int maxProcessors=PCL_MAX_PROCESSORS)
 
template<class P >
static void ApplyInverseGammaExponentCorrection (typename P::sample *samples, size_type length, double gamma, AbstractImage::ThreadData &threadData, int maxProcessors=PCL_MAX_PROCESSORS)
 
template<class P >
static void ApplyInverseSRGBGammaCorrection (typename P::sample *samples, size_type length, AbstractImage::ThreadData &threadData, int maxProcessors=PCL_MAX_PROCESSORS)
 
template<class P >
static void ApplySRGBGammaCorrection (typename P::sample *samples, size_type length, AbstractImage::ThreadData &threadData, int maxProcessors=PCL_MAX_PROCESSORS)
 

Detailed Description

TODO: Write a detailed description for IntegerResample.

Definition at line 97 of file IntegerResample.h.

Member Typedef Documentation

◆ downsample_mode

using pcl::IntegerResample::downsample_mode = IntegerDownsampleMode::value_type

Represents a downsample operation.

Definition at line 105 of file IntegerResample.h.

Constructor & Destructor Documentation

◆ IntegerResample() [1/2]

pcl::IntegerResample::IntegerResample ( int  zoom = 0,
downsample_mode  mode = IntegerDownsampleMode::Average 
)
inline

Constructs an IntegerResample object with zoom factor z and downsampling mode m.

Definition at line 111 of file IntegerResample.h.

◆ IntegerResample() [2/2]

pcl::IntegerResample::IntegerResample ( const IntegerResample )
default

Copy constructor.

Member Function Documentation

◆ Apply() [1/5]

void pcl::IntegerResample::Apply ( pcl::DImage image) const
overrideprotectedvirtual

Applies this transformation to a 64-bit floating point image.

Reimplemented from pcl::ImageTransformation.

◆ Apply() [2/5]

void pcl::IntegerResample::Apply ( pcl::Image image) const
overrideprotectedvirtual

Applies this transformation to a 32-bit floating point image.

Reimplemented from pcl::ImageTransformation.

◆ Apply() [3/5]

void pcl::IntegerResample::Apply ( pcl::UInt16Image image) const
overrideprotectedvirtual

Applies this transformation to a 16-bit unsigned integer image.

Reimplemented from pcl::ImageTransformation.

◆ Apply() [4/5]

void pcl::IntegerResample::Apply ( pcl::UInt32Image image) const
overrideprotectedvirtual

Applies this transformation to a 32-bit unsigned integer image.

Reimplemented from pcl::ImageTransformation.

◆ Apply() [5/5]

void pcl::IntegerResample::Apply ( pcl::UInt8Image image) const
overrideprotectedvirtual

Applies this transformation to an 8-bit unsigned integer image.

Reimplemented from pcl::ImageTransformation.

◆ DownsampleMode()

downsample_mode pcl::IntegerResample::DownsampleMode ( ) const
inline

Returns the current downsample mode of this IntegerResample object.

Definition at line 169 of file IntegerResample.h.

◆ GetNewSizes()

void pcl::IntegerResample::GetNewSizes ( int &  width,
int &  height 
) const
overridevirtual

Predicts transformed image dimensions.

Parameters
[in,out]widthReference to a variable whose value is a horizontal dimension in pixels (width). On output, it will receive the predicted horizontal dimension after the transformation.
[in,out]heightReference to a variable whose value is a vertical dimension in pixels (height). On output, it will receive the predicted vertical dimension after the transformation.
Note
This is a pure virtual member function that must be reimplemented in every derived class.

Implements pcl::GeometricTransformation.

◆ ScalingFactor()

double pcl::IntegerResample::ScalingFactor ( ) const
inline

Returns the pixel scaling factor applied by this instance, or the equivalent image resampling ratio. See SetZoomFactor() for the correspondence between zoom factors and resampling ratios.

Definition at line 159 of file IntegerResample.h.

◆ SetDownsampleMode()

void pcl::IntegerResample::SetDownsampleMode ( downsample_mode  mode)
inline

Sets the downsample mode for this IntegerResample object.

The downsample mode defines an statistical operation that the integer resampling algorithms applies to the set of original pixels that produce each pixel in the subsampled image. The default mode is IntegerDownsampleMode::Average, which calculates the mean of source pixels. The Median, Minimum and Maximum modes turn the integer downsampling algorithm into a morphological downsampling operation with very interesting properties and applications.

Definition at line 185 of file IntegerResample.h.

◆ SetZoomFactor()

void pcl::IntegerResample::SetZoomFactor ( int  zoom)
inline

Sets the zoom factor for this IntegerResample object.

Positive zoom factors are interpreted as magnifying factors; negative zoom factors are reduction factors. For example:

Zoom Factor Resampling ratio (original pixels : resampled pixels)
-3 1:3 (1/3 reduction)
-2 1:2 (1/2 reduction)
1 1:1 (actual pixels)
2 2:1 (x2 magnification)
3 3:1 (x3 magnification)
Note
Zoom factors 0 and -1 should not be used explicitly; they are reserved for internal use, and there is no guarantee that future versions of PCL will continue accepting them.

Definition at line 149 of file IntegerResample.h.

◆ ZoomFactor()

int pcl::IntegerResample::ZoomFactor ( ) const
inline

Returns the current zoom factor of this IntegerResample object.

Definition at line 125 of file IntegerResample.h.


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