MeVisLab Toolbox Reference
mlPCLCloudDistances.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 
15 #include "MLPCLCommonSystem.h"
16 #include <mlPCLBaseObject.h>
17 #include <mlPCLModule.h>
18 
19 ML_START_NAMESPACE
20 
21 //----------------------------------------------------------------------------------
23 //----------------------------------------------------------------------------------
25 {
26 public:
30 
31 protected:
33  void activateAttachments() override;
34 
36  void handleNotification (Field* field) override;
37 
38 private:
41  void _invalidate(size_t cloudSize0=ML_SIZE_T_MAX, size_t cloudSize1=ML_SIZE_T_MAX);
42 
44  void _updateCalculation();
45 
49  template <typename POINT_CLOUD_TYPE0, typename POINT_CLOUD_TYPE1>
50  void _calculateCloudDistances(const POINT_CLOUD_TYPE0 &inputPointCloud0,
51  const POINT_CLOUD_TYPE1 &inputPointCloud1);
52 
53 private:
55  FloatField *_input0ToInput1DistanceFld;
56 
58  IntField *_input0ToInput1IndexFld[2];
59 
61  Vector3Field *_input0ToInput1PositionFld[2];
62 
63 
65  FloatField *_input1ToInput0DistanceFld;
66 
68  IntField *_input1ToInput0IndexFld[2];
69 
71  Vector3Field *_input1ToInput0PositionFld[2];
72 
75  FloatField *_hausdorffDistanceFld;
76 
77 
79  FloatField *_input01MinDistanceFld;
80 
82  IntField *_input01MinDistanceIndexFld[2];
83 
85  Vector3Field *_input01MinDistancePositionFld[2];
86 
88  FloatField *_minDistanceFld;
89 
90 
92  BoolField *_resultsValidFld;
93 
94 
97 
100 };
101 
102 ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLPCL_Common_EXPORT
If included by external modules, exported symbols are declared as import symbols.
Field to encapsulate a boolean value.
Definition: mlFields.h:62
Base class for all fields used in the ML.
Definition: mlField.h:73
Field to encapsulate a float value.
Definition: mlFields.h:627
Field to encapsulate an integer value.
Definition: mlFields.h:161
ML Module class to calculate distances between two PCL point clouds.
void handleNotification(Field *field) override
Handles field changes of the field field.
void activateAttachments() override
Updates internal state after changes of fields without field notifications.
PCLCloudDistances()
Creates a PCLCloudDistances module with two input connectors for two PCLBaseObjectPtr's pointing to p...
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:1538
#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.
#define ML_SIZE_T_MAX
For convenience the maximum value of size_t without "U" which is probably more the expected naming.
Definition: mlTypeDefs.h:640