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

Public Member Functions | |
| DownsamplingModule () | |
| Creates a DownsamplingModule with default values. | |
| DownsamplingModule (DownsamplingMode defaultMode, std::string customName) | |
| Creates a DownsamplingModule with factors x = 1, y = 1 and the given downsampling mode and name. | |
| ~DownsamplingModule () override | |
| DownsamplingModule (const DownsamplingModule &other)=delete | |
| Copy constructor for class DownsamplingModule is deleted. | |
| DownsamplingModule (DownsamplingModule &&other) noexcept | |
| DownsamplingModule & | operator= (const DownsamplingModule &other)=delete |
| Copy assignment for class DownsamplingModule is deleted. | |
| DownsamplingModule & | operator= (DownsamplingModule &&other) noexcept |
| void | SetEnabled (bool enabled) override |
| Enables or disables the module. | |
| bool | IsEnabled () const override |
| Gets whether this module is currently enabled. | |
| 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. | |
| peak::icv::Image | Process (const peak::icv::Image &input) const |
| Applies the downsampling factors and mode to the input image and returns a downsampled copy based on current settings. | |
| peak::common::Any | Process (const peak::common::Any &input) const override |
| Applies the downsampling factors and mode to the input image and returns a downsampled copy based on current settings. | |
| const char * | GetType () const override |
| Returns the type of the module for serialization purposes or the custom type, if defined. | |
| void | SetCustomType (const std::string &type) |
| Sets the custom type of the module for serialization purposes. | |
| void | ResetToDefault () override |
| Resets all settings to their default values defined at initialization, i.e. x = 1, y = 1, and the initial downsampling mode. | |
| void | SetX (uint32_t x) |
| Sets the number of columns to downsample. | |
| void | SetY (uint32_t y) |
| Sets the number of rows to downsample. | |
| uint32_t | GetX () const |
| Returns the current number of columns used for downsampling. | |
| uint32_t | GetY () const |
| Returns the current number of rows used for downsampling. | |
| peak::common::IntervalU | GetRange () const |
| Returns the valid range for downsampling factors x and y. | |
| void | SetMode (const DownsamplingMode &mode) |
| Sets the DownsamplingMode. | |
| DownsamplingMode | GetMode () const |
| Returns the current DownsamplingMode. | |
Downsampling is used to decrease the image size.
This module provides comprehensive functionality for image downsampling, which is the process of reducing image resolution and dimensions. It supports multiple algorithms optimized for various use cases.
There are two basic techniques for downsampling:
The reduction factors are specified separately for the x (columns) and y (rows) directions.
Definition at line 110 of file peak_icv_downsampling_module.hpp.
|
inlineexplicit |
Creates a DownsamplingModule with default values.
Definition at line 481 of file peak_icv_downsampling_module.hpp.
|
inlineexplicit |
Creates a DownsamplingModule with factors x = 1, y = 1 and the given downsampling mode and name.
Definition at line 485 of file peak_icv_downsampling_module.hpp.
|
inlineoverride |
Definition at line 495 of file peak_icv_downsampling_module.hpp.
|
delete |
Copy constructor for class DownsamplingModule is deleted.
|
inlinenoexcept |
Definition at line 503 of file peak_icv_downsampling_module.hpp.
|
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.
| archive | The source archive containing the serialized parameters. |
| CorruptedException | If the archive is malformed, misses keys or the values are invalid |
| NotSupportedException | If the 'Version' entry indicates an unsupported version. |
Implements ISerializable.
Definition at line 552 of file peak_icv_downsampling_module.hpp.
|
inline |
Returns the current DownsamplingMode.
Definition at line 675 of file peak_icv_downsampling_module.hpp.
|
inline |
Returns the valid range for downsampling factors x and y.
Definition at line 656 of file peak_icv_downsampling_module.hpp.
|
inlineoverridevirtual |
Returns the type of the module for serialization purposes or the custom type, if defined.
Implements IModule.
Definition at line 604 of file peak_icv_downsampling_module.hpp.
|
inline |
Returns the current number of columns used for downsampling.
Definition at line 634 of file peak_icv_downsampling_module.hpp.
|
inline |
Returns the current number of rows used for downsampling.
Definition at line 645 of file peak_icv_downsampling_module.hpp.
|
inlineoverridevirtual |
Gets whether this module is currently enabled.
true if enabled; otherwise false.Implements IModule.
Definition at line 533 of file peak_icv_downsampling_module.hpp.
|
delete |
Copy assignment for class DownsamplingModule is deleted.
|
inlinenoexcept |
Definition at line 509 of file peak_icv_downsampling_module.hpp.
|
inlineoverridevirtual |
Applies the downsampling factors and mode to the input image and returns a downsampled copy based on current settings.
|
|
|
|
See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.
| input | The input image to be processed. |
| peak::common::InvalidCastException | If the input cast to peak::icv::Image failed. |
| NotSupportedException | If image has any other than the supported pixel formats. |
Implements IModule.
Definition at line 571 of file peak_icv_downsampling_module.hpp.
|
inline |
Applies the downsampling factors and mode to the input image and returns a downsampled copy based on current settings.
|
|
|
|
See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.
| input | The input image to be processed. |
| NotSupportedException | If image has any other than the supported pixel formats. |
Definition at line 566 of file peak_icv_downsampling_module.hpp.
|
inlineoverridevirtual |
Resets all settings to their default values defined at initialization, i.e. x = 1, y = 1, and the initial downsampling mode.
Implements IModule.
Definition at line 613 of file peak_icv_downsampling_module.hpp.
|
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.
| archive | The target archive that will store the serialized parameters. |
Implements ISerializable.
Definition at line 538 of file peak_icv_downsampling_module.hpp.
| void SetCustomType | ( | const std::string & | type | ) |
Sets the custom type of the module for serialization purposes.
| type | A string representing the module's type. |
|
inlineoverridevirtual |
Enables or disables the module.
| enabled | Set to true to enable, or false to disable. |
Implements IModule.
Definition at line 528 of file peak_icv_downsampling_module.hpp.
|
inline |
Sets the DownsamplingMode.
| mode | The DownsamplingMode to set. |
Definition at line 667 of file peak_icv_downsampling_module.hpp.
|
inline |
Sets the number of columns to downsample.
| x | The number of columns to downsample. |
Definition at line 620 of file peak_icv_downsampling_module.hpp.
|
inline |
Sets the number of rows to downsample.
| y | The number of rows to downsample. |
Definition at line 627 of file peak_icv_downsampling_module.hpp.