FilterBase.h
Go to the documentation of this file.
1 /* -------------------------------------------------------------------------
2  * A repertory of multi primitive-to-primitive (MP2P) ICP algorithms in C++
3  * Copyright (C) 2018-2024 Jose Luis Blanco, University of Almeria
4  * See LICENSE for license information.
5  * ------------------------------------------------------------------------- */
13 #pragma once
14 
16 #include <mp2p_icp/metricmap.h>
17 #include <mp2p_icp_filters/sm2mm.h>
18 #include <mrpt/containers/yaml.h>
19 #include <mrpt/core/optional_ref.h>
20 #include <mrpt/maps/CPointsMap.h>
21 #include <mrpt/obs/obs_frwds.h>
22 #include <mrpt/rtti/CObject.h>
23 #include <mrpt/system/COutputLogger.h>
24 #include <mrpt/version.h>
25 
26 #include <cstdint>
27 #include <stdexcept>
28 
29 namespace mrpt::system
30 {
31 class CTimeLogger;
32 }
33 
34 namespace mp2p_icp_filters
35 {
46 class FilterBase : public mrpt::rtti::CObject, // RTTI support
47  public mrpt::system::COutputLogger, // Logging support
48  public mp2p_icp::Parameterizable // Dynamic parameters
49 {
50 #if MRPT_VERSION < 0x020e00
51  DEFINE_VIRTUAL_MRPT_OBJECT(FilterBase)
52 #else
53  DEFINE_VIRTUAL_MRPT_OBJECT(FilterBase, mp2p_icp_filters)
54 #endif
55 
56  public:
57  FilterBase();
58  virtual ~FilterBase();
59 
65  virtual void initialize(const mrpt::containers::yaml& cfg_block) = 0;
66 
69  virtual void filter(mp2p_icp::metric_map_t& inOut) const = 0;
70 
72 };
73 
75 using FilterPipeline = std::vector<FilterBase::Ptr>;
76 
79  const FilterPipeline& filters, mp2p_icp::metric_map_t& inOut,
80  const mrpt::optional_ref<mrpt::system::CTimeLogger>& profiler =
81  std::nullopt);
82 
89  const mrpt::containers::yaml& c,
90  const mrpt::system::VerbosityLevel& vLevel = mrpt::system::LVL_INFO);
91 
100  const std::string& filename,
101  const mrpt::system::VerbosityLevel& vLevel = mrpt::system::LVL_INFO);
102 
105 } // namespace mp2p_icp_filters
mp2p_icp_filters::FilterBase::~FilterBase
virtual ~FilterBase()
mp2p_icp_filters::FilterBase::initialize
virtual void initialize(const mrpt::containers::yaml &cfg_block)=0
mp2p_icp_filters::apply_filter_pipeline
void apply_filter_pipeline(const FilterPipeline &filters, mp2p_icp::metric_map_t &inOut, const mrpt::optional_ref< mrpt::system::CTimeLogger > &profiler=std::nullopt)
Definition: FilterBase.cpp:25
mp2p_icp_filters::filter_pipeline_from_yaml_file
FilterPipeline filter_pipeline_from_yaml_file(const std::string &filename, const mrpt::system::VerbosityLevel &vLevel=mrpt::system::LVL_INFO)
Definition: FilterBase.cpp:72
testing::internal::string
::std::string string
Definition: gtest.h:1979
mp2p_icp::Parameterizable
Definition: Parameterizable.h:85
mp2p_icp_filters::filter_pipeline_from_yaml
FilterPipeline filter_pipeline_from_yaml(const mrpt::containers::yaml &c, const mrpt::system::VerbosityLevel &vLevel=mrpt::system::LVL_INFO)
Definition: FilterBase.cpp:40
mp2p_icp_filters::FilterBase
Definition: FilterBase.h:46
mp2p_icp_filters::FilterPipeline
std::vector< FilterBase::Ptr > FilterPipeline
Definition: FilterBase.h:75
sm2mm.h
simplemap-to-metricmap utility function
Parameterizable.h
mp2p_icp_filters::FilterBase::filter
virtual void filter(mp2p_icp::metric_map_t &inOut) const =0
metricmap.h
Generic representation of pointcloud(s) and/or extracted features.
mp2p_icp::metric_map_t
Generic container of pointcloud(s), extracted features and other maps.
Definition: metricmap.h:49
mp2p_icp_filters::FilterBase::FilterBase
FilterBase()
Definition: FilterBase.cpp:21
mp2p_icp_filters
Definition: FilterAdjustTimestamps.h:19
kitti-batch-convert.filename
filename
Definition: kitti-batch-convert.py:6
mrpt::system
Definition: FilterBase.h:29


mp2p_icp
Author(s):
autogenerated on Thu Dec 26 2024 03:48:10