21class GainBackendAccessor;
287 friend GainBackendAccessor;
299class GainBackendAccessor
311 return gain.m_backendHandle;
341 : m_backendHandle{ gainHandle }
356 *
this = std::move(other);
361 if (other.m_backendHandle)
366 m_backendHandle = other.m_backendHandle;
378 if (other.m_backendHandle)
384 m_backendHandle = other.m_backendHandle;
393 if (m_backendHandle !=
nullptr)
398 m_backendHandle = other.m_backendHandle;
399 other.m_backendHandle =
nullptr;
408 m_backendHandle,
reinterpret_cast<float*
>(&masterGainValue));
413 float masterGainValue;
417 m_backendHandle,
reinterpret_cast<float*
>(&masterGainValue));
420 return masterGainValue;
428 m_backendHandle,
reinterpret_cast<float*
>(&masterGainMin));
431 return masterGainMin;
439 m_backendHandle,
reinterpret_cast<float*
>(&masterGainMax));
442 return masterGainMax;
448 m_backendHandle,
reinterpret_cast<float*
>(&redGainValue));
457 m_backendHandle,
reinterpret_cast<float*
>(&redGainValue));
486 m_backendHandle,
reinterpret_cast<float*
>(&greenGainValue));
491 float greenGainValue;
495 m_backendHandle,
reinterpret_cast<float*
>(&greenGainValue));
498 return greenGainValue;
506 m_backendHandle,
reinterpret_cast<float*
>(&greenGainMin));
517 m_backendHandle,
reinterpret_cast<float*
>(&greenGainMax));
526 m_backendHandle,
reinterpret_cast<float*
>(&blueGainValue));
535 m_backendHandle,
reinterpret_cast<float*
>(&blueGainValue));
538 return blueGainValue;
546 m_backendHandle,
reinterpret_cast<float*
>(&blueGainMin));
557 m_backendHandle,
reinterpret_cast<float*
>(&blueGainMax));
572 return isPixelFormatSupported > 0;
578 m_backendHandle, ImageBackendAccessor::BackendHandle(image));
586 m_backendHandle, ImageBackendAccessor::BackendHandle(inputImage), &outputImageHandle);
589 return ImageBackendAccessor::CreateImage(outputImageHandle);
Applies gain to the data.
Definition peak_ipl_gain.hpp:36
float GreenGainMin() const
Returns the minimum value of the green gain.
Definition peak_ipl_gain.hpp:500
float GreenGainValue() const
Returns the value of the green gain.
Definition peak_ipl_gain.hpp:489
~Gain()
Destructor for the Gain instance.
Definition peak_ipl_gain.hpp:346
void ProcessInPlace(Image &image) const
Applies the gain on the given image in place that is, it will change the input image.
Definition peak_ipl_gain.hpp:574
float BlueGainValue() const
Returns the value of the blue gain.
Definition peak_ipl_gain.hpp:529
Image Process(const Image &inputImage) const
Applies the gain on the given image.
Definition peak_ipl_gain.hpp:581
float MasterGainMax() const
Returns the maximum value of the master gain.
Definition peak_ipl_gain.hpp:433
Gain & operator=(const Gain &other)
Copy assigment for Gain instance.
Definition peak_ipl_gain.hpp:369
float MasterGainValue() const
Returns the value of the master gain.
Definition peak_ipl_gain.hpp:411
void SetRedGainValue(float redGainValue)
Sets the values of the red Gain.
Definition peak_ipl_gain.hpp:444
float BlueGainMax() const
Returns the maximum value of the blue gain.
Definition peak_ipl_gain.hpp:551
void SetMasterGainValue(float masterGainValue)
Sets the values of the master Gain.
Definition peak_ipl_gain.hpp:404
float GreenGainMax() const
Returns the maximum value of the green gain.
Definition peak_ipl_gain.hpp:511
float RedGainMin() const
Returns the minimum value of the red gain.
Definition peak_ipl_gain.hpp:462
float BlueGainMin() const
Returns the minimum value of the blue gain.
Definition peak_ipl_gain.hpp:540
float MasterGainMin() const
Returns the minimum value of the master gain.
Definition peak_ipl_gain.hpp:422
void SetGreenGainValue(float greenGainValue)
Sets the values of the green Gain.
Definition peak_ipl_gain.hpp:482
void SetBlueGainValue(float blueGainValue)
Sets the values of the blue Gain.
Definition peak_ipl_gain.hpp:522
float RedGainValue() const
Returns the value of the red gain.
Definition peak_ipl_gain.hpp:451
bool IsPixelFormatSupported(PixelFormatName pixelFormatName) const
Returns whether the gain supports the given pixel format.
Definition peak_ipl_gain.hpp:562
float RedGainMax() const
Returns the maximum value of the red gain.
Definition peak_ipl_gain.hpp:472
Gain()
Constructor for a new Gain instance.
Definition peak_ipl_gain.hpp:335
Stores the pixel format, width and height of an image and the pointer to the image buffer.
Definition peak_ipl_image.hpp:40
PixelFormatName
Enum holding the possible pixel format names.
Definition peak_ipl_simple_types.hpp:39
void ExecuteAndMapReturnCodes(const CallableType &callableObject)
Definition peak_ipl_exception.hpp:182
The "peak::ipl" namespace contains the whole image processing library.
Definition peak_ipl_binning.hpp:23
PEAK_IPL_C_API PEAK_IPL_Gain_GetRedGainMin(PEAK_IPL_GAIN_HANDLE gainHandle, float *redGainMin)
Returns the minimum red gain value which can be set.
PEAK_IPL_C_API PEAK_IPL_Gain_GetIsPixelFormatSupported(PEAK_IPL_GAIN_HANDLE gainHandle, PEAK_IPL_PIXEL_FORMAT pixelFormat, PEAK_IPL_BOOL8 *isPixelFormatSupported)
Asks the given gamma corrector whether it supports the given pixel format.
PEAK_IPL_C_API PEAK_IPL_Gain_GetRedGainMax(PEAK_IPL_GAIN_HANDLE gainHandle, float *redGainMax)
Returns the maximum red gain value which can be set.
PEAK_IPL_C_API PEAK_IPL_Gain_SetBlueGainValue(PEAK_IPL_GAIN_HANDLE gainHandle, float *blueGainValue)
Sets the value of the blue gain.
PEAK_IPL_C_API PEAK_IPL_Gain_GetGreenGainValue(PEAK_IPL_GAIN_HANDLE gainHandle, float *greenGainValue)
Returns the green gain value.
PEAK_IPL_C_API PEAK_IPL_Gain_GetRedGainValue(PEAK_IPL_GAIN_HANDLE gainHandle, float *redGainValue)
Returns the red gain value.
PEAK_IPL_C_API PEAK_IPL_Gain_SetGreenGainValue(PEAK_IPL_GAIN_HANDLE gainHandle, float *greenGainValue)
Sets the value of the green gain.
PEAK_IPL_C_API PEAK_IPL_Gain_Process(PEAK_IPL_GAIN_HANDLE gainHandle, PEAK_IPL_IMAGE_HANDLE imageHandle, PEAK_IPL_IMAGE_HANDLE *outputImageHandle)
Apply the gain on the given image.
PEAK_IPL_C_API PEAK_IPL_Gain_GetBlueGainMax(PEAK_IPL_GAIN_HANDLE gainHandle, float *blueGainMax)
Returns the maximum blue gain value which can be set.
PEAK_IPL_C_API PEAK_IPL_Gain_GetMasterGainMax(PEAK_IPL_GAIN_HANDLE gainHandle, float *masterGainMax)
Returns the maximum master gain value which can be set.
PEAK_IPL_C_API PEAK_IPL_Gain_SetMasterGainValue(PEAK_IPL_GAIN_HANDLE gainHandle, float *masterGainValue)
Sets the value of the master gain.
PEAK_IPL_C_API PEAK_IPL_Gain_GetGreenGainMax(PEAK_IPL_GAIN_HANDLE gainHandle, float *greenGainMax)
Returns the maximum green gain value which can be set.
PEAK_IPL_C_API PEAK_IPL_Gain_GetMasterGainMin(PEAK_IPL_GAIN_HANDLE gainHandle, float *masterGainMin)
Returns the minimum master gain value which can be set.
PEAK_IPL_C_API PEAK_IPL_Gain_Construct(PEAK_IPL_GAIN_HANDLE *gainHandle)
Creates a gain.
PEAK_IPL_C_API PEAK_IPL_Gain_GetBlueGainMin(PEAK_IPL_GAIN_HANDLE gainHandle, float *blueGainMin)
Returns the minimum blue gain value which can be set.
struct PEAK_IPL_GAIN * PEAK_IPL_GAIN_HANDLE
Definition peak_ipl_backend.h:353
struct PEAK_IPL_IMAGE * PEAK_IPL_IMAGE_HANDLE
Definition peak_ipl_backend.h:361
PEAK_IPL_C_API PEAK_IPL_Gain_GetMasterGainValue(PEAK_IPL_GAIN_HANDLE gainHandle, float *masterGainValue)
Returns the master gain value.
PEAK_IPL_C_API PEAK_IPL_Gain_ProcessInPlace(PEAK_IPL_GAIN_HANDLE gainHandle, PEAK_IPL_IMAGE_HANDLE imageHandle)
Apply the gain on the given image.
PEAK_IPL_C_API PEAK_IPL_Gain_Destruct(PEAK_IPL_GAIN_HANDLE gainHandle)
Destroys the gain associated with the given handle.
int8_t PEAK_IPL_BOOL8
Definition peak_ipl_backend.h:41
PEAK_IPL_C_API PEAK_IPL_Gain_GetBlueGainValue(PEAK_IPL_GAIN_HANDLE gainHandle, float *blueGainValue)
Returns the blue gain value.
#define PEAK_IPL_NO_DISCARD
Definition peak_ipl_backend.h:26
int32_t PEAK_IPL_PIXEL_FORMAT
Definition peak_ipl_backend.h:180
PEAK_IPL_C_API PEAK_IPL_Gain_SetRedGainValue(PEAK_IPL_GAIN_HANDLE gainHandle, float *redGainValue)
Sets the value of the red gain.
PEAK_IPL_C_API PEAK_IPL_Gain_Acquire(PEAK_IPL_GAIN_HANDLE gainHandle)
Increase the reference count of a gain object.
PEAK_IPL_C_API PEAK_IPL_Gain_GetGreenGainMin(PEAK_IPL_GAIN_HANDLE gainHandle, float *greenGainMin)
Returns the minimum green gain value which can be set.
#define PEAK_IPL_C_ABI_PREFIX
Definition peak_ipl_dll_defines.h:16