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

Public Member Functions

None __init__ (self)
 Initializes a MonoConversionModule with default settings.
 
None __del__ (self)
 
str type (self)
 Returns the type of the module (used for serialization or UI).
 
None reset_to_default (self)
 Does nothing.
 
Image process (self, Image input_image)
 Converts the input image to the configured output pixel format.
 
None release_buffers (self)
 Frees unused internal buffers.
 

Data Fields

 enabled
 

Static Protected Member Functions

PixelFormat _get_output_format (PixelFormat input_pixel_format)
 

Protected Attributes

 _handle = image_converter_handle
 

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

Definition at line 11 of file mono_conversion_module.py.

Constructor & Destructor Documentation

◆ __init__()

None __init__ ( self)

Initializes a MonoConversionModule with default settings.

Since
ids_peak_icv 1.0

Reimplemented from ModuleBase.

Definition at line 22 of file mono_conversion_module.py.

◆ __del__()

None __del__ ( self)

Definition at line 37 of file mono_conversion_module.py.

Member Function Documentation

◆ _get_output_format()

PixelFormat _get_output_format ( PixelFormat input_pixel_format)
staticprotected

Definition at line 113 of file mono_conversion_module.py.

◆ process()

Image process ( self,
Image input_image )

Converts the input image to the configured output pixel format.

This operation disregards any specified image regions and processes the full image.

Parameters
input_imageThe input image to convert.
Returns
Converted image in the configured pixel format.
Since
ids_peak_icv 1.0

Reimplemented from IModule.

Definition at line 62 of file mono_conversion_module.py.

◆ release_buffers()

None release_buffers ( self)

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.

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

Definition at line 91 of file mono_conversion_module.py.

◆ reset_to_default()

None reset_to_default ( self)

Does nothing.

Since
ids_peak_icv 1.0

Reimplemented from IModule.

Definition at line 53 of file mono_conversion_module.py.

◆ type()

str type ( self)

Returns the type of the module (used for serialization or UI).

Returns
Module type.
Since
ids_peak_icv 1.0

Reimplemented from IModule.

Definition at line 42 of file mono_conversion_module.py.

Field Documentation

◆ _handle

_handle = image_converter_handle
protected

Definition at line 35 of file mono_conversion_module.py.

◆ enabled

enabled

Definition at line 75 of file mono_conversion_module.py.