IDS peak ICV v1.1.0
Loading...
Searching...
No Matches
ModuleBase Class Reference
Inheritance diagram for ModuleBase:

Public Member Functions

None __init__ (self)
 Creates an instance of class ModuleBase.
 
int version (self)
 Return the module version.
 
bool enabled (self)
 Get whether this module is enabled.
 
None enabled (self, bool value)
 Enable or disable 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
 

Detailed Description

Base class for all pipeline modules.

Since
ids_peak_icv 1.0

Definition at line 8 of file module_base.py.

Constructor & Destructor Documentation

◆ __init__()

Member Function Documentation

◆ _raise_corrupted_archive_key_missing()

None _raise_corrupted_archive_key_missing ( self,
str missing_archive_key )
protected

Definition at line 112 of file module_base.py.

◆ _raise_version_is_not_supported()

None _raise_version_is_not_supported ( self,
str actual_version,
str expected_version )
protected

Definition at line 115 of file module_base.py.

◆ _validate_version()

None _validate_version ( self,
IArchive archive )
protected

Definition at line 105 of file module_base.py.

◆ deserialize()

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.

Parameters
archiveThe source archive containing the serialized parameters.
Exceptions
CorruptedExceptionIf Archive is malformed, misses keys or the values are invalid
NotSupportedExceptionIf the 'Version' entry indicates an unsupported version.
Note
This function requires that the archive contains all expected fields as produced by a corresponding serialize() call.
Since
ids_peak_icv 1.0

Reimplemented from ISerializable.

Reimplemented in ColorMatrixTransformationModule, DebayerModule, DownsamplingModule, GainModule, HotpixelCorrectionModule, PixelFormatConversionModule, SharpeningModule, ToneCurveCorrectionModule, TransformationModule, and UnpackModule.

Definition at line 85 of file module_base.py.

◆ enabled() [1/2]

bool enabled ( self)

Get whether this module is enabled.

When disabled, process returns the input image unchanged.

Returns
True if the module is enabled, False otherwise.
Since
ids_peak_icv 1.0

Reimplemented from IModule.

Reimplemented in ColorMatrixTransformationModule, ColorMatrixTransformationModule, HotpixelCorrectionModule, HotpixelCorrectionModule, ToneCurveCorrectionModule, ToneCurveCorrectionModule, TransformationModule, TransformationModule, UnpackModule, and UnpackModule.

Definition at line 40 of file module_base.py.

◆ enabled() [2/2]

None enabled ( self,
bool value )

Enable or disable the module.

When disabled, process returns the input image unchanged.

Parameters
valueTrue to enable, False to disable.
Since
ids_peak_icv 1.0

Reimplemented from IModule.

Reimplemented in ColorMatrixTransformationModule, ColorMatrixTransformationModule, HotpixelCorrectionModule, HotpixelCorrectionModule, ToneCurveCorrectionModule, ToneCurveCorrectionModule, TransformationModule, TransformationModule, UnpackModule, and UnpackModule.

Definition at line 54 of file module_base.py.

◆ serialize()

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.

Returns
The serialized module's internal state.
Since
ids_peak_icv 1.0

Reimplemented from ISerializable.

Reimplemented in ColorMatrixTransformationModule, DebayerModule, DownsamplingModule, GainModule, HotpixelCorrectionModule, PixelFormatConversionModule, SharpeningModule, ToneCurveCorrectionModule, TransformationModule, and UnpackModule.

Definition at line 69 of file module_base.py.

◆ version()

int version ( self)

Return the module version.

Returns
Module version.
Since
ids_peak_icv 1.0

Definition at line 28 of file module_base.py.

Field Documentation

◆ _enabled

bool _enabled = True
protected

Definition at line 24 of file module_base.py.

◆ enabled

◆ version

version

Definition at line 83 of file module_base.py.