The "peak" namespace directly contains convenience functionality like the DeviceManager as well as the global Library::Initialize() / Library::Close() functions, which must be called before/after usage of the library.
More...
|
| namespace | core |
| | The "core" namespace contains the direct GenAPI and GenTL wrapper.
|
| |
| namespace | dynamic |
| |
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as the global Library::Initialize() / Library::Close() functions, which must be called before/after usage of the library.
◆ BufferTo()
Converts a core::Buffer into a different type.
This function converts the buffer into the format requested as template argument. Implement a template specialization for your custom data type yourself. For an example, have a look at the implementation to convert the buffer to a peak::ipl::Image, i.e. see file converters/peak_buffer_converter_ipl.hpp.
Usage:
auto image = peak::BufferTo<CustomImageType>(buffer);
- Parameters
-
- Returns
- Image data in the requested image container/class.
- Since
- 1.0
- Exceptions
-
| InvalidArgumentException | The given buffer is invalid. |
| InternalErrorException | An internal error has occurred. |
◆ BufferTo< peak::ipl::Image >()
Converts a core::Buffer into a peak::ipl::Image.
This creates a peak::ipl::Image as a shallow copy of the buffer (i.e. using the same memory). Remember that the buffer's memory is only under your control until you re-queue the buffer.
- Note
- To use this method, this file needs to be included explicitly:
#include <peak/converters/peak_buffer_converter_peak_ipl_.hpp>