Point Cloud Library (PCL)  1.11.1-dev
point_cloud_geometry_handlers.h
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Point Cloud Library (PCL) - www.pointclouds.org
5  * Copyright (c) 2012-, Open Perception, 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  */
37 
38 #pragma once
39 
40 #if defined __GNUC__
41 #pragma GCC system_header
42 #endif
43 
44 // PCL includes
45 #include <pcl/pcl_base.h> // for UNAVAILABLE
46 #include <pcl/point_cloud.h>
47 #include <pcl/common/io.h>
48 // VTK includes
49 #include <vtkSmartPointer.h>
50 #include <vtkPoints.h>
51 #include <vtkFloatArray.h>
52 
53 namespace pcl
54 {
55  namespace visualization
56  {
57  /** \brief Base handler class for PointCloud geometry.
58  * \author Radu B. Rusu
59  * \ingroup visualization
60  */
61  template <typename PointT>
63  {
64  public:
66  using PointCloudPtr = typename PointCloud::Ptr;
68 
69  using Ptr = shared_ptr<PointCloudGeometryHandler<PointT> >;
70  using ConstPtr = shared_ptr<const PointCloudGeometryHandler<PointT> >;
71 
72  /** \brief Constructor. */
74  cloud_ (cloud), capable_ (false),
76  fields_ ()
77  {}
78 
79  /** \brief Destructor. */
81 
82  /** \brief Abstract getName method.
83  * \return the name of the class/object.
84  */
85  virtual std::string
86  getName () const = 0;
87 
88  /** \brief Abstract getFieldName method. */
89  virtual std::string
90  getFieldName () const = 0;
91 
92  /** \brief Checl if this handler is capable of handling the input data or not. */
93  inline bool
94  isCapable () const { return (capable_); }
95 
96  /** \brief Obtain the actual point geometry for the input dataset in VTK format.
97  * \param[out] points the resultant geometry
98  */
99  virtual void
100  getGeometry (vtkSmartPointer<vtkPoints> &points) const = 0;
101 
102  /** \brief Set the input cloud to be used.
103  * \param[in] cloud the input cloud to be used by the handler
104  */
105  void
107  {
108  cloud_ = cloud;
109  }
110 
111  protected:
112  /** \brief A pointer to the input dataset. */
114 
115  /** \brief True if this handler is capable of handling the input data, false
116  * otherwise.
117  */
118  bool capable_;
119 
120  /** \brief The index of the field holding the X data. */
122 
123  /** \brief The index of the field holding the Y data. */
125 
126  /** \brief The index of the field holding the Z data. */
128 
129  /** \brief The list of fields available for this PointCloud. */
130  std::vector<pcl::PCLPointField> fields_;
131  };
132 
133  //////////////////////////////////////////////////////////////////////////////////////
134  /** \brief XYZ handler class for PointCloud geometry. Given an input dataset, all XYZ
135  * data present in fields "x", "y", and "z" is extracted and displayed on screen.
136  * \author Radu B. Rusu
137  * \ingroup visualization
138  */
139  template <typename PointT>
141  {
142  public:
144  using PointCloudPtr = typename PointCloud::Ptr;
146 
147  using Ptr = shared_ptr<PointCloudGeometryHandlerXYZ<PointT> >;
148  using ConstPtr = shared_ptr<const PointCloudGeometryHandlerXYZ<PointT> >;
149 
150  /** \brief Constructor. */
152 
153  /** \brief Destructor. */
155 
156  /** \brief Class getName method. */
157  virtual std::string
158  getName () const { return ("PointCloudGeometryHandlerXYZ"); }
159 
160  /** \brief Get the name of the field used. */
161  virtual std::string
162  getFieldName () const { return ("xyz"); }
163 
164  /** \brief Obtain the actual point geometry for the input dataset in VTK format.
165  * \param[out] points the resultant geometry
166  */
167  virtual void
168  getGeometry (vtkSmartPointer<vtkPoints> &points) const;
169 
170  private:
171  // Members derived from the base class
178  };
179 
180  //////////////////////////////////////////////////////////////////////////////////////
181  /** \brief Surface normal handler class for PointCloud geometry. Given an input
182  * dataset, all data present in fields "normal_x", "normal_y", and "normal_z" is
183  * extracted and displayed on screen as XYZ data.
184  * \author Radu B. Rusu
185  * \ingroup visualization
186  */
187  template <typename PointT>
189  {
190  public:
192  using PointCloudPtr = typename PointCloud::Ptr;
194 
195  using Ptr = shared_ptr<PointCloudGeometryHandlerSurfaceNormal<PointT> >;
196  using ConstPtr = shared_ptr<const PointCloudGeometryHandlerSurfaceNormal<PointT> >;
197 
198  /** \brief Constructor. */
200 
201  /** \brief Class getName method. */
202  virtual std::string
203  getName () const { return ("PointCloudGeometryHandlerSurfaceNormal"); }
204 
205  /** \brief Get the name of the field used. */
206  virtual std::string
207  getFieldName () const { return ("normal_xyz"); }
208 
209  /** \brief Obtain the actual point geometry for the input dataset in VTK format.
210  * \param[out] points the resultant geometry
211  */
212  virtual void
213  getGeometry (vtkSmartPointer<vtkPoints> &points) const;
214 
215  private:
216  // Members derived from the base class
223  };
224 
225  //////////////////////////////////////////////////////////////////////////////////////
226  /** \brief Custom handler class for PointCloud geometry. Given an input dataset and
227  * three user defined fields, all data present in them is extracted and displayed on
228  * screen as XYZ data.
229  * \author Radu B. Rusu
230  * \ingroup visualization
231  */
232  template <typename PointT>
234  {
235  public:
237  using PointCloudPtr = typename PointCloud::Ptr;
239 
240  using Ptr = shared_ptr<PointCloudGeometryHandlerCustom<PointT> >;
241  using ConstPtr = shared_ptr<const PointCloudGeometryHandlerCustom<PointT> >;
242 
243  /** \brief Constructor. */
245  const std::string &x_field_name,
246  const std::string &y_field_name,
247  const std::string &z_field_name)
249  {
250  field_x_idx_ = pcl::getFieldIndex<PointT> (x_field_name, fields_);
251  if (field_x_idx_ == UNAVAILABLE)
252  return;
253  field_y_idx_ = pcl::getFieldIndex<PointT> (y_field_name, fields_);
254  if (field_y_idx_ == UNAVAILABLE)
255  return;
256  field_z_idx_ = pcl::getFieldIndex<PointT> (z_field_name, fields_);
257  if (field_z_idx_ == UNAVAILABLE)
258  return;
259  field_name_ = x_field_name + y_field_name + z_field_name;
260  capable_ = true;
261  }
262 
263  /** \brief Class getName method. */
264  virtual std::string
265  getName () const { return ("PointCloudGeometryHandlerCustom"); }
266 
267  /** \brief Get the name of the field used. */
268  virtual std::string
269  getFieldName () const { return (field_name_); }
270 
271  /** \brief Obtain the actual point geometry for the input dataset in VTK format.
272  * \param[out] points the resultant geometry
273  */
274  virtual void
276  {
277  if (!capable_)
278  return;
279 
280  if (!points)
282  points->SetDataTypeToFloat ();
283  points->SetNumberOfPoints (cloud_->size ());
284 
285  float data;
286  // Add all points
287  double p[3];
288  for (vtkIdType i = 0; i < static_cast<vtkIdType> (cloud_->size ()); ++i)
289  {
290  // Copy the value at the specified field
291  const std::uint8_t* pt_data = reinterpret_cast<const std::uint8_t*> (&(*cloud_)[i]);
292  memcpy (&data, pt_data + fields_[field_x_idx_].offset, sizeof (float));
293  p[0] = data;
294 
295  memcpy (&data, pt_data + fields_[field_y_idx_].offset, sizeof (float));
296  p[1] = data;
297 
298  memcpy (&data, pt_data + fields_[field_z_idx_].offset, sizeof (float));
299  p[2] = data;
300 
301  points->SetPoint (i, p);
302  }
303  }
304 
305  private:
306  // Members derived from the base class
313 
314  /** \brief Name of the field used to create the geometry handler. */
315  std::string field_name_;
316  };
317 
318  ///////////////////////////////////////////////////////////////////////////////////////
319  /** \brief Base handler class for PointCloud geometry.
320  * \author Radu B. Rusu
321  * \ingroup visualization
322  */
323  template <>
325  {
326  public:
330 
331  using Ptr = shared_ptr<PointCloudGeometryHandler<PointCloud> >;
332  using ConstPtr = shared_ptr<const PointCloudGeometryHandler<PointCloud> >;
333 
334  /** \brief Constructor. */
335  PointCloudGeometryHandler (const PointCloudConstPtr &cloud, const Eigen::Vector4f & = Eigen::Vector4f::Zero ())
336  : cloud_ (cloud)
337  , capable_ (false)
338  , field_x_idx_ (UNAVAILABLE)
339  , field_y_idx_ (UNAVAILABLE)
340  , field_z_idx_ (UNAVAILABLE)
341  , fields_ (cloud_->fields)
342  {
343  }
344 
345  /** \brief Destructor. */
347 
348  /** \brief Abstract getName method. */
349  virtual std::string
350  getName () const = 0;
351 
352  /** \brief Abstract getFieldName method. */
353  virtual std::string
354  getFieldName () const = 0;
355 
356  /** \brief Check if this handler is capable of handling the input data or not. */
357  inline bool
358  isCapable () const { return (capable_); }
359 
360  /** \brief Obtain the actual point geometry for the input dataset in VTK format.
361  * \param[out] points the resultant geometry
362  */
363  virtual void
364  getGeometry (vtkSmartPointer<vtkPoints> &points) const;
365 
366  /** \brief Set the input cloud to be used.
367  * \param[in] cloud the input cloud to be used by the handler
368  */
369  void
371  {
372  cloud_ = cloud;
373  }
374 
375  protected:
376  /** \brief A pointer to the input dataset. */
378 
379  /** \brief True if this handler is capable of handling the input data, false
380  * otherwise.
381  */
382  bool capable_;
383 
384  /** \brief The index of the field holding the X data. */
386 
387  /** \brief The index of the field holding the Y data. */
389 
390  /** \brief The index of the field holding the Z data. */
392 
393  /** \brief The list of fields available for this PointCloud. */
394  std::vector<pcl::PCLPointField> fields_;
395  };
396 
397  //////////////////////////////////////////////////////////////////////////////////////
398  /** \brief XYZ handler class for PointCloud geometry. Given an input dataset, all XYZ
399  * data present in fields "x", "y", and "z" is extracted and displayed on screen.
400  * \author Radu B. Rusu
401  * \ingroup visualization
402  */
403  template <>
405  {
406  public:
410 
411  using Ptr = shared_ptr<PointCloudGeometryHandlerXYZ<PointCloud> >;
412  using ConstPtr = shared_ptr<const PointCloudGeometryHandlerXYZ<PointCloud> >;
413 
414  /** \brief Constructor. */
416 
417  /** \brief Destructor. */
419 
420  /** \brief Class getName method. */
421  virtual std::string
422  getName () const { return ("PointCloudGeometryHandlerXYZ"); }
423 
424  /** \brief Get the name of the field used. */
425  virtual std::string
426  getFieldName () const { return ("xyz"); }
427  };
428 
429  //////////////////////////////////////////////////////////////////////////////////////
430  /** \brief Surface normal handler class for PointCloud geometry. Given an input
431  * dataset, all data present in fields "normal_x", "normal_y", and "normal_z" is
432  * extracted and displayed on screen as XYZ data.
433  * \author Radu B. Rusu
434  * \ingroup visualization
435  */
436  template <>
438  {
439  public:
443 
444  using Ptr = shared_ptr<PointCloudGeometryHandlerSurfaceNormal<PointCloud> >;
445  using ConstPtr = shared_ptr<const PointCloudGeometryHandlerSurfaceNormal<PointCloud> >;
446 
447  /** \brief Constructor. */
449 
450  /** \brief Class getName method. */
451  virtual std::string
452  getName () const { return ("PointCloudGeometryHandlerSurfaceNormal"); }
453 
454  /** \brief Get the name of the field used. */
455  virtual std::string
456  getFieldName () const { return ("normal_xyz"); }
457  };
458 
459  //////////////////////////////////////////////////////////////////////////////////////
460  /** \brief Custom handler class for PointCloud geometry. Given an input dataset and
461  * three user defined fields, all data present in them is extracted and displayed on
462  * screen as XYZ data.
463  * \author Radu B. Rusu
464  * \ingroup visualization
465  */
466  template <>
468  {
469  public:
473 
474  /** \brief Constructor. */
476  const std::string &x_field_name,
477  const std::string &y_field_name,
478  const std::string &z_field_name);
479 
480  /** \brief Destructor. */
482 
483  /** \brief Class getName method. */
484  virtual std::string
485  getName () const { return ("PointCloudGeometryHandlerCustom"); }
486 
487  /** \brief Get the name of the field used. */
488  virtual std::string
489  getFieldName () const { return (field_name_); }
490 
491  private:
492  /** \brief Name of the field used to create the geometry handler. */
493  std::string field_name_;
494  };
495  }
496 }
497 
498 #ifdef PCL_NO_PRECOMPILE
499 #include <pcl/visualization/impl/point_cloud_geometry_handlers.hpp>
500 #endif
pcl::UNAVAILABLE
static constexpr index_t UNAVAILABLE
Definition: pcl_base.h:62
pcl::visualization::PointCloudGeometryHandler::fields_
std::vector< pcl::PCLPointField > fields_
The list of fields available for this PointCloud.
Definition: point_cloud_geometry_handlers.h:130
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::capable_
bool capable_
True if this handler is capable of handling the input data, false otherwise.
Definition: point_cloud_geometry_handlers.h:382
pcl::visualization::PointCloudGeometryHandler::setInputCloud
void setInputCloud(const PointCloudConstPtr &cloud)
Set the input cloud to be used.
Definition: point_cloud_geometry_handlers.h:106
pcl
Definition: convolution.h:46
pcl::visualization::PointCloudGeometryHandler::getFieldName
virtual std::string getFieldName() const =0
Abstract getFieldName method.
pcl::visualization::PointCloudGeometryHandlerXYZ::PointCloudGeometryHandlerXYZ
PointCloudGeometryHandlerXYZ(const PointCloudConstPtr &cloud)
Constructor.
Definition: point_cloud_geometry_handlers.hpp:53
pcl::visualization::PointCloudGeometryHandler::getName
virtual std::string getName() const =0
Abstract getName method.
pcl::visualization::PointCloudGeometryHandlerCustom::PointCloudGeometryHandlerCustom
PointCloudGeometryHandlerCustom(const PointCloudConstPtr &cloud, const std::string &x_field_name, const std::string &y_field_name, const std::string &z_field_name)
Constructor.
Definition: point_cloud_geometry_handlers.h:244
pcl::visualization::PointCloudGeometryHandlerXYZ< pcl::PCLPointCloud2 >::getName
virtual std::string getName() const
Class getName method.
Definition: point_cloud_geometry_handlers.h:422
pcl::visualization::PointCloudGeometryHandlerCustom< pcl::PCLPointCloud2 >::~PointCloudGeometryHandlerCustom
virtual ~PointCloudGeometryHandlerCustom()
Destructor.
Definition: point_cloud_geometry_handlers.h:481
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::PointCloudGeometryHandler
PointCloudGeometryHandler(const PointCloudConstPtr &cloud, const Eigen::Vector4f &=Eigen::Vector4f::Zero())
Constructor.
Definition: point_cloud_geometry_handlers.h:335
pcl::visualization::PointCloudGeometryHandlerCustom< pcl::PCLPointCloud2 >::getName
virtual std::string getName() const
Class getName method.
Definition: point_cloud_geometry_handlers.h:485
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal::getName
virtual std::string getName() const
Class getName method.
Definition: point_cloud_geometry_handlers.h:203
pcl::visualization::PointCloudGeometryHandlerXYZ::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_geometry_handlers.h:162
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::~PointCloudGeometryHandler
virtual ~PointCloudGeometryHandler()
Destructor.
Definition: point_cloud_geometry_handlers.h:346
pcl::visualization::PointCloudGeometryHandler::PointCloudGeometryHandler
PointCloudGeometryHandler(const PointCloudConstPtr &cloud)
Constructor.
Definition: point_cloud_geometry_handlers.h:73
pcl::visualization::PointCloudGeometryHandlerXYZ::getGeometry
virtual void getGeometry(vtkSmartPointer< vtkPoints > &points) const
Obtain the actual point geometry for the input dataset in VTK format.
Definition: point_cloud_geometry_handlers.hpp:70
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal< pcl::PCLPointCloud2 >::getName
virtual std::string getName() const
Class getName method.
Definition: point_cloud_geometry_handlers.h:452
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::field_z_idx_
index_t field_z_idx_
The index of the field holding the Z data.
Definition: point_cloud_geometry_handlers.h:391
pcl::PointCloud
PointCloud represents the base class in PCL for storing collections of 3D points.
Definition: distances.h:55
pcl::visualization::PointCloudGeometryHandler::field_z_idx_
index_t field_z_idx_
The index of the field holding the Z data.
Definition: point_cloud_geometry_handlers.h:127
pcl::index_t
detail::int_type_t< detail::index_type_size, detail::index_type_signed > index_t
Type used for an index in PCL.
Definition: types.h:110
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal< pcl::PCLPointCloud2 >::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_geometry_handlers.h:456
pcl::visualization::PointCloudGeometryHandlerXYZ::getName
virtual std::string getName() const
Class getName method.
Definition: point_cloud_geometry_handlers.h:158
pcl::PointXYZRGB
A point structure representing Euclidean xyz coordinates, and the RGB color.
Definition: point_types.hpp:628
pcl::visualization::PointCloudGeometryHandler::Ptr
shared_ptr< PointCloudGeometryHandler< PointT > > Ptr
Definition: point_cloud_geometry_handlers.h:69
pcl::visualization::PointCloudGeometryHandlerCustom
Custom handler class for PointCloud geometry.
Definition: point_cloud_geometry_handlers.h:233
pcl::visualization::PointCloudGeometryHandlerXYZ< pcl::PCLPointCloud2 >::~PointCloudGeometryHandlerXYZ
virtual ~PointCloudGeometryHandlerXYZ()
Destructor.
Definition: point_cloud_geometry_handlers.h:418
pcl::visualization::PointCloudGeometryHandlerCustom< pcl::PCLPointCloud2 >::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_geometry_handlers.h:489
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::fields_
std::vector< pcl::PCLPointField > fields_
The list of fields available for this PointCloud.
Definition: point_cloud_geometry_handlers.h:394
pcl::visualization::PointCloudGeometryHandler::PointCloudConstPtr
typename PointCloud::ConstPtr PointCloudConstPtr
Definition: point_cloud_geometry_handlers.h:67
pcl::visualization::PointCloudGeometryHandlerCustom::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_geometry_handlers.h:269
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::PointCloudConstPtr
PointCloud::ConstPtr PointCloudConstPtr
Definition: point_cloud_geometry_handlers.h:329
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::setInputCloud
void setInputCloud(const PointCloudConstPtr &cloud)
Set the input cloud to be used.
Definition: point_cloud_geometry_handlers.h:370
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal::getGeometry
virtual void getGeometry(vtkSmartPointer< vtkPoints > &points) const
Obtain the actual point geometry for the input dataset in VTK format.
Definition: point_cloud_geometry_handlers.hpp:138
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::PointCloudPtr
PointCloud::Ptr PointCloudPtr
Definition: point_cloud_geometry_handlers.h:328
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::Ptr
shared_ptr< PointCloudGeometryHandler< PointCloud > > Ptr
Definition: point_cloud_geometry_handlers.h:331
pcl::visualization::PointCloudGeometryHandler::ConstPtr
shared_ptr< const PointCloudGeometryHandler< PointT > > ConstPtr
Definition: point_cloud_geometry_handlers.h:70
pcl::visualization::PointCloudGeometryHandler::field_y_idx_
index_t field_y_idx_
The index of the field holding the Y data.
Definition: point_cloud_geometry_handlers.h:124
pcl::visualization::PointCloudGeometryHandler::isCapable
bool isCapable() const
Checl if this handler is capable of handling the input data or not.
Definition: point_cloud_geometry_handlers.h:94
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_geometry_handlers.h:207
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::ConstPtr
shared_ptr< const PointCloudGeometryHandler< PointCloud > > ConstPtr
Definition: point_cloud_geometry_handlers.h:332
pcl::PCLPointCloud2
Definition: PCLPointCloud2.h:16
pcl::visualization::PointCloudGeometryHandlerXYZ< pcl::PCLPointCloud2 >::getFieldName
virtual std::string getFieldName() const
Get the name of the field used.
Definition: point_cloud_geometry_handlers.h:426
pcl::visualization::PointCloudGeometryHandler::cloud_
PointCloudConstPtr cloud_
A pointer to the input dataset.
Definition: point_cloud_geometry_handlers.h:113
pcl::PointCloud::Ptr
shared_ptr< PointCloud< PointT > > Ptr
Definition: point_cloud.h:406
pcl::visualization::PointCloudGeometryHandlerCustom::getGeometry
virtual void getGeometry(vtkSmartPointer< vtkPoints > &points) const
Obtain the actual point geometry for the input dataset in VTK format.
Definition: point_cloud_geometry_handlers.h:275
pcl::visualization::PointCloudGeometryHandlerXYZ::~PointCloudGeometryHandlerXYZ
virtual ~PointCloudGeometryHandlerXYZ()
Destructor.
Definition: point_cloud_geometry_handlers.h:154
pcl::visualization::PointCloudGeometryHandler::field_x_idx_
index_t field_x_idx_
The index of the field holding the X data.
Definition: point_cloud_geometry_handlers.h:121
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal::PointCloudGeometryHandlerSurfaceNormal
PointCloudGeometryHandlerSurfaceNormal(const PointCloudConstPtr &cloud)
Constructor.
Definition: point_cloud_geometry_handlers.hpp:121
pcl::PointCloud::ConstPtr
shared_ptr< const PointCloud< PointT > > ConstPtr
Definition: point_cloud.h:407
pcl::visualization::PointCloudGeometryHandler::~PointCloudGeometryHandler
virtual ~PointCloudGeometryHandler()
Destructor.
Definition: point_cloud_geometry_handlers.h:80
pcl::visualization::PointCloudGeometryHandler::PointCloudPtr
typename PointCloud::Ptr PointCloudPtr
Definition: point_cloud_geometry_handlers.h:66
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::field_x_idx_
index_t field_x_idx_
The index of the field holding the X data.
Definition: point_cloud_geometry_handlers.h:385
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::field_y_idx_
index_t field_y_idx_
The index of the field holding the Y data.
Definition: point_cloud_geometry_handlers.h:388
pcl::visualization::PointCloudGeometryHandler
Base handler class for PointCloud geometry.
Definition: point_cloud_geometry_handlers.h:62
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::isCapable
bool isCapable() const
Check if this handler is capable of handling the input data or not.
Definition: point_cloud_geometry_handlers.h:358
pcl::visualization::PointCloudGeometryHandlerXYZ
XYZ handler class for PointCloud geometry.
Definition: point_cloud_geometry_handlers.h:140
pcl::visualization::PointCloudGeometryHandler::capable_
bool capable_
True if this handler is capable of handling the input data, false otherwise.
Definition: point_cloud_geometry_handlers.h:118
pcl::visualization::PointCloudGeometryHandlerCustom::getName
virtual std::string getName() const
Class getName method.
Definition: point_cloud_geometry_handlers.h:265
PCL_EXPORTS
#define PCL_EXPORTS
Definition: pcl_macros.h:323
pcl::visualization::PointCloudGeometryHandler< pcl::PCLPointCloud2 >::cloud_
PointCloudConstPtr cloud_
A pointer to the input dataset.
Definition: point_cloud_geometry_handlers.h:377
pcl::visualization::PointCloudGeometryHandlerSurfaceNormal
Surface normal handler class for PointCloud geometry.
Definition: point_cloud_geometry_handlers.h:188
vtkSmartPointer
Definition: actor_map.h:49
pcl::visualization::PointCloudGeometryHandler::getGeometry
virtual void getGeometry(vtkSmartPointer< vtkPoints > &points) const =0
Obtain the actual point geometry for the input dataset in VTK format.