IDS peak genericC++ v1.14.0
Loading...
Searching...
No Matches
Acquisition

Provides classes and utilities for acquiring, managing, and interpreting image and data buffers from devices. This includes access to data streams, buffer handling, and convenient conversions of raw or structured buffer contents into usable image representations. More...

Classes

class  peak::core::Buffer
 Represents a GenTL buffer module. More...
class  peak::core::BufferChunk
 Represents a buffer chunk. More...
class  peak::core::BufferPart
 Represents a buffer part. More...
class  peak::core::DataStream
 Represents a GenTL DataStream module. More...
class  peak::core::DataStreamDescriptor
 Encapsulates the GenTL functions associated with a GenTL DataStream module's ID. More...
class  peak::core::ImageView
 Implementation of the peak::common::IImageView interface for viewing image pixel data from arbitrary sources. More...

Enumerations

enum class  peak::core::BufferPayloadType {
  peak::core::BufferPayloadType::Unknown ,
  peak::core::BufferPayloadType::Image ,
  peak::core::BufferPayloadType::RawData ,
  peak::core::BufferPayloadType::File ,
  peak::core::BufferPayloadType::Chunk ,
  peak::core::BufferPayloadType::JPEG ,
  peak::core::BufferPayloadType::JPEG2000 ,
  peak::core::BufferPayloadType::H264 ,
  peak::core::BufferPayloadType::ChunkOnly ,
  peak::core::BufferPayloadType::DeviceSpecific ,
  peak::core::BufferPayloadType::MultiPart ,
  peak::core::BufferPayloadType::Custom = 1000
}
 Payload type of buffer. More...
enum class  peak::core::PixelFormatNamespace {
  peak::core::PixelFormatNamespace::GEV = 1 ,
  peak::core::PixelFormatNamespace::IIDC ,
  peak::core::PixelFormatNamespace::PFNC16Bit ,
  peak::core::PixelFormatNamespace::PFNC32Bit ,
  peak::core::PixelFormatNamespace::Custom = 1000
}
 The namespace needed to interpret the pixel format value of the buffer. More...
enum class  peak::core::BufferPartType {
  peak::core::BufferPartType::Unknown ,
  peak::core::BufferPartType::Image2D ,
  peak::core::BufferPartType::PlaneBiPlanar2D ,
  peak::core::BufferPartType::PlaneTriPlanar2D ,
  peak::core::BufferPartType::PlaneQuadPlanar2D ,
  peak::core::BufferPartType::Image3D ,
  peak::core::BufferPartType::PlaneBiPlanar3D ,
  peak::core::BufferPartType::PlaneTriPlanar3D ,
  peak::core::BufferPartType::PlaneQuadPlanar3D ,
  peak::core::BufferPartType::ConfidenceMap ,
  peak::core::BufferPartType::Custom = 1000
}
 Data type of the buffer part. More...

Functions

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

Detailed Description

Provides classes and utilities for acquiring, managing, and interpreting image and data buffers from devices. This includes access to data streams, buffer handling, and convenient conversions of raw or structured buffer contents into usable image representations.

Enumeration Type Documentation

◆ BufferPartType

enum class peak::core::BufferPartType
strong

Data type of the buffer part.

See GenTL PARTDATATYPE_IDS.

Enumerator
Unknown 
Image2D 
PlaneBiPlanar2D 
PlaneTriPlanar2D 
PlaneQuadPlanar2D 
Image3D 
PlaneBiPlanar3D 
PlaneTriPlanar3D 
PlaneQuadPlanar3D 
ConfidenceMap 
Custom 

◆ BufferPayloadType

enum class peak::core::BufferPayloadType
strong

Payload type of buffer.

See GenTL PAYLOADTYPE_INFO_IDS.

Enumerator
Unknown 
Image 
RawData 
File 
Chunk 
JPEG 
JPEG2000 
H264 
ChunkOnly 
DeviceSpecific 
MultiPart 
Custom 

◆ PixelFormatNamespace

The namespace needed to interpret the pixel format value of the buffer.

See GenTL PIXELFORMAT_NAMESPACE_IDS.

Enumerator
GEV 
IIDC 
PFNC16Bit 
PFNC32Bit 
Custom 

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::icv::Image BufferPartTo(const std::shared_ptr< peak::core::BufferPart > &part)
Converts a core::BufferPart into a peak::ipl::Image.
Definition peak_bufferpart_converter_icv.hpp:44
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::icv::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:44
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::icv::Image >()

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

Converts a core::Buffer into a peak::icv::Image.

This creates a peak::icv::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.
Since
1.12
Note
To use this method, this file needs to be included explicitly:

◆ 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: