Point Cloud Library (PCL)  1.10.0
processing.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 Willow Garage, Inc. 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/pcl_base.h>
43 #include <pcl/point_cloud.h>
44 #include <pcl/PolygonMesh.h>
45 
46 namespace pcl
47 {
48  /** \brief @b CloudSurfaceProcessing represents the base class for algorithms that takes a point cloud as input and
49  * produces a new output cloud that has been modified towards a better surface representation. These types of
50  * algorithms include surface smoothing, hole filling, cloud upsampling etc.
51  *
52  * \author Alexandru E. Ichim
53  * \ingroup surface
54  */
55  template <typename PointInT, typename PointOutT>
56  class CloudSurfaceProcessing : public PCLBase<PointInT>
57  {
58  public:
61 
66 
67  public:
68  /** \brief Constructor. */
69  CloudSurfaceProcessing () : PCLBase<PointInT> ()
70  {};
71 
72  /** \brief Empty destructor */
74 
75  /** \brief Process the input cloud and store the results
76  * \param[out] output the cloud where the results will be stored
77  */
78  virtual void
80 
81  protected:
82  /** \brief Abstract cloud processing method */
83  virtual void
85 
86  };
87 
88 
89  /** \brief @b MeshProcessing represents the base class for mesh processing algorithms.
90  * \author Alexandru E. Ichim
91  * \ingroup surface
92  */
94  {
95  public:
98 
100 
101  /** \brief Constructor. */
103 
104  /** \brief Destructor. */
105  virtual ~MeshProcessing () {}
106 
107  /** \brief Set the input mesh that we want to process
108  * \param[in] input the input polygonal mesh
109  */
110  inline void
112  { input_mesh_ = input; }
113 
114  /** \brief Get the input mesh to be processed
115  * \returns the mesh
116  */
118  getInputMesh () const
119  { return input_mesh_; }
120 
121  /** \brief Process the input surface mesh and store the results
122  * \param[out] output the resultant processed surface model
123  */
124  void
125  process (pcl::PolygonMesh &output);
126 
127  protected:
128  /** \brief Initialize computation. Must be called before processing starts. */
129  virtual bool
130  initCompute ();
131 
132  /** \brief UnInitialize computation. Must be called after processing ends. */
133  virtual void
134  deinitCompute ();
135 
136  /** \brief Abstract surface processing method. */
137  virtual void
138  performProcessing (pcl::PolygonMesh &output) = 0;
139 
140  /** \brief Abstract class get name method. */
141  virtual std::string
142  getClassName () const
143  { return (""); }
144 
145  /** \brief Input polygonal mesh. */
147  };
148 }
149 
150 #include "pcl/surface/impl/processing.hpp"
pcl
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:45
pcl::CloudSurfaceProcessing::Ptr
shared_ptr< CloudSurfaceProcessing< PointInT, PointOutT > > Ptr
Definition: processing.h:59
pcl::MeshProcessing::MeshProcessing
MeshProcessing()
Constructor.
Definition: processing.h:102
pcl::MeshProcessing::ConstPtr
shared_ptr< const MeshProcessing > ConstPtr
Definition: processing.h:97
pcl::PolygonMesh::ConstPtr
shared_ptr< const ::pcl::PolygonMesh > ConstPtr
Definition: PolygonMesh.h:98
pcl::CloudSurfaceProcessing::CloudSurfaceProcessing
CloudSurfaceProcessing()
Constructor.
Definition: processing.h:69
pcl::CloudSurfaceProcessing::process
virtual void process(pcl::PointCloud< PointOutT > &output)
Process the input cloud and store the results.
Definition: processing.hpp:43
pcl::MeshProcessing::setInputMesh
void setInputMesh(const pcl::PolygonMeshConstPtr &input)
Set the input mesh that we want to process.
Definition: processing.h:111
pcl::PCLBase
PCL base class.
Definition: pcl_base.h:69
pcl::PointCloud< PointOutT >
pcl::MeshProcessing::PolygonMeshConstPtr
PolygonMesh::ConstPtr PolygonMeshConstPtr
Definition: processing.h:99
pcl::MeshProcessing::getInputMesh
pcl::PolygonMeshConstPtr getInputMesh() const
Get the input mesh to be processed.
Definition: processing.h:118
pcl::MeshProcessing::getClassName
virtual std::string getClassName() const
Abstract class get name method.
Definition: processing.h:142
pcl::CloudSurfaceProcessing::performProcessing
virtual void performProcessing(pcl::PointCloud< PointOutT > &output)=0
Abstract cloud processing method.
pcl::PolygonMeshConstPtr
PolygonMesh::ConstPtr PolygonMeshConstPtr
Definition: PolygonMesh.h:102
pcl::PolygonMesh
Definition: PolygonMesh.h:15
pcl::CloudSurfaceProcessing::ConstPtr
shared_ptr< const CloudSurfaceProcessing< PointInT, PointOutT > > ConstPtr
Definition: processing.h:60
pcl::CloudSurfaceProcessing
CloudSurfaceProcessing represents the base class for algorithms that takes a point cloud as input and...
Definition: processing.h:56
pcl::MeshProcessing::input_mesh_
pcl::PolygonMeshConstPtr input_mesh_
Input polygonal mesh.
Definition: processing.h:146
pcl::MeshProcessing::Ptr
shared_ptr< MeshProcessing > Ptr
Definition: processing.h:96
pcl::MeshProcessing::~MeshProcessing
virtual ~MeshProcessing()
Destructor.
Definition: processing.h:105
pcl::MeshProcessing
MeshProcessing represents the base class for mesh processing algorithms.
Definition: processing.h:93
PCL_EXPORTS
#define PCL_EXPORTS
Definition: pcl_macros.h:253
pcl::CloudSurfaceProcessing::~CloudSurfaceProcessing
~CloudSurfaceProcessing()
Empty destructor.
Definition: processing.h:73
pcl::shared_ptr
boost::shared_ptr< T > shared_ptr
Alias for boost::shared_ptr.
Definition: pcl_macros.h:90