188 *
this = std::move(other);
195 if (other.m_backendHandle)
200 m_backendHandle = other.m_backendHandle;
212 if (other.m_backendHandle)
219 m_backendHandle = other.m_backendHandle;
228 if (m_backendHandle !=
nullptr)
232 m_backendHandle = other.m_backendHandle;
233 other.m_backendHandle =
nullptr;
243 m_backendHandle, reinterpret_cast<float*>(&gammaValue));
247 inline float GammaCorrector::GammaCorrectionValue()
const 253 m_backendHandle, reinterpret_cast<float*>(&gammaValue));
259 inline float GammaCorrector::GammaCorrectionMin()
const 265 m_backendHandle, reinterpret_cast<float*>(&gammaMin));
271 inline float GammaCorrector::GammaCorrectionMax()
const 277 m_backendHandle, reinterpret_cast<float*>(&gammaMax));
283 inline bool GammaCorrector::IsPixelFormatSupported(
PixelFormatName pixelFormatName)
const 289 static_cast<PEAK_IPL_PIXEL_FORMAT>(pixelFormatName),
290 reinterpret_cast<PEAK_IPL_BOOL8*>(&isPixelFormatSupported));
293 return isPixelFormatSupported > 0;
300 m_backendHandle, ImageBackendAccessor::BackendHandle(image));
304 inline Image GammaCorrector::Process(
const Image& inputImage)
const 309 m_backendHandle, ImageBackendAccessor::BackendHandle(inputImage), &outputImageHandle);
312 return ImageBackendAccessor::CreateImage(outputImageHandle);
#define PEAK_IPL_NO_DISCARD
Definition: peak_ipl_backend.h:26
PEAK_IPL_C_API PEAK_IPL_GammaCorrector_SetGammaCorrectionValue(PEAK_IPL_GAMMA_CORRECTOR_HANDLE gammaCorrectorHandle, float *gammaValue)
Sets the value of the gamma correction.
#define PEAK_IPL_C_ABI_PREFIX
Definition: peak_ipl_dll_defines.h:16
struct PEAK_IPL_GAMMA_CORRECTOR * PEAK_IPL_GAMMA_CORRECTOR_HANDLE
Definition: peak_ipl_backend.h:357
The "peak::ipl" namespace contains the whole image processing library.
Definition: peak_ipl_binning.hpp:22
PixelFormatName
Enum holding the possible pixel format names.
Definition: peak_ipl_simple_types.hpp:38
PEAK_IPL_C_API PEAK_IPL_GammaCorrector_Construct(PEAK_IPL_GAMMA_CORRECTOR_HANDLE *gammaCorrectorHandle)
Creates a gamma corrector.
PEAK_IPL_C_API PEAK_IPL_GammaCorrector_ProcessInPlace(PEAK_IPL_GAMMA_CORRECTOR_HANDLE gammaCorrectorHandle, PEAK_IPL_IMAGE_HANDLE imageHandle)
Corrects the gammas of the given image.
Applies gamma correction to the data.
Definition: peak_ipl_gamma_corrector.hpp:32
void ExecuteAndMapReturnCodes(const CallableType &callableObject)
Definition: peak_ipl_exception.hpp:182
void ProcessInPlace(Image &image) const
Corrects the gammas of the given image in place that is, it will change the input image...
Definition: peak_ipl_gamma_corrector.hpp:296
Stores the pixel format, width and height of an image and the pointer to the image buffer...
Definition: peak_ipl_image.hpp:39
PEAK_IPL_C_API PEAK_IPL_GammaCorrector_Destruct(PEAK_IPL_GAMMA_CORRECTOR_HANDLE gammaCorrectorHandle)
Destroys the gamma corrector associated with the given handle.
PEAK_IPL_C_API PEAK_IPL_GammaCorrector_GetIsPixelFormatSupported(PEAK_IPL_GAMMA_CORRECTOR_HANDLE gammaCorrectorHandle, 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_GammaCorrector_Acquire(PEAK_IPL_GAMMA_CORRECTOR_HANDLE gammaCorrectorHandle)
Increase the reference count of a gamma corrector object.
GammaCorrector & operator=(const GammaCorrector &other)
Copy assigment for GammaCorrector instance.
Definition: peak_ipl_gamma_corrector.hpp:203
~GammaCorrector()
Destructor for the GammaCorrector instance.
Definition: peak_ipl_gamma_corrector.hpp:178
struct PEAK_IPL_IMAGE * PEAK_IPL_IMAGE_HANDLE
Definition: peak_ipl_backend.h:361
PEAK_IPL_C_API PEAK_IPL_GammaCorrector_GetGammaCorrectionMin(PEAK_IPL_GAMMA_CORRECTOR_HANDLE gammaCorrectorHandle, float *gammaMin)
Returns the minimum gamma corrector value which can be set.
PEAK_IPL_C_API PEAK_IPL_GammaCorrector_GetGammaCorrectionMax(PEAK_IPL_GAMMA_CORRECTOR_HANDLE gammaCorrectorHandle, float *gammaMax)
Returns the maximum gamma corrector value which can be set.
int8_t PEAK_IPL_BOOL8
Definition: peak_ipl_backend.h:41
void SetGammaCorrectionValue(float gammaValue)
Sets the values of the gamma correction.
Definition: peak_ipl_gamma_corrector.hpp:239
PEAK_IPL_C_API PEAK_IPL_GammaCorrector_Process(PEAK_IPL_GAMMA_CORRECTOR_HANDLE gammaCorrectorHandle, PEAK_IPL_IMAGE_HANDLE imageHandle, PEAK_IPL_IMAGE_HANDLE *outputImageHandle)
Corrects the gammas of the given image.
PEAK_IPL_C_API PEAK_IPL_GammaCorrector_GetGammaCorrectionValue(PEAK_IPL_GAMMA_CORRECTOR_HANDLE gammaCorrectorHandle, float *gammaValue)
Returns the gamma corrector value.
GammaCorrector()
Constructor for a new GammaCorrector instance.
Definition: peak_ipl_gamma_corrector.hpp:173