241 if (other.m_backendHandle)
246 m_backendHandle = other.m_backendHandle;
258 if (other.m_backendHandle)
265 m_backendHandle = other.m_backendHandle;
272 *
this = std::move(other);
279 if (m_backendHandle !=
nullptr)
284 m_backendHandle = other.m_backendHandle;
285 other.m_backendHandle =
nullptr;
301 inline uint8_t Binning::BinningX()
const 310 inline uint8_t Binning::BinningY()
const 319 inline uint8_t Binning::BinningMin()
const 329 inline uint8_t Binning::BinningMax()
const 344 inputSize.
width, inputSize.
height, static_cast<PEAK_IPL_PIXEL_FORMAT>(pixelFormat));
350 inline bool Binning::IsPixelFormatSupported(
PixelFormatName pixelFormatName)
const 356 static_cast<PEAK_IPL_PIXEL_FORMAT>(pixelFormatName),
357 reinterpret_cast<PEAK_IPL_BOOL8*>(&isPixelFormatSupported));
360 return isPixelFormatSupported > 0;
363 inline Image Binning::Process(
const Image& inputImage)
const 368 m_backendHandle, ImageBackendAccessor::BackendHandle(inputImage), &outputImageHandle);
371 return ImageBackendAccessor::CreateImage(outputImageHandle);
378 m_backendHandle, reinterpret_cast<PEAK_IPL_BINNINGMODE*>(&mode));
388 m_backendHandle, reinterpret_cast<PEAK_IPL_BINNINGMODE*>(&value));
#define PEAK_IPL_NO_DISCARD
Definition: peak_ipl_backend.h:26
PEAK_IPL_C_API PEAK_IPL_Binning_SetBinningX(PEAK_IPL_BINNING_HANDLE binningHandle, uint8_t *binningXValue)
Sets the value of binning in horizontal direction.
PEAK_IPL_C_API PEAK_IPL_Binning_Construct(PEAK_IPL_BINNING_HANDLE *binningHandle)
Creates a binning.
PEAK_IPL_C_API PEAK_IPL_Binning_IsPixelformatSupported(PEAK_IPL_BINNING_HANDLE binningHandle, PEAK_IPL_PIXEL_FORMAT pixelFormat, PEAK_IPL_BOOL8 *isPixelFormatSupported)
Asks the given binning whether it supports the given pixel format.
PEAK_IPL_C_API PEAK_IPL_Binning_GetBinningMax(PEAK_IPL_BINNING_HANDLE binningHandle, uint8_t *binningMax)
Returns the maximum binning value which can be set.
PEAK_IPL_C_API PEAK_IPL_Binning_SetBinningMode(PEAK_IPL_BINNING_HANDLE binningHandle, PEAK_IPL_BINNINGMODE *mode)
Sets the value of binning mode.
#define PEAK_IPL_C_ABI_PREFIX
Definition: peak_ipl_dll_defines.h:16
size_t height
Height of size.
Definition: peak_ipl_simple_types.hpp:210
Definition: peak_ipl_binning.hpp:27
Binning & operator=(const Binning &other)
Copy assigment for Binning instance.
Definition: peak_ipl_binning.hpp:249
PEAK_IPL_C_API PEAK_IPL_Binning_GetBinningMin(PEAK_IPL_BINNING_HANDLE binningHandle, uint8_t *binningMin)
Returns the minimum binning value which can be set.
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_Binning_ExpectedOutputSize(PEAK_IPL_BINNING_HANDLE binningHandle, size_t *outputWidth, size_t *outputHeight, size_t inputWidth, size_t inputHeight, PEAK_IPL_PIXEL_FORMAT pixelFormat)
Returns the size of a binned image given the input size and pixelformat.
void ExecuteAndMapReturnCodes(const CallableType &callableObject)
Definition: peak_ipl_exception.hpp:182
2D size of an image.
Definition: peak_ipl_simple_types.hpp:207
Stores the pixel format, width and height of an image and the pointer to the image buffer...
Definition: peak_ipl_image.hpp:39
struct PEAK_IPL_IMAGE * PEAK_IPL_IMAGE_HANDLE
Definition: peak_ipl_backend.h:361
PEAK_IPL_C_API PEAK_IPL_Binning_SetBinningY(PEAK_IPL_BINNING_HANDLE binningHandle, uint8_t *binningYValue)
Sets the value of binning in vertical direction.
void SetBinningY(uint8_t value)
Sets the values of the binning in vertical direction.
Definition: peak_ipl_binning.hpp:296
int8_t PEAK_IPL_BOOL8
Definition: peak_ipl_backend.h:41
PEAK_IPL_C_API PEAK_IPL_Binning_GetBinningY(PEAK_IPL_BINNING_HANDLE binningHandle, uint8_t *binningYValue)
Returns the value of binning in vertical direction.
BinningMode
Mode parameter for the binning algorithm.
Definition: peak_ipl_binning.hpp:35
PEAK_IPL_C_API PEAK_IPL_Binning_Destruct(PEAK_IPL_BINNING_HANDLE binningHandle)
Destroys the binning associated with the given handle.
PEAK_IPL_C_API PEAK_IPL_Binning_GetBinningMode(PEAK_IPL_BINNING_HANDLE binningHandle, PEAK_IPL_BINNINGMODE *mode)
Returns the value of binning mode.
void SetBinningX(uint8_t value)
Sets the values of the binning in horizontal direction.
Definition: peak_ipl_binning.hpp:291
PEAK_IPL_C_API PEAK_IPL_Binning_GetBinningX(PEAK_IPL_BINNING_HANDLE binningHandle, uint8_t *binningXValue)
Returns the value of binning in horizontal direction.
PEAK_IPL_C_API PEAK_IPL_Binning_Acquire(PEAK_IPL_BINNING_HANDLE binningHandle)
Increase the reference count of a binning object.
~Binning()
Destructor for the Binning instance.
Definition: peak_ipl_binning.hpp:231
size_t width
Width of size.
Definition: peak_ipl_simple_types.hpp:209
Binning()
Constructor for a new Binning instance.
Definition: peak_ipl_binning.hpp:226
PEAK_IPL_C_API PEAK_IPL_Binning_Process(PEAK_IPL_BINNING_HANDLE binningHandle, PEAK_IPL_IMAGE_HANDLE imageHandle, PEAK_IPL_IMAGE_HANDLE *outputImageHandle)
Apply the binning on the given image.
Average (mean) of pixels.
struct PEAK_IPL_BINNING * PEAK_IPL_BINNING_HANDLE
Definition: peak_ipl_backend.h:341
void SetMode(BinningMode mode)
Sets the values of the binning mode.
Definition: peak_ipl_binning.hpp:374