Point Cloud Library (PCL)  1.10.1
point_representation.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 
40 #pragma once
41 
42 #include <algorithm>
43 #include <vector>
44 
45 #include <pcl/point_types.h>
46 #include <pcl/pcl_macros.h>
47 #include <pcl/for_each_type.h>
48 
49 namespace pcl
50 {
51  /** \brief @b PointRepresentation provides a set of methods for converting a point structs/object into an
52  * n-dimensional vector.
53  * \note This is an abstract class. Subclasses must set nr_dimensions_ to the appropriate value in the constructor
54  * and provide an implementation of the pure virtual copyToFloatArray method.
55  * \author Michael Dixon
56  */
57  template <typename PointT>
59  {
60  protected:
61  /** \brief The number of dimensions in this point's vector (i.e. the "k" in "k-D") */
62  int nr_dimensions_ = 0;
63  /** \brief A vector containing the rescale factor to apply to each dimension. */
64  std::vector<float> alpha_;
65  /** \brief Indicates whether this point representation is trivial. It is trivial if and only if the following
66  * conditions hold:
67  * - the relevant data consists only of float values
68  * - the vectorize operation directly copies the first nr_dimensions_ elements of PointT to the out array
69  * - sizeof(PointT) is a multiple of sizeof(float)
70  * In short, a trivial point representation converts the input point to a float array that is the same as if
71  * the point was reinterpret_casted to a float array of length nr_dimensions_ . This value says that this
72  * representation can be trivial; it is only trivial if setRescaleValues() has not been set.
73  */
74  bool trivial_ = false;
75 
76  public:
79 
80  /** \brief Empty destructor */
81  virtual ~PointRepresentation () = default;
82  //TODO: check if copy and move constructors / assignment operators are needed
83 
84  /** \brief Copy point data from input point to a float array. This method must be overridden in all subclasses.
85  * \param[in] p The input point
86  * \param[out] out A pointer to a float array.
87  */
88  virtual void copyToFloatArray (const PointT &p, float *out) const = 0;
89 
90  /** \brief Returns whether this point representation is trivial. It is trivial if and only if the following
91  * conditions hold:
92  * - the relevant data consists only of float values
93  * - the vectorize operation directly copies the first nr_dimensions_ elements of PointT to the out array
94  * - sizeof(PointT) is a multiple of sizeof(float)
95  * In short, a trivial point representation converts the input point to a float array that is the same as if
96  * the point was reinterpret_casted to a float array of length nr_dimensions_ . */
97  inline bool isTrivial() const { return trivial_ && alpha_.empty (); }
98 
99  /** \brief Verify that the input point is valid.
100  * \param p The point to validate
101  */
102  virtual bool
103  isValid (const PointT &p) const
104  {
105  bool is_valid = true;
106 
107  if (trivial_)
108  {
109  const float* temp = reinterpret_cast<const float*>(&p);
110 
111  for (int i = 0; i < nr_dimensions_; ++i)
112  {
113  if (!std::isfinite (temp[i]))
114  {
115  is_valid = false;
116  break;
117  }
118  }
119  }
120  else
121  {
122  float *temp = new float[nr_dimensions_];
123  copyToFloatArray (p, temp);
124 
125  for (int i = 0; i < nr_dimensions_; ++i)
126  {
127  if (!std::isfinite (temp[i]))
128  {
129  is_valid = false;
130  break;
131  }
132  }
133  delete [] temp;
134  }
135  return (is_valid);
136  }
137 
138  /** \brief Convert input point into a vector representation, rescaling by \a alpha.
139  * \param[in] p the input point
140  * \param[out] out The output vector. Can be of any type that implements the [] operator.
141  */
142  template <typename OutputType> void
143  vectorize (const PointT &p, OutputType &out) const
144  {
145  float *temp = new float[nr_dimensions_];
146  copyToFloatArray (p, temp);
147  if (alpha_.empty ())
148  {
149  for (int i = 0; i < nr_dimensions_; ++i)
150  out[i] = temp[i];
151  }
152  else
153  {
154  for (int i = 0; i < nr_dimensions_; ++i)
155  out[i] = temp[i] * alpha_[i];
156  }
157  delete [] temp;
158  }
159 
160  /** \brief Set the rescale values to use when vectorizing points
161  * \param[in] rescale_array The array/vector of rescale values. Can be of any type that implements the [] operator.
162  */
163  void
164  setRescaleValues (const float *rescale_array)
165  {
166  alpha_.resize (nr_dimensions_);
167  std::copy_n(rescale_array, nr_dimensions_, alpha_.begin());
168  }
169 
170  /** \brief Return the number of dimensions in the point's vector representation. */
171  inline int getNumberOfDimensions () const { return (nr_dimensions_); }
172  };
173 
174  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
175  /** \brief @b DefaultPointRepresentation extends PointRepresentation to define default behavior for common point types.
176  */
177  template <typename PointDefault>
178  class DefaultPointRepresentation : public PointRepresentation <PointDefault>
179  {
182 
183  public:
184  // Boost shared pointers
187 
189  {
190  // If point type is unknown, assume it's a struct/array of floats, and compute the number of dimensions
191  nr_dimensions_ = sizeof (PointDefault) / sizeof (float);
192  // Limit the default representation to the first 3 elements
193  if (nr_dimensions_ > 3) nr_dimensions_ = 3;
194 
195  trivial_ = true;
196  }
197 
199 
200  inline Ptr
201  makeShared () const
202  {
203  return (Ptr (new DefaultPointRepresentation<PointDefault> (*this)));
204  }
205 
206  void
207  copyToFloatArray (const PointDefault &p, float * out) const override
208  {
209  // If point type is unknown, treat it as a struct/array of floats
210  const float* ptr = reinterpret_cast<const float*> (&p);
211  std::copy_n(ptr, nr_dimensions_, out);
212  }
213  };
214 
215  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
216  /** \brief @b DefaulFeatureRepresentation extends PointRepresentation and is intended to be used when defining the
217  * default behavior for feature descriptor types (i.e., copy each element of each field into a float array).
218  */
219  template <typename PointDefault>
220  class DefaultFeatureRepresentation : public PointRepresentation <PointDefault>
221  {
222  protected:
224 
225  private:
226  struct IncrementFunctor
227  {
228  IncrementFunctor (int &n) : n_ (n)
229  {
230  n_ = 0;
231  }
232 
233  template<typename Key> inline void operator () ()
234  {
236  }
237 
238  private:
239  int &n_;
240  };
241 
242  struct NdCopyPointFunctor
243  {
244  using Pod = typename traits::POD<PointDefault>::type;
245 
246  NdCopyPointFunctor (const PointDefault &p1, float * p2)
247  : p1_ (reinterpret_cast<const Pod&>(p1)), p2_ (p2), f_idx_ (0) { }
248 
249  template<typename Key> inline void operator() ()
250  {
251  using FieldT = typename pcl::traits::datatype<PointDefault, Key>::type;
253  Helper<Key, FieldT, NrDims>::copyPoint (p1_, p2_, f_idx_);
254  }
255 
256  // Copy helper for scalar fields
257  template <typename Key, typename FieldT, int NrDims>
258  struct Helper
259  {
260  static void copyPoint (const Pod &p1, float * p2, int &f_idx)
261  {
262  const std::uint8_t * data_ptr = reinterpret_cast<const std::uint8_t *> (&p1) +
264  p2[f_idx++] = *reinterpret_cast<const FieldT*> (data_ptr);
265  }
266  };
267  // Copy helper for array fields
268  template <typename Key, typename FieldT, int NrDims>
269  struct Helper<Key, FieldT[NrDims], NrDims>
270  {
271  static void copyPoint (const Pod &p1, float * p2, int &f_idx)
272  {
273  const std::uint8_t * data_ptr = reinterpret_cast<const std::uint8_t *> (&p1) +
275  int nr_dims = NrDims;
276  const FieldT * array = reinterpret_cast<const FieldT *> (data_ptr);
277  for (int i = 0; i < nr_dims; ++i)
278  {
279  p2[f_idx++] = array[i];
280  }
281  }
282  };
283 
284  private:
285  const Pod &p1_;
286  float * p2_;
287  int f_idx_;
288  };
289 
290  public:
291  // Boost shared pointers
295 
297  {
298  nr_dimensions_ = 0; // zero-out the nr_dimensions_ before it gets incremented
299  pcl::for_each_type <FieldList> (IncrementFunctor (nr_dimensions_));
300  }
301 
302  inline Ptr
303  makeShared () const
304  {
305  return (Ptr (new DefaultFeatureRepresentation<PointDefault> (*this)));
306  }
307 
308  void
309  copyToFloatArray (const PointDefault &p, float * out) const override
310  {
311  pcl::for_each_type <FieldList> (NdCopyPointFunctor (p, out));
312  }
313  };
314 
315  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
316  template <>
318  {
319  public:
321  {
322  nr_dimensions_ = 3;
323  trivial_ = true;
324  }
325 
326  void
327  copyToFloatArray (const PointXYZ &p, float * out) const override
328  {
329  out[0] = p.x;
330  out[1] = p.y;
331  out[2] = p.z;
332  }
333  };
334 
335  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
336  template <>
338  {
339  public:
341  {
342  nr_dimensions_ = 3;
343  trivial_ = true;
344  }
345 
346  void
347  copyToFloatArray (const PointXYZI &p, float * out) const override
348  {
349  out[0] = p.x;
350  out[1] = p.y;
351  out[2] = p.z;
352  // By default, p.intensity is not part of the PointXYZI vectorization
353  }
354  };
355 
356  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
357  template <>
359  {
360  public:
362  {
363  nr_dimensions_ = 3;
364  trivial_ = true;
365  }
366 
367  void
368  copyToFloatArray (const PointNormal &p, float * out) const override
369  {
370  out[0] = p.x;
371  out[1] = p.y;
372  out[2] = p.z;
373  }
374  };
375 
376  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
377  template <>
379  {};
380 
381  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
382  template <>
384  {};
385 
386  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
387  template <>
389  {
390  public:
392  {
393  nr_dimensions_ = 4;
394  trivial_ = true;
395  }
396 
397  void
398  copyToFloatArray (const PPFSignature &p, float * out) const override
399  {
400  out[0] = p.f1;
401  out[1] = p.f2;
402  out[2] = p.f3;
403  out[3] = p.f4;
404  }
405  };
406 
407  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
408  template <>
410  {};
411 
412  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
413  template <>
415  {};
416 
417  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
418  template <>
420  {};
421 
422  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
423  template <>
425  {};
426 
427  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
428  template <>
430  {};
431 
432  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
433  template <>
435  {
436  public:
438  {
439  nr_dimensions_ = 36;
440  trivial_=false;
441  }
442 
443  void
444  copyToFloatArray (const Narf36 &p, float * out) const override
445  {
446  for (int i = 0; i < nr_dimensions_; ++i)
447  out[i] = p.descriptor[i];
448  }
449  };
450  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
451  template <>
453  {};
454 
455  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
456  template <>
458  {
459  public:
461  {
462  nr_dimensions_ = 1980;
463  }
464 
465  void
466  copyToFloatArray (const ShapeContext1980 &p, float * out) const override
467  {
468  for (int i = 0; i < nr_dimensions_; ++i)
469  out[i] = p.descriptor[i];
470  }
471  };
472 
473  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
474  template <>
476  {
477  public:
479  {
480  nr_dimensions_ = 1960;
481  }
482 
483  void
484  copyToFloatArray (const UniqueShapeContext1960 &p, float * out) const override
485  {
486  for (int i = 0; i < nr_dimensions_; ++i)
487  out[i] = p.descriptor[i];
488  }
489  };
490 
491  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
492  template <>
494  {
495  public:
497  {
498  nr_dimensions_ = 352;
499  }
500 
501  void
502  copyToFloatArray (const SHOT352 &p, float * out) const override
503  {
504  for (int i = 0; i < nr_dimensions_; ++i)
505  out[i] = p.descriptor[i];
506  }
507  };
508 
509  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
510  template <>
512  {
513  public:
515  {
516  nr_dimensions_ = 1344;
517  }
518 
519  void
520  copyToFloatArray (const SHOT1344 &p, float * out) const override
521  {
522  for (int i = 0; i < nr_dimensions_; ++i)
523  out[i] = p.descriptor[i];
524  }
525  };
526 
527 
528  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
529  /** \brief @b CustomPointRepresentation extends PointRepresentation to allow for sub-part selection on the point.
530  */
531  template <typename PointDefault>
532  class CustomPointRepresentation : public PointRepresentation <PointDefault>
533  {
535 
536  public:
537  // Boost shared pointers
540 
541  /** \brief Constructor
542  * \param[in] max_dim the maximum number of dimensions to use
543  * \param[in] start_dim the starting dimension
544  */
545  CustomPointRepresentation (const int max_dim = 3, const int start_dim = 0)
546  : max_dim_(max_dim), start_dim_(start_dim)
547  {
548  // If point type is unknown, assume it's a struct/array of floats, and compute the number of dimensions
549  nr_dimensions_ = static_cast<int> (sizeof (PointDefault) / sizeof (float)) - start_dim_;
550  // Limit the default representation to the first 3 elements
551  if (nr_dimensions_ > max_dim_)
553  }
554 
555  inline Ptr
556  makeShared () const
557  {
558  return Ptr (new CustomPointRepresentation<PointDefault> (*this));
559  }
560 
561  /** \brief Copy the point data into a float array
562  * \param[in] p the input point
563  * \param[out] out the resultant output array
564  */
565  virtual void
566  copyToFloatArray (const PointDefault &p, float *out) const
567  {
568  // If point type is unknown, treat it as a struct/array of floats
569  const float *ptr = (reinterpret_cast<const float*> (&p)) + start_dim_;
570  std::copy_n(ptr, nr_dimensions_, out);
571  }
572 
573  protected:
574  /** \brief Use at most this many dimensions (i.e. the "k" in "k-D" is at most max_dim_) -- \note float fields are assumed */
575  int max_dim_;
576  /** \brief Use dimensions only starting with this one (i.e. the "k" in "k-D" is = dim - start_dim_) -- \note float fields are assumed */
578  };
579 }
pcl::DefaultFeatureRepresentation::NdCopyPointFunctor::Helper
Definition: point_representation.h:258
pcl_macros.h
Defines all the PCL and non-PCL macros used.
pcl::DefaultPointRepresentation< PointNormal >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:361
pcl::PFHSignature125
A point structure representing the Point Feature Histogram (PFH).
Definition: point_types.hpp:1264
pcl
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:45
point_types.h
pcl::traits::offset
Definition: point_traits.h:153
pcl::CustomPointRepresentation::CustomPointRepresentation
CustomPointRepresentation(const int max_dim=3, const int start_dim=0)
Constructor.
Definition: point_representation.h:545
pcl::DefaultPointRepresentation< PointXYZ >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:320
pcl::DefaultPointRepresentation::~DefaultPointRepresentation
~DefaultPointRepresentation()
Definition: point_representation.h:198
pcl::DefaultPointRepresentation< PointXYZ >::copyToFloatArray
void copyToFloatArray(const PointXYZ &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:327
pcl::traits::datatype
Definition: point_traits.h:165
pcl::NormalBasedSignature12
A point structure representing the Normal Based Signature for a feature matrix of 4-by-3.
Definition: point_types.hpp:1351
pcl::UniqueShapeContext1960::descriptor
float descriptor[1960]
Definition: point_types.hpp:1381
pcl::DefaultFeatureRepresentation< PFHSignature125 >::FieldList
typename pcl::traits::fieldList< PFHSignature125 >::type FieldList
Definition: point_representation.h:294
pcl::GASDSignature512
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape descriptor.
Definition: point_types.hpp:1550
pcl::PointRepresentation::getNumberOfDimensions
int getNumberOfDimensions() const
Return the number of dimensions in the point's vector representation.
Definition: point_representation.h:171
pcl::PointRepresentation::vectorize
void vectorize(const PointT &p, OutputType &out) const
Convert input point into a vector representation, rescaling by alpha.
Definition: point_representation.h:143
pcl::DefaultPointRepresentation
DefaultPointRepresentation extends PointRepresentation to define default behavior for common point ty...
Definition: point_representation.h:178
pcl::PointXYZI
Definition: point_types.hpp:456
pcl::FPFHSignature33
A point structure representing the Fast Point Feature Histogram (FPFH).
Definition: point_types.hpp:1476
pcl::PointRepresentation< Narf * >::ConstPtr
shared_ptr< const PointRepresentation< Narf * > > ConstPtr
Definition: point_representation.h:78
pcl::PointRepresentation::isTrivial
bool isTrivial() const
Returns whether this point representation is trivial.
Definition: point_representation.h:97
pcl::CustomPointRepresentation
CustomPointRepresentation extends PointRepresentation to allow for sub-part selection on the point.
Definition: point_representation.h:532
pcl::PointRepresentation::isValid
virtual bool isValid(const PointT &p) const
Verify that the input point is valid.
Definition: point_representation.h:103
pcl::DefaultPointRepresentation< SHOT1344 >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:514
pcl::DefaultFeatureRepresentation::DefaultFeatureRepresentation
DefaultFeatureRepresentation()
Definition: point_representation.h:296
pcl::DefaultPointRepresentation::ConstPtr
shared_ptr< const DefaultPointRepresentation< PointDefault > > ConstPtr
Definition: point_representation.h:186
pcl::DefaultPointRepresentation< PointNormal >::copyToFloatArray
void copyToFloatArray(const PointNormal &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:368
pcl::SHOT1344::descriptor
float descriptor[1344]
Definition: point_types.hpp:1412
pcl::PointXYZRGB
A point structure representing Euclidean xyz coordinates, and the RGB color.
Definition: point_types.hpp:620
pcl::DefaultPointRepresentation< ShapeContext1980 >::copyToFloatArray
void copyToFloatArray(const ShapeContext1980 &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:466
pcl::UniqueShapeContext1960
A point structure representing a Unique Shape Context.
Definition: point_types.hpp:1379
pcl::ShapeContext1980::descriptor
float descriptor[1980]
Definition: point_types.hpp:1366
pcl::ShapeContext1980
A point structure representing a Shape Context.
Definition: point_types.hpp:1364
pcl::DefaultPointRepresentation< PPFSignature >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:391
pcl::DefaultFeatureRepresentation
DefaulFeatureRepresentation extends PointRepresentation and is intended to be used when defining the ...
Definition: point_representation.h:220
pcl::GASDSignature7992
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape and color descr...
Definition: point_types.hpp:1578
pcl::DefaultPointRepresentation< SHOT1344 >::copyToFloatArray
void copyToFloatArray(const SHOT1344 &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:520
pcl::DefaultFeatureRepresentation::NdCopyPointFunctor::Helper::copyPoint
static void copyPoint(const Pod &p1, float *p2, int &f_idx)
Definition: point_representation.h:260
pcl::CustomPointRepresentation::max_dim_
int max_dim_
Use at most this many dimensions (i.e.
Definition: point_representation.h:575
pcl::DefaultPointRepresentation< Narf36 >::copyToFloatArray
void copyToFloatArray(const Narf36 &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:444
pcl::DefaultPointRepresentation< PointXYZI >::copyToFloatArray
void copyToFloatArray(const PointXYZI &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:347
pcl::CustomPointRepresentation::Ptr
shared_ptr< CustomPointRepresentation< PointDefault > > Ptr
Definition: point_representation.h:538
pcl::PointXYZ
A point structure representing Euclidean xyz coordinates.
Definition: point_types.hpp:292
pcl::PointRepresentation
PointRepresentation provides a set of methods for converting a point structs/object into an n-dimensi...
Definition: point_representation.h:58
pcl::PPFSignature::f1
float f1
Definition: point_types.hpp:1294
pcl::PPFSignature
A point structure for storing the Point Pair Feature (PPF) values.
Definition: point_types.hpp:1292
pcl::DefaultPointRepresentation< SHOT352 >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:496
pcl::DefaultPointRepresentation::Ptr
shared_ptr< DefaultPointRepresentation< PointDefault > > Ptr
Definition: point_representation.h:185
pcl::CustomPointRepresentation::makeShared
Ptr makeShared() const
Definition: point_representation.h:556
pcl::DefaultFeatureRepresentation::Ptr
shared_ptr< DefaultFeatureRepresentation< PointDefault > > Ptr
Definition: point_representation.h:292
pcl::DefaultFeatureRepresentation::NdCopyPointFunctor::Helper< Key, FieldT[NrDims], NrDims >::copyPoint
static void copyPoint(const Pod &p1, float *p2, int &f_idx)
Definition: point_representation.h:271
pcl::PFHRGBSignature250
A point structure representing the Point Feature Histogram with colors (PFHRGB).
Definition: point_types.hpp:1278
pcl::PointRepresentation::trivial_
bool trivial_
Indicates whether this point representation is trivial.
Definition: point_representation.h:74
pcl::PointRepresentation::alpha_
std::vector< float > alpha_
A vector containing the rescale factor to apply to each dimension.
Definition: point_representation.h:64
pcl::CustomPointRepresentation::start_dim_
int start_dim_
Use dimensions only starting with this one (i.e.
Definition: point_representation.h:577
pcl::PointNormal
A point structure representing Euclidean xyz coordinates, together with normal coordinates and the su...
Definition: point_types.hpp:877
pcl::DefaultPointRepresentation::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:188
pcl::DefaultPointRepresentation< Narf36 >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:437
pcl::DefaultPointRepresentation< SHOT352 >::copyToFloatArray
void copyToFloatArray(const SHOT352 &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:502
pcl::Narf36
A point structure representing the Narf descriptor.
Definition: point_types.hpp:1606
pcl::DefaultPointRepresentation< PointXYZI >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:340
pcl::PointRepresentation::~PointRepresentation
virtual ~PointRepresentation()=default
Empty destructor.
pcl::PointRepresentation::nr_dimensions_
int nr_dimensions_
The number of dimensions in this point's vector (i.e.
Definition: point_representation.h:62
pcl::PPFSignature::f2
float f2
Definition: point_types.hpp:1294
pcl::CustomPointRepresentation::copyToFloatArray
virtual void copyToFloatArray(const PointDefault &p, float *out) const
Copy the point data into a float array.
Definition: point_representation.h:566
pcl::GASDSignature984
A point structure representing the Globally Aligned Spatial Distribution (GASD) shape and color descr...
Definition: point_types.hpp:1564
pcl::DefaultPointRepresentation< UniqueShapeContext1960 >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:478
pcl::PointRepresentation< Narf * >::Ptr
shared_ptr< PointRepresentation< Narf * > > Ptr
Definition: point_representation.h:77
pcl::DefaultPointRepresentation< PPFSignature >::copyToFloatArray
void copyToFloatArray(const PPFSignature &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:398
pcl::DefaultFeatureRepresentation::makeShared
Ptr makeShared() const
Definition: point_representation.h:303
pcl::SHOT352::descriptor
float descriptor[352]
Definition: point_types.hpp:1396
pcl::PointRepresentation::setRescaleValues
void setRescaleValues(const float *rescale_array)
Set the rescale values to use when vectorizing points.
Definition: point_representation.h:164
pcl::SHOT1344
A point structure representing the generic Signature of Histograms of OrienTations (SHOT) - shape+col...
Definition: point_types.hpp:1410
pcl::DefaultPointRepresentation< ShapeContext1980 >::DefaultPointRepresentation
DefaultPointRepresentation()
Definition: point_representation.h:460
pcl::SHOT352
A point structure representing the generic Signature of Histograms of OrienTations (SHOT) - shape onl...
Definition: point_types.hpp:1394
pcl::PPFSignature::f4
float f4
Definition: point_types.hpp:1294
pcl::DefaultPointRepresentation::makeShared
Ptr makeShared() const
Definition: point_representation.h:201
pcl::CustomPointRepresentation::ConstPtr
shared_ptr< const CustomPointRepresentation< PointDefault > > ConstPtr
Definition: point_representation.h:539
pcl::PPFSignature::f3
float f3
Definition: point_types.hpp:1294
pcl::Narf36::descriptor
float descriptor[36]
Definition: point_types.hpp:1609
pcl::DefaultPointRepresentation< UniqueShapeContext1960 >::copyToFloatArray
void copyToFloatArray(const UniqueShapeContext1960 &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:484
pcl::DefaultPointRepresentation::copyToFloatArray
void copyToFloatArray(const PointDefault &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:207
pcl::PointRepresentation::copyToFloatArray
virtual void copyToFloatArray(const PointT &p, float *out) const =0
Copy point data from input point to a float array.
pcl::shared_ptr
boost::shared_ptr< T > shared_ptr
Alias for boost::shared_ptr.
Definition: pcl_macros.h:108
pcl::traits::fieldList
Definition: point_traits.h:179
pcl::VFHSignature308
A point structure representing the Viewpoint Feature Histogram (VFH).
Definition: point_types.hpp:1490
pcl::DefaultFeatureRepresentation::copyToFloatArray
void copyToFloatArray(const PointDefault &p, float *out) const override
Copy point data from input point to a float array.
Definition: point_representation.h:309