Point Cloud Library (PCL)
1.15.1
Toggle main menu visibility
Loading...
Searching...
No Matches
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
#pragma once
41
42
#include <pcl/pcl_base.h>
43
#include <pcl/PolygonMesh.h>
44
45
namespace
pcl
46
{
47
template
<
typename
Po
int
T>
class
PointCloud
;
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
using
Ptr
= shared_ptr<CloudSurfaceProcessing<PointInT, PointOutT> >;
61
using
ConstPtr
= shared_ptr<const CloudSurfaceProcessing<PointInT, PointOutT> >;
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
~CloudSurfaceProcessing
()
override
=
default
;
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
using
Ptr
= shared_ptr<MeshProcessing>;
98
using
ConstPtr
= shared_ptr<const MeshProcessing>;
99
100
using
PolygonMeshConstPtr
=
PolygonMesh::ConstPtr
;
101
102
/** \brief Constructor. */
103
MeshProcessing
() =
default
;
104
105
/** \brief Destructor. */
106
virtual
~MeshProcessing
() =
default
;
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"
pcl::CloudSurfaceProcessing::~CloudSurfaceProcessing
~CloudSurfaceProcessing() override=default
Empty destructor.
pcl::CloudSurfaceProcessing::performProcessing
virtual void performProcessing(pcl::PointCloud< PointOutT > &output)=0
Abstract cloud processing method.
pcl::CloudSurfaceProcessing::ConstPtr
shared_ptr< const CloudSurfaceProcessing< PointInT, PointOutT > > ConstPtr
Definition
processing.h:61
pcl::CloudSurfaceProcessing::Ptr
shared_ptr< CloudSurfaceProcessing< PointInT, PointOutT > > Ptr
Definition
processing.h:60
pcl::CloudSurfaceProcessing::process
virtual void process(pcl::PointCloud< PointOutT > &output)
Process the input cloud and store the results.
Definition
processing.hpp:47
pcl::CloudSurfaceProcessing::CloudSurfaceProcessing
CloudSurfaceProcessing()
Constructor.
Definition
processing.h:70
pcl::MeshProcessing::initCompute
virtual bool initCompute()
Initialize computation.
pcl::MeshProcessing::performProcessing
virtual void performProcessing(pcl::PolygonMesh &output)=0
Abstract surface processing method.
pcl::MeshProcessing::~MeshProcessing
virtual ~MeshProcessing()=default
Destructor.
pcl::MeshProcessing::MeshProcessing
MeshProcessing()=default
Constructor.
pcl::MeshProcessing::getClassName
virtual std::string getClassName() const
Abstract class get name method.
Definition
processing.h:143
pcl::MeshProcessing::setInputMesh
void setInputMesh(const pcl::PolygonMeshConstPtr &input)
Set the input mesh that we want to process.
Definition
processing.h:112
pcl::MeshProcessing::process
void process(pcl::PolygonMesh &output)
Process the input surface mesh and store the results.
pcl::MeshProcessing::input_mesh_
pcl::PolygonMeshConstPtr input_mesh_
Input polygonal mesh.
Definition
processing.h:147
pcl::MeshProcessing::ConstPtr
shared_ptr< const MeshProcessing > ConstPtr
Definition
processing.h:98
pcl::MeshProcessing::PolygonMeshConstPtr
PolygonMesh::ConstPtr PolygonMeshConstPtr
Definition
processing.h:100
pcl::MeshProcessing::Ptr
shared_ptr< MeshProcessing > Ptr
Definition
processing.h:97
pcl::MeshProcessing::deinitCompute
virtual void deinitCompute()
UnInitialize computation.
pcl::MeshProcessing::getInputMesh
pcl::PolygonMeshConstPtr getInputMesh() const
Get the input mesh to be processed.
Definition
processing.h:119
pcl::PCLBase< PointInT >::input_
PointCloudConstPtr input_
Definition
pcl_base.h:147
pcl::PCLBase< PointInT >::indices_
IndicesPtr indices_
Definition
pcl_base.h:150
pcl::PCLBase< PointInT >::initCompute
bool initCompute()
pcl::PCLBase< PointInT >::PCLBase
PCLBase()
pcl::PCLBase< PointInT >::deinitCompute
bool deinitCompute()
pcl::PointCloud
PointCloud represents the base class in PCL for storing collections of 3D points.
Definition
point_cloud.h:174
pcl
Definition
convolution.h:46
pcl::PolygonMeshConstPtr
PolygonMesh::ConstPtr PolygonMeshConstPtr
Definition
PolygonMesh.h:101
pcl::PolygonMesh
Definition
PolygonMesh.h:15
pcl::PolygonMesh::ConstPtr
shared_ptr< const ::pcl::PolygonMesh > ConstPtr
Definition
PolygonMesh.h:97