1from __future__
import annotations
11 Decimation is used to decrease the image size.
13 @supportedPixelformats{Downsampling}
15 This method reduces resolution by selecting (i.e., skipping) pixels at regular intervals
16 along columns (x), rows (y) or both.
17 It is computationally efficient but may introduce aliasing.
19 @note Processes the entire image, ignoring any specified image region.
20 @note As with binning, the alpha channel of the input image (if present) is also ignored during decimation.
21 It is always set to the maximum possible pixel value.
22 @note Decimation permanently reduces image resolution. The original resolution cannot be recovered
23 after decimation is applied.
25 Default Configuration:
28 - DownsamplingMode.Decimation
30 @since ids_peak_icv 1.0
31 @ingroup ids_peak_icv_python_pipeline_features
34 def __init__(self, module: DownsamplingModule) ->
None:
37 Creates a DecimationFeature for an existing downsampling module.
39 @param module: module Reference to the underlying DownsamplingModule.
48 Indicates whether the feature is currently enabled.
49 @return True if enabled; otherwise, False.
57 Enables or disables the feature.
58 @param value: Set to True to enable the feature, or False to disable it.
65 Resets all settings to the default configuration:
68 - DownsamplingMode.Decimation
70 @note The enabled state does not change when calling this function.
80 Gets the current number of columns used for decimation.
82 @return The current number of columns used for decimation.
83 The decimation algorithm uses one column, skips the next x - 1 columns, and repeats this process.
88 def x(self, value: int) ->
None:
91 Sets the number of columns used for decimation.
93 @param value: The number of columns used for decimation.
94 The decimation algorithm uses one column, skips the next x - 1 columns, and repeats this process.
95 Valid values are within the range returned by object.range.
97 @exception OutOfRangeException: If value is outside the valid range.
105 Gets the current number of rows used for decimation.
106 @return The current number of rows used for decimation.
107 The decimation algorithm uses one row, skips the next y - 1 rows, and repeats this process.
112 def y(self, value: int) ->
None:
115 Sets the number of rows used for decimation.
117 @param value: The number of rows used for decimation.
118 The decimation algorithm uses one row, skips the next y - 1 rows, and repeats this process.
119 Valid values are within the range returned by object.range.
121 @exception OutOfRangeException: If value is outside the valid range.
129 Gets the valid range for the decimation factors x and y.
131 The returned interval specifies the minimum and maximum values that can be passed to the property x or y.
133 @return An IntervalU representing the valid decimation factor range.
Decimation is used to decrease the image size.
None reset_to_default(self)
Resets all settings to the default configuration:
None __init__(self, DownsamplingModule module)
Creates a DecimationFeature for an existing downsampling module.
int y(self)
Gets the current number of rows used for decimation.
bool enabled(self)
Indicates whether the feature is currently enabled.
int x(self)
Gets the current number of columns used for decimation.
Interval range(self)
Gets the valid range for the decimation factors x and y.
Abstract base class for all image processing pipeline features.