Point Cloud Library (PCL)  1.10.1-dev
point_types.h
Go to the documentation of this file.
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 
40 #pragma once
41 
42 #include <pcl/PCLPointField.h>
43 #include <pcl/register_point_struct.h>
44 
45 #include <boost/mpl/contains.hpp>
46 #include <boost/mpl/fold.hpp>
47 #include <boost/mpl/vector.hpp>
48 
49 #include <bitset>
50 
51 /**
52  * \file pcl/point_types.h
53  * Defines all the PCL implemented PointT point type structures
54  * \ingroup common
55  */
56 
57 // We're doing a lot of black magic with Boost here, so disable warnings in Maintainer mode, as we will never
58 // be able to fix them anyway
59 #if defined _MSC_VER
60  #pragma warning(disable: 4201)
61 #endif
62 
63 /** @{*/
64 namespace pcl
65 {
66  /** \brief Members: float x, y, z
67  * \ingroup common
68  */
69  struct PointXYZ;
70 
71  /** \brief Members: rgba
72  * \ingroup common
73  */
74  struct RGB;
75 
76  /** \brief Members: intensity (float)
77  * \ingroup common
78  */
79  struct Intensity;
80 
81  /** \brief Members: intensity (std::uint8_t)
82  * \ingroup common
83  */
84  struct Intensity8u;
85 
86  /** \brief Members: intensity (std::uint32_t)
87  * \ingroup common
88  */
89  struct Intensity32u;
90 
91  /** \brief Members: float x, y, z, intensity
92  * \ingroup common
93  */
94  struct PointXYZI;
95 
96  /** \brief Members: float x, y, z, uin32_t label
97  * \ingroup common
98  */
99  struct PointXYZL;
100 
101  /** \brief Members: std::uint32_t label
102  * \ingroup common
103  */
104  struct Label;
105 
106  /** \brief Members: float x, y, z; std::uint32_t rgba
107  * \ingroup common
108  */
109  struct PointXYZRGBA;
110 
111  /** \brief Members: float x, y, z, rgb
112  * \ingroup common
113  */
114  struct PointXYZRGB;
115 
116  /** \brief Members: float x, y, z, rgb, std::uint32_t label
117  * \ingroup common
118  */
119  struct PointXYZRGBL;
120 
121  /** \brief Members: float x, y, z, h, s, v
122  * \ingroup common
123  */
124  struct PointXYZHSV;
125 
126  /** \brief Members: float x, y
127  * \ingroup common
128  */
129  struct PointXY;
130 
131  /** \brief Members: float u, v
132  * \ingroup common
133  */
134  struct PointUV;
135 
136  /** \brief Members: float x, y, z, strength
137  * \ingroup common
138  */
139  struct InterestPoint;
140 
141  /** \brief Members: float normal[3], curvature
142  * \ingroup common
143  */
144  struct Normal;
145 
146  /** \brief Members: float normal[3]
147  * \ingroup common
148  */
149  struct Axis;
150 
151  /** \brief Members: float x, y, z; float normal[3], curvature
152  * \ingroup common
153  */
154  struct PointNormal;
155 
156  /** \brief Members: float x, y, z, rgb, normal[3], curvature
157  * \ingroup common
158  */
159  struct PointXYZRGBNormal;
160 
161  /** \brief Members: float x, y, z, intensity, normal[3], curvature
162  * \ingroup common
163  */
164  struct PointXYZINormal;
165 
166  /** \brief Members: float x, y, z, label, normal[3], curvature
167  * \ingroup common
168  */
169  struct PointXYZLNormal;
170 
171  /** \brief Members: float x, y, z (union with float point[4]), range
172  * \ingroup common
173  */
174  struct PointWithRange;
175 
176  /** \brief Members: float x, y, z, vp_x, vp_y, vp_z
177  * \ingroup common
178  */
179  struct PointWithViewpoint;
180 
181  /** \brief Members: float j1, j2, j3
182  * \ingroup common
183  */
184  struct MomentInvariants;
185 
186  /** \brief Members: float r_min, r_max
187  * \ingroup common
188  */
189  struct PrincipalRadiiRSD;
190 
191  /** \brief Members: std::uint8_t boundary_point
192  * \ingroup common
193  */
194  struct Boundary;
195 
196  /** \brief Members: float principal_curvature[3], pc1, pc2
197  * \ingroup common
198  */
199  struct PrincipalCurvatures;
200 
201  /** \brief Members: float descriptor[352], rf[9]
202  * \ingroup common
203  */
204  struct SHOT352;
205 
206  /** \brief Members: float descriptor[1344], rf[9]
207  * \ingroup common
208  */
209  struct SHOT1344;
210 
211  /** \brief Members: Axis x_axis, y_axis, z_axis
212  * \ingroup common
213  */
214  struct ReferenceFrame;
215 
216  /** \brief Members: float descriptor[1980], rf[9]
217  * \ingroup common
218  */
219  struct ShapeContext1980;
220 
221  /** \brief Members: float descriptor[1960], rf[9]
222  * \ingroup common
223  */
224  struct UniqueShapeContext1960;
225 
226  /** \brief Members: float pfh[125]
227  * \ingroup common
228  */
229  struct PFHSignature125;
230 
231  /** \brief Members: float pfhrgb[250]
232  * \ingroup common
233  */
234  struct PFHRGBSignature250;
235 
236  /** \brief Members: float f1, f2, f3, f4, alpha_m
237  * \ingroup common
238  */
239  struct PPFSignature;
240 
241  /** \brief Members: float f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, alpha_m
242  * \ingroup common
243  */
244  struct CPPFSignature;
245 
246  /** \brief Members: float f1, f2, f3, f4, r_ratio, g_ratio, b_ratio, alpha_m
247  * \ingroup common
248  */
249  struct PPFRGBSignature;
250 
251  /** \brief Members: float values[12]
252  * \ingroup common
253  */
254  struct NormalBasedSignature12;
255 
256  /** \brief Members: float fpfh[33]
257  * \ingroup common
258  */
259  struct FPFHSignature33;
260 
261  /** \brief Members: float vfh[308]
262  * \ingroup common
263  */
264  struct VFHSignature308;
265 
266  /** \brief Members: float grsd[21]
267  * \ingroup common
268  */
269  struct GRSDSignature21;
270 
271  /** \brief Members: float esf[640]
272  * \ingroup common
273  */
274  struct ESFSignature640;
275 
276  /** \brief Members: float gasd[512]
277  * \ingroup common
278  */
279  struct GASDSignature512;
280 
281  /** \brief Members: float gasd[984]
282  * \ingroup common
283  */
284  struct GASDSignature984;
285 
286  /** \brief Members: float gasd[7992]
287  * \ingroup common
288  */
289  struct GASDSignature7992;
290 
291  /** \brief Members: float histogram[16]
292  * \ingroup common
293  */
294  struct GFPFHSignature16;
295 
296  /** \brief Members: float scale; float orientation; std::uint8_t descriptor[64]
297  * \ingroup common
298  */
299  struct BRISKSignature512;
300 
301  /** \brief Members: float x, y, z, roll, pitch, yaw; float descriptor[36]
302  * \ingroup common
303  */
304  struct Narf36;
305 
306  /** \brief Data type to store extended information about a transition from foreground to backgroundSpecification of the fields for BorderDescription::traits.
307  * \ingroup common
308  */
309  using BorderTraits = std::bitset<32>;
310 
311  /** \brief Specification of the fields for BorderDescription::traits.
312  * \ingroup common
313  */
315  {
321  };
322 
323  /** \brief Members: int x, y; BorderTraits traits
324  * \ingroup common
325  */
326  struct BorderDescription;
327 
328  /** \brief Members: float gradient[3]
329  * \ingroup common
330  */
331  struct IntensityGradient;
332 
333  /** \brief Members: float histogram[N]
334  * \ingroup common
335  */
336  template<int N>
337  struct Histogram;
338 
339  /** \brief Members: float x, y, z, scale, angle, response, octave
340  * \ingroup common
341  */
342  struct PointWithScale;
343 
344  /** \brief Members: float x, y, z, normal[3], rgba, radius, confidence, curvature
345  * \ingroup common
346  */
347  struct PointSurfel;
348 
349  /** \brief Members: float x, y, z, intensity, intensity_variance, height_variance
350  * \ingroup common
351  */
352  struct PointDEM;
353 }
354 
355 /** @} */
356 
357 #include <pcl/impl/point_types.hpp> // Include struct definitions
358 
359 // ==============================
360 // =====POINT_CLOUD_REGISTER=====
361 // ==============================
362 
364  (std::uint32_t, rgba, rgba)
365 )
366 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::RGB, pcl::_RGB)
367 
369  (float, intensity, intensity)
370 )
371 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Intensity, pcl::_Intensity)
372 
374  (std::uint8_t, intensity, intensity)
375 )
376 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Intensity8u, pcl::_Intensity8u)
377 
379  (std::uint32_t, intensity, intensity)
380 )
381 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Intensity32u, pcl::_Intensity32u)
382 
384  (float, x, x)
385  (float, y, y)
386  (float, z, z)
387 )
388 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZ, pcl::_PointXYZ)
389 
391  (float, x, x)
392  (float, y, y)
393  (float, z, z)
394  (std::uint32_t, rgba, rgba)
395 )
396 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGBA, pcl::_PointXYZRGBA)
397 
399  (float, x, x)
400  (float, y, y)
401  (float, z, z)
402  (float, rgb, rgb)
403 )
404 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGB, pcl::_PointXYZRGB)
405 
407  (float, x, x)
408  (float, y, y)
409  (float, z, z)
410  (std::uint32_t, rgba, rgba)
411  (std::uint32_t, label, label)
412 )
413 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGBL, pcl::_PointXYZRGBL)
414 
416  (float, x, x)
417  (float, y, y)
418  (float, z, z)
419  (float, h, h)
420  (float, s, s)
421  (float, v, v)
422 )
423 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZHSV, pcl::_PointXYZHSV)
424 
426  (float, x, x)
427  (float, y, y)
428 )
429 
431  (float, u, u)
432  (float, v, v)
433 )
434 
436  (float, x, x)
437  (float, y, y)
438  (float, z, z)
439  (float, strength, strength)
440 )
441 
443  (float, x, x)
444  (float, y, y)
445  (float, z, z)
446  (float, intensity, intensity)
447 )
448 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZI, pcl::_PointXYZI)
449 
451  (float, x, x)
452  (float, y, y)
453  (float, z, z)
454  (std::uint32_t, label, label)
455 )
456 
458  (std::uint32_t, label, label)
459 )
460 
462  (float, normal_x, normal_x)
463  (float, normal_y, normal_y)
464  (float, normal_z, normal_z)
465  (float, curvature, curvature)
466 )
467 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Normal, pcl::_Normal)
468 
470  (float, normal_x, normal_x)
471  (float, normal_y, normal_y)
472  (float, normal_z, normal_z)
473 )
474 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::Axis, pcl::_Axis)
475 
477  (float, x, x)
478  (float, y, y)
479  (float, z, z)
480  (float, normal_x, normal_x)
481  (float, normal_y, normal_y)
482  (float, normal_z, normal_z)
483  (float, curvature, curvature)
484 )
486  (float, x, x)
487  (float, y, y)
488  (float, z, z)
489  (float, rgb, rgb)
490  (float, normal_x, normal_x)
491  (float, normal_y, normal_y)
492  (float, normal_z, normal_z)
493  (float, curvature, curvature)
494 )
495 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointXYZRGBNormal, pcl::_PointXYZRGBNormal)
497  (float, x, x)
498  (float, y, y)
499  (float, z, z)
500  (float, intensity, intensity)
501  (float, normal_x, normal_x)
502  (float, normal_y, normal_y)
503  (float, normal_z, normal_z)
504  (float, curvature, curvature)
505 )
507  (float, x, x)
508  (float, y, y)
509  (float, z, z)
510  (std::uint32_t, label, label)
511  (float, normal_x, normal_x)
512  (float, normal_y, normal_y)
513  (float, normal_z, normal_z)
514  (float, curvature, curvature)
515 )
517  (float, x, x)
518  (float, y, y)
519  (float, z, z)
520  (float, range, range)
521 )
522 
524  (float, x, x)
525  (float, y, y)
526  (float, z, z)
527  (float, vp_x, vp_x)
528  (float, vp_y, vp_y)
529  (float, vp_z, vp_z)
530 )
531 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointWithViewpoint, pcl::_PointWithViewpoint)
532 
534  (float, j1, j1)
535  (float, j2, j2)
536  (float, j3, j3)
537 )
538 
540  (float, r_min, r_min)
541  (float, r_max, r_max)
542 )
543 
545  (std::uint8_t, boundary_point, boundary_point)
546 )
547 
549  (float, principal_curvature_x, principal_curvature_x)
550  (float, principal_curvature_y, principal_curvature_y)
551  (float, principal_curvature_z, principal_curvature_z)
552  (float, pc1, pc1)
553  (float, pc2, pc2)
554 )
555 
557  (float[125], histogram, pfh)
558 )
559 
561  (float[250], histogram, pfhrgb)
562 )
563 
565  (float, f1, f1)
566  (float, f2, f2)
567  (float, f3, f3)
568  (float, f4, f4)
569  (float, alpha_m, alpha_m)
570 )
571 
573  (float, f1, f1)
574  (float, f2, f2)
575  (float, f3, f3)
576  (float, f4, f4)
577  (float, f5, f5)
578  (float, f6, f6)
579  (float, f7, f7)
580  (float, f8, f8)
581  (float, f9, f9)
582  (float, f10, f10)
583  (float, alpha_m, alpha_m)
584 )
585 
587  (float, f1, f1)
588  (float, f2, f2)
589  (float, f3, f3)
590  (float, f4, f4)
591  (float, r_ratio, r_ratio)
592  (float, g_ratio, g_ratio)
593  (float, b_ratio, b_ratio)
594  (float, alpha_m, alpha_m)
595 )
596 
598  (float[12], values, values)
599 )
600 
602  (float[1980], descriptor, shape_context)
603  (float[9], rf, rf)
604 )
605 
607  (float[1960], descriptor, shape_context)
608  (float[9], rf, rf)
609 )
610 
612  (float[352], descriptor, shot)
613  (float[9], rf, rf)
614 )
615 
617  (float[1344], descriptor, shot)
618  (float[9], rf, rf)
619 )
620 
622  (float[33], histogram, fpfh)
623 )
624 
626  (float, scale, brisk_scale)
627  (float, orientation, brisk_orientation)
628  (unsigned char[64], descriptor, brisk_descriptor512)
629 )
630 
632  (float[308], histogram, vfh)
633 )
634 
636  (float[21], histogram, grsd)
637 )
638 
640  (float[640], histogram, esf)
641 )
642 
644  (float[512], histogram, gasd)
645 )
646 
648  (float[984], histogram, gasd)
649 )
650 
652  (float[7992], histogram, gasd)
653 )
654 
656  (float[36], descriptor, descriptor)
657 )
658 
660  (float[16], histogram, gfpfh)
661 )
662 
664  (float, gradient_x, gradient_x)
665  (float, gradient_y, gradient_y)
666  (float, gradient_z, gradient_z)
667 )
668 
670  (float, x, x)
671  (float, y, y)
672  (float, z, z)
673  (float, scale, scale)
674 )
675 
677  (float, x, x)
678  (float, y, y)
679  (float, z, z)
680  (float, normal_x, normal_x)
681  (float, normal_y, normal_y)
682  (float, normal_z, normal_z)
683  (std::uint32_t, rgba, rgba)
684  (float, radius, radius)
685  (float, confidence, confidence)
686  (float, curvature, curvature)
687 )
688 
690  (float[3], x_axis, x_axis)
691  (float[3], y_axis, y_axis)
692  (float[3], z_axis, z_axis)
693 )
694 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::ReferenceFrame, pcl::_ReferenceFrame)
695 
697  (float, x, x)
698  (float, y, y)
699  (float, z, z)
700  (float, intensity, intensity)
701  (float, intensity_variance, intensity_variance)
702  (float, height_variance, height_variance)
703 )
704 POINT_CLOUD_REGISTER_POINT_WRAPPER(pcl::PointDEM, pcl::_PointDEM)
705 
706 namespace pcl
707 {
708  // Allow float 'rgb' data to match to the newer uint32 'rgba' tag. This is so
709  // you can load old 'rgb' PCD files into e.g. a PointCloud<PointXYZRGBA>.
710  template<typename PointT>
711  struct FieldMatches<PointT, fields::rgba>
712  {
713  bool operator() (const pcl::PCLPointField& field)
714  {
715  if (field.name == "rgb")
716  {
717  // For fixing the alpha value bug #1141, the rgb field can also match
718  // uint32.
719  return ((field.datatype == pcl::PCLPointField::FLOAT32 ||
721  field.count == 1);
722  }
723  else
724  {
728  }
729  }
730  };
731  template<typename PointT>
732  struct FieldMatches<PointT, fields::rgb>
733  {
734  bool operator() (const pcl::PCLPointField& field)
735  {
736  if (field.name == "rgba")
737  {
738  return (field.datatype == pcl::PCLPointField::UINT32 &&
739  field.count == 1);
740  }
741  else
742  {
743  // For fixing the alpha value bug #1141, rgb can also match uint32
748  }
749  }
750  };
751 
752  namespace traits
753  {
754 
755  /** \brief Metafunction to check if a given point type has a given field.
756  *
757  * Example usage at run-time:
758  *
759  * \code
760  * bool curvature_available = pcl::traits::has_field<PointT, pcl::fields::curvature>::value;
761  * \endcode
762  *
763  * Example usage at compile-time:
764  *
765  * \code
766  * BOOST_MPL_ASSERT_MSG ((pcl::traits::has_field<PointT, pcl::fields::label>::value),
767  * POINT_TYPE_SHOULD_HAVE_LABEL_FIELD,
768  * (PointT));
769  * \endcode
770  */
771  template <typename PointT, typename Field>
772  struct has_field : boost::mpl::contains<typename pcl::traits::fieldList<PointT>::type, Field>::type
773  { };
774 
775  /** Metafunction to check if a given point type has all given fields. */
776  template <typename PointT, typename Field>
777  struct has_all_fields : boost::mpl::fold<Field,
778  boost::mpl::bool_<true>,
779  boost::mpl::and_<boost::mpl::_1,
780  has_field<PointT, boost::mpl::_2> > >::type
781  { };
782 
783  /** Metafunction to check if a given point type has any of the given fields. */
784  template <typename PointT, typename Field>
785  struct has_any_field : boost::mpl::fold<Field,
786  boost::mpl::bool_<false>,
787  boost::mpl::or_<boost::mpl::_1,
788  has_field<PointT, boost::mpl::_2> > >::type
789  { };
790 
791  /** \brief Traits defined for ease of use with fields already registered before
792  *
793  * has_<fields to be detected>: struct with `value` datamember defined at compiletime
794  * has_<fields to be detected>_v: constexpr boolean
795  * Has<Fields to be detected>: concept modelling name alias for `enable_if`
796  */
797 
798  /** Metafunction to check if a given point type has x and y fields. */
799  template <typename PointT>
800  struct has_xy : has_all_fields<PointT, boost::mpl::vector<pcl::fields::x,
801  pcl::fields::y> >
802  { };
803 
804  template <typename PointT>
805  constexpr auto has_xy_v = has_xy<PointT>::value;
806 
807  template <typename PointT>
808  using HasXY = std::enable_if_t<has_xy_v<PointT>, bool>;
809 
810  template <typename PointT>
811  using HasNoXY = std::enable_if_t<!has_xy_v<PointT>, bool>;
812 
813  /** Metafunction to check if a given point type has x, y, and z fields. */
814  template <typename PointT>
815  struct has_xyz : has_all_fields<PointT, boost::mpl::vector<pcl::fields::x,
816  pcl::fields::y,
817  pcl::fields::z> >
818  { };
819 
820  template <typename PointT>
821  constexpr auto has_xyz_v = has_xyz<PointT>::value;
822 
823  template <typename PointT>
824  using HasXYZ = std::enable_if_t<has_xyz_v<PointT>, bool>;
825 
826  template <typename PointT>
827  using HasNoXYZ = std::enable_if_t<!has_xyz_v<PointT>, bool>;
828 
829  /** Metafunction to check if a given point type has normal_x, normal_y, and
830  * normal_z fields. */
831  template <typename PointT>
832  struct has_normal : has_all_fields<PointT, boost::mpl::vector<pcl::fields::normal_x,
833  pcl::fields::normal_y,
834  pcl::fields::normal_z> >
835  { };
836 
837  template <typename PointT>
838  constexpr auto has_normal_v = has_normal<PointT>::value;
839 
840  template <typename PointT>
841  using HasNormal = std::enable_if_t<has_normal_v<PointT>, bool>;
842 
843  template <typename PointT>
844  using HasNoNormal = std::enable_if_t<!has_normal_v<PointT>, bool>;
845 
846  /** Metafunction to check if a given point type has curvature field. */
847  template <typename PointT>
848  struct has_curvature : has_field<PointT, pcl::fields::curvature>
849  { };
850 
851  template <typename PointT>
852  constexpr auto has_curvature_v = has_curvature<PointT>::value;
853 
854  template <typename PointT>
855  using HasCurvature = std::enable_if_t<has_curvature_v<PointT>, bool>;
856 
857  template <typename PointT>
858  using HasNoCurvature = std::enable_if_t<!has_curvature_v<PointT>, bool>;
859 
860  /** Metafunction to check if a given point type has intensity field. */
861  template <typename PointT>
862  struct has_intensity : has_field<PointT, pcl::fields::intensity>
863  { };
864 
865  template <typename PointT>
866  constexpr auto has_intensity_v = has_intensity<PointT>::value;
867 
868  template <typename PointT>
869  using HasIntensity = std::enable_if_t<has_intensity_v<PointT>, bool>;
870 
871  template <typename PointT>
872  using HasNoIntensity = std::enable_if_t<!has_intensity_v<PointT>, bool>;
873 
874  /** Metafunction to check if a given point type has either rgb or rgba field. */
875  template <typename PointT>
876  struct has_color : has_any_field<PointT, boost::mpl::vector<pcl::fields::rgb,
877  pcl::fields::rgba> >
878  { };
879 
880  template <typename PointT>
881  constexpr auto has_color_v = has_color<PointT>::value;
882 
883  template <typename PointT>
884  using HasColor = std::enable_if_t<has_color_v<PointT>, bool>;
885 
886  template <typename PointT>
887  using HasNoColor = std::enable_if_t<!has_color_v<PointT>, bool>;
888 
889  /** Metafunction to check if a given point type has label field. */
890  template <typename PointT>
891  struct has_label : has_field<PointT, pcl::fields::label>
892  { };
893 
894  template <typename PointT>
895  constexpr auto has_label_v = has_label<PointT>::value;
896 
897  template <typename PointT>
898  using HasLabel = std::enable_if_t<has_label_v<PointT>, bool>;
899 
900  template <typename PointT>
901  using HasNoLabel = std::enable_if_t<!has_label_v<PointT>, bool>;
902  }
903 
904 } // namespace pcl
905 
906 // Not strictly required, merely to preserve API for PCL users < 1.4
907 #include <pcl/common/point_tests.h>
908 
909 #if defined _MSC_VER
910  #pragma warning(default: 4201)
911 #endif
912 
A point structure representing normal coordinates and the surface curvature estimate.
A point structure representing the grayscale intensity in single-channel images.
A point structure representing a Shape Context.
std::bitset< 32 > BorderTraits
Data type to store extended information about a transition from foreground to backgroundSpecification...
Definition: point_types.h:309
A point structure representing a description of whether a point is lying on a surface boundary or not...
A point structure representing Euclidean xyz coordinates, a label, together with normal coordinates a...
Histogram< 250 > PFHRGBSignature250
Definition: internal.hpp:74
A point structure representing Euclidean xyz coordinates, padded with an extra range float...
A point structure representing the Normal Based Signature for a feature matrix of 4-by-3...
A point structure representing a Unique Shape Context.
BorderTrait
Specification of the fields for BorderDescription::traits.
Definition: point_types.h:314
A structure representing the Local Reference Frame of a point.
Histogram< 33 > FPFHSignature33
Definition: internal.hpp:75
A point structure representing Digital Elevation Map.
A point structure representing the Binary Robust Invariant Scalable Keypoints (BRISK).
A point structure representing an Axis using its normal coordinates.
Histogram< 125 > PFHSignature125
Definition: internal.hpp:73
A point structure representing Euclidean xyz coordinates, and the RGBA color.
A point structure representing the grayscale intensity in single-channel images.
A point structure representing the Fast Point Feature Histogram (FPFH).
A 2D point structure representing Euclidean xy coordinates.
Histogram< 308 > VFHSignature308
Definition: internal.hpp:76
std::uint32_t count
Definition: PCLPointField.h:17
A structure representing RGB color information.
A point structure representing an N-D histogram.
A 2D point structure representing pixel image coordinates.
A point structure representing the GFPFH descriptor with 16 bins.
A point structure representing the Point Feature Histogram with colors (PFHRGB).
A point structure representing Euclidean xyz coordinates, and the intensity value.
std::uint8_t Label
Definition: tree.h:73
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:79
A point structure representing Euclidean xyz coordinates.
A point structure representing Euclidean xyz coordinates, intensity, together with normal coordinates...
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape and color descr...
A point structure representing an interest point with Euclidean xyz coordinates, and an interest valu...
A point structure representing the three moment invariants.
float4 PointXYZRGB
Definition: internal.hpp:60
A point structure representing the grayscale intensity in single-channel images.
A point structure representing the generic Signature of Histograms of OrienTations (SHOT) - shape onl...
A structure to store if a point in a range image lies on a border between an obstacle and the backgro...
A point structure representing Euclidean xyz coordinates, together with normal coordinates and the su...
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape and color descr...
A point structure for storing the Point Pair Feature (CPPF) values.
A point structure representing Euclidean xyz coordinates together with the viewpoint from which it wa...
A point structure representing the intensity gradient of an XYZI point cloud.
bool operator()(const PCLPointField &field)
Definition: PCLPointField.h:54
A point structure representing the generic Signature of Histograms of OrienTations (SHOT) - shape+col...
std::string name
Definition: PCLPointField.h:13
A point structure representing the Viewpoint Feature Histogram (VFH).
A point structure representing a 3-D position and scale.
A point structure representing the minimum and maximum surface radii (in meters) computed using RSD...
A point structure representing the Narf descriptor.
A point structure representing Euclidean xyz coordinates, and the RGB color.
std::uint8_t datatype
Definition: PCLPointField.h:16
A point structure representing the principal curvatures and their magnitudes.
A point structure representing the Point Feature Histogram (PFH).
A point structure representing the Ensemble of Shape Functions (ESF).
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape descriptor...
A point structure representing the Global Radius-based Surface Descriptor (GRSD). ...
A surfel, that is, a point structure representing Euclidean xyz coordinates, together with normal coo...
A point structure representing Euclidean xyz coordinates, and the RGB color, together with normal coo...
A point structure for storing the Point Pair Feature (PPF) values.
A point structure for storing the Point Pair Color Feature (PPFRGB) values.