Classes | |
class | Buffer |
The buffer class encapsulates a Genicam buffer that is provided by a stream. More... | |
class | CPort |
This is the port definition that connects GenAPI to GenTL. More... | |
class | Device |
The device class encapsulates a Genicam device. More... | |
class | GenTLException |
class | GenTLWrapper |
Wrapper for dynamically loaded GenICam transport layers. More... | |
class | Image |
The image class encapsulates image information. More... | |
class | ImageList |
An object of this class manages a limited number of images. More... | |
class | Interface |
The interface class encapsulates a Genicam interface. More... | |
class | Stream |
The stream class encapsulates a Genicam stream. More... | |
class | System |
The system class encapsulates a Genicam transport layer. More... | |
Functions | |
std::shared_ptr< GenApi::CNodeMapRef > | allocNodeMap (std::shared_ptr< const GenTLWrapper > gentl, void *port, CPort *cport, const char *xml=0) |
Convenience function that returns a GenICam node map from the given port. More... | |
bool | callCommand (const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, bool exception=false) |
Calls the given command. More... | |
void | checkFeature (const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, const char *value, bool igncache=false) |
Checks the value of given feature and throws an exception in case of a mismatch. More... | |
bool | convertImage (uint8_t *rgb_out, uint8_t *mono_out, const uint8_t *raw, uint64_t pixelformat, size_t width, size_t height, size_t xpadding) |
Converts image to RGB and monochrome format. More... | |
void | convYCbCr411toQuadRGB (uint8_t rgb[12], const uint8_t *row, int i) |
Conversion of a group of four pixels from YCbCr411 format (6 bytes for four pixels) to RGB. More... | |
void | convYCbCr411toRGB (uint8_t rgb[3], const uint8_t *row, int i) |
Conversion of one pixel from YCbCr411 format (6 bytes for four pixels) to RGB. More... | |
std::string | ensureNewFileName (std::string name) |
This method checks if the given file name already exists and produces a new file name if this happens. More... | |
std::vector< std::string > | getAvailableGenTLs (const char *paths) |
The function uses the given list files of paths that is separated by colons or semicolons, depending on the used operating system, and returns all files with the suffix .cti. More... | |
bool | getBoolean (const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, bool exception=false, bool igncache=false) |
Get the value of a boolean feature of the given nodemap. More... | |
std::shared_ptr< GenApi::CChunkAdapter > | getChunkAdapter (const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const std::string &tltype) |
NOTE: This function is deprecated. More... | |
void | getColor (uint8_t rgb[3], const std::shared_ptr< const Image > &img, uint32_t ds, uint32_t i, uint32_t k) |
Expects an image in Mono8 or YCbCr411_8 format and returns the color as RGB value at the given pixel location. More... | |
std::string | getComponetOfPart (const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const Buffer *buffer, uint32_t ipart) |
std::shared_ptr< Device > | getDevice (const char *devid) |
Searches across all transport layers and interfaces for a device. More... | |
std::vector< std::shared_ptr< Device > > | getDevices () |
Returns a list of all devices that are available across all transport layers and interfaces. More... | |
std::string | getEnum (const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, bool exception=false) |
Get the value of an enumeration of the given nodemap. More... | |
std::string | getEnum (const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, std::vector< std::string > &list, bool exception=false) |
Get the current value and list of possible values of an enumeration of the given nodemap. More... | |
double | getFloat (const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, double *vmin=0, double *vmax=0, bool exception=false, bool igncache=false) |
Get the value of a double feature of the given nodemap. More... | |
int64_t | getInteger (const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, int64_t *vmin=0, int64_t *vmax=0, bool exception=false, bool igncache=false) |
Get the value of an integer feature of the given nodemap. More... | |
std::string | getString (const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, bool exception=false, bool igncache=false) |
Get the value of a feature of the given nodemap. More... | |
bool | isHostBigEndian () |
bool | setBoolean (const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, bool value, bool exception=false) |
Set the value of a boolean feature of the given nodemap. More... | |
bool | setEnum (const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, const char *value, bool exception=false) |
Set the value of an enumeration of the given nodemap. More... | |
bool | setFloat (const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, double value, bool exception=false) |
Set the value of a float feature of the given nodemap. More... | |
bool | setInteger (const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, int64_t value, bool exception=false) |
Set the value of an integer feature of the given nodemap. More... | |
bool | setIPV4Address (const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, const char *value, bool exception) |
Set the value of an integer feature of the given nodemap from an IP address. More... | |
bool | setString (const std::shared_ptr< GenApi::CNodeMapRef > &nodemap, const char *name, const char *value, bool exception=false) |
Set the value of a feature of the given nodemap. More... | |
std::string | storeImage (const std::string &name, ImgFmt fmt, const Image &image, size_t yoffset=0, size_t height=0) |
Stores the given image. More... | |
std::string | storeImageAsDisparityPFM (const std::string &name, const Image &image, int inv, float scale, float offset) |
Stores the given image as disparity. More... | |
void | storePointCloud (std::string name, double f, double t, double scale, std::shared_ptr< const Image > left, std::shared_ptr< const Image > disp, std::shared_ptr< const Image > conf, std::shared_ptr< const Image > error) |
enum rcg::ImgFmt |
Enumerator | |
---|---|
PNM | |
PNG |
Definition at line 46 of file image_store.h.
Enumeration describing which data type is present in given buffer part as taken from GenTL 1.5 definition.
See Buffer::getPartDataType().
Payload types as taken from GenTL 1.5 definition.
Pixelformat namespace IDs as taken from GenTL 1.5 definition.
See Buffer::getPixelFormatNamespace().
Enumerator | |
---|---|
PIXELFORMAT_NAMESPACE_UNKNOWN | |
PIXELFORMAT_NAMESPACE_GEV | |
PIXELFORMAT_NAMESPACE_IIDC | |
PIXELFORMAT_NAMESPACE_PFNC_16BIT | |
PIXELFORMAT_NAMESPACE_PFNC_32BIT | |
PIXELFORMAT_NAMESPACE_CUSTOM_ID |
std::shared_ptr< GenApi::CNodeMapRef > rcg::allocNodeMap | ( | std::shared_ptr< const GenTLWrapper > | gentl, |
void * | port, | ||
CPort * | cport, | ||
const char * | xml = 0 |
||
) |
Convenience function that returns a GenICam node map from the given port.
gentl | Pointer to GenTL Wrapper. |
port | Pointer to module or remote port. |
cport | Pointer to CPort Wrapper. |
xml | Path and name for storing the received XML file or 0 if xml file should not be stored. |
bool rcg::callCommand | ( | const std::shared_ptr< GenApi::CNodeMapRef > & | nodemap, |
const char * | name, | ||
bool | exception = false |
||
) |
Calls the given command.
nodemap | Initialized nodemap. |
name | Name of command. |
exception | True if an error should be signaled via exception instead of a return value. |
void rcg::checkFeature | ( | const std::shared_ptr< GenApi::CNodeMapRef > & | nodemap, |
const char * | name, | ||
const char * | value, | ||
bool | igncache = false |
||
) |
Checks the value of given feature and throws an exception in case of a mismatch.
The check succeeds if the feature does not exist.
nodemap | Feature nodemap. |
name | Name of feature. |
value | Expected value of feature. |
igncache | True if value is always read from the device, even if cached. |
bool rcg::convertImage | ( | uint8_t * | rgb_out, |
uint8_t * | mono_out, | ||
const uint8_t * | raw, | ||
uint64_t | pixelformat, | ||
size_t | width, | ||
size_t | height, | ||
size_t | xpadding | ||
) |
Converts image to RGB and monochrome format.
Supported input pixel formats are:
Mono8, Confidence8, Error8, YCbCr411, RGB8, BayerRG8, BayerBG8, BayerGR8, BayerGB8
rgb_out | Pointer to target array for rgb image. The array must have a size of 3*width*height pixel. The pointer can be 0. |
mono_out | Pointer to target array for monochrome image. The array must have a size of width*height pixel. The pointer can be 0. |
raw | Pointer to input pixels. |
pixelformat | Pixel format of input. |
width | Width of image. |
height | Height of image. |
xpadding | Padding of input image. |
void rcg::convYCbCr411toQuadRGB | ( | uint8_t | rgb[12], |
const uint8_t * | row, | ||
int | i | ||
) |
Conversion of a group of four pixels from YCbCr411 format (6 bytes for four pixels) to RGB.
Conversion of four pixels is a bit more efficient than conversions of individual pixels.
rgb | Pointer to an array of size 3 for storing the result. |
row | Image row. |
i | Index of first pixel in row that should be converted. The index must be a multiple of 4! |
void rcg::convYCbCr411toRGB | ( | uint8_t | rgb[3], |
const uint8_t * | row, | ||
int | i | ||
) |
std::string rcg::ensureNewFileName | ( | std::string | name | ) |
This method checks if the given file name already exists and produces a new file name if this happens.
Definition at line 60 of file image_store.cc.
std::vector< std::string > rcg::getAvailableGenTLs | ( | const char * | paths | ) |
The function uses the given list files of paths that is separated by colons or semicolons, depending on the used operating system, and returns all files with the suffix .cti.
Paths,which | may be 0. |
Definition at line 50 of file gentl_wrapper_linux.cc.
bool rcg::getBoolean | ( | const std::shared_ptr< GenApi::CNodeMapRef > & | nodemap, |
const char * | name, | ||
bool | exception = false , |
||
bool | igncache = false |
||
) |
Get the value of a boolean feature of the given nodemap.
nodemap | Initialized nodemap. |
name | Name of feature. |
exception | True if an error should be signaled via exception. |
igncache | True if value is always read from the device, even if cached. |
std::shared_ptr< GenApi::CChunkAdapter > rcg::getChunkAdapter | ( | const std::shared_ptr< GenApi::CNodeMapRef > & | nodemap, |
const std::string & | tltype | ||
) |
NOTE: This function is deprecated.
Instead, enable chunks with ChunkModeActive=true and call Stream::attachBuffers(true).
Sets ChunkModeActive to 1, creates a chunk adapter for the specified transport layer and attaches it to the given nodemap.
The returned chunk adapter must be attached to a buffer that contains chunk data. Thereafter, the data can be accessed through the Chunk* features of the given nodemap. After accessing all required data, the adapter must be detached from the buffer!
nodemap | Feature nodemap. |
tltype | Transport layer type as returned by, e.g. System::getTLType() or Device::getTLType() |
void rcg::getColor | ( | uint8_t | rgb[3], |
const std::shared_ptr< const Image > & | img, | ||
uint32_t | ds, | ||
uint32_t | i, | ||
uint32_t | k | ||
) |
Expects an image in Mono8 or YCbCr411_8 format and returns the color as RGB value at the given pixel location.
The downscale factor ds can be greater than one. In this case, the given pixel location refers to the downscaled image and the returned color is averaged over ds x ds pixels.
rgb | Array of size 3 for returning the color. |
img | Pointer to image. |
ds | Downscale factor, i.e. >= 1 |
i,k | Pixel location in downscaled coordinates. |
std::string rcg::getComponetOfPart | ( | const std::shared_ptr< GenApi::CNodeMapRef > & | nodemap, |
const Buffer * | buffer, | ||
uint32_t | ipart | ||
) |
std::shared_ptr< Device > rcg::getDevice | ( | const char * | devid | ) |
Searches across all transport layers and interfaces for a device.
This method accepts optionally specifying the interface ID as prefix, followed by ':', i.e. "[<interfaca_id>[:]]<device_id>". If the interface ID is not given, then all interfaces are sought and the first device with the given ID returned.
devid | Device ID. |
std::vector< std::shared_ptr< Device > > rcg::getDevices | ( | ) |
std::string rcg::getEnum | ( | const std::shared_ptr< GenApi::CNodeMapRef > & | nodemap, |
const char * | name, | ||
bool | exception = false |
||
) |
Get the value of an enumeration of the given nodemap.
nodemap | Initialized nodemap. |
name | Name of feature. |
exception | True if an error should be signaled via exception. |
std::string rcg::getEnum | ( | const std::shared_ptr< GenApi::CNodeMapRef > & | nodemap, |
const char * | name, | ||
std::vector< std::string > & | list, | ||
bool | exception = false |
||
) |
Get the current value and list of possible values of an enumeration of the given nodemap.
nodemap | Initialized nodemap. |
name | Name of feature. |
list | List of possible values. |
exception | True if an error should be signaled via exception. |
double rcg::getFloat | ( | const std::shared_ptr< GenApi::CNodeMapRef > & | nodemap, |
const char * | name, | ||
double * | vmin = 0 , |
||
double * | vmax = 0 , |
||
bool | exception = false , |
||
bool | igncache = false |
||
) |
Get the value of a double feature of the given nodemap.
nodemap | Initialized nodemap. |
name | Name of feature. |
vmin | Minimum value. A null poiter can be given if the value is not required. |
vmax | Maximum value. A null poiter can be given if the value is not required. |
exception | True if an error should be signaled via exception. |
igncache | True if value is always read from the device, even if cached. |
int64_t rcg::getInteger | ( | const std::shared_ptr< GenApi::CNodeMapRef > & | nodemap, |
const char * | name, | ||
int64_t * | vmin = 0 , |
||
int64_t * | vmax = 0 , |
||
bool | exception = false , |
||
bool | igncache = false |
||
) |
Get the value of an integer feature of the given nodemap.
nodemap | Initialized nodemap. |
name | Name of feature. |
vmin | Minimum value. A null poiter can be given if the value is not required. |
vmax | Maximum value. A null poiter can be given if the value is not required. |
exception | True if an error should be signaled via exception. |
igncache | True if value is always read from the device, even if cached. |
std::string rcg::getString | ( | const std::shared_ptr< GenApi::CNodeMapRef > & | nodemap, |
const char * | name, | ||
bool | exception = false , |
||
bool | igncache = false |
||
) |
Get the value of a feature of the given nodemap.
The datatype of the feature can be boolean, integer, float, enum or string. The given value will be converted depending on the datatype and representation of the feature, which can be hex, ip4v or mac for an integer feature.
nodemap | Initialized nodemap. |
name | Name of feature. |
exception | True if an error should be signaled via exception. |
igncache | True if value is always read from the device, even if cached. |
bool rcg::setBoolean | ( | const std::shared_ptr< GenApi::CNodeMapRef > & | nodemap, |
const char * | name, | ||
bool | value, | ||
bool | exception = false |
||
) |
Set the value of a boolean feature of the given nodemap.
nodemap | Initialized nodemap. |
name | Name of feature. |
value | New value of feature. |
exception | True if an error should be signaled via exception instead of a return value. |
bool rcg::setEnum | ( | const std::shared_ptr< GenApi::CNodeMapRef > & | nodemap, |
const char * | name, | ||
const char * | value, | ||
bool | exception = false |
||
) |
Set the value of an enumeration of the given nodemap.
nodemap | Initialized nodemap. |
name | Name of feature. |
value | New value of feature. |
exception | True if an error should be signaled via exception instead of a return value. |
bool rcg::setFloat | ( | const std::shared_ptr< GenApi::CNodeMapRef > & | nodemap, |
const char * | name, | ||
double | value, | ||
bool | exception = false |
||
) |
Set the value of a float feature of the given nodemap.
nodemap | Initialized nodemap. |
name | Name of feature. |
value | New value of feature. |
exception | True if an error should be signaled via exception instead of a return value. |
bool rcg::setInteger | ( | const std::shared_ptr< GenApi::CNodeMapRef > & | nodemap, |
const char * | name, | ||
int64_t | value, | ||
bool | exception = false |
||
) |
Set the value of an integer feature of the given nodemap.
nodemap | Initialized nodemap. |
name | Name of feature. |
value | New value of feature. |
exception | True if an error should be signaled via exception instead of a return value. |
bool rcg::setIPV4Address | ( | const std::shared_ptr< GenApi::CNodeMapRef > & | nodemap, |
const char * | name, | ||
const char * | value, | ||
bool | exception | ||
) |
Set the value of an integer feature of the given nodemap from an IP address.
nodemap | Initialized nodemap. |
name | Name of feature. |
value | IP address formated as string, i.e. <v0>.<v1>.<v2>.<v3> |
exception | True if an error should be signaled via exception instead of a return value. |
bool rcg::setString | ( | const std::shared_ptr< GenApi::CNodeMapRef > & | nodemap, |
const char * | name, | ||
const char * | value, | ||
bool | exception = false |
||
) |
Set the value of a feature of the given nodemap.
The datatype of the feature can be boolean, integer, float, enum or string. The given value will be converted depending on the datatype and representation of the feature, which can be hex, ip4v or mac for an integer feature.
nodemap | Initialized nodemap. |
name | Name of feature. |
value | New value of feature. |
exception | True if an error should be signaled via exception instead of a return value. |
std::string rcg::storeImage | ( | const std::string & | name, |
ImgFmt | fmt, | ||
const Image & | image, | ||
size_t | yoffset = 0 , |
||
size_t | height = 0 |
||
) |
Stores the given image.
NOTE: An exception that is based on std::exception is thrown in case of an error, e.g. if input or output format is not supported.
name | Name of output file without suffix. |
fmt | Image file format. |
image | Image to be stored. |
yoffset | First image row to be stored. |
height | Number of image rows to be stored. 0 means all rows. |
Definition at line 528 of file image_store.cc.
std::string rcg::storeImageAsDisparityPFM | ( | const std::string & | name, |
const Image & | image, | ||
int | inv, | ||
float | scale, | ||
float | offset | ||
) |
Stores the given image as disparity.
The image format must be Coord3D_C16.
NOTE: An exception that is based on std::exception is thrown in case of an error, e.g. if input or output format is not supported.
name | Name of output file without suffix. |
image | Image to be stored. |
inv | Value to mark invalid pixels. |
scale | Scale factor for valid values. |
offset | Offset for valid values. |
Definition at line 552 of file image_store.cc.