AngleLimit.h
Go to the documentation of this file.
1 // kate: replace-tabs off; indent-width 4; indent-mode normal
2 // vim: ts=4:sw=4:noexpandtab
3 /*
4 
5 Copyright (c) 2010--2024,
6 François Pomerleau and Stephane Magnenat, ASL, ETHZ, Switzerland
7 Matej Boxan, Norlab, Université Laval, Canada
8 You can contact the authors at <f dot pomerleau at gmail dot com> and
9 <stephane at magnenat dot net> and <matej dot boxan at gmail dot com>
10 
11 All rights reserved.
12 
13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions are met:
15  * Redistributions of source code must retain the above copyright
16  notice, this list of conditions and the following disclaimer.
17  * Redistributions in binary form must reproduce the above copyright
18  notice, this list of conditions and the following disclaimer in the
19  documentation and/or other materials provided with the distribution.
20  * Neither the name of the <organization> nor the
21  names of its contributors may be used to endorse or promote products
22  derived from this software without specific prior written permission.
23 
24 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
25 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 DISCLAIMED. IN NO EVENT SHALL ETH-ASL BE LIABLE FOR ANY
28 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 
35 */
36 #pragma once
37 
38 #include "PointMatcher.h"
39 
43 template< typename T>
45 {
52 
54 
55  inline static const std::string description()
56  {
57  return "Filter points based on a given angle range in spherical coordinates. Assumes the angles in degrees.";
58  }
59  inline static const ParametersDoc availableParameters()
60  {
61  return {
62  {"phiMin", "Lower bound of the azimuthal angle", "-inf", "-inf", "inf", &P::Comp<T>},
63  {"phiMax", "Upper bound of the azimuthal angle", "-inf", "-inf", "inf", &P::Comp<T>},
64  {"thetaMin", "Lower bound of the polar angle", "-inf", "-inf", "inf", &P::Comp<T>},
65  {"thetaMax", "Upper bound of the polar angle", "-inf", "-inf", "inf", &P::Comp<T>},
66  {"removeInside", "If set to true (1), remove points inside the spherical wedge; else (0), remove points outside the wedge", "1", "0", "1", P::Comp<bool>}
67  };
68  }
69 
70  const T phiMin;
71  const T phiMax;
72  const T thetaMin;
73  const T thetaMax;
74  const bool removeInside;
75 
78  virtual DataPoints filter(const DataPoints& input);
79  virtual void inPlaceFilter(DataPoints& cloud);
80 };
AngleLimitDataPointsFilter::DataPoints
PointMatcher< T >::DataPoints DataPoints
Definition: AngleLimit.h:53
AngleLimitDataPointsFilter::description
static const std::string description()
Definition: AngleLimit.h:55
AngleLimitDataPointsFilter::Parameters
Parametrizable::Parameters Parameters
Definition: AngleLimit.h:48
DataPointsFilter
PM::DataPointsFilter DataPointsFilter
Definition: pypoint_matcher_helper.h:22
AngleLimitDataPointsFilter::P
PointMatcherSupport::Parametrizable P
Definition: AngleLimit.h:47
build_map.T
T
Definition: build_map.py:34
AngleLimitDataPointsFilter::phiMin
const T phiMin
Definition: AngleLimit.h:70
PointMatcher
Functions and classes that are dependant on scalar type are defined in this templatized class.
Definition: PointMatcher.h:130
PointMatcher::DataPoints
A point cloud.
Definition: PointMatcher.h:207
AngleLimitDataPointsFilter::Parametrizable
PointMatcherSupport::Parametrizable Parametrizable
Definition: AngleLimit.h:46
AngleLimitDataPointsFilter::thetaMax
const T thetaMax
Definition: AngleLimit.h:73
testing::internal::string
::std::string string
Definition: gtest.h:1979
AngleLimitDataPointsFilter
Definition: AngleLimit.h:44
AngleLimitDataPointsFilter::thetaMin
const T thetaMin
Definition: AngleLimit.h:72
AngleLimitDataPointsFilter::InvalidParameter
Parametrizable::InvalidParameter InvalidParameter
Definition: AngleLimit.h:51
PointMatcherSupport::Parametrizable::ParametersDoc
std::vector< ParameterDoc > ParametersDoc
The documentation of all parameters.
Definition: Parametrizable.h:187
align_sequence.params
params
Definition: align_sequence.py:13
AngleLimitDataPointsFilter::availableParameters
static const ParametersDoc availableParameters()
Definition: AngleLimit.h:59
AngleLimitDataPointsFilter::ParameterDoc
Parametrizable::ParameterDoc ParameterDoc
Definition: AngleLimit.h:49
AngleLimitDataPointsFilter::phiMax
const T phiMax
Definition: AngleLimit.h:71
PointMatcherSupport::Parametrizable::InvalidParameter
An exception thrown when one tries to fetch the value of an unexisting parameter.
Definition: Parametrizable.h:144
AngleLimitDataPointsFilter::AngleLimitDataPointsFilter
AngleLimitDataPointsFilter(const Parameters &params=Parameters())
Constructor, uses parameter interface.
Definition: AngleLimit.cpp:42
PointMatcherSupport::Parametrizable
The superclass of classes that are constructed using generic parameters. This class provides the para...
Definition: Parametrizable.h:141
AngleLimitDataPointsFilter::ParametersDoc
Parametrizable::ParametersDoc ParametersDoc
Definition: AngleLimit.h:50
PointMatcherSupport::Parametrizable::ParameterDoc
The documentation of a parameter.
Definition: Parametrizable.h:160
AngleLimitDataPointsFilter::inPlaceFilter
virtual void inPlaceFilter(DataPoints &cloud)
Apply these filters to a point cloud without copying.
Definition: AngleLimit.cpp:64
AngleLimitDataPointsFilter::removeInside
const bool removeInside
Definition: AngleLimit.h:74
PointMatcher.h
public interface
AngleLimitDataPointsFilter::filter
virtual DataPoints filter(const DataPoints &input)
Apply filters to input point cloud. This is the non-destructive version and returns a copy.
Definition: AngleLimit.cpp:54
PointMatcherSupport::Parametrizable::Parameters
std::map< std::string, Parameter > Parameters
Parameters stored as a map of string->string.
Definition: Parametrizable.h:199


libpointmatcher
Author(s):
autogenerated on Sun Dec 22 2024 03:21:52