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