IDS peak ICV v1.6.0
Loading...
Searching...
No Matches
PixelFormatConversionModule Class Reference
Inheritance diagram for PixelFormatConversionModule:

Public Member Functions

 PixelFormatConversionModule ()
 Creates an instance of class PixelFormatConversionModule.
 
void Dispose ()
 Releases all resources used by this class.
 
override Image Process (Image inputImage)
 Converts the input image to the configured output pixel format.
 
void ReleaseBuffers ()
 Frees unused internal buffers.
 
override void ResetToDefault ()
 Resets the output pixel format to its default value ( PixelFormat.RGB8).
 
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.
 
virtual object Process (object input)
 Processes input data and returns the result.This function is called by the pipeline to process a unit of data.
 

Static Public Attributes

const PixelFormat DefaultOutputPixelFormat = PixelFormat.RGB8
 The default output pixel format.
 

Properties

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.
 
PixelFormat OutputPixelFormat = DefaultOutputPixelFormat [get, set]
 The desired output pixel format.
 
int Version = 1 [get]
 The module version.
 
virtual bool IsEnabled = true [get, set]
 Get whether this module is enabled.
 

Detailed Description

Pixel format conversion module that transforms images to a specified output pixel format.

The pixel format conversion module allows explicit control over the output pixel format.

Default pixel format: IDSImaging.Peak.Common.Types.PixelFormat.RGB8

Since
IDSImaging.Peak.ICV 1.3

Constructor & Destructor Documentation

◆ PixelFormatConversionModule()

Creates an instance of class PixelFormatConversionModule.

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.

Reimplemented from ModuleBase.

◆ Dispose()

void Dispose ( )
inline

Releases all resources used by this class.

◆ Process() [1/2]

virtual object Process ( object input)
inlinevirtualinherited

Processes input data and returns the result.This function is called by the pipeline to process a unit of data.

Implements IModule.

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

◆ Process() [2/2]

override Image Process ( Image inputImage)
inline

Converts the input image to the configured output pixel format.

Note
This operation disregards any specified image regions and processes the entire image.
Parameters
inputImageThe input image to convert.
Returns
The converted image in the specified pixel format.

◆ ReleaseBuffers()

void ReleaseBuffers ( )
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.

◆ ResetToDefault()

override void ResetToDefault ( )
inlinevirtual

Resets the output pixel format to its default value ( PixelFormat.RGB8).

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.

Field Documentation

◆ DefaultOutputPixelFormat

const PixelFormat DefaultOutputPixelFormat = PixelFormat.RGB8
static

The default output pixel format.

Property Documentation

◆ IsEnabled

virtual bool IsEnabled = true
getsetinherited

Get whether this module is enabled.

When disabled, Process returns the input image unchanged.

Implements IModule.

◆ OutputPixelFormat

PixelFormat OutputPixelFormat = DefaultOutputPixelFormat
getset

The desired output pixel format.

◆ 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.