25 #ifndef WMSUPERQUADRICGLYPHS_H
26 #define WMSUPERQUADRICGLYPHS_H
33 #include <osg/Uniform>
35 #include "core/dataHandler/WDataSetDTI.h"
36 #include "core/graphicsEngine/WGEManagedGroupNode.h"
37 #include "core/graphicsEngine/callbacks/WGELinearTranslationCallback.h"
38 #include "core/graphicsEngine/shaders/WGEShader.h"
39 #include "core/kernel/WModule.h"
40 #include "core/kernel/WModuleInputData.h"
41 #include "core/kernel/WModuleOutputData.h"
66 virtual const std::string
getName()
const;
81 virtual std::shared_ptr< WModule >
factory()
const;
134 std::shared_ptr< WModuleInputData< WDataSetDTI > >
m_input;
235 inline void addGlyph( osg::Vec3 position, osg::ref_ptr< osg::Vec3Array > vertices, osg::ref_ptr< osg::Vec3Array > orientation );
244 inline void addTensor(
size_t idx, osg::Vec3Array* diag, osg::Vec3Array* offdiag );
258 osg::Drawable::UpdateCallback(),
269 virtual void update( osg::NodeVisitor* nv, osg::Drawable* d );
277 void setNewTensorData( osg::ref_ptr< osg::Vec3Array > diag, osg::ref_ptr< osg::Vec3Array > offdiag );
Node callback to handle updates in the glyph tensor data.
virtual void update(osg::NodeVisitor *nv, osg::Drawable *d)
This operator gets called by OSG every update cycle.
osg::Geometry * m_geometry
The geometry node to handle here.
osg::ref_ptr< osg::Vec3Array > m_tensorOffDiag
Off-diagonal tensor elements in texture coordinate array.
osg::ref_ptr< osg::Vec3Array > m_tensorDiag
Diagonal tensor elements in texture coordinate array.
void setNewTensorData(osg::ref_ptr< osg::Vec3Array > diag, osg::ref_ptr< osg::Vec3Array > offdiag)
Updates the tensor data in the glyph slice.
GlyphGeometryNodeCallback(osg::Geometry *geo)
Constructor.
Rendering of GPU bases Superquadric Glyphs.
virtual void properties()
Initialize the properties for this module.
size_t m_nbGlyphsZ
Number of glyphs on Z Plane.
osg::ref_ptr< WGEManagedGroupNode > m_output
The Geode containing all the glyphs.
WMSuperquadricGlyphs()
Constructor.
size_t m_maxY
Number of cells in Y direction.
osg::ref_ptr< WGEManagedGroupNode > m_xSlice
The transformation node moving the X slice through the dataset space if the sliders are used.
osg::ref_ptr< GlyphGeometryNodeCallback > m_zSliceGlyphCallback
The update callback of m_zSlice glphs.
std::shared_ptr< WCondition > m_propCondition
A condition used to notify about changes in several properties.
WPropInt m_zPos
z position of the slice
std::shared_ptr< WModuleInputData< WDataSetDTI > > m_input
The input dataset.
size_t m_maxX
Number of cells in X direction.
WPropDouble m_evThreshold
The eigenvalue threshold to filter glyphs.
WPropDouble m_faThreshold
The FA threshold to filter glyphs.
virtual std::shared_ptr< WModule > factory() const
Due to the prototype design pattern used to build modules, this method returns a new instance of this...
osg::ref_ptr< GlyphGeometryNodeCallback > m_ySliceGlyphCallback
The update callback of m_ySlice glphs.
WPropDouble m_gamma
Sharpness of the glyphs.
virtual ~WMSuperquadricGlyphs()
Destructor.
WPropInt m_yPos
y position of the slice
WPropDouble m_scaling
Scaling of the glyphs.
void addTensor(size_t idx, osg::Vec3Array *diag, osg::Vec3Array *offdiag)
Adds a tensor to two arrays.
osg::ref_ptr< GlyphGeometryNodeCallback > m_xSliceGlyphCallback
The update callback of m_xSlice glphs.
WPropInt m_xPos
x position of the slice
virtual const std::string getDescription() const
Gives back a description of this module.
WPropBool m_showonY
indicates whether the vector should be shown on slice Y
WPropBool m_showonZ
indicates whether the vector should be shown on slice Z
size_t m_nbGlyphsX
Number of glyphs on X Plane.
std::shared_ptr< WGridRegular3D > m_dataSetGrid
The current tensor dataset's grid.
void initOSG()
Initializes the needed geodes, transformations and vertex arrays.
std::shared_ptr< WValueSetBase > m_dataSetValueSet
The current tensor dataset's valueset.
osg::ref_ptr< WGEShader > m_shader
the shader actually doing the glyph raytracing
WPropBool m_showonX
indicates whether the vector should be shown on slice X
osg::ref_ptr< WGEManagedGroupNode > m_zSlice
The transformation node moving the Z slice through the dataset space if the sliders are used.
osg::ref_ptr< WGEManagedGroupNode > m_ySlice
The transformation node moving the Y slice through the dataset space if the sliders are used.
std::shared_ptr< const WDataSetDTI > m_dataSet
The current tensor dataset.
virtual void connectors()
Initialize the connectors this module is using.
size_t m_maxZ
Number of cells in Z direction.
virtual const std::string getName() const
Gives back the name of this module.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
virtual void moduleMain()
Entry point after loading the module.
size_t m_nbGlyphsY
Number of glyphs on Y Plane.
WPropBool m_directionalColoring
Color glyphs by direction?
void addGlyph(osg::Vec3 position, osg::ref_ptr< osg::Vec3Array > vertices, osg::ref_ptr< osg::Vec3Array > orientation)
Adds a cube to the vertex array.
Class representing a single module of OpenWalnut.