Provides getters and setters for arbitrary fields. More...
#include <point_iterator_safe.h>
Public Member Functions | |
template<bool SAFE, class T > | |
T | getField (uint32_t pointIndex, uint32_t fieldIndex) |
bool | isFieldAvailable (uint32_t fieldIndex) |
template<class T > | |
bool | isFieldCompatible (uint32_t fieldIndex) |
template<> | |
bool | isFieldCompatible (uint32_t fieldIndex) |
PointCloud2Iterator (sensor_msgs::PointCloud2::Ptr pcl, std::vector< std::string > fieldNames) | |
template<class T > | |
void | setField (uint32_t pointIndex, uint32_t fieldIndex, T value) |
template<> | |
void | setField (uint32_t pointIndex, uint32_t fieldIndex, float value) |
Private Member Functions | |
void | checkFieldAvailable (uint32_t fieldIndex) |
template<class T > | |
void | checkFieldCompatible (uint32_t fieldIndex) |
Private Attributes | |
std::vector< size_t > | fieldDataSizes |
std::vector< uint8_t > | fieldDataTypes |
std::vector< std::string > | fieldNames |
std::vector< uint32_t > | fieldOffsets |
std::vector< bool > | fieldsAvailable |
sensor_msgs::PointCloud2::Ptr | pcl |
Provides getters and setters for arbitrary fields.
Given a set field names, it provides getters and setters for the corresponding fields. It does not handle memory allocation, nor compatibility checks; this has be ensured by the user.
Definition at line 14 of file point_iterator_safe.h.
point_cloud_color::PointCloud2Iterator< SAFE >::PointCloud2Iterator | ( | sensor_msgs::PointCloud2::Ptr | pcl, |
std::vector< std::string > | fieldNames | ||
) |
Definition at line 10 of file point_iterator_safe.cpp.
void point_cloud_color::PointCloud2Iterator< SAFE >::checkFieldAvailable | ( | uint32_t | fieldIndex | ) | [inline, private] |
Definition at line 29 of file point_iterator_safe.h.
void point_cloud_color::PointCloud2Iterator< SAFE >::checkFieldCompatible | ( | uint32_t | fieldIndex | ) | [inline, private] |
Definition at line 34 of file point_iterator_safe.h.
float point_cloud_color::PointCloud2Iterator< SAFE, T >::getField< T > | ( | uint32_t | pointIndex, |
uint32_t | fieldIndex | ||
) |
Definition at line 55 of file point_iterator_safe.cpp.
bool point_cloud_color::PointCloud2Iterator< SAFE >::isFieldAvailable | ( | uint32_t | fieldIndex | ) | [inline] |
Definition at line 17 of file point_iterator_safe.h.
bool point_cloud_color::PointCloud2Iterator< SAFE >::isFieldCompatible | ( | uint32_t | fieldIndex | ) | [inline] |
Definition at line 20 of file point_iterator_safe.h.
bool point_cloud_color::PointCloud2Iterator< SAFE >::isFieldCompatible | ( | uint32_t | fieldIndex | ) | [inline] |
Definition at line 23 of file point_iterator_safe.h.
void point_cloud_color::PointCloud2Iterator< T >::setField< T > | ( | uint32_t | pointIndex, |
uint32_t | fieldIndex, | ||
T | value | ||
) |
Definition at line 63 of file point_iterator_safe.cpp.
void point_cloud_color::PointCloud2Iterator< SAFE >::setField< T > | ( | uint32_t | pointIndex, |
uint32_t | fieldIndex, | ||
float | value | ||
) |
Definition at line 67 of file point_iterator_safe.cpp.
std::vector<size_t> point_cloud_color::PointCloud2Iterator< SAFE >::fieldDataSizes [private] |
Definition at line 44 of file point_iterator_safe.h.
std::vector<uint8_t> point_cloud_color::PointCloud2Iterator< SAFE >::fieldDataTypes [private] |
Definition at line 43 of file point_iterator_safe.h.
std::vector<std::string> point_cloud_color::PointCloud2Iterator< SAFE >::fieldNames [private] |
Definition at line 40 of file point_iterator_safe.h.
std::vector<uint32_t> point_cloud_color::PointCloud2Iterator< SAFE >::fieldOffsets [private] |
Definition at line 42 of file point_iterator_safe.h.
std::vector<bool> point_cloud_color::PointCloud2Iterator< SAFE >::fieldsAvailable [private] |
Definition at line 41 of file point_iterator_safe.h.
sensor_msgs::PointCloud2::Ptr point_cloud_color::PointCloud2Iterator< SAFE >::pcl [private] |
Definition at line 39 of file point_iterator_safe.h.