MeVisLab Toolbox Reference
mlPCLVoxelGrid.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
17#include "MLPCLFiltersSystem.h"
18#include <mlPCLModule.h>
20#include <pcl/filters/voxel_grid.h>
22
23ML_START_NAMESPACE
24
25//----------------------------------------------------------------------------------
28//----------------------------------------------------------------------------------
30{
31public:
34
35protected:
37 void activateAttachments() override;
38
40 void handleNotification (Field* field) override;
41
43 void calculateOutputImageProperties(int outIndex, PagedImage *outImage) override;
44
46 void calculateOutputSubImage(SubImage *outSubImage, int outIndex, SubImage *) override;
47
48private:
50 void _filter();
51
58 template <typename POINT_TYPE, typename POINT_CLOUD_TYPE>
59 void _setUpTSubImage(pcl::VoxelGrid<POINT_TYPE> &voxelGridFilter,
60 const POINT_CLOUD_TYPE &outputPointCloud,
61 float fillVal);
62
64 template <typename POINT_CLOUD_TYPE> void _filterT(const POINT_CLOUD_TYPE &inputPointCloud);
65
67 StringField *_filterFieldNameFld;
68
70 BoolField *_downsampleAllDataFld;
71
73 FloatField *_limitMinFld;
74
76 FloatField *_limitMaxFld;
77
79 BoolField *_filterLimitsNegativeFld;
80
83 Vector3Field *_leafSizeFld;
84
86 IntField *_minimumPointsNumberPerVoxelFld;
87
89 FloatField *_fillValueFld;
90
92 TSubImage<MLfloat> _lastSampledGrid;
93
96
99};
100
101ML_END_NAMESPACE
102
Project global and OS specific declarations.
#define MLPCL_Filters_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 boolean value.
Definition mlFields.h:58
Base class for all fields used in the ML.
Definition mlField.h:73
Field to encapsulate a float value.
Definition mlFields.h:415
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 applying the pcl::VoxelGrid filter to the input point cloud and provides the filter ...
void calculateOutputSubImage(SubImage *outSubImage, int outIndex, SubImage *) override
Fills an output page with image data.
PCLVoxelGrid()
Initializes an ML module wrapping a pcl::VoxelGrid filter.
void handleNotification(Field *field) override
Handles field changes of the field field.
void calculateOutputImageProperties(int outIndex, PagedImage *outImage) override
Determine settings of the ML image output.
void activateAttachments() override
Updates internal state after changes of fields without field notifications.
Class which represents an image, which manages properties of an image and image data which is located...
Field to encapsulate a string value.
Definition mlFields.h:610
This class manages/represents a rectangular 6d image region which is organized linearly in memory.
Definition mlSubImage.h:75
This template class manages/represents a rectangular 6d image region in memory which is organized lin...
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.
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.