IDS peak ICV v1.4.0
Loading...
Searching...
No Matches
GainModule Class Reference
Inheritance diagram for GainModule:

Data Structures

class  Handle
 

Public Member Functions

 GainModule ()
 Creates an instance of class GainModule.
 
void Dispose ()
 Releases all resources used by this class.
 
override void Serialize (IArchive archive)
 Serializes the object's internal state into the provided archive.
 
override void Deserialize (IArchive archive)
 Restores the object's state from the provided archive.
 
override object Process (object input)
 Applies the gains to the input image in place and returns a reference to the modified image.
 
override void ResetToDefault ()
 Resets all parameters to their default values.
 
override Image Process (Image input)
 Applies the gains to the input image in place and returns a reference to the modified image.
 

Properties

IntervalF Range [get]
 Gets the valid range for the master or color gains.
 
override string TypeId [get]
 The unique type identifier for this module implementation.This should be a unique string identifying the specific implementation of the module.
 
override bool IsEnabled [get, set]
 Gets or sets whether the module is enabled.
 
float Master [get, set]
 The current master gain value.
 
float Red [get, set]
 The current red gain value.
 
float Green [get, set]
 The current green gain value.
 
float Blue [get, set]
 The current blue gain value.
 
int Version = 1 [get]
 The module version.
 

Detailed Description

Image pipeline module for applying gain to the image.

A gain module consists of a master gain applied to all channels, along with individual gain values for the red, green, and blue channels.

Since
IDSImaging.Peak.ICV 1.3

Constructor & Destructor Documentation

◆ GainModule()

GainModule ( )
inline

Creates an instance of class GainModule.

Member Function Documentation

◆ Deserialize()

override void Deserialize ( IArchive archive)
inlinevirtual

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.

Note
This function requires that the archive contains all expected fields as produced by a corresponding Serialize call.
Parameters
archiveThe source archive containing the serialized parameters.
Exceptions
IcvCorruptedExceptionThe archive is malformed, misses keys or the values are invalid.
IcvNotSupportedExceptionThe Version entry indicates an unsupported version.
IcvOutOfRangeExceptionThe values are outside of the valid range.

Reimplemented from ModuleBase.

◆ Dispose()

void Dispose ( )
inline

Releases all resources used by this class.

◆ Process() [1/2]

override Image Process ( Image input)
inline

Applies the gains to the input image in place and returns a reference to the modified image.

The correction is performed based on the current configuration of the module. The operation modifies the input image directly and does not create a copy.

Note
Supported pixel formats: BayerRG8, BayerRG10, BayerRG12, BayerGR8, BayerGR10, BayerGR12, BayerBG8, BayerBG10, BayerBG12, BayerGB8, BayerGB10, BayerGB12, Mono8, Mono10, Mono12, Mono16.
Note
This operation disregards any specified image regions and processes the entire image.
Parameters
inputThe input image to be processed and corrected.
Returns
A reference to the input image after in-place gain correction.
Exceptions
IcvNotSupportedExceptionThrown when input has any other than the supported pixel formats.

◆ Process() [2/2]

override object Process ( object input)
inlinevirtual

Applies the gains to the input image in place and returns a reference to the modified image.

The correction is performed based on the current configuration of the module. The operation modifies the input image directly and does not create a copy.

Note
Supported pixel formats: BayerRG8, BayerRG10, BayerRG12, BayerGR8, BayerGR10, BayerGR12, BayerBG8, BayerBG10, BayerBG12, BayerGB8, BayerGB10, BayerGB12, Mono8, Mono10, Mono12, Mono16.
Note
This operation disregards any specified image regions and processes the entire image.
Parameters
inputThe input image to be processed and corrected.
Returns
A reference to the input image after in-place gain correction.
Exceptions
IcvNotSupportedExceptionThe input is not an Image or has any other than the supported pixel formats.

Reimplemented from ModuleBase.

◆ ResetToDefault()

override void ResetToDefault ( )
inlinevirtual

Resets all parameters to their default values.

Default values:

Note
The enabled state does not change when calling this function.

Reimplemented from ModuleBase.

◆ Serialize()

override void Serialize ( IArchive archive)
inlinevirtual

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.

Parameters
archiveThe target archive that will store the serialized parameters.

Reimplemented from ModuleBase.

Property Documentation

◆ Blue

float Blue
getset

The current blue gain value.

Sets the color gain for the blue channel. The valid range for the gain value can be obtained using the Range function.

Exceptions
IcvOutOfRangeExceptionThe value is outside the valid range.

Implements IGain.

◆ Green

float Green
getset

The current green gain value.

Sets the color gain for the green channel. The valid range for the gain value can be obtained using the Range function.

Exceptions
IcvOutOfRangeExceptionThe value is outside the valid range.

Implements IGain.

◆ IsEnabled

override bool IsEnabled
getset

Gets or sets whether the module is enabled.

Implements IModule.

◆ Master

float Master
getset

The current master gain value.

Sets the overall master gain. The valid range for the gain value can be obtained using the Range function.

Exceptions
IcvOutOfRangeExceptionThe value is outside the valid range.

Implements IGain.

◆ Range

Gets the valid range for the master or color gains.

Provides the minimum and maximum values that are accepted by the Master, Red, Green and the Blue functions.

◆ Red

float Red
getset

The current red gain value.

Sets the color gain for the red channel. The valid range for the gain value can be obtained using the Range function.

Exceptions
IcvOutOfRangeExceptionThe value is outside the valid range.

Implements IGain.

◆ TypeId

override string TypeId
get

The unique type identifier for this module implementation.This should be a unique string identifying the specific implementation of the module.

Implements IModule.

◆ Version

int Version = 1
getinherited

The module version.