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>
58 #pragma warning(disable: 4201)
62 # pragma GCC system_header
141 struct InterestPoint;
161 struct PointXYZRGBNormal;
166 struct PointXYZINormal;
171 struct PointXYZLNormal;
176 struct PointWithRange;
181 struct PointWithViewpoint;
186 struct MomentInvariants;
191 struct PrincipalRadiiRSD;
201 struct PrincipalCurvatures;
216 struct ReferenceFrame;
221 struct ShapeContext1980;
226 struct UniqueShapeContext1960;
246 struct CPPFSignature;
251 struct PPFRGBSignature;
256 struct NormalBasedSignature12;
271 struct GRSDSignature21;
276 struct ESFSignature640;
281 struct GASDSignature512;
286 struct GASDSignature984;
291 struct GASDSignature7992;
296 struct GFPFHSignature16;
301 struct BRISKSignature512;
328 struct BorderDescription;
333 struct IntensityGradient;
344 struct PointWithScale;
359 #include <pcl/impl/point_types.hpp>
366 (std::uint32_t, rgba, rgba)
371 (
float, intensity, intensity)
376 (std::uint8_t, intensity, intensity)
381 (std::uint32_t, intensity, intensity)
396 (std::uint32_t, rgba, rgba)
412 (std::uint32_t, rgba, rgba)
413 (std::uint32_t, label, label)
441 (
float, strength, strength)
448 (
float, intensity, intensity)
456 (std::uint32_t, label, label)
460 (std::uint32_t, label, label)
464 (
float, normal_x, normal_x)
465 (
float, normal_y, normal_y)
466 (
float, normal_z, normal_z)
467 (
float, curvature, curvature)
472 (
float, normal_x, normal_x)
473 (
float, normal_y, normal_y)
474 (
float, normal_z, normal_z)
482 (
float, normal_x, normal_x)
483 (
float, normal_y, normal_y)
484 (
float, normal_z, normal_z)
485 (
float, curvature, curvature)
492 (
float, normal_x, normal_x)
493 (
float, normal_y, normal_y)
494 (
float, normal_z, normal_z)
495 (
float, curvature, curvature)
502 (
float, intensity, intensity)
503 (
float, normal_x, normal_x)
504 (
float, normal_y, normal_y)
505 (
float, normal_z, normal_z)
506 (
float, curvature, curvature)
512 (std::uint32_t, label, label)
513 (
float, normal_x, normal_x)
514 (
float, normal_y, normal_y)
515 (
float, normal_z, normal_z)
516 (
float, curvature, curvature)
522 (
float, range, range)
542 (
float, r_min, r_min)
543 (
float, r_max, r_max)
547 (std::uint8_t, boundary_point, boundary_point)
551 (
float, principal_curvature_x, principal_curvature_x)
552 (
float, principal_curvature_y, principal_curvature_y)
553 (
float, principal_curvature_z, principal_curvature_z)
559 (
float[125], histogram, pfh)
563 (
float[250], histogram, pfhrgb)
571 (
float, alpha_m, alpha_m)
585 (
float, alpha_m, alpha_m)
593 (
float, r_ratio, r_ratio)
594 (
float, g_ratio, g_ratio)
595 (
float, b_ratio, b_ratio)
596 (
float, alpha_m, alpha_m)
600 (
float[12], values, values)
604 (
float[1980], descriptor, shape_context)
609 (
float[1960], descriptor, shape_context)
614 (
float[352], descriptor, shot)
619 (
float[1344], descriptor, shot)
624 (
float[33], histogram, fpfh)
628 (
float, scale, brisk_scale)
629 (
float, orientation, brisk_orientation)
630 (
unsigned char[64], descriptor, brisk_descriptor512)
634 (
float[308], histogram, vfh)
638 (
float[21], histogram, grsd)
642 (
float[640], histogram, esf)
646 (
float[512], histogram, gasd)
650 (
float[984], histogram, gasd)
654 (
float[7992], histogram, gasd)
658 (
float[36], descriptor, descriptor)
662 (
float[16], histogram, gfpfh)
666 (
float, gradient_x, gradient_x)
667 (
float, gradient_y, gradient_y)
668 (
float, gradient_z, gradient_z)
675 (
float, scale, scale)
682 (
float, normal_x, normal_x)
683 (
float, normal_y, normal_y)
684 (
float, normal_z, normal_z)
685 (std::uint32_t, rgba, rgba)
686 (
float, radius, radius)
687 (
float, confidence, confidence)
688 (
float, curvature, curvature)
692 (
float[3], x_axis, x_axis)
693 (
float[3], y_axis, y_axis)
694 (
float[3], z_axis, z_axis)
702 (
float, intensity, intensity)
703 (
float, intensity_variance, intensity_variance)
704 (
float, height_variance, height_variance)
712 template<
typename Po
intT>
713 struct FieldMatches<
PointT, fields::rgba>
717 if (field.
name ==
"rgb")
727 return (field.
name == traits::name<PointT, fields::rgba>::value &&
728 field.
datatype == traits::datatype<PointT, fields::rgba>::value &&
729 field.
count == traits::datatype<PointT, fields::rgba>::size);
733 template<
typename Po
intT>
734 struct FieldMatches<
PointT, fields::rgb>
738 if (field.
name ==
"rgba")
746 return (field.
name == traits::name<PointT, fields::rgb>::value &&
747 (field.
datatype == traits::datatype<PointT, fields::rgb>::value ||
749 field.
count == traits::datatype<PointT, fields::rgb>::size);
773 template <
typename Po
intT,
typename Field>
774 struct has_field : boost::mpl::contains<typename pcl::traits::fieldList<PointT>::type, Field>::type
778 template <
typename Po
intT,
typename Field>
779 struct has_all_fields : boost::mpl::fold<Field,
780 boost::mpl::bool_<true>,
781 boost::mpl::and_<boost::mpl::_1,
782 has_field<PointT, boost::mpl::_2> > >::type
786 template <
typename Po
intT,
typename Field>
787 struct has_any_field : boost::mpl::fold<Field,
788 boost::mpl::bool_<false>,
789 boost::mpl::or_<boost::mpl::_1,
790 has_field<PointT, boost::mpl::_2> > >::type
801 template <
typename Po
intT>
802 struct has_xy : has_all_fields<PointT, boost::mpl::vector<pcl::fields::x,
806 template <
typename Po
intT>
807 constexpr
auto has_xy_v = has_xy<PointT>::value;
809 template <
typename Po
intT>
810 using HasXY = std::enable_if_t<has_xy_v<PointT>,
bool>;
812 template <
typename Po
intT>
813 using HasNoXY = std::enable_if_t<!has_xy_v<PointT>,
bool>;
816 template <
typename Po
intT>
817 struct has_xyz : has_all_fields<PointT, boost::mpl::vector<pcl::fields::x,
822 template <
typename Po
intT>
823 constexpr
auto has_xyz_v = has_xyz<PointT>::value;
825 template <
typename Po
intT>
826 using HasXYZ = std::enable_if_t<has_xyz_v<PointT>,
bool>;
828 template <
typename Po
intT>
829 using HasNoXYZ = std::enable_if_t<!has_xyz_v<PointT>,
bool>;
833 template <
typename Po
intT>
834 struct has_normal : has_all_fields<PointT, boost::mpl::vector<pcl::fields::normal_x,
835 pcl::fields::normal_y,
836 pcl::fields::normal_z> >
839 template <
typename Po
intT>
840 constexpr
auto has_normal_v = has_normal<PointT>::value;
842 template <
typename Po
intT>
843 using HasNormal = std::enable_if_t<has_normal_v<PointT>,
bool>;
845 template <
typename Po
intT>
846 using HasNoNormal = std::enable_if_t<!has_normal_v<PointT>,
bool>;
849 template <
typename Po
intT>
850 struct has_curvature : has_field<PointT, pcl::fields::curvature>
853 template <
typename Po
intT>
854 constexpr
auto has_curvature_v = has_curvature<PointT>::value;
856 template <
typename Po
intT>
857 using HasCurvature = std::enable_if_t<has_curvature_v<PointT>,
bool>;
859 template <
typename Po
intT>
860 using HasNoCurvature = std::enable_if_t<!has_curvature_v<PointT>,
bool>;
863 template <
typename Po
intT>
864 struct has_intensity : has_field<PointT, pcl::fields::intensity>
867 template <
typename Po
intT>
868 constexpr
auto has_intensity_v = has_intensity<PointT>::value;
870 template <
typename Po
intT>
871 using HasIntensity = std::enable_if_t<has_intensity_v<PointT>,
bool>;
873 template <
typename Po
intT>
874 using HasNoIntensity = std::enable_if_t<!has_intensity_v<PointT>,
bool>;
877 template <
typename Po
intT>
878 struct has_color : has_any_field<PointT, boost::mpl::vector<pcl::fields::rgb,
882 template <
typename Po
intT>
883 constexpr
auto has_color_v = has_color<PointT>::value;
885 template <
typename Po
intT>
886 using HasColor = std::enable_if_t<has_color_v<PointT>,
bool>;
888 template <
typename Po
intT>
889 using HasNoColor = std::enable_if_t<!has_color_v<PointT>,
bool>;
892 template <
typename Po
intT>
893 struct has_label : has_field<PointT, pcl::fields::label>
896 template <
typename Po
intT>
897 constexpr
auto has_label_v = has_label<PointT>::value;
899 template <
typename Po
intT>
900 using HasLabel = std::enable_if_t<has_label_v<PointT>,
bool>;
902 template <
typename Po
intT>
903 using HasNoLabel = std::enable_if_t<!has_label_v<PointT>,
bool>;
909 #include <pcl/common/point_tests.h>
912 #pragma warning(default: 4201)