38 #ifndef PCL_IMPL_POINT_TYPES_HPP_
39 #define PCL_IMPL_POINT_TYPES_HPP_
42 #define PCL_POINT_TYPES \
52 (pcl::InterestPoint) \
56 (pcl::PointXYZRGBNormal) \
57 (pcl::PointXYZINormal) \
58 (pcl::PointWithRange) \
59 (pcl::PointWithViewpoint) \
60 (pcl::MomentInvariants) \
61 (pcl::PrincipalRadiiRSD) \
63 (pcl::PrincipalCurvatures) \
64 (pcl::PFHSignature125) \
65 (pcl::PFHRGBSignature250) \
67 (pcl::PPFRGBSignature) \
68 (pcl::NormalBasedSignature12) \
69 (pcl::FPFHSignature33) \
70 (pcl::VFHSignature308) \
71 (pcl::ESFSignature640) \
73 (pcl::IntensityGradient) \
74 (pcl::PointWithScale) \
78 #define PCL_XYZ_POINT_TYPES \
86 (pcl::InterestPoint) \
88 (pcl::PointXYZRGBNormal) \
89 (pcl::PointXYZINormal) \
90 (pcl::PointWithRange) \
91 (pcl::PointWithViewpoint) \
95 #define PCL_XYZL_POINT_TYPES \
101 #define PCL_NORMAL_POINT_TYPES \
104 (pcl::PointXYZRGBNormal) \
105 (pcl::PointXYZINormal)
108 #define PCL_FEATURE_POINT_TYPES \
109 (pcl::PFHSignature125) \
110 (pcl::PFHRGBSignature250) \
111 (pcl::PPFSignature) \
112 (pcl::PPFRGBSignature) \
113 (pcl::NormalBasedSignature12) \
114 (pcl::FPFHSignature33) \
115 (pcl::VFHSignature308) \
116 (pcl::ESFSignature640) \
122 #define PCL_ADD_POINT4D \
132 inline Eigen::Map<Eigen::Vector3f> getVector3fMap () { return (Eigen::Vector3f::Map (data)); } \
133 inline const Eigen::Map<const Eigen::Vector3f> getVector3fMap () const { return (Eigen::Vector3f::Map (data)); } \
134 inline Eigen::Map<Eigen::Vector4f, Eigen::Aligned> getVector4fMap () { return (Eigen::Vector4f::MapAligned (data)); } \
135 inline const Eigen::Map<const Eigen::Vector4f, Eigen::Aligned> getVector4fMap () const { return (Eigen::Vector4f::MapAligned (data)); } \
136 inline Eigen::Map<Eigen::Array3f> getArray3fMap () { return (Eigen::Array3f::Map (data)); } \
137 inline const Eigen::Map<const Eigen::Array3f> getArray3fMap () const { return (Eigen::Array3f::Map (data)); } \
138 inline Eigen::Map<Eigen::Array4f, Eigen::Aligned> getArray4fMap () { return (Eigen::Array4f::MapAligned (data)); } \
139 inline const Eigen::Map<const Eigen::Array4f, Eigen::Aligned> getArray4fMap () const { return (Eigen::Array4f::MapAligned (data)); }
141 #define PCL_ADD_NORMAL4D \
152 inline Eigen::Map<Eigen::Vector3f> getNormalVector3fMap () { return (Eigen::Vector3f::Map (data_n)); } \
153 inline const Eigen::Map<const Eigen::Vector3f> getNormalVector3fMap () const { return (Eigen::Vector3f::Map (data_n)); } \
154 inline Eigen::Map<Eigen::Vector4f, Eigen::Aligned> getNormalVector4fMap () { return (Eigen::Vector4f::MapAligned (data_n)); } \
155 inline const Eigen::Map<const Eigen::Vector4f, Eigen::Aligned> getNormalVector4fMap () const { return (Eigen::Vector4f::MapAligned (data_n)); }
157 #define PCL_ADD_RGB \
176 typedef Eigen::Map<Eigen::Array4f, Eigen::Aligned>
Array4fMap;
189 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
205 x = _x; y = _y; z = _z;
209 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
214 os <<
"(" << p.x <<
"," << p.y <<
"," << p.z <<
")";
258 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
279 os <<
"(" << p.x <<
"," << p.y <<
"," << p.z <<
" - " << p.
intensity <<
")";
288 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
303 os <<
"(" << p.x <<
"," << p.y <<
"," << p.z <<
" - " << p.
label <<
")";
314 os <<
"(" << p.
label <<
")";
343 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
355 inline const Eigen::Vector3i
getRGBVector3i ()
const {
return (Eigen::Vector3i (r, g, b)); }
356 inline Eigen::Vector4i
getRGBVector4i () {
return (Eigen::Vector4i (r, g, b, 0)); }
357 inline const Eigen::Vector4i
getRGBVector4i ()
const {
return (Eigen::Vector4i (r, g, b, 0)); }
363 const unsigned char* rgba_ptr =
reinterpret_cast<const unsigned char*
>(&p.rgba);
364 os <<
"(" << p.x <<
"," << p.y <<
"," << p.z <<
" - "
365 <<
static_cast<int>(*rgba_ptr) <<
","
366 <<
static_cast<int>(*(rgba_ptr+1)) <<
","
367 <<
static_cast<int>(*(rgba_ptr+2)) <<
","
368 <<
static_cast<int>(*(rgba_ptr+3)) <<
")";
377 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
385 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
438 inline const Eigen::Vector3i
getRGBVector3i ()
const {
return (Eigen::Vector3i (r, g, b)); }
439 inline Eigen::Vector4i
getRGBVector4i () {
return (Eigen::Vector4i (r, g, b, 0)); }
440 inline const Eigen::Vector4i
getRGBVector4i ()
const {
return (Eigen::Vector4i (r, g, b, 0)); }
442 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
446 os <<
"(" << p.x <<
"," << p.y <<
"," << p.z <<
" - "
447 <<
static_cast<int>(p.r) <<
","
448 << static_cast<int>(p.g) <<
","
449 <<
static_cast<int>(p.b) <<
")";
462 inline PointXYZRGBL (uint8_t _r, uint8_t _g, uint8_t _b, uint32_t _label)
471 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
475 os <<
"(" << p.x <<
"," << p.y <<
"," << p.z <<
" - " << p.r <<
"," << p.g <<
"," << p.b <<
" - " << p.
label <<
")";
492 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
501 h = s = v = data_c[3] = 0;
507 h = _h; v = _v; s = _s;
510 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
514 os <<
"(" << p.x <<
"," << p.y <<
"," << p.z <<
" - " << p.
h <<
" , " << p.
s <<
" , " << p.
v <<
")";
529 os <<
"(" << p.
x <<
"," << p.
y <<
")";
547 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
551 os <<
"(" << p.x <<
"," << p.y <<
"," << p.z <<
" - " << p.
strength <<
")";
569 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
576 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
579 inline Normal (
float n_x,
float n_y,
float n_z)
581 normal_x = n_x; normal_y = n_y; normal_z = n_z;
585 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
590 os <<
"(" << p.normal[0] <<
"," << p.normal[1] <<
"," << p.normal[2] <<
" - " << p.
curvature <<
")";
600 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
607 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
610 inline Axis (
float n_x,
float n_y,
float n_z)
612 normal_x = n_x; normal_y = n_y; normal_z = n_z;
616 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
621 os <<
"(" << p.normal[0] <<
"," << p.normal[1] <<
"," << p.normal[2] <<
")";
627 os <<
"(" << p.normal[0] <<
"," << p.normal[1] <<
"," << p.normal[2] <<
")";
646 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
655 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
661 os <<
"(" << p.x <<
"," << p.y <<
"," << p.z <<
" - " << p.normal[0] <<
"," << p.normal[1] <<
"," << p.normal[2] <<
" - " << p.
curvature <<
")";
719 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
728 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
738 os <<
"(" << p.x <<
"," << p.y <<
"," << p.z <<
" - " << p.
rgb <<
" - " << p.normal[0] <<
"," << p.normal[1] <<
"," << p.normal[2] <<
" - " << p.
r <<
", " << p.
g <<
", " << p.
b <<
" - " << p.
curvature <<
")";
758 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
767 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
774 os <<
"(" << p.x <<
"," << p.y <<
"," << p.z <<
" - " << p.
intensity <<
" - " << p.normal[0] <<
"," << p.normal[1] <<
"," << p.normal[2] <<
" - " << p.
curvature <<
")";
792 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
807 os <<
"(" << p.x <<
"," << p.y <<
"," << p.z <<
" - " << p.
range <<
")";
824 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
832 PointWithViewpoint(
float _x=0.0f,
float _y=0.0f,
float _z=0.0f,
float _vp_x=0.0f,
float _vp_y=0.0f,
float _vp_z=0.0f)
836 vp_x=_vp_x; vp_y=_vp_y; vp_z=_vp_z;
841 os <<
"(" << p.x <<
"," << p.y <<
"," << p.z <<
" - " << p.
vp_x <<
"," << p.
vp_y <<
"," << p.
vp_z <<
")";
854 os <<
"(" << p.
j1 <<
"," << p.
j2 <<
"," << p.
j3 <<
")";
867 os <<
"(" << p.
r_min <<
"," << p.
r_max <<
")";
917 for (
int i = 0; i < 125; ++i)
918 os << (i == 0 ?
"(" :
"") << p.
histogram[i] << (i < 124 ?
", " :
")");
931 for (
int i = 0; i < 250; ++i)
932 os << (i == 0 ?
"(" :
"") << p.
histogram[i] << (i < 249 ?
", " :
")");
946 os <<
"(" << p.
f1 <<
", " << p.
f2 <<
", " << p.
f3 <<
", " << p.
f4 <<
", " << p.
alpha_m <<
")";
961 os <<
"(" << p.
f1 <<
", " << p.
f2 <<
", " << p.
f3 <<
", " << p.
f4 <<
", " <<
976 for (
int i = 0; i < 12; ++i)
977 os << (i == 0 ?
"(" :
"") << p.
values[i] << (i < 11 ?
", " :
")");
992 for (
int i = 0; i < 9; ++i)
993 os << (i == 0 ?
"(" :
"") << p.
rf[i] << (i < 8 ?
", " :
")");
994 for (
size_t i = 0; i < p.
descriptor.size (); ++i)
1008 PCL_DEPRECATED (
inline std::ostream&
operator << (std::ostream& os,
const SHOT& p),
"SHOT POINT IS DEPRECATED, USE SHOT352 FOR SHAPE AND SHOT1344 FOR SHAPE+COLOR INSTEAD");
1011 for (
int i = 0; i < 9; ++i)
1012 os << (i == 0 ?
"(" :
"") << p.
rf[i] << (i < 8 ?
", " :
")");
1013 for (
size_t i = 0; i < p.
descriptor.size (); ++i)
1029 for (
int i = 0; i < 9; ++i)
1030 os << (i == 0 ?
"(" :
"") << p.
rf[i] << (i < 8 ?
", " :
")");
1031 for (
size_t i = 0; i < 352; ++i)
1032 os << (i == 0 ?
"(" :
"") << p.
descriptor[i] << (i < 351 ?
", " :
")");
1047 for (
int i = 0; i < 9; ++i)
1048 os << (i == 0 ?
"(" :
"") << p.
rf[i] << (i < 8 ?
", " :
")");
1049 for (
size_t i = 0; i < 1344; ++i)
1050 os << (i == 0 ?
"(" :
"") << p.
descriptor[i] << (i < 1343 ?
", " :
")");
1078 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1085 x_axis = y_axis = z_axis =
Axis();
1097 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1115 for (
int i = 0; i < 33; ++i)
1116 os << (i == 0 ?
"(" :
"") << p.
histogram[i] << (i < 32 ?
", " :
")");
1129 for (
int i = 0; i < 308; ++i)
1130 os << (i == 0 ?
"(" :
"") << p.
histogram[i] << (i < 307 ?
", " :
")");
1143 for (
int i = 0; i < 640; ++i)
1144 os << (i == 0 ?
"(" :
"") << p.
histogram[i] << (i < 639 ?
", " :
")");
1173 os << p.
x<<
","<<p.
y<<
","<<p.
z<<
" - "<<p.
roll*360.0/M_PI<<
"deg,"<<p.
pitch*360.0/M_PI<<
"deg,"<<p.
yaw*360.0/M_PI<<
"deg - ";
1174 for (
int i = 0; i < 36; ++i)
1175 os << (i == 0 ?
"(" :
"") << p.
descriptor[i] << (i < 35 ?
", " :
")");
1191 os <<
"(" << p.
x <<
"," << p.
y <<
")";
1226 inline std::ostream& operator << (std::ostream& os, const Histogram<N>& p)
1228 for (
int i = 0; i < N; ++i)
1229 os << (i == 0 ?
"(" :
"") << p.histogram[i] << (i < N-1 ?
", " :
")");
1240 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1254 os <<
"(" << p.x <<
"," << p.y <<
"," << p.z <<
" - " << p.
scale <<
")";
1276 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1285 normal_x = normal_y = normal_z = data_n[3] = 0.0f;
1293 const unsigned char* rgba_ptr =
reinterpret_cast<const unsigned char*
>(&p.
rgba);
1295 "(" << p.x <<
"," << p.y <<
"," << p.z <<
" - " <<
1296 p.normal_x <<
"," << p.normal_y <<
"," << p.normal_z <<
" - "
1297 <<
static_cast<int>(*rgba_ptr) <<
","
1298 <<
static_cast<int>(*(rgba_ptr+1)) <<
","
1299 <<
static_cast<int>(*(rgba_ptr+2)) <<
","
1300 <<
static_cast<int>(*(rgba_ptr+3)) <<
" - " <<
1308 template <
typename Po
intT>
inline bool
1315 template <>
inline bool