IDS peak genericC++ v1.11.1
Loading...
Searching...
No Matches
peak Namespace Reference

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...

Namespaces

namespace  core
 The "core" namespace contains the direct GenAPI and GenTL wrapper.
 
namespace  dynamic
 

Classes

class  DeviceManager
 The global DeviceManager (singleton) searches all installed producer libraries (*.cti) and enumerates the modules contained in them. More...
 
class  Library
 A collection of global library functions. More...
 

Functions

template<>
peak::ipl::Image BufferTo< peak::ipl::Image > (const std::shared_ptr< peak::core::Buffer > &buffer)
 Converts a core::Buffer into a peak::ipl::Image.
 
template<>
peak::ipl::Image BufferPartTo (const std::shared_ptr< peak::core::BufferPart > &part)
 Converts a core::BufferPart into a peak::ipl::Image.
 
template<class OutType>
OutType BufferTo (const std::shared_ptr< peak::core::Buffer > &buffer)
 Converts a core::Buffer into a different type.
 
template<class OutType>
OutType BufferPartTo (const std::shared_ptr< peak::core::BufferPart > &bufferPart)
 Converts a core::BufferPart into a different type.
 

Detailed Description

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.

Function Documentation

◆ BufferPartTo() [1/2]

template<class OutType>
OutType peak::BufferPartTo ( const std::shared_ptr< peak::core::BufferPart > & bufferPart)

Converts a core::BufferPart into a different type.

This function converts the buffer part 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 part to a peak::ipl::Image, i.e. see file converters/peak_bufferpart_converter_ipl.hpp.

Usage:

auto image = peak::BufferPartTo<CustomImageType>(bufferPart);
peak::ipl::Image BufferPartTo(const std::shared_ptr< peak::core::BufferPart > &part)
Converts a core::BufferPart into a peak::ipl::Image.
Definition peak_bufferpart_converter_ipl.hpp:42
Parameters
[in]bufferPartA core::BufferPart that contains image data.
Returns
Image data in the requested image container/class.
Since
1.8
Exceptions
InvalidArgumentExceptionThe given buffer part is invalid.
InvalidCastExceptionThe given buffer part can not be casted to the requested OutType.
InternalErrorExceptionAn internal error has occurred.

◆ BufferPartTo() [2/2]

template<>
peak::ipl::Image peak::BufferPartTo ( const std::shared_ptr< peak::core::BufferPart > & part)
inline

Converts a core::BufferPart into a peak::ipl::Image.

This creates a peak::ipl::Image as a shallow copy of the buffer (i.e. using the same memory).

Parameters
[in]partThe buffer part to convert
Returns
The buffer part converted to an Image.
Remarks
Remember that the buffer part's memory is only under your control until you re-queue the buffer.
Since
1.8
Note
To use this method, this file needs to be included explicitly:

◆ BufferTo()

template<class OutType>
OutType peak::BufferTo ( const std::shared_ptr< peak::core::Buffer > & buffer)

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);
OutType BufferTo(const std::shared_ptr< peak::core::Buffer > &buffer)
Converts a core::Buffer into a different type.
Definition peak_buffer_converter.hpp:43
Parameters
[in]bufferA core::Buffer that contains image data.
Returns
Image data in the requested image container/class.
Since
1.0
Exceptions
InvalidArgumentExceptionThe given buffer is invalid.
InternalErrorExceptionAn internal error has occurred.

◆ BufferTo< peak::ipl::Image >()

template<>
peak::ipl::Image peak::BufferTo< peak::ipl::Image > ( const std::shared_ptr< peak::core::Buffer > & buffer)
inline

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).

Parameters
[in]bufferThe buffer to convert
Returns
The buffer converted to an Image.
Remarks
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: