OpenWalnut  1.5.0dev
Public Member Functions | Private Member Functions | Private Attributes | List of all members
WMTeemGlyphs::GlyphGeneration Class Reference

This class actually generated the glyph geometry. More...

+ Collaboration diagram for WMTeemGlyphs::GlyphGeneration:

Public Member Functions

 GlyphGeneration (std::shared_ptr< WDataSetSphericalHarmonics > dataSet, std::shared_ptr< WDataSetScalar > dataGFA, double thresholdGFA, const size_t &sliceId, const size_t &order, const size_t &subdivisionLevel, const size_t &modulo, const size_t &sliceType, const bool &usePolar, const float &scale, const bool &useNormalization, const bool &useRadiusNormalization, const bool &hideNegativeLobes)
 Constructor setting the data pointers and the properties from the module. More...
 
 ~GlyphGeneration ()
 Destructor freeing the data. More...
 
void operator() (size_t id, size_t numThreads, WBoolFlag &b)
 Computes the glyphs. More...
 
osg::ref_ptr< osg::Geode > getGraphics ()
 Get the geode of the computed glyphs. More...
 

Private Member Functions

void minMaxNormalization (limnPolyData *glyph, const size_t &nbVertCoords)
 Makes the radii of the glyph be distributed between [0,1]. More...
 

Private Attributes

size_t m_nA
 Internal variable holding the number of glyphs in the first direction of the slice. More...
 
size_t m_nB
 Internal variable holding the number of glyphs in the second direction of the slice. More...
 
size_t m_nX
 Number of voxels in x direction. More...
 
size_t m_nY
 Number of voxels in y direction. More...
 
size_t m_nZ
 Number of voxels in z direction. More...
 
std::shared_ptr< WDataSetSphericalHarmonicsm_dataSet
 Pointer to the treated data set. More...
 
std::shared_ptr< WDataSetScalarm_dataGFA
 Pointer to possible GFA data set. More...
 
std::shared_ptr< WGridRegular3Dm_grid
 Pointer to the grid of the treated data set. More...
 
osg::ref_ptr< osg::Vec3Array > m_vertArray
 Vertices of the triangles of the glyphs. More...
 
osg::ref_ptr< osg::Vec3Array > m_normals
 Normals of the vertices of the glyphs. More...
 
osg::ref_ptr< osg::Vec4Array > m_colors
 Colors of the vertices of the glyphs. More...
 
osg::ref_ptr< osg::DrawElementsUInt > m_glyphElements
 Indices of the vertices of the triangles of the glyphs. More...
 
double m_thresholdGFA
 Stores the GFA threshold from the property. More...
 
size_t m_sliceId
 Stores option from property. More...
 
size_t m_order
 Stores option from property. More...
 
size_t m_sliceType
 Stores option from property. More...
 
size_t m_subdivisionLevel
 Store option from property. More...
 
size_t m_modulo
 Store option from property. More...
 
bool m_usePolar
 Stores option from property. More...
 
float m_scale
 Stores option from property. More...
 
bool m_useNormalization
 Stores option from property. More...
 
bool m_useRadiusNormalization
 Stores option from property. More...
 
bool m_hideNegativeLobes
 Stores option from property. More...
 
limnPolyData * m_sphere
 The geometry of the subdivided icosahedron. More...
 

Detailed Description

This class actually generated the glyph geometry.

This class has () operator that the work. The () operator enables it to be parallelized by WThreadedFunction.

Definition at line 173 of file WMTeemGlyphs.h.

Constructor & Destructor Documentation

◆ GlyphGeneration()

WMTeemGlyphs::GlyphGeneration::GlyphGeneration ( std::shared_ptr< WDataSetSphericalHarmonics dataSet,
std::shared_ptr< WDataSetScalar dataGFA,
double  thresholdGFA,
const size_t &  sliceId,
const size_t &  order,
const size_t &  subdivisionLevel,
const size_t &  modulo,
const size_t &  sliceType,
const bool &  usePolar,
const float &  scale,
const bool &  useNormalization,
const bool &  useRadiusNormalization,
const bool &  hideNegativeLobes 
)

Constructor setting the data pointers and the properties from the module.

Parameters
dataSetPointer to the treated data set.
dataGFAGFA data for dataSet.
thresholdGFAThreshold of GFA below which we will not draw the glyphs
sliceIdRendered slice
orderOrder of the rendered spherical harmonics.
subdivisionLevelSubidivision level of spheres that are basis for glyphs (resolution)
moduloShow only every modulo-th glyph in each direction.
sliceTypeSlice direction (sagittal, coronal, axial )
usePolarUse polar glyphs (HOME otherwise)
scaleResize the glyphs.
useNormalizationScale minimum and maximum radius to [0,1].
useRadiusNormalizationScale glyphs to make them all the same size.
hideNegativeLobesVertices with negative radius will be set to zero.

Definition at line 449 of file WMTeemGlyphs.cpp.

References m_colors, m_glyphElements, m_grid, m_modulo, m_nA, m_nB, m_normals, m_nX, m_nY, m_nZ, m_sliceId, m_sphere, m_subdivisionLevel, and m_vertArray.

◆ ~GlyphGeneration()

WMTeemGlyphs::GlyphGeneration::~GlyphGeneration ( )

Destructor freeing the data.

Definition at line 524 of file WMTeemGlyphs.cpp.

Member Function Documentation

◆ getGraphics()

osg::ref_ptr< osg::Geode > WMTeemGlyphs::GlyphGeneration::getGraphics ( )

Get the geode of the computed glyphs.

Returns
geode

Definition at line 775 of file WMTeemGlyphs.cpp.

◆ minMaxNormalization()

void WMTeemGlyphs::GlyphGeneration::minMaxNormalization ( limnPolyData *  glyph,
const size_t &  nbVertCoords 
)
private

Makes the radii of the glyph be distributed between [0,1].

Parameters
glyphThe glyph that will be normalized given as teem's limnPolyData.
nbVertCoordsNumber of coordinates per vertex for the glyph poly-data

Definition at line 406 of file WMTeemGlyphs.cpp.

◆ operator()()

void WMTeemGlyphs::GlyphGeneration::operator() ( size_t  id,
size_t  numThreads,
WBoolFlag b 
)

Computes the glyphs.

Parameters
idThread id.
numThreadsThe number of threads accessing this function simultaneously
bA flag allowing to check whether a an abort has been requested.

Definition at line 530 of file WMTeemGlyphs.cpp.

References WLogger::addLogMessage(), WLogger::getLogger(), WMTeemGlyphs::m_dataSet, and WValue< T >::size().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_colors

osg::ref_ptr< osg::Vec4Array > WMTeemGlyphs::GlyphGeneration::m_colors
private

Colors of the vertices of the glyphs.

Definition at line 245 of file WMTeemGlyphs.h.

Referenced by GlyphGeneration().

◆ m_dataGFA

std::shared_ptr< WDataSetScalar > WMTeemGlyphs::GlyphGeneration::m_dataGFA
private

Pointer to possible GFA data set.

Definition at line 241 of file WMTeemGlyphs.h.

◆ m_dataSet

std::shared_ptr< WDataSetSphericalHarmonics > WMTeemGlyphs::GlyphGeneration::m_dataSet
private

Pointer to the treated data set.

Definition at line 240 of file WMTeemGlyphs.h.

◆ m_glyphElements

osg::ref_ptr< osg::DrawElementsUInt > WMTeemGlyphs::GlyphGeneration::m_glyphElements
private

Indices of the vertices of the triangles of the glyphs.

Definition at line 246 of file WMTeemGlyphs.h.

Referenced by GlyphGeneration().

◆ m_grid

std::shared_ptr< WGridRegular3D > WMTeemGlyphs::GlyphGeneration::m_grid
private

Pointer to the grid of the treated data set.

Definition at line 242 of file WMTeemGlyphs.h.

Referenced by GlyphGeneration().

◆ m_hideNegativeLobes

bool WMTeemGlyphs::GlyphGeneration::m_hideNegativeLobes
private

Stores option from property.

Definition at line 258 of file WMTeemGlyphs.h.

◆ m_modulo

size_t WMTeemGlyphs::GlyphGeneration::m_modulo
private

Store option from property.

Definition at line 253 of file WMTeemGlyphs.h.

Referenced by GlyphGeneration().

◆ m_nA

size_t WMTeemGlyphs::GlyphGeneration::m_nA
private

Internal variable holding the number of glyphs in the first direction of the slice.

Definition at line 235 of file WMTeemGlyphs.h.

Referenced by GlyphGeneration().

◆ m_nB

size_t WMTeemGlyphs::GlyphGeneration::m_nB
private

Internal variable holding the number of glyphs in the second direction of the slice.

Definition at line 236 of file WMTeemGlyphs.h.

Referenced by GlyphGeneration().

◆ m_normals

osg::ref_ptr< osg::Vec3Array > WMTeemGlyphs::GlyphGeneration::m_normals
private

Normals of the vertices of the glyphs.

Definition at line 244 of file WMTeemGlyphs.h.

Referenced by GlyphGeneration().

◆ m_nX

size_t WMTeemGlyphs::GlyphGeneration::m_nX
private

Number of voxels in x direction.

Definition at line 237 of file WMTeemGlyphs.h.

Referenced by GlyphGeneration().

◆ m_nY

size_t WMTeemGlyphs::GlyphGeneration::m_nY
private

Number of voxels in y direction.

Definition at line 238 of file WMTeemGlyphs.h.

Referenced by GlyphGeneration().

◆ m_nZ

size_t WMTeemGlyphs::GlyphGeneration::m_nZ
private

Number of voxels in z direction.

Definition at line 239 of file WMTeemGlyphs.h.

Referenced by GlyphGeneration().

◆ m_order

size_t WMTeemGlyphs::GlyphGeneration::m_order
private

Stores option from property.

Definition at line 250 of file WMTeemGlyphs.h.

◆ m_scale

float WMTeemGlyphs::GlyphGeneration::m_scale
private

Stores option from property.

Definition at line 255 of file WMTeemGlyphs.h.

◆ m_sliceId

size_t WMTeemGlyphs::GlyphGeneration::m_sliceId
private

Stores option from property.

Definition at line 249 of file WMTeemGlyphs.h.

Referenced by GlyphGeneration().

◆ m_sliceType

size_t WMTeemGlyphs::GlyphGeneration::m_sliceType
private

Stores option from property.

Definition at line 251 of file WMTeemGlyphs.h.

◆ m_sphere

limnPolyData* WMTeemGlyphs::GlyphGeneration::m_sphere
private

The geometry of the subdivided icosahedron.

Definition at line 260 of file WMTeemGlyphs.h.

Referenced by GlyphGeneration().

◆ m_subdivisionLevel

size_t WMTeemGlyphs::GlyphGeneration::m_subdivisionLevel
private

Store option from property.

Definition at line 252 of file WMTeemGlyphs.h.

Referenced by GlyphGeneration().

◆ m_thresholdGFA

double WMTeemGlyphs::GlyphGeneration::m_thresholdGFA
private

Stores the GFA threshold from the property.

Definition at line 248 of file WMTeemGlyphs.h.

◆ m_useNormalization

bool WMTeemGlyphs::GlyphGeneration::m_useNormalization
private

Stores option from property.

Definition at line 256 of file WMTeemGlyphs.h.

◆ m_usePolar

bool WMTeemGlyphs::GlyphGeneration::m_usePolar
private

Stores option from property.

Definition at line 254 of file WMTeemGlyphs.h.

◆ m_useRadiusNormalization

bool WMTeemGlyphs::GlyphGeneration::m_useRadiusNormalization
private

Stores option from property.

Definition at line 257 of file WMTeemGlyphs.h.

◆ m_vertArray

osg::ref_ptr< osg::Vec3Array > WMTeemGlyphs::GlyphGeneration::m_vertArray
private

Vertices of the triangles of the glyphs.

Definition at line 243 of file WMTeemGlyphs.h.

Referenced by GlyphGeneration().


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