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_ */
lvr2::LVRPointBufferBridge::getPointCloudActor
vtkSmartPointer< vtkActor > getPointCloudActor()
Definition: LVRPointBufferBridge.cpp:589
lvr2::LVRPointBufferBridge::m_pointCloudActor
vtkSmartPointer< vtkActor > m_pointCloudActor
Definition: LVRPointBufferBridge.hpp:101
lvr2::LVRPointBufferBridge::m_hasNormals
bool m_hasNormals
Definition: LVRPointBufferBridge.hpp:103
lvr2::LVRPointBufferBridge::m_useSpectralChannel
color< bool > m_useSpectralChannel
Definition: LVRPointBufferBridge.hpp:109
lvr2::LVRPointBufferBridge::setSpectralChannels
void setSpectralChannels(color< size_t > channels, color< bool > use_channel)
set the spectral channel for (r, g, b) and set if it is used
Definition: LVRPointBufferBridge.cpp:103
lvr2::LVRPointBufferBridge::useGradient
void useGradient(bool useGradient)
switch between spectral mapping and gradient
Definition: LVRPointBufferBridge.cpp:321
lvr2::LVRPointBufferBridge::m_useNDVI
bool m_useNDVI
Definition: LVRPointBufferBridge.hpp:112
lvr2::LVRPointBufferBridge::m_spectralChannels
color< size_t > m_spectralChannels
Definition: LVRPointBufferBridge.hpp:108
lvr2::LVRPointBufferBridge::m_vtk_polyData
vtkSmartPointer< vtkPolyData > m_vtk_polyData
Definition: LVRPointBufferBridge.hpp:96
lvr2::LVRPointBufferBridge::refreshSpectralGradient
void refreshSpectralGradient()
update the view with gradient information
Definition: LVRPointBufferBridge.cpp:184
ColorMap.hpp
lvr2::color< size_t >
lvr2::PointBufferPtr
std::shared_ptr< PointBuffer > PointBufferPtr
Definition: PointBuffer.hpp:130
lvr2::LVRPointBufferBridge::hasColors
bool hasColors()
Definition: LVRPointBufferBridge.cpp:351
lvr2::LVRPointBufferBridge::m_hasColors
bool m_hasColors
Definition: LVRPointBufferBridge.hpp:104
lvr2::LVRPointBufferBridge::getSpectralChannels
void getSpectralChannels(color< size_t > &channels, color< bool > &use_channel) const
get spectral channel mappings
Definition: LVRPointBufferBridge.cpp:159
lvr2::LVRPointBufferBridge::m_spectralGradientChannel
size_t m_spectralGradientChannel
Definition: LVRPointBufferBridge.hpp:111
lvr2::LVRPointBufferBridge::~LVRPointBufferBridge
virtual ~LVRPointBufferBridge()
Definition: LVRPointBufferBridge.cpp:356
lvr2::LVRPointBufferBridge::setNormalsVisibility
void setNormalsVisibility(bool visible)
Definition: LVRPointBufferBridge.cpp:563
lvr2::LVRPointBufferBridge::refreshSpectralChannel
void refreshSpectralChannel()
update the view with channel mappings
Definition: LVRPointBufferBridge.cpp:120
lvr2::LVRPointBufferBridge::m_id_polyData
vtkSmartPointer< vtkPolyData > m_id_polyData
Definition: LVRPointBufferBridge.hpp:99
lvr2::LVRPointBufferBridge::getPolyIDData
vtkSmartPointer< vtkPolyData > getPolyIDData()
Definition: LVRPointBufferBridge.cpp:585
lvr2::LVRPointBufferBridge::setOpacity
void setOpacity(float opacityValue)
Definition: LVRPointBufferBridge.cpp:547
lvr2::LVRPointBufferBridge::setVisibility
void setVisibility(bool visible)
Definition: LVRPointBufferBridge.cpp:558
PointBuffer.hpp
lvr2::LVRPointBufferBridge::getPolyData
vtkSmartPointer< vtkPolyData > getPolyData()
Definition: LVRPointBufferBridge.cpp:580
lvr2::LVRPointBufferBridge::getPointBuffer
PointBufferPtr getPointBuffer()
get the point buffer
Definition: LVRPointBufferBridge.cpp:336
lvr2::LVRPointBufferBridge::m_useNormalizedGradient
bool m_useNormalizedGradient
Definition: LVRPointBufferBridge.hpp:107
lvr2::LVRPointBufferBridge::getSpectralColorGradient
void getSpectralColorGradient(GradientType &gradient, size_t &channel, bool &normalized, bool &useNDVI) const
get the gradienttype, channel, normalizend and ndvi flags
Definition: LVRPointBufferBridge.cpp:313
lvr2::LVRPointBufferBridge::LVRPointBufferBridge
LVRPointBufferBridge(PointBufferPtr pointcloud)
Definition: LVRPointBufferBridge.cpp:54
lvr2::LVRPointBufferBridge::m_spectralGradient
GradientType m_spectralGradient
Definition: LVRPointBufferBridge.hpp:110
lvr2::LVRPointBufferBridge::setPointSize
void setPointSize(int pointSize)
Definition: LVRPointBufferBridge.cpp:541
lvr2::LVRPointBufferBridge::getNumPoints
size_t getNumPoints()
Definition: LVRPointBufferBridge.cpp:341
lvr2::LVRPointBufferBridge
Definition: LVRPointBufferBridge.hpp:52
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::LVRPointBufferBridge::setColorsVisibility
void setColorsVisibility(bool visible)
Definition: LVRPointBufferBridge.cpp:553
lvr2::LVRPointBufferBridge::m_pointBuffer
PointBufferPtr m_pointBuffer
Definition: LVRPointBufferBridge.hpp:105
lvr2::PointBufferBridgePtr
boost::shared_ptr< LVRPointBufferBridge > PointBufferBridgePtr
Definition: LVRPointBufferBridge.hpp:116
lvr2::GradientType
GradientType
Identifies a color gradient.
Definition: ColorMap.hpp:54
lvr2::LVRPointBufferBridge::setSpectralColorGradient
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...
Definition: LVRPointBufferBridge.cpp:165
lvr2::LVRPointBufferBridge::computePointCloudActor
void computePointCloudActor(PointBufferPtr pc)
Definition: LVRPointBufferBridge.cpp:360
kfusion::device::normalized
__kf_device__ float3 normalized(const float3 &v)
Definition: temp_utils.hpp:97
lvr2::LVRPointBufferBridge::setBaseColor
void setBaseColor(float r, float g, float b)
Definition: LVRPointBufferBridge.cpp:536
lvr2::LVRPointBufferBridge::hasNormals
bool hasNormals()
Definition: LVRPointBufferBridge.cpp:346
lvr2::LVRPointBufferBridge::m_numPoints
size_t m_numPoints
Definition: LVRPointBufferBridge.hpp:102
lvr2::LVRPointBufferBridge::m_useGradient
bool m_useGradient
Definition: LVRPointBufferBridge.hpp:106
lvr2::LVRPointBufferBridge::m_vtk_normals
vtkSmartPointer< vtkDoubleArray > m_vtk_normals
Definition: LVRPointBufferBridge.hpp:113


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 Wed Mar 2 2022 00:37:24