IDS peak ICV v1.3.0
Loading...
Searching...
No Matches
BinningFeature Class Reference

#include <peak_icv/pipeline/features/peak_icv_binning_feature.hpp>

Inheritance diagram for BinningFeature:

Public Member Functions

 BinningFeature (detail::DownsamplingModule &module)
 Creates a BinningFeature for an existing downsampling module.
 
void SetEnabled (bool enabled) override
 Enables or disables the feature.
 
bool IsEnabled () const override
 Gets whether this feature is currently enabled.
 
void ResetToDefault () override
 Resets all settings to the default values.
 
void SetX (uint32_t x)
 Sets the number of columns used for binning.
 
void SetY (uint32_t y)
 Sets the number of rows used for binning.
 
uint32_t GetX () const
 Gets the current number of columns used for binning.
 
uint32_t GetY () const
 Gets the current number of rows used for binning.
 
peak::common::IntervalU GetRange () const
 Gets the valid range for the binning factors x and y.
 
void SetMode (const BinningMode &mode)
 Sets the BinningMode.
 
BinningMode GetMode () const
 Gets the current BinningMode.
 

Detailed Description

Binning is used to decrease the image size.

This method reduces resolution by summarizing or averaging groups of pixels in the horizontal (x) and/or vertical (y) directions. It helps preserve image quality by minimizing aliasing artifacts.

Note
Processes the entire image, ignoring any specified image region. The alpha channel of the input image (if present) is also ignored. This is because the alpha channel can have different interpretations — such as transparency, segmentation labels, or masks — each of which would require different handling during binning. Consequently, the alpha channel of the output image is always set to the maximum possible pixel value.
Warning
Binning permanently reduces image resolution. The original resolution cannot be recovered after binning is applied.

Defaults
See also
features::DecimationFeature, BinningMode
Since
ids_peak_icv 1.0

Definition at line 53 of file peak_icv_binning_feature.hpp.

Constructor & Destructor Documentation

◆ BinningFeature()

BinningFeature ( detail::DownsamplingModule & module)
inlineexplicit

Creates a BinningFeature for an existing downsampling module.

Parameters
moduleReference to the underlying detail::DownsamplingModule.
Since
ids_peak_icv 1.0

Definition at line 161 of file peak_icv_binning_feature.hpp.

Member Function Documentation

◆ GetMode()

BinningMode GetMode ( ) const
inline

Gets the current BinningMode.

Returns
The current BinningMode.
Since
ids_peak_icv 1.0

Definition at line 241 of file peak_icv_binning_feature.hpp.

◆ GetRange()

peak::common::IntervalU GetRange ( ) const
inline

Gets the valid range for the binning factors x and y.

The returned interval specifies the minimum and maximum values that can be passed to SetX or SetY.

Returns
An IntervalU representing the valid binning factor range.
Since
ids_peak_icv 1.0

Definition at line 220 of file peak_icv_binning_feature.hpp.

◆ GetX()

uint32_t GetX ( ) const
inline

Gets the current number of columns used for binning.

Returns
The current number of columns summarized/averaged during binning.
Since
ids_peak_icv 1.0

Definition at line 210 of file peak_icv_binning_feature.hpp.

◆ GetY()

uint32_t GetY ( ) const
inline

Gets the current number of rows used for binning.

Returns
The current number of rows summarized/averaged during binning.
Since
ids_peak_icv 1.0

Definition at line 215 of file peak_icv_binning_feature.hpp.

◆ IsEnabled()

bool IsEnabled ( ) const
inlineoverridevirtual

Gets whether this feature is currently enabled.

Returns
true if enabled; otherwise false.
Since
ids_peak_icv 1.0

Implements IFeature.

Definition at line 170 of file peak_icv_binning_feature.hpp.

◆ ResetToDefault()

void ResetToDefault ( )
inlineoverridevirtual

Resets all settings to the default values.

Note
The enabled state does not change when calling this function.
Since
ids_peak_icv 1.0

Implements IFeature.

Definition at line 175 of file peak_icv_binning_feature.hpp.

◆ SetEnabled()

void SetEnabled ( bool enabled)
inlineoverridevirtual

Enables or disables the feature.

Parameters
enabledSet to true to enable, or false to disable.
Since
ids_peak_icv 1.0

Implements IFeature.

Definition at line 165 of file peak_icv_binning_feature.hpp.

◆ SetMode()

void SetMode ( const BinningMode & mode)
inline

Sets the BinningMode.

Parameters
modeThe BinningMode to set.
Exceptions
NotSupportedExceptionIf the mode is an unsupported BinningMode.
Since
ids_peak_icv 1.0

Definition at line 225 of file peak_icv_binning_feature.hpp.

◆ SetX()

void SetX ( uint32_t x)
inline

Sets the number of columns used for binning.

Parameters
xAn integer value representing the number of columns summarized/averaged during binning. Valid values are within the range returned by GetRange.
Exceptions
OutOfRangeExceptionIf x is outside the valid range.
Since
ids_peak_icv 1.0

Definition at line 180 of file peak_icv_binning_feature.hpp.

◆ SetY()

void SetY ( uint32_t y)
inline

Sets the number of rows used for binning.

Parameters
yAn integer value representing the number of rows summarized/averaged during binning. Valid values are within the range returned by GetRange.
Exceptions
OutOfRangeExceptionIf y is outside the valid range.
Since
ids_peak_icv 1.0

Definition at line 195 of file peak_icv_binning_feature.hpp.