IDS peak ICV v1.2.0
Loading...
Searching...
No Matches
BinningFeature Class Reference
Inheritance diagram for BinningFeature:

Public Member Functions

None __init__ (self, DownsamplingModule module)
 Creates a BinningFeature for an existing downsampling module.
 
bool enabled (self)
 Indicates whether the feature is currently enabled.
 
None enabled (self, bool value)
 Enables or disables the feature.
 
None reset_to_default (self)
 Resets all settings to the default configuration:
 
int x (self)
 Gets the current number of columns used for binning.
 
None x (self, int value)
 Sets the number of columns used for binning.
 
int y (self)
 Gets the current number of rows used for binning.
 
None y (self, int value)
 Sets the number of rows used for binning.
 
BinningMode mode (self)
 Gets the current BinningMode.
 
None mode (self, BinningMode value)
 Sets the BinningMode.
 
Interval range (self)
 Gets the valid range for the binning factors x and y.
 

Protected Attributes

 _module = module
 

Detailed Description

Binning is used to decrease the image size.

Supported pixel formats
  • BayerGR8
  • BayerGR10
  • BayerGR12
  • BayerRG8
  • BayerRG10
  • BayerRG12
  • BayerGB8
  • BayerGB10
  • BayerGB12
  • BayerBG8
  • BayerBG10
  • BayerBG12
  • Mono8
  • Mono10
  • Mono12
  • Mono16
  • Confidence8
  • Confidence16
  • Coord3D_C8
  • Coord3D_C16
  • Coord3D_C32f
  • Coord3D_ABC32f
  • RGB8
  • RGB10
  • RGB12
  • BGR8
  • BGR10
  • BGR12
  • RGBa8
  • RGBa10
  • RGBa12
  • BGRa8
  • BGRa10
  • BGRa12
  • Mono32fIDS
  • RGB32fIDS

See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.

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.
Binning permanently reduces image resolution. The original resolution cannot be recovered after binning is applied.

Default configuration:

  • x = 1
  • y = 1
  • BinningMode.BinningAverage
Since
ids_peak_icv 1.0

Definition at line 39 of file binning_feature.py.

Constructor & Destructor Documentation

◆ __init__()

None __init__ ( self,
DownsamplingModule module )

Creates a BinningFeature for an existing downsampling module.

Parameters
moduleReference to the underlying DownsamplingModule.
Since
ids_peak_icv 1.0

Definition at line 70 of file binning_feature.py.

Member Function Documentation

◆ enabled() [1/2]

bool enabled ( self)

Indicates whether the feature is currently enabled.

Returns
True if enabled; otherwise, False.
Since
ids_peak_icv 1.0

Reimplemented from IFeature.

Definition at line 82 of file binning_feature.py.

◆ enabled() [2/2]

None enabled ( self,
bool value )

Enables or disables the feature.

Parameters
valueSet to True to enable the feature, or False to disable it.
Since
ids_peak_icv 1.0

Reimplemented from IFeature.

Definition at line 93 of file binning_feature.py.

◆ mode() [1/2]

BinningMode mode ( self)

Gets the current BinningMode.

Returns
The current BinningMode.
Since
ids_peak_icv 1.0

Definition at line 170 of file binning_feature.py.

◆ mode() [2/2]

None mode ( self,
BinningMode value )

Sets the BinningMode.

Parameters
valueThe BinningMode to set.
Since
ids_peak_icv 1.0

Definition at line 182 of file binning_feature.py.

◆ range()

Interval range ( self)

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 object.x or object.y.

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

Definition at line 194 of file binning_feature.py.

◆ reset_to_default()

None reset_to_default ( self)

Resets all settings to the default configuration:

  • x = 1
  • y = 1
  • BinningMode.BinningAverage
Note
The enabled state does not change when calling this function.
Since
ids_peak_icv 1.0

Reimplemented from IFeature.

Definition at line 103 of file binning_feature.py.

◆ x() [1/2]

int x ( self)

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 118 of file binning_feature.py.

◆ x() [2/2]

None x ( self,
int value )

Sets the number of columns used for binning.

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

Definition at line 130 of file binning_feature.py.

◆ y() [1/2]

int y ( self)

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 144 of file binning_feature.py.

◆ y() [2/2]

None y ( self,
int value )

Sets the number of rows used for binning.

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

Definition at line 156 of file binning_feature.py.

Field Documentation

◆ _module

_module = module
protected

Definition at line 79 of file binning_feature.py.