PCL
pcl::Resample Class Reference

Image resampling algorithm. More...

#include <Resample.h>

+ Inheritance diagram for pcl::Resample:

Public Types

using abs_resize_mode = AbsoluteResizeMode::value_type
 
using resize_mode = ResizeMode::value_type
 

Public Member Functions

 Resample (const Resample &)=default
 
 Resample (PixelInterpolation &p, double scale=1.0)
 
 Resample (PixelInterpolation &p, double scaleX, double scaleY)
 
abs_resize_mode AbsMode () const
 
void GetNewSizes (int &width, int &height) const override
 
void GetScalingFactors (double &sx, double &sy) const
 
void GetSizes (double &width, double &height) const
 
bool IsAbsolute () const
 
bool IsRelative () const
 
resize_mode Mode () const
 
void SetAbsMode (abs_resize_mode absMode)
 
void SetMode (resize_mode mode)
 
void SetScalingFactors (double sx, double sy)
 
void SetSizes (double width, double height)
 
void SetXScale (double sx)
 
void SetXSize (double width)
 
void SetYScale (double sy)
 
void SetYSize (double height)
 
double XScale () const
 
double XSize () const
 
double YScale () const
 
double YSize () const
 
- Public Member Functions inherited from pcl::InterpolatingGeometricTransformation
 InterpolatingGeometricTransformation (const InterpolatingGeometricTransformation &)=default
 
 InterpolatingGeometricTransformation (InterpolatingGeometricTransformation &&x)
 
 InterpolatingGeometricTransformation (PixelInterpolation &p)
 
void DisableUnclippedInterpolation (bool disable=true)
 
void EnableUnclippedInterpolation (bool enable=true)
 
PixelInterpolationInterpolation ()
 
const PixelInterpolationInterpolation () const
 
InterpolatingGeometricTransformationoperator= (const InterpolatingGeometricTransformation &)=default
 
InterpolatingGeometricTransformationoperator= (InterpolatingGeometricTransformation &&x)
 
void SetInterpolation (PixelInterpolation &p)
 
bool UsingUnclippedInterpolation () 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::ImageResolution
 ImageResolution ()=default
 
 ImageResolution (const ImageResolution &)=default
 
void GetResolution (double &x, double &y)
 
double HorizontalResolution () const
 
bool IsMetricResolution () const
 
ImageResolutionoperator= (const ImageResolution &)=default
 
double Resolution () const
 
void SetMetricResolution (bool m)
 
void SetResolution (double r)
 
void SetResolution (double x, double y)
 
double VerticalResolution () 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 Resample

Definition at line 133 of file Resample.h.

Member Typedef Documentation

◆ abs_resize_mode

using pcl::Resample::abs_resize_mode = AbsoluteResizeMode::value_type

Represents an absolute resizing mode.

Definition at line 147 of file Resample.h.

◆ resize_mode

using pcl::Resample::resize_mode = ResizeMode::value_type

Represents a resizing mode.

Definition at line 142 of file Resample.h.

Constructor & Destructor Documentation

◆ Resample() [1/3]

pcl::Resample::Resample ( PixelInterpolation p,
double  scale = 1.0 
)
inline

Constructs a default Resample object using the specified pixel interpolation p and a single scaling ratio for both axes.

The specified pixel interpolation object p must remain valid while this object exists.

The resizing mode is set relative to current image dimensions.

Definition at line 158 of file Resample.h.

◆ Resample() [2/3]

pcl::Resample::Resample ( PixelInterpolation p,
double  scaleX,
double  scaleY 
)
inline

Constructs a default Resample object using the specified pixel interpolation p and separate scaling ratios for the X and Y axes, scaleX and scaleY respectively.

The specified pixel interpolation object p must remain valid while this object exists.

The resizing mode is set relative to current image dimensions.

Definition at line 175 of file Resample.h.

◆ Resample() [3/3]

pcl::Resample::Resample ( const Resample )
default

Copy constructor.

Member Function Documentation

◆ AbsMode()

abs_resize_mode pcl::Resample::AbsMode ( ) const
inline

Returns the current absolute resizing mode. The absolute resizing mode is only applied when Mode() is not equal to ResizeMode::RelativeDimensions.

Definition at line 366 of file Resample.h.

◆ Apply() [1/5]

void pcl::Resample::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::Resample::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::Resample::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::Resample::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::Resample::Apply ( pcl::UInt8Image image) const
overrideprotectedvirtual

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

Reimplemented from pcl::ImageTransformation.

◆ GetNewSizes()

void pcl::Resample::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.

◆ GetScalingFactors()

void pcl::Resample::GetScalingFactors ( double &  sx,
double &  sy 
) const
inline

Gets the scaling factors sx and sy for the X and Y axes, respectively.

Use GetScalingFactors(), XScale() and YScale() semantics to define a Resample instance that resizes images relative to their current dimensions.

Definition at line 261 of file Resample.h.

◆ GetSizes()

void pcl::Resample::GetSizes ( double &  width,
double &  height 
) const
inline

Gets the resampled image width and height.

Use GetSizes(), XSize() and YSize() semantics to define a Resample instance that resizes images to fixed dimensions.

Definition at line 193 of file Resample.h.

◆ IsAbsolute()

bool pcl::Resample::IsAbsolute ( ) const
inline

Returns true iff this Resample object resizes images to fixed dimensions, i.e. when Mode() is not equal to ResizeMode::RelativeDimensions.

Definition at line 349 of file Resample.h.

◆ IsRelative()

bool pcl::Resample::IsRelative ( ) const
inline

Returns true iff this Resample object resizes images relative to their current dimensions, i.e. when Mode() is equal to ResizeMode::RelativeDimensions.

Definition at line 340 of file Resample.h.

◆ Mode()

resize_mode pcl::Resample::Mode ( ) const
inline

Returns the current resize mode.

Definition at line 330 of file Resample.h.

◆ SetAbsMode()

void pcl::Resample::SetAbsMode ( abs_resize_mode  absMode)
inline

Sets the absolute resizing mode. The absolute resizing mode is only applied when Mode() is not equal to ResizeMode::RelativeDimensions.

Definition at line 375 of file Resample.h.

◆ SetMode()

void pcl::Resample::SetMode ( resize_mode  mode)
inline

Sets the current resize mode.

Definition at line 357 of file Resample.h.

◆ SetScalingFactors()

void pcl::Resample::SetScalingFactors ( double  sx,
double  sy 
)
inline

Sets the scaling factors sx and sy for the X and Y axes, respectively.

Use SetScalingFactors(), SetXScale() and SetYScale() semantics to define a Resample instance that resizes images relative to their current dimensions.

Definition at line 298 of file Resample.h.

◆ SetSizes()

void pcl::Resample::SetSizes ( double  width,
double  height 
)
inline

Sets the resampled image width and height.

Use SetSizes(), SetXSize() and SetYSize() semantics to define a Resample instance that resizes images to fixed dimensions.

Definition at line 226 of file Resample.h.

◆ SetXScale()

void pcl::Resample::SetXScale ( double  sx)
inline

Sets the horizontal scaling factor.

Use SetScalingFactors(), SetXScale() and SetYScale() semantics to define a Resample instance that resizes images relative to their current dimensions.

Definition at line 310 of file Resample.h.

◆ SetXSize()

void pcl::Resample::SetXSize ( double  width)
inline

Sets the resampled image width.

Use SetSizes(), SetXSize() and SetYSize() semantics to define a Resample instance that resizes images to fixed dimensions.

Definition at line 237 of file Resample.h.

◆ SetYScale()

void pcl::Resample::SetYScale ( double  sy)
inline

Sets the vertical scaling factor.

Use SetScalingFactors(), SetXScale() and SetYScale() semantics to define a Resample instance that resizes images relative to their current dimensions.

Definition at line 322 of file Resample.h.

◆ SetYSize()

void pcl::Resample::SetYSize ( double  height)
inline

Sets the resampled image height.

Use SetSizes(), SetXSize() and SetYSize() semantics to define a Resample instance that resizes images to fixed dimensions.

Definition at line 248 of file Resample.h.

◆ XScale()

double pcl::Resample::XScale ( ) const
inline

Returns the horizontal scaling factor.

Use GetScalingFactors(), XScale() and YScale() semantics to define a Resample instance that resizes images relative to their current dimensions.

Definition at line 273 of file Resample.h.

◆ XSize()

double pcl::Resample::XSize ( ) const
inline

Returns the resampled image width.

Use GetSizes(), XSize() and YSize() semantics to define a Resample instance that resizes images to fixed dimensions.

Definition at line 204 of file Resample.h.

◆ YScale()

double pcl::Resample::YScale ( ) const
inline

Returns the vertical scaling factor.

Use GetScalingFactors(), XScale() and YScale() semantics to define a Resample instance that resizes images relative to their current dimensions.

Definition at line 285 of file Resample.h.

◆ YSize()

double pcl::Resample::YSize ( ) const
inline

Returns the resampled image height.

Use GetSizes(), XSize() and YSize() semantics to define a Resample instance that resizes images to fixed dimensions.

Definition at line 215 of file Resample.h.


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