A simple pixeltypemapper (maps device specific pixelformats read from device-node map to pylon pixeltypes by their name).
More...
#include <pylon/PixelTypeMapper.h>
A simple pixeltypemapper (maps device specific pixelformats read from device-node map to pylon pixeltypes by their name).
Use this mapper to convert a device specifc Pylon::PixelFormat value to a Pylon::EPixelType used for PixelFormatConverters. When passing the symbolic name of the pixeltype you can use the static function CPixelTypeMapper::GetPylonPixelTypeByName(). If you want to convert a nodeValue you must first create a CPixelTypeMapper instance and pass the constructor a pointer the PixelFormat node of the device you want the node value to be converted. Then call CPixelTypeMapper::GetPylonPixelTypeFromNodeValue() to get the corresponding Pylon::EPixelType.
Pylon::CPixelTypeMapper::CPixelTypeMapper |
( |
void |
| ) |
|
Create an empty mapper. Before calling any non-static function you must call SetPixelFormatEnumNode to initialize the mapper.
static const char* Pylon::CPixelTypeMapper::GetNameByPixelType |
( |
EPixelType |
pixelType, |
|
|
SFNCVersion |
sfncVer = SFNCVersion_pre2_0 |
|
) |
| |
|
static |
Static function that returns a string representation of the given EPixelType.
- Parameters
-
pixelType | The pixel type to return the name for. |
sfncVer | SFNC Version to use when doing the mapping. Some names have been changed in SFNC 2.0 |
- Returns
- Returns the pointer to a null terminated string representing the symbolic name of the pixel type.
Passing Pylon::PixelType_Mono16 will return "Mono16" will be returned. If the pixel type is not known an empty string is returned.
- Note
- The returned name cannot be used to parameterize the pixel format of a camera device, because the camera's pixel format name can be different. The camera's pixel format name depends on the used standard feature naming convention (SFNC).
static EPixelType Pylon::CPixelTypeMapper::GetPylonPixelTypeByName |
( |
const char * |
pszSymbolicName | ) |
|
|
static |
Returns a Pylon::EPixelType for a given symbolic name.
- Parameters
-
pszSymbolicName | pointer to the symbolic name. Note: Symbolic names are case sensitive. You can obtain the symbolic name by calling GENAPI_NAMESPACE::IEnumEntry::GetSymbolic() |
- Returns
- Returns the Pylon_PixelType for a given symbolic name.
Static version which does the lookup soley by symbolic string comparison. Passing "Mono16" will return Pylon::PixelType_Mono16. If the name is not found Pylon::PixelType_Undefined will be returned.
static EPixelType Pylon::CPixelTypeMapper::GetPylonPixelTypeByName |
( |
const String_t & |
symbolicName | ) |
|
|
inlinestatic |
Returns a Pylon::EPixelType for a given symbolic name.
- Parameters
-
symbolicName | The symbolic name. Note: Symbolic names are case sensitive. You can obtain the symbolic name by calling GENAPI_NAMESPACE::IEnumEntry::GetSymbolic() |
- Returns
- Returns the Pylon_PixelType for a given symbolic name.
Static version which does the lookup solely by symbolic string comparison. Passing "Mono16" will return Pylon::PixelType_Mono16. If the name is not found Pylon::PixelType_Undefined will be returned.
EPixelType Pylon::CPixelTypeMapper::GetPylonPixelTypeFromNodeValue |
( |
int64_t |
nodeValue | ) |
const |
Converts an enumeration node value to a Pylon::EPixelType enum.
- Parameters
-
nodeValue | node value to convert. You can obtain this value by calling GENAPI_NAMESPACE::IEnumeration::GetIntValue. |
- Returns
- Returns the Pylon::EPixelType for a given pixelformat enum value defined in the Enum passed in c'tor
Converts a enumeration node value to a Pylon::EPixelType enum. You must have initialized the mapper before you can call this function.
bool Pylon::CPixelTypeMapper::IsValid |
( |
| ) |
const |
Checks the objects validity.
- Returns
- Returns true if the object is initialized properly.
Essentially this function checks whether you've called SetPixelFormatEnumNode.
Lazy initialization of the object.
- Parameters
-
pEnum | Pointer to the enumeration node containing the PixelFormats. |
Call this function initialize the mapper when using the default c'tor.
The documentation for this class was generated from the following file: