Point Cloud Library (PCL)  1.8.0
point_types.h
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Point Cloud Library (PCL) - www.pointclouds.org
5  * Copyright (c) 2010-2011, Willow Garage, Inc.
6  *
7  * All rights reserved.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  *
13  * * Redistributions of source code must retain the above copyright
14  * notice, this list of conditions and the following disclaimer.
15  * * Redistributions in binary form must reproduce the above
16  * copyright notice, this list of conditions and the following
17  * disclaimer in the documentation and/or other materials provided
18  * with the distribution.
19  * * Neither the name of the copyright holder(s) nor the names of its
20  * contributors may be used to endorse or promote products derived
21  * from this software without specific prior written permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  *
36  * $Id$
37  *
38  */
39 #ifndef PCL_DATA_TYPES_H_
40 #define PCL_DATA_TYPES_H_
41 
42 #include <pcl/pcl_macros.h>
43 #include <bitset>
44 #include <pcl/register_point_struct.h>
45 #include <boost/mpl/contains.hpp>
46 #include <boost/mpl/fold.hpp>
47 #include <boost/mpl/vector.hpp>
48 
49 /**
50  * \file pcl/point_types.h
51  * Defines all the PCL implemented PointT point type structures
52  * \ingroup common
53  */
54 
55 // We're doing a lot of black magic with Boost here, so disable warnings in Maintainer mode, as we will never
56 // be able to fix them anyway
57 #if defined _MSC_VER
58  #pragma warning(disable: 4201)
59 #endif
60 //#pragma warning(push, 1)
61 #if defined __GNUC__
62 # pragma GCC system_header
63 #endif
64 
65 /** @{*/
66 namespace pcl
67 {
68  /** \brief Members: float x, y, z
69  * \ingroup common
70  */
71  struct PointXYZ;
72 
73  /** \brief Members: rgba
74  * \ingroup common
75  */
76  struct RGB;
77 
78  /** \brief Members: intensity (float)
79  * \ingroup common
80  */
81  struct Intensity;
82 
83  /** \brief Members: intensity (uint8_t)
84  * \ingroup common
85  */
86  struct Intensity8u;
87 
88  /** \brief Members: intensity (uint32_t)
89  * \ingroup common
90  */
91  struct Intensity32u;
92 
93  /** \brief Members: float x, y, z, intensity
94  * \ingroup common
95  */
96  struct PointXYZI;
97 
98  /** \brief Members: float x, y, z, uin32_t label
99  * \ingroup common
100  */
101  struct PointXYZL;
102 
103  /** \brief Members: uint32_t label
104  * \ingroup common
105  */
106  struct Label;
107 
108  /** \brief Members: float x, y, z; uint32_t rgba
109  * \ingroup common
110  */
111  struct PointXYZRGBA;
112 
113  /** \brief Members: float x, y, z, rgb
114  * \ingroup common
115  */
116  struct PointXYZRGB;
117 
118  /** \brief Members: float x, y, z, rgb, uint32_t label
119  * \ingroup common
120  */
121  struct PointXYZRGBL;
122 
123  /** \brief Members: float x, y, z, h, s, v
124  * \ingroup common
125  */
126  struct PointXYZHSV;
127 
128  /** \brief Members: float x, y
129  * \ingroup common
130  */
131  struct PointXY;
132 
133  /** \brief Members: float u, v
134  * \ingroup common
135  */
136  struct PointUV;
137 
138  /** \brief Members: float x, y, z, strength
139  * \ingroup common
140  */
141  struct InterestPoint;
142 
143  /** \brief Members: float normal[3], curvature
144  * \ingroup common
145  */
146  struct Normal;
147 
148  /** \brief Members: float normal[3]
149  * \ingroup common
150  */
151  struct Axis;
152 
153  /** \brief Members: float x, y, z; float normal[3], curvature
154  * \ingroup common
155  */
156  struct PointNormal;
157 
158  /** \brief Members: float x, y, z, rgb, normal[3], curvature
159  * \ingroup common
160  */
161  struct PointXYZRGBNormal;
162 
163  /** \brief Members: float x, y, z, intensity, normal[3], curvature
164  * \ingroup common
165  */
166  struct PointXYZINormal;
167 
168  /** \brief Members: float x, y, z, label, normal[3], curvature
169  * \ingroup common
170  */
171  struct PointXYZLNormal;
172 
173  /** \brief Members: float x, y, z (union with float point[4]), range
174  * \ingroup common
175  */
176  struct PointWithRange;
177 
178  /** \brief Members: float x, y, z, vp_x, vp_y, vp_z
179  * \ingroup common
180  */
181  struct PointWithViewpoint;
182 
183  /** \brief Members: float j1, j2, j3
184  * \ingroup common
185  */
186  struct MomentInvariants;
187 
188  /** \brief Members: float r_min, r_max
189  * \ingroup common
190  */
191  struct PrincipalRadiiRSD;
192 
193  /** \brief Members: uint8_t boundary_point
194  * \ingroup common
195  */
196  struct Boundary;
197 
198  /** \brief Members: float principal_curvature[3], pc1, pc2
199  * \ingroup common
200  */
201  struct PrincipalCurvatures;
202 
203  /** \brief Members: float descriptor[352], rf[9]
204  * \ingroup common
205  */
206  struct SHOT352;
207 
208  /** \brief Members: float descriptor[1344], rf[9]
209  * \ingroup common
210  */
211  struct SHOT1344;
212 
213  /** \brief Members: Axis x_axis, y_axis, z_axis
214  * \ingroup common
215  */
216  struct ReferenceFrame;
217 
218  /** \brief Members: float descriptor[1980], rf[9]
219  * \ingroup common
220  */
221  struct ShapeContext1980;
222 
223  /** \brief Members: float descriptor[1960], rf[9]
224  * \ingroup common
225  */
226  struct UniqueShapeContext1960;
227 
228  /** \brief Members: float pfh[125]
229  * \ingroup common
230  */
231  struct PFHSignature125;
232 
233  /** \brief Members: float pfhrgb[250]
234  * \ingroup common
235  */
236  struct PFHRGBSignature250;
237 
238  /** \brief Members: float f1, f2, f3, f4, alpha_m
239  * \ingroup common
240  */
241  struct PPFSignature;
242 
243  /** \brief Members: float f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, alpha_m
244  * \ingroup common
245  */
246  struct CPPFSignature;
247 
248  /** \brief Members: float f1, f2, f3, f4, r_ratio, g_ratio, b_ratio, alpha_m
249  * \ingroup common
250  */
251  struct PPFRGBSignature;
252 
253  /** \brief Members: float values[12]
254  * \ingroup common
255  */
256  struct NormalBasedSignature12;
257 
258  /** \brief Members: float fpfh[33]
259  * \ingroup common
260  */
261  struct FPFHSignature33;
262 
263  /** \brief Members: float vfh[308]
264  * \ingroup common
265  */
266  struct VFHSignature308;
267 
268  /** \brief Members: float grsd[21]
269  * \ingroup common
270  */
271  struct GRSDSignature21;
272 
273  /** \brief Members: float esf[640]
274  * \ingroup common
275  */
276  struct ESFSignature640;
277 
278  /** \brief Members: float histogram[16]
279  * \ingroup common
280  */
281  struct GFPFHSignature16;
282 
283  /** \brief Members: float scale; float orientation; uint8_t descriptor[64]
284  * \ingroup common
285  */
286  struct BRISKSignature512;
287 
288  /** \brief Members: float x, y, z, roll, pitch, yaw; float descriptor[36]
289  * \ingroup common
290  */
291  struct Narf36;
292 
293  /** \brief Data type to store extended information about a transition from foreground to backgroundSpecification of the fields for BorderDescription::traits.
294  * \ingroup common
295  */
296  typedef std::bitset<32> BorderTraits;
297 
298  /** \brief Specification of the fields for BorderDescription::traits.
299  * \ingroup common
300  */
302  {
308  };
309 
310  /** \brief Members: int x, y; BorderTraits traits
311  * \ingroup common
312  */
313  struct BorderDescription;
314 
315  /** \brief Members: float gradient[3]
316  * \ingroup common
317  */
318  struct IntensityGradient;
319 
320  /** \brief Members: float histogram[N]
321  * \ingroup common
322  */
323  template<int N>
324  struct Histogram;
325 
326  /** \brief Members: float x, y, z, scale, angle, response, octave
327  * \ingroup common
328  */
329  struct PointWithScale;
330 
331  /** \brief Members: float x, y, z, normal[3], rgba, radius, confidence, curvature
332  * \ingroup common
333  */
334  struct PointSurfel;
335 
336  /** \brief Members: float x, y, z, intensity, intensity_variance, height_variance
337  * \ingroup common
338  */
339  struct PointDEM;
340 }
341 
342 /** @} */
343 
344 #include <pcl/impl/point_types.hpp> // Include struct definitions
345 
346 // ==============================
347 // =====POINT_CLOUD_REGISTER=====
348 // ==============================
349 
351  (uint32_t, rgba, rgba)
352 )
353 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::RGB, pcl::_RGB)
354 
356  (float, intensity, intensity)
357 )
358 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Intensity, pcl::_Intensity)
359 
361  (uint8_t, intensity, intensity)
362 )
363 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Intensity8u, pcl::_Intensity8u)
364 
365 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_Intensity32u,
366  (uint32_t, intensity, intensity)
367 )
368 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Intensity32u, pcl::_Intensity32u)
369 
371  (float, x, x)
372  (float, y, y)
373  (float, z, z)
374 )
375 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZ, pcl::_PointXYZ)
376 
377 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZRGBA,
378  (float, x, x)
379  (float, y, y)
380  (float, z, z)
381  (uint32_t, rgba, rgba)
382 )
383 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGBA, pcl::_PointXYZRGBA)
384 
386  (float, x, x)
387  (float, y, y)
388  (float, z, z)
389  (float, rgb, rgb)
390 )
391 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGB, pcl::_PointXYZRGB)
392 
393 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZRGBL,
394  (float, x, x)
395  (float, y, y)
396  (float, z, z)
397  (uint32_t, rgba, rgba)
398  (uint32_t, label, label)
399 )
400 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGBL, pcl::_PointXYZRGBL)
401 
403  (float, x, x)
404  (float, y, y)
405  (float, z, z)
406  (float, h, h)
407  (float, s, s)
408  (float, v, v)
409 )
410 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZHSV, pcl::_PointXYZHSV)
411 
413  (float, x, x)
414  (float, y, y)
415 )
416 
418  (float, u, u)
419  (float, v, v)
420 )
421 
422 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::InterestPoint,
423  (float, x, x)
424  (float, y, y)
425  (float, z, z)
426  (float, strength, strength)
427 )
428 
430  (float, x, x)
431  (float, y, y)
432  (float, z, z)
433  (float, intensity, intensity)
434 )
435 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZI, pcl::_PointXYZI)
436 
438  (float, x, x)
439  (float, y, y)
440  (float, z, z)
441  (uint32_t, label, label)
442 )
443 
445  (uint32_t, label, label)
446 )
447 
449  (float, normal_x, normal_x)
450  (float, normal_y, normal_y)
451  (float, normal_z, normal_z)
452  (float, curvature, curvature)
453 )
454 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Normal, pcl::_Normal)
455 
457  (float, normal_x, normal_x)
458  (float, normal_y, normal_y)
459  (float, normal_z, normal_z)
460 )
461 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Axis, pcl::_Axis)
462 
464  (float, x, x)
465  (float, y, y)
466  (float, z, z)
467  (float, normal_x, normal_x)
468  (float, normal_y, normal_y)
469  (float, normal_z, normal_z)
470  (float, curvature, curvature)
471 )
472 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointXYZRGBNormal,
473  (float, x, x)
474  (float, y, y)
475  (float, z, z)
476  (float, rgb, rgb)
477  (float, normal_x, normal_x)
478  (float, normal_y, normal_y)
479  (float, normal_z, normal_z)
480  (float, curvature, curvature)
481 )
482 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGBNormal, pcl::_PointXYZRGBNormal)
483 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointXYZINormal,
484  (float, x, x)
485  (float, y, y)
486  (float, z, z)
487  (float, intensity, intensity)
488  (float, normal_x, normal_x)
489  (float, normal_y, normal_y)
490  (float, normal_z, normal_z)
491  (float, curvature, curvature)
492 )
493 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointXYZLNormal,
494  (float, x, x)
495  (float, y, y)
496  (float, z, z)
497  (uint32_t, label, label)
498  (float, normal_x, normal_x)
499  (float, normal_y, normal_y)
500  (float, normal_z, normal_z)
501  (float, curvature, curvature)
502 )
503 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointWithRange,
504  (float, x, x)
505  (float, y, y)
506  (float, z, z)
507  (float, range, range)
508 )
509 
510 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_PointWithViewpoint,
511  (float, x, x)
512  (float, y, y)
513  (float, z, z)
514  (float, vp_x, vp_x)
515  (float, vp_y, vp_y)
516  (float, vp_z, vp_z)
517 )
518 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointWithViewpoint, pcl::_PointWithViewpoint)
519 
520 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::MomentInvariants,
521  (float, j1, j1)
522  (float, j2, j2)
523  (float, j3, j3)
524 )
525 
526 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PrincipalRadiiRSD,
527  (float, r_min, r_min)
528  (float, r_max, r_max)
529 )
530 
532  (uint8_t, boundary_point, boundary_point)
533 )
534 
535 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PrincipalCurvatures,
536  (float, principal_curvature_x, principal_curvature_x)
537  (float, principal_curvature_y, principal_curvature_y)
538  (float, principal_curvature_z, principal_curvature_z)
539  (float, pc1, pc1)
540  (float, pc2, pc2)
541 )
542 
543 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PFHSignature125,
544  (float[125], histogram, pfh)
545 )
546 
547 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PFHRGBSignature250,
548  (float[250], histogram, pfhrgb)
549 )
550 
552  (float, f1, f1)
553  (float, f2, f2)
554  (float, f3, f3)
555  (float, f4, f4)
556  (float, alpha_m, alpha_m)
557 )
558 
559 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::CPPFSignature,
560  (float, f1, f1)
561  (float, f2, f2)
562  (float, f3, f3)
563  (float, f4, f4)
564  (float, f5, f5)
565  (float, f6, f6)
566  (float, f7, f7)
567  (float, f8, f8)
568  (float, f9, f9)
569  (float, f10, f10)
570  (float, alpha_m, alpha_m)
571 )
572 
573 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PPFRGBSignature,
574  (float, f1, f1)
575  (float, f2, f2)
576  (float, f3, f3)
577  (float, f4, f4)
578  (float, r_ratio, r_ratio)
579  (float, g_ratio, g_ratio)
580  (float, b_ratio, b_ratio)
581  (float, alpha_m, alpha_m)
582 )
583 
584 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::NormalBasedSignature12,
585  (float[12], values, values)
586 )
587 
588 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::ShapeContext1980,
589  (float[1980], descriptor, shape_context)
590  (float[9], rf, rf)
591 )
592 
593 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::UniqueShapeContext1960,
594  (float[1960], descriptor, shape_context)
595  (float[9], rf, rf)
596 )
597 
599  (float[352], descriptor, shot)
600  (float[9], rf, rf)
601 )
602 
604  (float[1344], descriptor, shot)
605  (float[9], rf, rf)
606 )
607 
608 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::FPFHSignature33,
609  (float[33], histogram, fpfh)
610 )
611 
612 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::BRISKSignature512,
613  (float, scale, brisk_scale)
614  (float, orientation, brisk_orientation)
615  (unsigned char[64], descriptor, brisk_descriptor512)
616 )
617 
618 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::VFHSignature308,
619  (float[308], histogram, vfh)
620 )
621 
622 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::GRSDSignature21,
623  (float[21], histogram, grsd)
624 )
625 
626 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::ESFSignature640,
627  (float[640], histogram, esf)
628 )
629 
631  (float[36], descriptor, descriptor)
632 )
633 
634 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::GFPFHSignature16,
635  (float[16], histogram, gfpfh)
636 )
637 
638 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::IntensityGradient,
639  (float, gradient_x, gradient_x)
640  (float, gradient_y, gradient_y)
641  (float, gradient_z, gradient_z)
642 )
643 
644 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PointWithScale,
645  (float, x, x)
646  (float, y, y)
647  (float, z, z)
648  (float, scale, scale)
649 )
650 
652  (float, x, x)
653  (float, y, y)
654  (float, z, z)
655  (float, normal_x, normal_x)
656  (float, normal_y, normal_y)
657  (float, normal_z, normal_z)
658  (uint32_t, rgba, rgba)
659  (float, radius, radius)
660  (float, confidence, confidence)
661  (float, curvature, curvature)
662 )
663 
664 POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::_ReferenceFrame,
665  (float[3], x_axis, x_axis)
666  (float[3], y_axis, y_axis)
667  (float[3], z_axis, z_axis)
668 )
669 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::ReferenceFrame, pcl::_ReferenceFrame)
670 
672  (float, x, x)
673  (float, y, y)
674  (float, z, z)
675  (float, intensity, intensity)
676  (float, intensity_variance, intensity_variance)
677  (float, height_variance, height_variance)
678 )
679 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointDEM, pcl::_PointDEM)
680 
681 namespace pcl
682 {
683  // Allow float 'rgb' data to match to the newer uint32 'rgba' tag. This is so
684  // you can load old 'rgb' PCD files into e.g. a PointCloud<PointXYZRGBA>.
685  template<typename PointT>
686  struct FieldMatches<PointT, fields::rgba>
687  {
688  bool operator() (const pcl::PCLPointField& field)
689  {
690  if (field.name == "rgb")
691  {
692  return (field.datatype == pcl::PCLPointField::FLOAT32 &&
693  field.count == 1);
694  }
695  else
696  {
697  return (field.name == traits::name<PointT, fields::rgba>::value &&
698  field.datatype == traits::datatype<PointT, fields::rgba>::value &&
699  field.count == traits::datatype<PointT, fields::rgba>::size);
700  }
701  }
702  };
703  template<typename PointT>
704  struct FieldMatches<PointT, fields::rgb>
705  {
706  bool operator() (const pcl::PCLPointField& field)
707  {
708  if (field.name == "rgba")
709  {
710  return (field.datatype == pcl::PCLPointField::UINT32 &&
711  field.count == 1);
712  }
713  else
714  {
715  return (field.name == traits::name<PointT, fields::rgb>::value &&
716  field.datatype == traits::datatype<PointT, fields::rgb>::value &&
717  field.count == traits::datatype<PointT, fields::rgb>::size);
718  }
719  }
720  };
721 
722  namespace traits
723  {
724 
725  /** \brief Metafunction to check if a given point type has a given field.
726  *
727  * Example usage at run-time:
728  *
729  * \code
730  * bool curvature_available = pcl::traits::has_field<PointT, pcl::fields::curvature>::value;
731  * \endcode
732  *
733  * Example usage at compile-time:
734  *
735  * \code
736  * BOOST_MPL_ASSERT_MSG ((pcl::traits::has_field<PointT, pcl::fields::label>::value),
737  * POINT_TYPE_SHOULD_HAVE_LABEL_FIELD,
738  * (PointT));
739  * \endcode
740  */
741  template <typename PointT, typename Field>
742  struct has_field : boost::mpl::contains<typename pcl::traits::fieldList<PointT>::type, Field>::type
743  { };
744 
745  /** Metafunction to check if a given point type has all given fields. */
746  template <typename PointT, typename Field>
747  struct has_all_fields : boost::mpl::fold<Field,
748  boost::mpl::bool_<true>,
749  boost::mpl::and_<boost::mpl::_1,
750  has_field<PointT, boost::mpl::_2> > >::type
751  { };
752 
753  /** Metafunction to check if a given point type has any of the given fields. */
754  template <typename PointT, typename Field>
755  struct has_any_field : boost::mpl::fold<Field,
756  boost::mpl::bool_<false>,
757  boost::mpl::or_<boost::mpl::_1,
758  has_field<PointT, boost::mpl::_2> > >::type
759  { };
760 
761  /** Metafunction to check if a given point type has x, y, and z fields. */
762  template <typename PointT>
763  struct has_xyz : has_all_fields<PointT, boost::mpl::vector<pcl::fields::x,
764  pcl::fields::y,
765  pcl::fields::z> >
766  { };
767 
768  /** Metafunction to check if a given point type has normal_x, normal_y, and
769  * normal_z fields. */
770  template <typename PointT>
771  struct has_normal : has_all_fields<PointT, boost::mpl::vector<pcl::fields::normal_x,
772  pcl::fields::normal_y,
773  pcl::fields::normal_z> >
774  { };
775 
776  /** Metafunction to check if a given point type has curvature field. */
777  template <typename PointT>
778  struct has_curvature : has_field<PointT, pcl::fields::curvature>
779  { };
780 
781  /** Metafunction to check if a given point type has intensity field. */
782  template <typename PointT>
783  struct has_intensity : has_field<PointT, pcl::fields::intensity>
784  { };
785 
786  /** Metafunction to check if a given point type has either rgb or rgba field. */
787  template <typename PointT>
788  struct has_color : has_any_field<PointT, boost::mpl::vector<pcl::fields::rgb,
789  pcl::fields::rgba> >
790  { };
791 
792  /** Metafunction to check if a given point type has label field. */
793  template <typename PointT>
794  struct has_label : has_field<PointT, pcl::fields::label>
795  { };
796 
797  }
798 
799 } // namespace pcl
800 
801 #if defined _MSC_VER
802  #pragma warning(default: 4201)
803 #endif
804 //#pragma warning(pop)
805 
806 #endif //#ifndef PCL_DATA_TYPES_H_
Histogram< 125 > PFHSignature125
Definition: internal.hpp:73
BorderTrait
Specification of the fields for BorderDescription::traits.
Definition: point_types.h:301
Metafunction to check if a given point type has normal_x, normal_y, and normal_z fields.
Definition: point_types.h:771
float4 PointXYZRGB
Definition: internal.hpp:60
Metafunction to check if a given point type has either rgb or rgba field.
Definition: point_types.h:788
pcl::uint32_t count
Definition: PCLPointField.h:25
Metafunction to check if a given point type has curvature field.
Definition: point_types.h:778
Metafunction to check if a given point type has intensity field.
Definition: point_types.h:783
Metafunction to check if a given point type has any of the given fields.
Definition: point_types.h:755
Metafunction to check if a given point type has x, y, and z fields.
Definition: point_types.h:763
POINT_CLOUD_REGISTER_POINT_STRUCT(pcl::_PointXYZLAB,(float, x, x)(float, y, y)(float, z, z)(float, L, L)(float, a, a)(float, b, b)) namespace pcl
Definition: gicp6d.h:78
Histogram< 308 > VFHSignature308
Definition: internal.hpp:76
Histogram< 33 > FPFHSignature33
Definition: internal.hpp:75
Metafunction to check if a given point type has all given fields.
Definition: point_types.h:747
Histogram< 250 > PFHRGBSignature250
Definition: internal.hpp:74
pcl::uint8_t datatype
Definition: PCLPointField.h:24
std::string name
Definition: PCLPointField.h:21
Metafunction to check if a given point type has label field.
Definition: point_types.h:794
A point structure representing the Narf descriptor.
A point structure representing Euclidean xyz coordinates, and the RGB color.
Metafunction to check if a given point type has a given field.
Definition: point_types.h:742
std::bitset< 32 > BorderTraits
Data type to store extended information about a transition from foreground to backgroundSpecification...
Definition: point_types.h:291