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.
Save warning state.
Class IntMultiField. See MultiField for documentation.
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.
PCLModule(int numImageInputs=0, int numImageOutputs=0, int numPCLInputs=0, int numPCLOutputs=0, bool createEnumAndNotify=false)
#define ML_MODULE_CLASS_HEADER(className)
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