216 uint8_t* outputImageBuffer,
size_t outputImageBufferSize)
const;
239 double factor,
double offset = 0.0)
const;
265 uint8_t* outputImageBuffer,
size_t outputImageBufferSize,
double factor,
double offset = 0.0)
const;
336 const peak::ipl::PixelFormat& outputPixelFormat,
const size_t width,
const size_t height,
const size_t imageCount)
352 if (other.m_backendHandle)
357 m_backendHandle = other.m_backendHandle;
369 if (other.m_backendHandle)
376 m_backendHandle = other.m_backendHandle;
383 *
this = std::move(other);
390 if (m_backendHandle !=
nullptr)
395 m_backendHandle = other.m_backendHandle;
396 other.m_backendHandle =
nullptr;
404 const size_t imageCount)
422 return conversionMode;
441 std::vector<PixelFormatName> supportedOutputPixelFormats(size);
448 return supportedOutputPixelFormats;
456 ImageBackendAccessor::BackendHandle(inputImage),
460 return ImageBackendAccessor::CreateImage(outputImageHandle);
464 uint8_t* outputImageBuffer,
size_t outputImageBufferSize)
const
469 ImageBackendAccessor::BackendHandle(inputImage),
471 outputImageBufferSize, &outputImageHandle);
474 return ImageBackendAccessor::CreateImage(outputImageHandle);
482 ImageBackendAccessor::BackendHandle(inputImage),
484 interval.
End(), &outputImageHandle);
487 return ImageBackendAccessor::CreateImage(outputImageHandle);
496 ImageBackendAccessor::BackendHandle(inputImage), interval.
Start(), interval.
End(),
498 outputImageBufferSize, &outputImageHandle);
501 return ImageBackendAccessor::CreateImage(outputImageHandle);
505 const Image& inputImage,
const PixelFormat& outputPixelFormat,
double factor,
double offset)
const
510 ImageBackendAccessor::BackendHandle(inputImage),
514 return ImageBackendAccessor::CreateImage(outputImageHandle);
518 uint8_t* outputImageBuffer,
size_t outputImageBufferSize,
double factor,
double offset)
const
523 ImageBackendAccessor::BackendHandle(inputImage), factor, offset,
525 outputImageBufferSize, &outputImageHandle);
528 return ImageBackendAccessor::CreateImage(outputImageHandle);
peak::ipl::ConversionMode ConversionMode() const
Returns the current conversion mode.
Definition peak_ipl_image_converter.hpp:413
~ImageConverter()
Destructor for the ImageConverter instance.
Definition peak_ipl_image_converter.hpp:342
ImageConverter & operator=(const ImageConverter &other)
Copy assigment for ImageConverter instance.
Definition peak_ipl_image_converter.hpp:360
Image Convert(const Image &inputImage, const peak::ipl::PixelFormat &outputPixelFormat) const
Converts the given inputImage to the specified outputPixelFormat.
Definition peak_ipl_image_converter.hpp:451
ImageConverter()
Constructor for a new ImageConverter instance.
Definition peak_ipl_image_converter.hpp:330
void PreAllocateConversion(const peak::ipl::PixelFormat &inputPixelFormat, const peak::ipl::PixelFormat &outputPixelFormat, size_t width, size_t height, size_t imageCount=5)
Pre-allocate buffer pools needed for the specified conversion.
Definition peak_ipl_image_converter.hpp:402
void SetConversionMode(peak::ipl::ConversionMode conversionMode)
Set conversion mode.
Definition peak_ipl_image_converter.hpp:425
std::vector< peak::ipl::PixelFormatName > SupportedOutputPixelFormatNames(const peak::ipl::PixelFormat &inputPixelFormat) const
Returns the supported output pixel formats for a given input pixel format.
Definition peak_ipl_image_converter.hpp:433
Stores the pixel format, width and height of an image and the pointer to the image buffer.
Definition peak_ipl_image.hpp:41
Interval support and convenience class.
Definition peak_ipl_interval.hpp:35
constexpr T End() const
Get the end value (inclusive) for the interval.
Definition peak_ipl_interval.hpp:78
constexpr T Start() const
Get the start value (inclusive) for the interval.
Definition peak_ipl_interval.hpp:66
Definition peak_ipl_binning.hpp:25
ConversionMode
Enum holding the possible conversion modes.
Definition peak_ipl_simple_types.hpp:29
@ Fast
Fast conversion mode.
Definition peak_ipl_simple_types.hpp:30
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
#define PEAK_IPL_NO_DISCARD
Definition peak_ipl_attribute_defines.h:25
PEAK_IPL_C_API PEAK_IPL_ImageConverter_GetSupportedOutputPixelFormats(PEAK_IPL_IMAGE_CONVERTER_HANDLE imageConverterHandle, PEAK_IPL_PIXEL_FORMAT inputPixelFormat, PEAK_IPL_PIXEL_FORMAT *outputPixelFormats, size_t *outputPixelFormatsSize)
Queries the supported output pixel formats for a given input pixel format.
PEAK_IPL_C_API PEAK_IPL_ImageConverter_ConvertWithFactorAndOffset(PEAK_IPL_IMAGE_CONVERTER_HANDLE imageConverterHandle, PEAK_IPL_IMAGE_HANDLE inputImageHandle, PEAK_IPL_PIXEL_FORMAT outputPixelFormat, double factor, double offset, PEAK_IPL_IMAGE_HANDLE *outputImageHandle)
Creates a new image containing the data of the current image converted to the given pixel format mult...
PEAK_IPL_C_API PEAK_IPL_ImageConverter_Convert(PEAK_IPL_IMAGE_CONVERTER_HANDLE imageConverterHandle, PEAK_IPL_IMAGE_HANDLE inputImageHandle, PEAK_IPL_PIXEL_FORMAT outputPixelFormat, PEAK_IPL_IMAGE_HANDLE *outputImageHandle)
Creates a new image containing the data of the input image converted to the given pixel format.
PEAK_IPL_C_API PEAK_IPL_ImageConverter_Construct(PEAK_IPL_IMAGE_CONVERTER_HANDLE *imageConverterHandle)
Creates an image converter.
PEAK_IPL_C_API PEAK_IPL_ImageConverter_Acquire(PEAK_IPL_IMAGE_CONVERTER_HANDLE imageConverterHandle)
Increase the reference count of an image converter.
int32_t PEAK_IPL_CONVERSION_MODE
Definition peak_ipl_backend.h:55
PEAK_IPL_C_API PEAK_IPL_ImageConverter_ConvertToBuffer(PEAK_IPL_IMAGE_CONVERTER_HANDLE imageConverterHandle, PEAK_IPL_IMAGE_HANDLE inputImageHandle, PEAK_IPL_PIXEL_FORMAT outputPixelFormat, uint8_t *outputImageBuffer, size_t outputImageBufferSize, PEAK_IPL_IMAGE_HANDLE *outputImageHandle)
Creates a new image containing the data of the input image converted to the given pixel format.
PEAK_IPL_C_API PEAK_IPL_ImageConverter_PreAllocateConversion(PEAK_IPL_IMAGE_CONVERTER_HANDLE imageConverterHandle, PEAK_IPL_PIXEL_FORMAT inputPixelFormat, PEAK_IPL_PIXEL_FORMAT outputPixelFormat, size_t width, size_t height, size_t imageCount)
Pre-allocates internal buffer pools for the specified conversion.
PEAK_IPL_C_API PEAK_IPL_ImageConverter_SetConversionMode(PEAK_IPL_IMAGE_CONVERTER_HANDLE imageConverterHandle, PEAK_IPL_CONVERSION_MODE conversionMode)
Sets the given image converter's conversion mode.
struct PEAK_IPL_IMAGE * PEAK_IPL_IMAGE_HANDLE
Definition peak_ipl_backend.h:388
PEAK_IPL_C_API PEAK_IPL_ImageConverter_Destruct(PEAK_IPL_IMAGE_CONVERTER_HANDLE imageConverterHandle)
Destroys the image converter associated with the given handle.
int32_t PEAK_IPL_PIXEL_FORMAT
Definition peak_ipl_backend.h:173
PEAK_IPL_C_API PEAK_IPL_ImageConverter_ConvertFromInterval(PEAK_IPL_IMAGE_CONVERTER_HANDLE imageConverterHandle, PEAK_IPL_IMAGE_HANDLE inputImageHandle, PEAK_IPL_PIXEL_FORMAT outputPixelFormat, double start, double end, PEAK_IPL_IMAGE_HANDLE *outputImageHandle)
Converts the given imageHandle to the specified outputPixelFormat. The pixel values are mapped from t...
PEAK_IPL_C_API PEAK_IPL_ImageConverter_ConvertToBufferFromInterval(PEAK_IPL_IMAGE_CONVERTER_HANDLE imageConverterHandle, PEAK_IPL_IMAGE_HANDLE inputImageHandle, double start, double end, PEAK_IPL_PIXEL_FORMAT outputPixelFormat, uint8_t *outputImageBuffer, size_t outputImageBufferSize, PEAK_IPL_IMAGE_HANDLE *outputImageHandle)
Converts the given imageHandle to the specified outputPixelFormat into an existing outputImageBuffer....
PEAK_IPL_C_API PEAK_IPL_ImageConverter_ConvertToBufferWithFactorAndOffset(PEAK_IPL_IMAGE_CONVERTER_HANDLE imageConverterHandle, PEAK_IPL_IMAGE_HANDLE inputImageHandle, double factor, double offset, PEAK_IPL_PIXEL_FORMAT outputPixelFormat, uint8_t *outputImageBuffer, size_t outputImageBufferSize, PEAK_IPL_IMAGE_HANDLE *outputImageHandle)
Converts the given imageHandle to the specified outputPixelFormat into an existing outputImageBuffer ...
struct PEAK_IPL_IMAGE_CONVERTER * PEAK_IPL_IMAGE_CONVERTER_HANDLE
Definition peak_ipl_backend.h:356
PEAK_IPL_C_API PEAK_IPL_ImageConverter_GetConversionMode(PEAK_IPL_IMAGE_CONVERTER_HANDLE imageConverterHandle, PEAK_IPL_CONVERSION_MODE *conversionMode)
Queries the given image converter's current conversion mode.
#define PEAK_IPL_C_ABI_PREFIX
Definition peak_ipl_dll_defines.h:16