IDSpeakIPL  v1.9.1
peak::ipl::Binning Class Referencefinal

#include <peak_ipl/algorithm/peak_ipl_binning.hpp>

Public Types

enum  BinningMode : uint16_t {
  BinningMode::Average = 0,
  BinningMode::Sum = 1
}
 Mode parameter for the binning algorithm. More...
 

Public Member Functions

 Binning ()
 Constructor for a new Binning instance. More...
 
 ~Binning ()
 Destructor for the Binning instance. More...
 
 Binning (const Binning &other)
 Copy Constructor for a new Binning instance. More...
 
Binning & operator= (const Binning &other)
 Copy assigment for Binning instance. More...
 
 Binning (Binning &&other) noexcept
 Move constructor for Binning instance. More...
 
Binning & operator= (Binning &&other) noexcept
 Move assignment for Binning instance. More...
 
void SetBinningX (uint8_t value)
 Sets the values of the binning in horizontal direction. More...
 
PEAK_IPL_NO_DISCARD uint8_t BinningX () const
 Returns the value of the binning in horizontal direction. More...
 
void SetBinningY (uint8_t value)
 Sets the values of the binning in vertical direction. More...
 
PEAK_IPL_NO_DISCARD uint8_t BinningY () const
 Returns the value of the binning in vertical direction. More...
 
PEAK_IPL_NO_DISCARD uint8_t BinningMin () const
 Returns the minimum value for the binning. More...
 
PEAK_IPL_NO_DISCARD uint8_t BinningMax () const
 Returns the maximum value for the binning. More...
 
PEAK_IPL_NO_DISCARD Size2D ExpectedOutputSize (Size2D inputSize, PixelFormatName pixelFormat) const
 Returns the size of a binned image given the input size and pixelformat. More...
 
void SetMode (BinningMode mode)
 Sets the values of the binning mode. More...
 
PEAK_IPL_NO_DISCARD BinningMode Mode () const
 Returns the value of the binning mode. More...
 
PEAK_IPL_NO_DISCARD bool IsPixelFormatSupported (PixelFormatName pixelFormatName) const
 Returns whether the binning supports the given pixel format. More...
 
PEAK_IPL_NO_DISCARD Image Process (const Image &inputImage) const
 Applies the binning on the given image. More...
 

Member Enumeration Documentation

◆ BinningMode

enum peak::ipl::Binning::BinningMode : uint16_t
strong

Mode parameter for the binning algorithm.

The enum holding the possible modi.

Enumerator
Average 

Average (mean) of pixels.

Sum 

Sum of pixels.

Constructor & Destructor Documentation

◆ Binning() [1/3]

peak::ipl::Binning::Binning ( )
inline

Constructor for a new Binning instance.

Creates a new Binning instance.

Since
1.3.3

◆ ~Binning()

peak::ipl::Binning::~Binning ( )
inline

Destructor for the Binning instance.

Destroys a Binning instance.

Since
1.3.3

◆ Binning() [2/3]

peak::ipl::Binning::Binning ( const Binning &  other)
inline

Copy Constructor for a new Binning instance.

Creates a new Binning instance.

Note
This only creates a shallow copy. See Shallow copy (since 1.8) for a detailed explanation.
Parameters
[in]otherThe other instance to acquire a reference for.
Since
1.3.3 Deleted
1.8 Implemented as shallow copy

◆ Binning() [3/3]

peak::ipl::Binning::Binning ( Binning &&  other)
inlinenoexcept

Move constructor for Binning instance.

Moves the instance from other to this. Afterwards other is invalid.

Parameters
[in]otherThe other instance to move.
Since
1.3.3

Member Function Documentation

◆ BinningMax()

uint8_t peak::ipl::Binning::BinningMax ( ) const
inline

Returns the maximum value for the binning.

Returns
The maximum value for the binning.
Since
1.3.3

◆ BinningMin()

uint8_t peak::ipl::Binning::BinningMin ( ) const
inline

Returns the minimum value for the binning.

Returns
The minimum value for the binning.
Since
1.3.3

◆ BinningX()

uint8_t peak::ipl::Binning::BinningX ( ) const
inline

Returns the value of the binning in horizontal direction.

Returns
The value of the binning in horizontal direction.
Since
1.3.3

◆ BinningY()

uint8_t peak::ipl::Binning::BinningY ( ) const
inline

Returns the value of the binning in vertical direction.

Returns
The value of the binning in vertical direction.
Since
1.3.3

◆ ExpectedOutputSize()

Size2D peak::ipl::Binning::ExpectedOutputSize ( Size2D  inputSize,
PixelFormatName  pixelFormat 
) const
inline

Returns the size of a binned image given the input size and pixelformat.

Parameters
[in]inputSizeThe size of the input image.
[in]pixelFormatThe pixelFormat of the input image.
Returns
The size of a binned image
Exceptions
InvalidArgumentpixelFormat isn't supported.
Since
1.3.4

◆ IsPixelFormatSupported()

bool peak::ipl::Binning::IsPixelFormatSupported ( PixelFormatName  pixelFormatName) const
inline

Returns whether the binning supports the given pixel format.

Returns
Flag whether the given pixel format is supported.
Parameters
[in]pixelFormatNameThe pixel format of interest.
Since
1.3.3

◆ Mode()

Binning::BinningMode peak::ipl::Binning::Mode ( ) const
inline

Returns the value of the binning mode.

Returns
The value of the binning mode.
Since
1.3.3

◆ operator=() [1/2]

Binning & peak::ipl::Binning::operator= ( const Binning &  other)
inline

Copy assigment for Binning instance.

Acquires a reference from other to this instance. If this instance already has a reference, it will be destroyed.

Note
See Shallow copy (since 1.8) for a detailed explanation.
Parameters
[in]otherThe other instance to acquire a reference for.
Since
1.3.3 Deleted
1.8 Implemented as shallow copy

◆ operator=() [2/2]

Binning & peak::ipl::Binning::operator= ( Binning &&  other)
inlinenoexcept

Move assignment for Binning instance.

Moves the instance from other to this. Afterwards other is invalid.

Parameters
[in]otherThe other instance to move.
Since
1.3.3

◆ Process()

Image peak::ipl::Binning::Process ( const Image &  inputImage) const
inline

Applies the binning on the given image.

Parameters
[in]inputImageImage to process.
Returns
A new created image containing the gamma-corrected pixels.
Exceptions
ImageFormatNotSupportedExceptionimage has unsupported pixel format.
InvalidArgumentthe image is too small.
Since
1.3.3

◆ SetBinningX()

void peak::ipl::Binning::SetBinningX ( uint8_t  value)
inline

Sets the values of the binning in horizontal direction.

Parameters
[in]valueThe value of the binning in horizontal direction.
Exceptions
InvalidArgumentvalue isn't supported.
Since
1.3.3

◆ SetBinningY()

void peak::ipl::Binning::SetBinningY ( uint8_t  value)
inline

Sets the values of the binning in vertical direction.

Parameters
[in]valueThe value of the binning in vertical direction.
Exceptions
InvalidArgumentvalue isn't supported.
Since
1.3.3

◆ SetMode()

void peak::ipl::Binning::SetMode ( Binning::BinningMode  mode)
inline

Sets the values of the binning mode.

Parameters
[in]modeThe value of the binning mode.
Exceptions
InvalidArgumentvalue isn't supported.
Since
1.3.3

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