LVRPointBufferBridge.hpp
Go to the documentation of this file.
1 
34 #ifndef LVRPOINTBUFFERBRIDGE_HPP_
35 #define LVRPOINTBUFFERBRIDGE_HPP_
36 
38 #include "lvr2/io/PointBuffer.hpp"
39 
40 #include <vtkPolyData.h>
41 #include <vtkSmartPointer.h>
42 #include <vtkActor.h>
43 #include <vtkDoubleArray.h>
44 
45 #include <boost/shared_ptr.hpp>
46 
47 namespace lvr2
48 {
49 
50 struct Pose;
51 
53 {
54 public:
57  virtual ~LVRPointBufferBridge();
58 
59  vtkSmartPointer<vtkActor> getPointCloudActor();
60  size_t getNumPoints();
61  bool hasNormals();
62  bool hasColors();
63 
64  void setBaseColor(float r, float g, float b);
65  void setPointSize(int pointSize);
66  void setOpacity(float opacityValue);
67  void setVisibility(bool visible);
68  void setNormalsVisibility(bool visible);
69  void setColorsVisibility(bool visible);
71  void setSpectralChannels(color<size_t> channels, color<bool> use_channel);
73  void getSpectralChannels(color<size_t> &channels, color<bool> &use_channel) const;
75  void setSpectralColorGradient(GradientType gradient, size_t channel, bool normalized = false, bool ndvi = false);
77  void getSpectralColorGradient(GradientType &gradient, size_t &channel, bool &normalized, bool &useNDVI) const;
79  void useGradient(bool useGradient);
82  vtkSmartPointer<vtkPolyData> getPolyData();
83 
84  vtkSmartPointer<vtkPolyData> getPolyIDData();
85 
86 private:
91 
92 protected:
93 
95 
96  vtkSmartPointer<vtkPolyData> m_vtk_polyData;
97 
98  //Maybe this is not neaded but
99  vtkSmartPointer<vtkPolyData> m_id_polyData;
100 
101  vtkSmartPointer<vtkActor> m_pointCloudActor;
102  size_t m_numPoints;
112  bool m_useNDVI;
113  vtkSmartPointer<vtkDoubleArray> m_vtk_normals;
114 };
115 
116 typedef boost::shared_ptr<LVRPointBufferBridge> PointBufferBridgePtr;
117 
118 } /* namespace lvr2 */
119 
120 #endif /* LVRPOINTBUFFERBRIDGE_HPP_ */
void useGradient(bool useGradient)
switch between spectral mapping and gradient
boost::shared_ptr< LVRPointBufferBridge > PointBufferBridgePtr
void computePointCloudActor(PointBufferPtr pc)
void getSpectralColorGradient(GradientType &gradient, size_t &channel, bool &normalized, bool &useNDVI) const
get the gradienttype, channel, normalizend and ndvi flags
vtkSmartPointer< vtkPolyData > getPolyIDData()
void setOpacity(float opacityValue)
vtkSmartPointer< vtkDoubleArray > m_vtk_normals
void setSpectralColorGradient(GradientType gradient, size_t channel, bool normalized=false, bool ndvi=false)
set the gradienttype, desired channel, if the outputcolor should be normalized and if the NDVI should...
std::shared_ptr< PointBuffer > PointBufferPtr
vtkSmartPointer< vtkActor > m_pointCloudActor
void setBaseColor(float r, float g, float b)
__kf_device__ float3 normalized(const float3 &v)
Definition: temp_utils.hpp:97
void refreshSpectralChannel()
update the view with channel mappings
void getSpectralChannels(color< size_t > &channels, color< bool > &use_channel) const
get spectral channel mappings
GradientType
Identifies a color gradient.
Definition: ColorMap.hpp:50
void refreshSpectralGradient()
update the view with gradient information
void setSpectralChannels(color< size_t > channels, color< bool > use_channel)
set the spectral channel for (r, g, b) and set if it is used
void setColorsVisibility(bool visible)
void setNormalsVisibility(bool visible)
vtkSmartPointer< vtkPolyData > getPolyData()
vtkSmartPointer< vtkPolyData > m_vtk_polyData
LVRPointBufferBridge(PointBufferPtr pointcloud)
vtkSmartPointer< vtkActor > getPointCloudActor()
vtkSmartPointer< vtkPolyData > m_id_polyData
PointBufferPtr getPointBuffer()
get the point buffer


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:08