Visualizer Class Reference

Visualizer for label density voxel grids. More...

#include <VisionX/libraries/VoxelGrids/LabelDensity/Visualizer.h>

+ Inheritance diagram for Visualizer:

Public Member Functions

float getAlpha () const
 Get the alpha. More...
 
void setAlpha (float value)
 Set the alpha. Must be in [0, 1]. More...
 
 Visualizer ()
 
 Visualizer (const armarx::DebugDrawerTopic &drawer, const std::string &layer="LabelDensityVoxelGrid")
 
virtual ~Visualizer () override
 Virtual destructor. More...
 
- Public Member Functions inherited from Visualizer< Voxel >
void clearLayer ()
 Clear the layer. More...
 
void clearVoxelLayer (bool sleep=false)
 Clear the voxel layer. More...
 
void draw (const VoxelGrid< Voxel > &grid)
 Draw the voxel grid. More...
 
void drawBoundingEdges (const VoxelGrid< Voxel > &grid)
 Draw the bounding edges of the voxel grid. More...
 
void drawStructure (const VoxelGrid< Voxel > &grid, float lineWidth=1, const armarx::DrawColor &colorEdges={0,.5, 1, 1}, const armarx::DrawColor &colorStructure={0, 1, 1, 1}, bool drawOriginVoxel=false)
 Draw the bounding edges of the voxel grid. More...
 
 operator bool () const
 
void setDebugDrawer (const armarx::DebugDrawerInterfacePrx &debugDrawer)
 Set the debug drawer. More...
 
void setLayer (const std::string &layer)
 Set the layer name. More...
 
 Visualizer ()
 Default constructor. More...
 
 Visualizer (const armarx::DebugDrawerTopic &drawer, const std::string &voxelLayer="VoxelGrid")
 Initialize with debug drawer and voxel grid. More...
 

Protected Member Functions

virtual void drawVoxel (const VoxelVisuData &voxelVisu) override
 Draw a voxel. More...
 
virtual bool isVisible (const VoxelVisuData &voxelVisu) const override
 Indicate whether a voxel shall be drawn. More...
 
- Protected Member Functions inherited from Visualizer< Voxel >
armarx::DebugDrawerTopicdrawer ()
 Get the debug drawer. More...
 
const armarx::DebugDrawerTopicdrawer () const
 
std::string getVoxelLayer () const
 Get the layer name. More...
 

Protected Attributes

float alpha = 0.75
 

Detailed Description

Visualizer for label density voxel grids.

Draws voxels as multi-colored boxes, where the proportion of each color corresponds to the proportion of the respective label.

Definition at line 17 of file Visualizer.h.

Constructor & Destructor Documentation

◆ Visualizer() [1/2]

Visualizer ( )
default

◆ Visualizer() [2/2]

Visualizer ( const armarx::DebugDrawerTopic drawer,
const std::string &  layer = "LabelDensityVoxelGrid" 
)

Definition at line 15 of file Visualizer.cpp.

◆ ~Visualizer()

~Visualizer ( )
overridevirtualdefault

Virtual destructor.

Reimplemented from Visualizer< Voxel >.

Member Function Documentation

◆ drawVoxel()

virtual void drawVoxel ( const VoxelVisuData &  visu)
overrideprotectedvirtual

Draw a voxel.

Reimplemented from Visualizer< Voxel >.

◆ getAlpha()

float getAlpha ( ) const

Get the alpha.

Definition at line 59 of file Visualizer.cpp.

◆ isVisible()

virtual bool isVisible ( const VoxelVisuData &  visu) const
overrideprotectedvirtual

Indicate whether a voxel shall be drawn.

Voxels for which this method returns false are not passed to drawVoxel().

Reimplemented from Visualizer< Voxel >.

◆ setAlpha()

void setAlpha ( float  value)

Set the alpha. Must be in [0, 1].

Definition at line 64 of file Visualizer.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ alpha

float alpha = 0.75
protected

Definition at line 41 of file Visualizer.h.


The documentation for this class was generated from the following files: