MeVisLab Toolbox Reference
mlPCLClusterStatistics.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code author="Wolf Spindler"
3//----------------------------------------------------------------------------------
6
14//----------------------------------------------------------------------------------
15#pragma once
16
18#include <mlPCLBaseObject.h>
19#include <mlPCLModule.h>
20
21ML_START_NAMESPACE
22
23// Forward to internally used class.
24class DoubleMultiField;
25class IntMultiField;
26struct StatisticalClusterInfo;
27
28//----------------------------------------------------------------------------------
30//----------------------------------------------------------------------------------
32{
33public:
35 typedef std::map<MLssize_t, StatisticalClusterInfo> ClusterMap;
36
40
43
46
47protected:
49 void activateAttachments() override;
50
52 void handleNotification (Field* field) override;
53
54private:
56 void _clearStatistics(const std::string &status="Cluster information is invalid");
57
59 void _setUpClusterInfoMap(const MLPointCloudXYZINormal &inputPointCloud);
60
62 void _setUpOutputFields();
63
65 void _filter();
66
68 template <typename POINT_CLOUD_TYPE> void _filterT(const POINT_CLOUD_TYPE &inputPointCloud);
69
70
71 // Input fields:
72
74 EnumField *_clusterIndexMemberFld;
75
77 EnumField *_magnitudeMemberFld;
78
80 EnumField *_phaseMemberFld;
81
82
84 Vector3Field *_planePointFld;
85
87 Vector3Field *_planeNormalFld;
88
89
90 // Output fields:
92 IntField *_numClustersFld;
93
95 IntMultiField *_clusterNumPointsFld;
96
97 // Magnitude:
99 DoubleMultiField *_clusterMagnitudeSumsFld;
100
102 DoubleMultiField *_clusterMagnitudeSumsAbsoluteFld;
103
105 DoubleMultiField *_clusterMagnitudeAveragesFld;
106
108 DoubleMultiField *_clusterMagnitudeAveragesAbsoluteFld;
109
111 DoubleMultiField *_clusterMagnitudeMediansFld;
112
113 // Phase:
115 DoubleMultiField *_clusterPhaseSumsFld;
116
118 DoubleMultiField *_clusterPhaseSumsAbsoluteFld;
119
121 DoubleMultiField *_clusterPhaseAveragesFld;
122
124 DoubleMultiField *_clusterPhaseAveragesAbsoluteFld;
125
127 DoubleMultiField *_clusterPhaseMediansFld;
128
129
131 DoubleMultiField *_clusterCenterOfGravitiesFld;
132
134 DoubleMultiField *_clusterEigenValuesFld;
135
137 DoubleMultiField *_clusterEigenVectorsFld;
138
140 DoubleMultiField *_clusterOrientedExtentsFld;
141
145 DoubleMultiField *_clusterPlaneIntersectionsFld;
146
149 IntMultiField *_clusterPlaneIntersectionsOkFld;
150
151
153 BaseField *_outputBaseFld;
154
155
157 ClusterMap *_clusterMap;
158
161
164};
165
166ML_END_NAMESPACE
167
Project global and OS specific declarations.
#define MLPCL_ClusterStatistics_EXPORT
If included by external modules, exported symbols are declared as import symbols.
Field to encapsulate a pointer to an ML base object.
Definition mlFields.h:797
Save warning state.
Field to encapsulate an enumerated value.
Definition mlFields.h:195
Base class for all fields used in the ML.
Definition mlField.h:73
Field to encapsulate an integer value.
Definition mlFields.h:126
Class IntMultiField. See MultiField for documentation.
ML Module providing arithmetic operations on a selectable subset of members/fields of the points of t...
void activateAttachments() override
Updates internal state after changes of fields without field notifications.
~PCLClusterStatistics() override
Destructor.
std::map< MLssize_t, StatisticalClusterInfo > ClusterMap
Map of statistical cluster information.
const ClusterMap & getClusterStatistics() const
Allows read access to current statistical information.
void handleNotification(Field *field) override
Handles field changes of the field field.
PCLClusterStatistics()
Creates a PCLClusterStatistics module with two input connectors for two PCLBaseObjectPtr's pointing t...
ML Module base class for algorithms from the Point Cloud Library (PCL).
Definition mlPCLModule.h:26
Field to encapsulate a vector of 3 double values.
Definition mlFields.h:1103
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
Base object containing pointers (as MLPCLObjectPtrsContainer) to objects from the Point Cloud Library...
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.
pcl::PointCloud< pcl::PointXYZINormal > MLPointCloudXYZINormal
The basic point cloud type used in the PCL MeVisLab binding.
Definition mlPCLTypes.h:104