Point Cloud Library (PCL)  1.5.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
point_types.h
Go to the documentation of this file.
00001 /*
00002  * Software License Agreement (BSD License)
00003  *
00004  *  Point Cloud Library (PCL) - www.pointclouds.org
00005  *  Copyright (c) 2010-2011, Willow Garage, Inc.
00006  *
00007  *  All rights reserved.
00008  *
00009  *  Redistribution and use in source and binary forms, with or without
00010  *  modification, are permitted provided that the following conditions
00011  *  are met:
00012  *
00013  *   * Redistributions of source code must retain the above copyright
00014  *     notice, this list of conditions and the following disclaimer.
00015  *   * Redistributions in binary form must reproduce the above
00016  *     copyright notice, this list of conditions and the following
00017  *     disclaimer in the documentation and/or other materials provided
00018  *     with the distribution.
00019  *   * Neither the name of Willow Garage, Inc. nor the names of its
00020  *     contributors may be used to endorse or promote products derived
00021  *     from this software without specific prior written permission.
00022  *
00023  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00024  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00025  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00026  *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00027  *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00028  *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00029  *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00030  *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00031  *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00032  *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00033  *  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00034  *  POSSIBILITY OF SUCH DAMAGE.
00035  *
00036  * $Id: point_types.h 4702 2012-02-23 09:39:33Z gedikli $
00037  *
00038  */
00039 #ifndef PCL_DATA_TYPES_H_
00040 #define PCL_DATA_TYPES_H_
00041 
00042 #include <pcl/pcl_macros.h>
00043 #include <Eigen/Core>
00044 #include <bitset>
00045 #include <vector>
00046 #include <pcl/ros/register_point_struct.h>
00047 
00054 // We're doing a lot of black magic with Boost here, so disable warnings in Maintainer mode, as we will never
00055 // be able to fix them anyway
00056 #ifdef BUILD_Maintainer
00057 #  if defined __GNUC__
00058 #    if __GNUC__ == 4 && __GNUC_MINOR__ > 3
00059 #      pragma GCC diagnostic ignored "-Weffc++"
00060 #      pragma GCC diagnostic ignored "-pedantic"
00061 #    else
00062 #      pragma GCC system_header 
00063 #    endif
00064 #  elif defined _MSC_VER
00065 #    pragma warning(push, 1)
00066 #  endif
00067 #endif
00068 
00070 namespace pcl
00071 {
00075   struct PointXYZ;
00076 
00080   struct PointXYZI;
00081 
00085   struct PointXYZL;
00086 
00090   struct Label;
00091 
00095   struct PointXYZRGBA;
00096 
00100   struct PointXYZRGB;
00101 
00105   struct PointXYZRGBL;
00106 
00110   struct PointXYZHSV;
00111 
00115   struct PointXY;
00116 
00120   struct InterestPoint;
00121 
00125   struct Normal;
00126 
00130   struct Axis;
00131 
00135   struct PointNormal;
00136 
00140   struct PointXYZRGBNormal;
00141 
00145   struct PointXYZINormal;
00146 
00150   struct PointWithRange;
00151 
00155   struct PointWithViewpoint;
00156 
00160   struct MomentInvariants;
00161 
00165   struct PrincipalRadiiRSD;
00166 
00170   struct Boundary;
00171 
00175   struct PrincipalCurvatures;
00176 
00180   struct SHOT;
00181 
00185   struct ReferenceFrame;
00186 
00190   struct ShapeContext;
00191 
00195   struct PFHSignature125;
00196 
00200   struct PFHRGBSignature250;
00201 
00205   struct PPFSignature;
00206 
00210   struct PPFRGBSignature;
00211 
00215   struct NormalBasedSignature12;
00216 
00220   struct FPFHSignature33;
00221 
00225   struct VFHSignature308;
00226 
00230   struct Narf36;
00231 
00235   typedef std::bitset<32> BorderTraits;
00236 
00240   enum BorderTrait
00241   {
00242     BORDER_TRAIT__OBSTACLE_BORDER, BORDER_TRAIT__SHADOW_BORDER, BORDER_TRAIT__VEIL_POINT,
00243     BORDER_TRAIT__SHADOW_BORDER_TOP, BORDER_TRAIT__SHADOW_BORDER_RIGHT, BORDER_TRAIT__SHADOW_BORDER_BOTTOM,
00244     BORDER_TRAIT__SHADOW_BORDER_LEFT, BORDER_TRAIT__OBSTACLE_BORDER_TOP, BORDER_TRAIT__OBSTACLE_BORDER_RIGHT,
00245     BORDER_TRAIT__OBSTACLE_BORDER_BOTTOM, BORDER_TRAIT__OBSTACLE_BORDER_LEFT, BORDER_TRAIT__VEIL_POINT_TOP,
00246     BORDER_TRAIT__VEIL_POINT_RIGHT, BORDER_TRAIT__VEIL_POINT_BOTTOM, BORDER_TRAIT__VEIL_POINT_LEFT
00247   };
00248 
00252   struct BorderDescription;
00253 
00257   struct IntensityGradient;
00258 
00262   template<int N>
00263   struct Histogram;
00264 
00268   struct PointWithScale;
00269 
00273   struct PointSurfel;
00274 }
00275 
00278 #include "pcl/impl/point_types.hpp"  // Include struct definitions
00279 
00280 // ==============================
00281 // =====POINT_CLOUD_REGISTER=====
00282 // ==============================
00283 
00284 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZ,
00285     (float, x, x)
00286     (float, y, y)
00287     (float, z, z)
00288 )
00289 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZ, pcl::_PointXYZ)
00290 
00291 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZRGBA,
00292     (float, x, x)
00293     (float, y, y)
00294     (float, z, z)
00295     (uint32_t, rgba, rgba)
00296 )
00297 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGBA, pcl::_PointXYZRGBA)
00298 
00299 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZRGB,
00300     (float, x, x)
00301     (float, y, y)
00302     (float, z, z)
00303     (float, rgb, rgb)
00304 )
00305 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGB, pcl::_PointXYZRGB)
00306 
00307 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZRGBL,
00308     (float, x, x)
00309     (float, y, y)
00310     (float, z, z)
00311     (uint32_t, rgba, rgba)
00312     (uint32_t, label, label)
00313 )
00314 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGBL, pcl::_PointXYZRGBL)
00315 
00316 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZHSV,
00317     (float, x, x)
00318     (float, y, y)
00319     (float, z, z)
00320     (float, h, h)
00321     (float, s, s)
00322     (float, v, v)
00323 )
00324 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZHSV, pcl::_PointXYZHSV)
00325 
00326 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointXY,
00327     (float, x, x)
00328     (float, y, y)
00329 )
00330 
00331 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::InterestPoint,
00332     (float, x, x)
00333     (float, y, y)
00334     (float, z, z)
00335     (float, strength, strength)
00336 )
00337 
00338 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZI,
00339     (float, x, x)
00340     (float, y, y)
00341     (float, z, z)
00342     (float, intensity, intensity)
00343 )
00344 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZI, pcl::_PointXYZI)
00345 
00346 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointXYZL,
00347     (float, x, x)
00348     (float, y, y)
00349     (float, z, z)
00350     (uint32_t, label, label)
00351 )
00352 
00353 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::Label,
00354     (uint32_t, label, label)
00355 )
00356 
00357 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_Normal,
00358     (float, normal_x, normal_x)
00359     (float, normal_y, normal_y)
00360     (float, normal_z, normal_z)
00361     (float, curvature, curvature)
00362 )
00363 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Normal, pcl::_Normal)
00364 
00365 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_Axis,
00366     (float, normal_x, normal_x)
00367     (float, normal_y, normal_y)
00368     (float, normal_z, normal_z)
00369 )
00370 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Axis, pcl::_Axis)
00371 
00372 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointNormal,
00373     (float, x, x)
00374     (float, y, y)
00375     (float, z, z)
00376     (float, normal_x, normal_x)
00377     (float, normal_y, normal_y)
00378     (float, normal_z, normal_z)
00379     (float, curvature, curvature)
00380 )
00381 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZRGBNormal,
00382     (float, x, x)
00383     (float, y, y)
00384     (float, z, z)
00385     (float, rgb, rgb)
00386     (float, normal_x, normal_x)
00387     (float, normal_y, normal_y)
00388     (float, normal_z, normal_z)
00389     (float, curvature, curvature)
00390 )
00391 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGBNormal, pcl::_PointXYZRGBNormal)
00392 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointXYZINormal,
00393     (float, x, x)
00394     (float, y, y)
00395     (float, z, z)
00396     (float, intensity, intensity)
00397     (float, normal_x, normal_x)
00398     (float, normal_y, normal_y)
00399     (float, normal_z, normal_z)
00400     (float, curvature, curvature)
00401 )
00402 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointWithRange,
00403     (float, x, x)
00404     (float, y, y)
00405     (float, z, z)
00406     (float, range, range)
00407 )
00408 
00409 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointWithViewpoint,
00410     (float, x, x)
00411     (float, y, y)
00412     (float, z, z)
00413     (float, vp_x, vp_x)
00414     (float, vp_y, vp_y)
00415     (float, vp_z, vp_z)
00416 )
00417 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointWithViewpoint, pcl::_PointWithViewpoint)
00418 
00419 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::MomentInvariants,
00420     (float, j1, j1)
00421     (float, j2, j2)
00422     (float, j3, j3)
00423 )
00424 
00425 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PrincipalRadiiRSD,
00426     (float, r_min, r_min)
00427     (float, r_max, r_max)
00428 )
00429 
00430 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::Boundary,
00431     (uint8_t, boundary_point, boundary_point)
00432 )
00433 
00434 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PrincipalCurvatures,
00435     (float, principal_curvature_x, principal_curvature_x)
00436     (float, principal_curvature_y, principal_curvature_y)
00437     (float, principal_curvature_z, principal_curvature_z)
00438     (float, pc1, pc1)
00439     (float, pc2, pc2)
00440 )
00441 
00442 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PFHSignature125,
00443     (float[125], histogram, pfh)
00444 )
00445 
00446 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PFHRGBSignature250,
00447     (float[250], histogram, pfhrgb)
00448 )
00449 
00450 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PPFSignature,
00451     (float, f1, f1)
00452     (float, f2, f2)
00453     (float, f3, f3)
00454     (float, f4, f4)
00455     (float, alpha_m, alpha_m)
00456 )
00457 
00458 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PPFRGBSignature,
00459     (float, f1, f1)
00460     (float, f2, f2)
00461     (float, f3, f3)
00462     (float, f4, f4)
00463     (float, r_ratio, r_ratio)
00464     (float, g_ratio, g_ratio)
00465     (float, b_ratio, b_ratio)
00466     (float, alpha_m, alpha_m)
00467 )
00468 
00469 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::NormalBasedSignature12,
00470     (float[12], values, values)
00471 )
00472 
00473 //POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_SHOT352,
00474 //                                   (float[352], descriptor, shot)
00475 //                                   (float[9], rf, rf)
00476 //                                   (uint32_t, size, size)
00477 //)
00478 //POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::SHOT352, pcl::_SHOT352)
00479 //
00480 //POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_SHOT1344,
00481 //                                   (float[1344], descriptor, shot)
00482 //                                   (float[9], rf, rf)
00483 //                                   (uint32_t, size, size)
00484 //)
00485 //POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::SHOT1344, pcl::_SHOT1344)
00486 
00487 
00488 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::FPFHSignature33,
00489     (float[33], histogram, fpfh)
00490 )
00491 
00492 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::VFHSignature308,
00493     (float[308], histogram, vfh)
00494 )
00495 
00496 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::Narf36,
00497     (float[36], descriptor, descriptor)
00498 )
00499 
00500 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::GFPFHSignature16,
00501     (float[16], histogram, gfpfh)
00502 )
00503 
00504 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::IntensityGradient,
00505     (float, gradient_x, gradient_x)
00506     (float, gradient_y, gradient_y)
00507     (float, gradient_z, gradient_z)
00508 )
00509 
00510 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointWithScale,
00511     (float, x, x)
00512     (float, y, y)
00513     (float, z, z)
00514     (float, scale, scale)
00515 )
00516 
00517 POINT_CLOUD_REGISTER_POINT_STRUCT(pcl::PointSurfel,
00518     (float, x, x)
00519     (float, y, y)
00520     (float, z, z)
00521     (float, normal_x, normal_x)
00522     (float, normal_y, normal_y)
00523     (float, normal_z, normal_z)
00524     (uint32_t, rgba, rgba)
00525     (float, radius, radius)
00526     (float, confidence, confidence)
00527     (float, curvature, curvature)
00528 )
00529 
00530 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_ReferenceFrame,
00531     (float[3], x_axis, x_axis)
00532     (float[3], y_axis, y_axis)
00533     (float[3], z_axis, z_axis)
00534     (float, confidence, confidence)
00535 )
00536 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::ReferenceFrame, pcl::_ReferenceFrame)
00537 
00538 //POINT_CLOUD_REGISTER_POINT_STRUCT(pcl::BorderDescription,
00539 //                                  (int, x, x)
00540 //                                  (int, y, y)
00541 //                                  (uint32_t, traits, traits)
00542 //)
00543 
00544 #ifdef BUILD_Maintainer
00545 #  if defined __GNUC__
00546 #    if __GNUC__ == 4 && __GNUC_MINOR__ > 3
00547 #      pragma GCC diagnostic warning "-Weffc++"
00548 #      pragma GCC diagnostic warning "-pedantic"
00549 #    endif
00550 #  elif defined _MSC_VER
00551 #    pragma warning(pop)
00552 #  endif
00553 #endif
00554 
00555 #endif  //#ifndef PCL_DATA_TYPES_H_