PCL
pcl::Rotation Class Reference

Image rotation algorithm. More...

#include <Rotation.h>

+ Inheritance diagram for pcl::Rotation:

Public Member Functions

 Rotation (const Rotation &)=default
 
 Rotation (PixelInterpolation &p, double angle, const DPoint &center)
 
 Rotation (PixelInterpolation &p, double angle=0, double cx=0, double cy=0)
 
double Angle () const
 
DPoint Center () const
 
double CenterX () const
 
double CenterY () const
 
void DisableUnclippedRotation (bool disable=true)
 
void EnableUnclippedRotation (bool enable=true)
 
const DVectorFillValues () const
 
void GetNewSizes (int &width, int &height) const override
 
bool IsUnclipped () const
 
void SetAngle (double rads)
 
void SetCenter (const DPoint &center)
 
void SetCenter (double xc, double yc)
 
void SetFillValues (const DVector &fillValues)
 
- 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::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 Rotation

Definition at line 74 of file Rotation.h.

Constructor & Destructor Documentation

◆ Rotation() [1/3]

pcl::Rotation::Rotation ( PixelInterpolation p,
double  angle = 0,
double  cx = 0,
double  cy = 0 
)
inline

Constructs a new Rotation object.

Parameters
pReference to a pixel interpolation, which must remain valid while this object exists.
angleRotation angle in radians
cxHorizontal coordinate of the center of rotation, measured in pixels in the image coordinate system.
cyVertical coordinate of the center of rotation, measured in pixels in the image coordinate system.

Definition at line 93 of file Rotation.h.

◆ Rotation() [2/3]

pcl::Rotation::Rotation ( PixelInterpolation p,
double  angle,
const DPoint center 
)
inline

Constructs a new Rotation object.

Parameters
pReference to a pixel interpolation, which must remain valid while this object exists.
angleRotation angle in radians
centerCoordinates of the center of rotation, measured in pixels in the image coordinate system.

Definition at line 111 of file Rotation.h.

◆ Rotation() [3/3]

pcl::Rotation::Rotation ( const Rotation )
default

Copy constructor.

Member Function Documentation

◆ Angle()

double pcl::Rotation::Angle ( ) const
inline

Returns the rotation angle in radians.

Definition at line 126 of file Rotation.h.

◆ Apply() [1/5]

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

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

Reimplemented from pcl::ImageTransformation.

◆ Center()

DPoint pcl::Rotation::Center ( ) const
inline

Returns the center of rotation. The returned point coordinates are measured in pixels in the image coordinate system.

Definition at line 143 of file Rotation.h.

◆ CenterX()

double pcl::Rotation::CenterX ( ) const
inline

Returns the horizontal coordinate of the center of rotation, measured in pixels in the image coordinate system.

Definition at line 152 of file Rotation.h.

◆ CenterY()

double pcl::Rotation::CenterY ( ) const
inline

Returns the vertical coordinate of the center of rotation, measured in pixels in the image coordinate system.

Definition at line 161 of file Rotation.h.

◆ DisableUnclippedRotation()

void pcl::Rotation::DisableUnclippedRotation ( bool  disable = true)
inline

Disables unclipped rotations for this object. See IsUnclipped() for information on unclipped rotations.

Definition at line 213 of file Rotation.h.

◆ EnableUnclippedRotation()

void pcl::Rotation::EnableUnclippedRotation ( bool  enable = true)
inline

Enables unclipped rotations for this object. See IsUnclipped() for information on unclipped rotations.

Definition at line 204 of file Rotation.h.

◆ FillValues()

const DVector& pcl::Rotation::FillValues ( ) const
inline

Returns the current vector of per-channel filling values for uncovered image regions.

See the documentation for SetFillValues() for more information.

Definition at line 224 of file Rotation.h.

◆ GetNewSizes()

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

◆ IsUnclipped()

bool pcl::Rotation::IsUnclipped ( ) const
inline

Returns true iff this transformation will preserve the entire target image without clipping any pixels after rotating it.

An unclipped rotation ignores the specified rotation center coordinates (see CenterX() and CenterY(), as well as the class constructor) and rotates images with respect to their geometric centers. To accommodate all rotated pixels in the result, the unclipped rotated image will always be bigger than the original, except for the trivial cases of rotations by 0 and 180 degrees.

Definition at line 195 of file Rotation.h.

◆ SetAngle()

void pcl::Rotation::SetAngle ( double  rads)
inline

Sets the rotation angle in radians.

Definition at line 134 of file Rotation.h.

◆ SetCenter() [1/2]

void pcl::Rotation::SetCenter ( const DPoint center)
inline

Sets the center of rotation. The specified center point coordinates must be expressed in pixels in the image coordinate system.

Definition at line 170 of file Rotation.h.

◆ SetCenter() [2/2]

void pcl::Rotation::SetCenter ( double  xc,
double  yc 
)
inline

Sets the center of rotation to the specified coordinates xc and yc, which must be expressed in pixels in the image coordinate system.

Definition at line 179 of file Rotation.h.

◆ SetFillValues()

void pcl::Rotation::SetFillValues ( const DVector fillValues)
inline

Sets a vector of per-channel filling values for uncovered image regions.

Uncovered regions result when an image is rotated by non-orthogonal angles.

By default, there are no filling values defined (and hence the returned vector is empty by default). When the Rotation instance is executed and a filling value is not defined for a channel of the target image, uncovered regions are filled with the minimum sample value in the native range of the image (usually zero).

Definition at line 241 of file Rotation.h.


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