00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef PCL_DATA_TYPES_H_
00040 #define PCL_DATA_TYPES_H_
00041
00042 #include <pcl/pcl_macros.h>
00043 #include <pcl/common/eigen.h>
00044 #include <bitset>
00045 #include <vector>
00046 #include <pcl/ros/register_point_struct.h>
00047
00054
00055
00056 #pragma warning(disable: 4201)
00057
00058 #ifdef BUILD_Maintainer
00059 # if defined __GNUC__
00060 # include <features.h>
00061 # if __GNUC_PREREQ(4, 3)
00062 # pragma GCC diagnostic ignored "-Weffc++"
00063 # pragma GCC diagnostic ignored "-pedantic"
00064 # else
00065 # pragma GCC system_header
00066 # endif
00067
00068 # endif
00069 #endif
00070
00072 namespace pcl
00073 {
00077 struct PointXYZ;
00078
00082 struct RGB;
00083
00087 struct PointXYZI;
00088
00092 struct PointXYZL;
00093
00097 struct Label;
00098
00102 struct PointXYZRGBA;
00103
00107 struct PointXYZRGB;
00108
00112 struct PointXYZRGBL;
00113
00117 struct PointXYZHSV;
00118
00122 struct PointXY;
00123
00127 struct InterestPoint;
00128
00132 struct Normal;
00133
00137 struct Axis;
00138
00142 struct PointNormal;
00143
00147 struct PointXYZRGBNormal;
00148
00152 struct PointXYZINormal;
00153
00157 struct PointWithRange;
00158
00162 struct PointWithViewpoint;
00163
00167 struct MomentInvariants;
00168
00172 struct PrincipalRadiiRSD;
00173
00177 struct Boundary;
00178
00182 struct PrincipalCurvatures;
00183
00188 struct
00189 PCL_DEPRECATED_CLASS (SHOT, "USE SHOT352 FOR SHAPE AND SHOT1344 FOR SHAPE+COLOR INSTEAD");
00190
00194 struct SHOT352;
00195
00199 struct SHOT1344;
00200
00204 struct ReferenceFrame;
00205
00209 struct ShapeContext;
00210
00214 struct PFHSignature125;
00215
00219 struct PFHRGBSignature250;
00220
00224 struct PPFSignature;
00225
00229 struct PPFRGBSignature;
00230
00234 struct NormalBasedSignature12;
00235
00239 struct FPFHSignature33;
00240
00244 struct VFHSignature308;
00248 struct ESFSignature640;
00253 struct Narf36;
00254
00258 typedef std::bitset<32> BorderTraits;
00259
00263 enum BorderTrait
00264 {
00265 BORDER_TRAIT__OBSTACLE_BORDER, BORDER_TRAIT__SHADOW_BORDER, BORDER_TRAIT__VEIL_POINT,
00266 BORDER_TRAIT__SHADOW_BORDER_TOP, BORDER_TRAIT__SHADOW_BORDER_RIGHT, BORDER_TRAIT__SHADOW_BORDER_BOTTOM,
00267 BORDER_TRAIT__SHADOW_BORDER_LEFT, BORDER_TRAIT__OBSTACLE_BORDER_TOP, BORDER_TRAIT__OBSTACLE_BORDER_RIGHT,
00268 BORDER_TRAIT__OBSTACLE_BORDER_BOTTOM, BORDER_TRAIT__OBSTACLE_BORDER_LEFT, BORDER_TRAIT__VEIL_POINT_TOP,
00269 BORDER_TRAIT__VEIL_POINT_RIGHT, BORDER_TRAIT__VEIL_POINT_BOTTOM, BORDER_TRAIT__VEIL_POINT_LEFT
00270 };
00271
00275 struct BorderDescription;
00276
00280 struct IntensityGradient;
00281
00285 template<int N>
00286 struct Histogram;
00287
00291 struct PointWithScale;
00292
00296 struct PointSurfel;
00297 }
00298
00301 #include <pcl/impl/point_types.hpp>
00302
00303
00304
00305
00306
00307 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::RGB,
00308 (uint32_t, rgba, rgba)
00309 )
00310 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZ,
00311 (float, x, x)
00312 (float, y, y)
00313 (float, z, z)
00314 )
00315 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZ, pcl::_PointXYZ)
00316
00317 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZRGBA,
00318 (float, x, x)
00319 (float, y, y)
00320 (float, z, z)
00321 (uint32_t, rgba, rgba)
00322 )
00323 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGBA, pcl::_PointXYZRGBA)
00324
00325 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZRGB,
00326 (float, x, x)
00327 (float, y, y)
00328 (float, z, z)
00329 (float, rgb, rgb)
00330 )
00331 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGB, pcl::_PointXYZRGB)
00332
00333 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZRGBL,
00334 (float, x, x)
00335 (float, y, y)
00336 (float, z, z)
00337 (uint32_t, rgba, rgba)
00338 (uint32_t, label, label)
00339 )
00340 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGBL, pcl::_PointXYZRGBL)
00341
00342 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZHSV,
00343 (float, x, x)
00344 (float, y, y)
00345 (float, z, z)
00346 (float, h, h)
00347 (float, s, s)
00348 (float, v, v)
00349 )
00350 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZHSV, pcl::_PointXYZHSV)
00351
00352 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointXY,
00353 (float, x, x)
00354 (float, y, y)
00355 )
00356
00357 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::InterestPoint,
00358 (float, x, x)
00359 (float, y, y)
00360 (float, z, z)
00361 (float, strength, strength)
00362 )
00363
00364 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZI,
00365 (float, x, x)
00366 (float, y, y)
00367 (float, z, z)
00368 (float, intensity, intensity)
00369 )
00370 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZI, pcl::_PointXYZI)
00371
00372 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointXYZL,
00373 (float, x, x)
00374 (float, y, y)
00375 (float, z, z)
00376 (uint32_t, label, label)
00377 )
00378
00379 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::Label,
00380 (uint32_t, label, label)
00381 )
00382
00383 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_Normal,
00384 (float, normal_x, normal_x)
00385 (float, normal_y, normal_y)
00386 (float, normal_z, normal_z)
00387 (float, curvature, curvature)
00388 )
00389 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Normal, pcl::_Normal)
00390
00391 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_Axis,
00392 (float, normal_x, normal_x)
00393 (float, normal_y, normal_y)
00394 (float, normal_z, normal_z)
00395 )
00396 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Axis, pcl::_Axis)
00397
00398 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointNormal,
00399 (float, x, x)
00400 (float, y, y)
00401 (float, z, z)
00402 (float, normal_x, normal_x)
00403 (float, normal_y, normal_y)
00404 (float, normal_z, normal_z)
00405 (float, curvature, curvature)
00406 )
00407 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZRGBNormal,
00408 (float, x, x)
00409 (float, y, y)
00410 (float, z, z)
00411 (float, rgb, rgb)
00412 (float, normal_x, normal_x)
00413 (float, normal_y, normal_y)
00414 (float, normal_z, normal_z)
00415 (float, curvature, curvature)
00416 )
00417 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGBNormal, pcl::_PointXYZRGBNormal)
00418 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointXYZINormal,
00419 (float, x, x)
00420 (float, y, y)
00421 (float, z, z)
00422 (float, intensity, intensity)
00423 (float, normal_x, normal_x)
00424 (float, normal_y, normal_y)
00425 (float, normal_z, normal_z)
00426 (float, curvature, curvature)
00427 )
00428 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointWithRange,
00429 (float, x, x)
00430 (float, y, y)
00431 (float, z, z)
00432 (float, range, range)
00433 )
00434
00435 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointWithViewpoint,
00436 (float, x, x)
00437 (float, y, y)
00438 (float, z, z)
00439 (float, vp_x, vp_x)
00440 (float, vp_y, vp_y)
00441 (float, vp_z, vp_z)
00442 )
00443 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointWithViewpoint, pcl::_PointWithViewpoint)
00444
00445 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::MomentInvariants,
00446 (float, j1, j1)
00447 (float, j2, j2)
00448 (float, j3, j3)
00449 )
00450
00451 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PrincipalRadiiRSD,
00452 (float, r_min, r_min)
00453 (float, r_max, r_max)
00454 )
00455
00456 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::Boundary,
00457 (uint8_t, boundary_point, boundary_point)
00458 )
00459
00460 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PrincipalCurvatures,
00461 (float, principal_curvature_x, principal_curvature_x)
00462 (float, principal_curvature_y, principal_curvature_y)
00463 (float, principal_curvature_z, principal_curvature_z)
00464 (float, pc1, pc1)
00465 (float, pc2, pc2)
00466 )
00467
00468 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PFHSignature125,
00469 (float[125], histogram, pfh)
00470 )
00471
00472 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PFHRGBSignature250,
00473 (float[250], histogram, pfhrgb)
00474 )
00475
00476 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PPFSignature,
00477 (float, f1, f1)
00478 (float, f2, f2)
00479 (float, f3, f3)
00480 (float, f4, f4)
00481 (float, alpha_m, alpha_m)
00482 )
00483
00484 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PPFRGBSignature,
00485 (float, f1, f1)
00486 (float, f2, f2)
00487 (float, f3, f3)
00488 (float, f4, f4)
00489 (float, r_ratio, r_ratio)
00490 (float, g_ratio, g_ratio)
00491 (float, b_ratio, b_ratio)
00492 (float, alpha_m, alpha_m)
00493 )
00494
00495 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::NormalBasedSignature12,
00496 (float[12], values, values)
00497 )
00498
00499 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::SHOT352,
00500 (float[352], descriptor, shot)
00501 (float[9], rf, rf)
00502 )
00503
00504 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::SHOT1344,
00505 (float[1344], descriptor, shot)
00506 (float[9], rf, rf)
00507 )
00508
00509 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::FPFHSignature33,
00510 (float[33], histogram, fpfh)
00511 )
00512
00513 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::VFHSignature308,
00514 (float[308], histogram, vfh)
00515 )
00516 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::ESFSignature640,
00517 (float[640], histogram, esf)
00518 )
00519 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::Narf36,
00520 (float[36], descriptor, descriptor)
00521 )
00522
00523 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::GFPFHSignature16,
00524 (float[16], histogram, gfpfh)
00525 )
00526
00527 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::IntensityGradient,
00528 (float, gradient_x, gradient_x)
00529 (float, gradient_y, gradient_y)
00530 (float, gradient_z, gradient_z)
00531 )
00532
00533 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointWithScale,
00534 (float, x, x)
00535 (float, y, y)
00536 (float, z, z)
00537 (float, scale, scale)
00538 )
00539
00540 POINT_CLOUD_REGISTER_POINT_STRUCT(pcl::PointSurfel,
00541 (float, x, x)
00542 (float, y, y)
00543 (float, z, z)
00544 (float, normal_x, normal_x)
00545 (float, normal_y, normal_y)
00546 (float, normal_z, normal_z)
00547 (uint32_t, rgba, rgba)
00548 (float, radius, radius)
00549 (float, confidence, confidence)
00550 (float, curvature, curvature)
00551 )
00552
00553 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_ReferenceFrame,
00554 (float[3], x_axis, x_axis)
00555 (float[3], y_axis, y_axis)
00556 (float[3], z_axis, z_axis)
00557
00558 )
00559 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::ReferenceFrame, pcl::_ReferenceFrame)
00560
00561
00562
00563
00564
00565
00566
00567 namespace pcl {
00568
00569
00570 template<typename PointT>
00571 struct FieldMatches<PointT, fields::rgba>
00572 {
00573 bool operator() (const sensor_msgs::PointField& field)
00574 {
00575 if (field.name == "rgb")
00576 {
00577 return (field.datatype == sensor_msgs::PointField::FLOAT32 &&
00578 field.count == 1);
00579 }
00580 else
00581 {
00582 return (field.name == traits::name<PointT, fields::rgba>::value &&
00583 field.datatype == traits::datatype<PointT, fields::rgba>::value &&
00584 field.count == traits::datatype<PointT, fields::rgba>::size);
00585 }
00586 }
00587 };
00588 }
00589
00590 #pragma warning(default: 4201)
00591
00592 #ifdef BUILD_Maintainer
00593 # if defined __GNUC__
00594 # if __GNUC_PREREQ(4, 3)
00595 # pragma GCC diagnostic warning "-Weffc++"
00596 # pragma GCC diagnostic warning "-pedantic"
00597 # endif
00598
00599 # endif
00600 #endif
00601
00602 #endif //#ifndef PCL_DATA_TYPES_H_