MeVisLab Toolbox Reference
mlPCLSampleConsensus.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code author="Wolf Spindler"
3//----------------------------------------------------------------------------------
5
12//----------------------------------------------------------------------------------
13#pragma once
14
16#include <mlPCLModule.h>
18#include <pcl/sample_consensus/sac.h>
20
22
23class FloatMultiField;
24
25//----------------------------------------------------------------------------------
27//----------------------------------------------------------------------------------
29{
30public:
33
34protected:
36 void activateAttachments() override;
37
39 void handleNotification (Field* field) override;
40
41private:
43 void _clampValues();
44
46 void _filter();
47
49 template <typename POINT_CLOUD_TYPE_PTR> void _filterT(POINT_CLOUD_TYPE_PTR inputPointCloudPtr);
50
55 template <typename MODEL_TYPE>
56 typename pcl::SampleConsensus<typename MODEL_TYPE::element_type::PointCloud::PointType>::Ptr
57 _createSampleConsensusInstanceT(MODEL_TYPE model, std::string &msg);
58
60 EnumField *_sacTypeFld;
61
63 DoubleField *_distanceThresholdFld;
64
66 IntField *_maxIterationsFld;
67
69 DoubleField *_probabilityFld;
70
72 IntField *_emIterationsFld;
73
75 DoubleField *_fractionNrPretestFld;
76
77 // //! Return the best model found so far. More...
78 // void getModel (std::vector< int > &model)
79
81 FloatMultiField *_modelCoefficientsFld;
82
84 BaseField *_inputSacMLModuleBaseFld;
85
88
91};
92
94
Project global and OS specific declarations.
#define MLPCL_SampleConsensus_EXPORT
If included by external modules, exported symbols are declared as import symbols.
Disables warnings from PCL headers which otherwise cannot be avoided.
Restores disabled warnings from PCL headers which otherwise cannot be avoided.
Field to encapsulate a pointer to an ML base object.
Definition mlFields.h:797
Field to encapsulate a double value.
Definition mlFields.h:538
Field to encapsulate an enumerated value.
Definition mlFields.h:195
Base class for all fields used in the ML.
Definition mlField.h:73
Class FloatMultiField. See MultiField for documentation.
Field to encapsulate an integer value.
Definition mlFields.h:126
ML Module base class for algorithms from the Point Cloud Library (PCL).
Definition mlPCLModule.h:26
ML Module class wrapping the pcl::SampleConsensus class from the PCL.
PCLSampleConsensus()
Initializes an ML module wrapping a pcl::SampleConsensus filter.
void activateAttachments() override
Updates internal state after changes of fields without field notifications.
void handleNotification(Field *field) override
Handles field changes of the field field.
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
ML Module base class for algorithms from the Point Cloud Library (PCL).
#define ML_PCL_TEST_INTERFACE(BASE_OBJECT_NAME)
Implements a dedicated interface for PCL related modules which is required in automatic tests.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.