IDS peak ICV v1.6.0
Loading...
Searching...
No Matches
MonoConversionModule Class Reference

#include <peak_icv/pipeline/detail/peak_icv_mono_conversion_module.hpp>

Inheritance diagram for MonoConversionModule:

Public Member Functions

 MonoConversionModule ()
 Creates an instance of class MonoConversion.
 
 ~MonoConversionModule () override
 
 MonoConversionModule (const MonoConversionModule &other)=delete
 Copy constructor for class MonoConversionModule is deleted.
 
 MonoConversionModule (MonoConversionModule &&other) noexcept
 
MonoConversionModule & operator= (const MonoConversionModule &other)=delete
 Copy assignment for class MonoConversionModule is deleted.
 
MonoConversionModule & operator= (MonoConversionModule &&other) noexcept
 
void Serialize (peak::common::serialization::IArchive &archive) const override
 Serializes the object's internal state into the provided archive.
 
void Deserialize (const peak::common::serialization::IArchive &archive) override
 Restores the object's state from the provided archive.
 
void SetEnabled (bool enabled) override
 Enables or disables the module.
 
bool IsEnabled () const override
 Gets whether this module is currently enabled.
 
const char * GetType () const override
 Returns the type of the module for serialization purposes.
 
void ResetToDefault () override
 Calling this method has no effect.
 
peak::icv::Image Process (const peak::icv::Image &input) const
 Converts the input image to the configured output pixel format.
 
peak::common::Any Process (const peak::common::Any &input) const override
 Converts the input image to the configured output pixel format.
 
void ReleaseBuffers () const
 Frees unused internal buffers.
 

Detailed Description

Mono conversion is an image pipeline module that converts images to a monochrome format.

The mono conversion module performs a mono (grayscale) conversion on input images. When enabled, it converts the input image to a mono format while preserving the input bit depth. If disabled, the input image is passed through unchanged.

Since
ids_peak_icv 1.0

Constructor & Destructor Documentation

◆ MonoConversionModule() [1/3]

Creates an instance of class MonoConversion.

Since
ids_peak_icv 1.0

◆ ~MonoConversionModule()

~MonoConversionModule ( )
inlineoverride
Since
ids_peak_icv 1.0

◆ MonoConversionModule() [2/3]

MonoConversionModule ( const MonoConversionModule & other)
delete

Copy constructor for class MonoConversionModule is deleted.

Note
If you need to copy a module, you can create a new one and copy the parameters via Serialize() and Deserialize().
Since
ids_peak_icv 1.0

◆ MonoConversionModule() [3/3]

MonoConversionModule ( MonoConversionModule && other)
inlinenoexcept
Since
ids_peak_icv 1.0

Member Function Documentation

◆ Deserialize()

void Deserialize ( const peak::common::serialization::IArchive & archive)
inlineoverridevirtual

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

Implements ISerializable.

◆ GetType()

const char * GetType ( ) const
inlineoverridevirtual

Returns the type of the module for serialization purposes.

Returns
A string representing the module's type.
Since
ids_peak_icv 1.0

Implements IModule.

◆ IsEnabled()

bool IsEnabled ( ) const
inlineoverridevirtual

Gets whether this module is currently enabled.

Returns
true if enabled; otherwise false.
Since
ids_peak_icv 1.0

Implements IModule.

◆ operator=() [1/2]

MonoConversionModule & operator= ( const MonoConversionModule & other)
delete

Copy assignment for class MonoConversionModule is deleted.

Note
If you need to copy a module, you can create a new one and copy the parameters via Serialize() and Deserialize().
Since
ids_peak_icv 1.0

◆ operator=() [2/2]

MonoConversionModule & operator= ( MonoConversionModule && other)
inlinenoexcept
Since
ids_peak_icv 1.0

◆ Process() [1/2]

peak::common::Any Process ( const peak::common::Any & input) const
inlineoverridevirtual

Converts the input image to the configured output pixel format.

Note
This operation disregards any specified image regions and processes the full image.
Parameters
inputThe input image to convert.
Returns
Converted image in the configured pixel format.
Exceptions
peak::common::InvalidCastExceptionIf the input cast to peak::icv::Image failed.
Since
ids_peak_icv 1.0

Implements IModule.

◆ Process() [2/2]

peak::icv::Image Process ( const peak::icv::Image & input) const
inline

Converts the input image to the configured output pixel format.

Note
This operation disregards any specified image regions and processes the full image.
Parameters
inputThe input image to convert.
Returns
Converted image in the configured pixel format.
Since
ids_peak_icv 1.0

◆ ReleaseBuffers()

void ReleaseBuffers ( ) const
inline

Frees unused internal buffers.

This module uses pre-allocated internal buffers to accelerate conversions. When the image size or pixel format changes, new buffers are allocated, which may cause the internal buffer pool to grow over time. This function can be used to release unused buffers and reduce memory usage.

Note
Avoid calling this function too frequently (e.g., after every resize or format change), as it introduces some overhead.
Since
ids_peak_icv 1.0

◆ ResetToDefault()

void ResetToDefault ( )
inlineoverridevirtual

Calling this method has no effect.

Since
ids_peak_icv 1.0

Implements IModule.

◆ Serialize()

void Serialize ( peak::common::serialization::IArchive & archive) const
inlineoverridevirtual

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.
Since
ids_peak_icv 1.0

Implements ISerializable.

◆ SetEnabled()

void SetEnabled ( bool enabled)
inlineoverridevirtual

Enables or disables the module.

Parameters
enabledSet to true to enable, or false to disable.
Since
ids_peak_icv 1.0

Implements IModule.