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

typedef IntegerDownsampleMode::value_type downsample_mode
 

Public Member Functions

 IntegerResample (int zoom=0, downsample_mode mode=IntegerDownsampleMode::Average)
 
 IntegerResample (const IntegerResample &)=default
 
downsample_mode DownsampleMode () const
 
void GetNewSizes (int &width, int &height) const override
 
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
 
virtual ~GeometricTransformation ()
 
- 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
 

Protected Member Functions

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

Detailed Description

TODO: Write a detailed description for IntegerResample.

Definition at line 97 of file IntegerResample.h.

Member Typedef Documentation

◆ downsample_mode

typedef IntegerDownsampleMode::value_type pcl::IntegerResample::downsample_mode

Represents a downsample operation.

Definition at line 104 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 110 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::Image image) const
overrideprotectedvirtual

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

Reimplemented from pcl::ImageTransformation.

◆ Apply() [2/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() [3/5]

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

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

Reimplemented from pcl::ImageTransformation.

◆ Apply() [4/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() [5/5]

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

Applies this transformation to a 32-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 155 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.

◆ 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 171 of file IntegerResample.h.

References pcl::Apply().

◆ 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)

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 147 of file IntegerResample.h.

◆ ZoomFactor()

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

Returns the current zoom factor of this IntegerResample object.

Definition at line 123 of file IntegerResample.h.


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