219 uint8_t* outputImageBuffer,
size_t outputImageBufferSize)
const;
242 double factor,
double offset = 0.0)
const;
268 uint8_t* outputImageBuffer,
size_t outputImageBufferSize,
double factor,
double offset = 0.0)
const;
339 const peak::ipl::PixelFormat& outputPixelFormat,
const size_t width,
const size_t height,
const size_t imageCount)
355 if (other.m_backendHandle)
360 m_backendHandle = other.m_backendHandle;
372 if (other.m_backendHandle)
379 m_backendHandle = other.m_backendHandle;
386 *
this = std::move(other);
393 if (m_backendHandle !=
nullptr)
398 m_backendHandle = other.m_backendHandle;
399 other.m_backendHandle =
nullptr;
407 const size_t imageCount)
425 return conversionMode;
444 std::vector<PixelFormatName> supportedOutputPixelFormats(size);
451 return supportedOutputPixelFormats;
459 ImageBackendAccessor::BackendHandle(inputImage),
463 return ImageBackendAccessor::CreateImage(outputImageHandle);
467 uint8_t* outputImageBuffer,
size_t outputImageBufferSize)
const
472 ImageBackendAccessor::BackendHandle(inputImage),
474 outputImageBufferSize, &outputImageHandle);
477 return ImageBackendAccessor::CreateImage(outputImageHandle);
485 ImageBackendAccessor::BackendHandle(inputImage),
487 interval.
End(), &outputImageHandle);
490 return ImageBackendAccessor::CreateImage(outputImageHandle);
499 ImageBackendAccessor::BackendHandle(inputImage), interval.
Start(), interval.
End(),
501 outputImageBufferSize, &outputImageHandle);
504 return ImageBackendAccessor::CreateImage(outputImageHandle);
508 const Image& inputImage,
const PixelFormat& outputPixelFormat,
double factor,
double offset)
const
513 ImageBackendAccessor::BackendHandle(inputImage),
517 return ImageBackendAccessor::CreateImage(outputImageHandle);
521 uint8_t* outputImageBuffer,
size_t outputImageBufferSize,
double factor,
double offset)
const
526 ImageBackendAccessor::BackendHandle(inputImage), factor, offset,
528 outputImageBufferSize, &outputImageHandle);
531 return ImageBackendAccessor::CreateImage(outputImageHandle);
peak::ipl::ConversionMode ConversionMode() const
Returns the current conversion mode.
Definition peak_ipl_image_converter.hpp:416
~ImageConverter()
Destructor for the ImageConverter instance.
Definition peak_ipl_image_converter.hpp:345
ImageConverter & operator=(const ImageConverter &other)
Copy assigment for ImageConverter instance.
Definition peak_ipl_image_converter.hpp:363
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:454
ImageConverter()
Constructor for a new ImageConverter instance.
Definition peak_ipl_image_converter.hpp:333
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:405
void SetConversionMode(peak::ipl::ConversionMode conversionMode)
Set conversion mode.
Definition peak_ipl_image_converter.hpp:428
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:436
Stores the pixel format, width and height of an image and the pointer to the image buffer.
Definition peak_ipl_image.hpp:47
Interval support and convenience class.
Definition peak_ipl_interval.hpp:38
constexpr T End() const
Get the end value (inclusive) for the interval.
Definition peak_ipl_interval.hpp:81
constexpr T Start() const
Get the start value (inclusive) for the interval.
Definition peak_ipl_interval.hpp:69
ConversionMode
Enum holding the possible conversion modes.
Definition peak_ipl_simple_types.hpp:32
@ Fast
Fast conversion mode.
Definition peak_ipl_simple_types.hpp:33
The "peak::ipl" namespace contains the whole image processing library.
void ExecuteAndMapReturnCodes(const CallableType &callableObject)
Definition peak_ipl_exception.hpp:289
#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:405
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:373
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