Point Cloud Library (PCL)
1.6.0
Main Page
Modules
Namespaces
Classes
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
registration
include
pcl
registration
transformation_validation_euclidean.h
Go to the documentation of this file.
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: transformation_validation_euclidean.h 4220 2012-02-03 06:26:08Z rusu $
37
*
38
*/
39
#ifndef PCL_REGISTRATION_TRANSFORMATION_VALIDATION_EUCLIDEAN_H_
40
#define PCL_REGISTRATION_TRANSFORMATION_VALIDATION_EUCLIDEAN_H_
41
42
#include <
pcl/point_representation.h
>
43
#include <
pcl/kdtree/kdtree.h
>
44
#include <
pcl/kdtree/kdtree_flann.h
>
45
#include <
pcl/registration/transformation_validation.h
>
46
47
namespace
pcl
48
{
49
namespace
registration
50
{
70
template
<
typename
Po
int
Source,
typename
Po
int
Target>
71
class
TransformationValidationEuclidean
72
{
73
public
:
74
typedef
boost::shared_ptr<TransformationValidation<PointSource, PointTarget> >
Ptr
;
75
typedef
boost::shared_ptr<const TransformationValidation<PointSource, PointTarget> >
ConstPtr
;
76
77
typedef
typename
pcl::KdTree<PointTarget>
KdTree
;
78
typedef
typename
pcl::KdTree<PointTarget>::Ptr
KdTreePtr
;
79
80
typedef
typename
KdTree::PointRepresentationConstPtr
PointRepresentationConstPtr
;
81
82
typedef
typename
TransformationValidation<PointSource, PointTarget>::PointCloudSourceConstPtr
PointCloudSourceConstPtr
;
83
typedef
typename
TransformationValidation<PointSource, PointTarget>::PointCloudTargetConstPtr
PointCloudTargetConstPtr
;
84
89
TransformationValidationEuclidean
() :
90
max_range_ (std::numeric_limits<double>::max ()),
91
tree_ (new pcl::
KdTreeFLANN
<PointTarget>)
92
{
93
}
94
95
virtual
~TransformationValidationEuclidean
() {};
96
101
inline
void
102
setMaxRange
(
double
max_range)
103
{
104
max_range_ = max_range;
105
}
106
116
double
117
validateTransformation
(
118
const
PointCloudSourceConstPtr
&cloud_src,
119
const
PointCloudTargetConstPtr
&cloud_tgt,
120
const
Eigen::Matrix4f &transformation_matrix);
121
122
protected
:
126
double
max_range_;
127
129
KdTreePtr
tree_;
130
131
public
:
132
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
133
};
134
}
135
}
136
137
#include <
pcl/registration/impl/transformation_validation_euclidean.hpp
>
138
139
#endif
/* PCL_REGISTRATION_TRANSFORMATION_VALIDATION_EUCLIDEAN_H_ */
Generated on Fri Mar 8 2013 12:50:53 for Point Cloud Library (PCL) by
1.8.3.1