1from __future__
import annotations
3from abc
import ABC, abstractmethod
9 Abstract base class for all image processing pipeline features.
11 IFeature defines the common interface that all pipeline features must implement.
12 Features represent configurable image processing operations that can be enabled
13 or disabled within an image processing pipeline.
15 Each feature provides:
16 - Enable/disable functionality through the `enabled` property
17 - Reset capability to restore default settings via `reset_to_default()`
18 - Feature-specific configuration methods (implemented in derived classes)
20 Features are typically used within a pipeline context where they can be
21 selectively enabled or disabled to customize the image processing workflow.
22 When a feature is disabled, it has no effect on the processed image.
25 - All derived classes must implement the three abstract methods:
26 `enabled` (getter/setter) and `reset_to_default`.
27 - The enabled state is independent of the feature's configuration.
28 Calling `reset_to_default()` will reset the feature's parameters
29 to their default values but will not change the enabled/disabled state.
32 # Assuming we have a concrete feature implementation
33 feature = SomeConcreteFeature()
35 feature.enabled = True
38 # Feature will be applied during processing
40 # Reset to default configuration (but keep enabled state)
41 feature.reset_to_default()
44 @since ids_peak_icv 1.0
45 @ingroup ids_peak_icv_python_pipeline_features
53 Indicates whether the feature is currently enabled.
55 @return True if enabled; otherwise False.
57 @since ids_peak_icv 1.0
66 Enables or disables the feature.
67 @param value: Set to True to enable the feature, or False to disable it.
69 @since ids_peak_icv 1.0
77 Restores the feature's default values.
78 The enabled state does not change when calling this function.
80 @since ids_peak_icv 1.0
Abstract base class for all image processing pipeline features.
None reset_to_default(self)
Restores the feature's default values.
bool enabled(self)
Indicates whether the feature is currently enabled.