Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #pragma once
00036
00037 #include "PointMatcher.h"
00038
00039 #include <string>
00040
00042 template<typename T>
00043 struct CutAtDescriptorThresholdDataPointsFilter: public PointMatcher<T>::DataPointsFilter
00044 {
00045 typedef PointMatcherSupport::Parametrizable Parametrizable;
00046 typedef PointMatcherSupport::Parametrizable P;
00047 typedef Parametrizable::Parameters Parameters;
00048 typedef Parametrizable::ParameterDoc ParameterDoc;
00049 typedef Parametrizable::ParametersDoc ParametersDoc;
00050 typedef Parametrizable::InvalidParameter InvalidParameter;
00051
00052 typedef typename PointMatcher<T>::DataPoints DataPoints;
00053 typedef typename PointMatcher<T>::DataPoints::InvalidField InvalidField;
00054
00055 inline static const std::string description()
00056 {
00057 return "Subsampling. Cut points with value of a given descriptor above or below a given threshold.";
00058 }
00059 inline static const ParametersDoc availableParameters()
00060 {
00061 return {
00062 {"descName", "Descriptor name used to cut points", "none"},
00063 {"useLargerThan", "If set to 1 (true), points with values above the 'threshold' will be cut. If set to 0 (false), points with values below the 'threshold' will be cut.", "1", "0", "1", P::Comp<bool>},
00064 {"threshold", "Value at which to cut.", "0", "-inf", "inf", &P::Comp<T>}
00065 };
00066 }
00067
00068 const std::string descName;
00069 const bool useLargerThan;
00070 const T threshold;
00071
00073 CutAtDescriptorThresholdDataPointsFilter(const Parameters& params = Parameters());
00074 virtual DataPoints filter(const DataPoints& input);
00075 virtual void inPlaceFilter(DataPoints& cloud);
00076 };