
Public Member Functions | |
| None | __init__ (self) |
| Creates an instance of class ModuleBase. | |
| int | version (self) |
| Return the module version. | |
| bool | enabled (self) |
| Gets whether this module is enabled. | |
| None | enabled (self, bool enabled) |
| Enables or disables the module. | |
| None | serialize (self, IArchive archive) |
| Serializes the object's internal state into the provided archive. | |
| None | deserialize (self, IArchive archive) |
| Restores the object's state from the provided archive. | |
Data Fields | |
| enabled | |
| version | |
Protected Member Functions | |
| None | _validate_version (self, IArchive archive) |
| None | _raise_corrupted_archive_key_missing (self, str missing_archive_key) |
| None | _raise_version_is_not_supported (self, str actual_version, str expected_version) |
Protected Attributes | |
| bool | _enabled = True |
Base class for all pipeline modules.
| None __init__ | ( | self | ) |
Creates an instance of class ModuleBase.
Reimplemented in ColorMatrixTransformationModule, DebayerModule, DownsamplingModule, GainModule, HotpixelCorrectionModule, MonoConversionModule, PixelFormatConversionModule, SharpeningModule, ToneCurveCorrectionModule, TransformationModule, and UnpackModule.
|
protected |
|
protected |
|
protected |
| None deserialize | ( | self, | |
| IArchive | archive ) |
Restores the object's state from the provided archive.
This function reads and applies all necessary parameters from the given archive to reconstruct the internal state of the object. It ensures that the object is restored to a valid and consistent state.
| archive | The source archive containing the serialized parameters. |
| CorruptedException | If Archive is malformed, misses keys or the values are invalid. |
| NotSupportedException | If the 'Version' entry indicates an unsupported version. |
Reimplemented in ColorMatrixTransformationModule, DebayerModule, DownsamplingModule, GainModule, HotpixelCorrectionModule, PixelFormatConversionModule, SharpeningModule, ToneCurveCorrectionModule, TransformationModule, and UnpackModule.
| bool enabled | ( | self | ) |
Gets whether this module is enabled.
When disabled, process returns the input image unchanged.
Reimplemented in ColorMatrixTransformationModule, ColorMatrixTransformationModule, HotpixelCorrectionModule, HotpixelCorrectionModule, ToneCurveCorrectionModule, ToneCurveCorrectionModule, TransformationModule, TransformationModule, UnpackModule, and UnpackModule.
| None enabled | ( | self, | |
| bool | enabled ) |
Enables or disables the module.
When disabled, process returns the input image unchanged.
| enabled | True to enable, False to disable. |
Reimplemented in ColorMatrixTransformationModule, ColorMatrixTransformationModule, HotpixelCorrectionModule, HotpixelCorrectionModule, ToneCurveCorrectionModule, ToneCurveCorrectionModule, TransformationModule, TransformationModule, UnpackModule, and UnpackModule.
| None serialize | ( | self, | |
| IArchive | archive ) |
Serializes the object's internal state into the provided archive.
This function populates the given archive with all parameters required to fully represent the current state of the object. It ensures that the object can be reconstructed or transmitted accurately by saving all relevant data members in a consistent and structured format.
| archive | The target archive that will store the serialized parameters. |
Reimplemented in ColorMatrixTransformationModule, DebayerModule, DownsamplingModule, GainModule, HotpixelCorrectionModule, PixelFormatConversionModule, SharpeningModule, ToneCurveCorrectionModule, TransformationModule, and UnpackModule.
| int version | ( | self | ) |
Return the module version.
Reimplemented in ColorMatrixTransformationModule.
|
protected |
| enabled |
| version |
Reimplemented in ColorMatrixTransformationModule.