OpenWalnut
1.5.0dev
|
This class actually generated the glyph geometry. More...
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< WDataSetSphericalHarmonics > | m_dataSet |
Pointer to the treated data set. More... | |
std::shared_ptr< WDataSetScalar > | m_dataGFA |
Pointer to possible GFA data set. More... | |
std::shared_ptr< WGridRegular3D > | m_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... | |
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.
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.
dataSet | Pointer to the treated data set. |
dataGFA | GFA data for dataSet. |
thresholdGFA | Threshold of GFA below which we will not draw the glyphs |
sliceId | Rendered slice |
order | Order of the rendered spherical harmonics. |
subdivisionLevel | Subidivision level of spheres that are basis for glyphs (resolution) |
modulo | Show only every modulo-th glyph in each direction. |
sliceType | Slice direction (sagittal, coronal, axial ) |
usePolar | Use polar glyphs (HOME otherwise) |
scale | Resize the glyphs. |
useNormalization | Scale minimum and maximum radius to [0,1]. |
useRadiusNormalization | Scale glyphs to make them all the same size. |
hideNegativeLobes | Vertices 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.
WMTeemGlyphs::GlyphGeneration::~GlyphGeneration | ( | ) |
Destructor freeing the data.
Definition at line 524 of file WMTeemGlyphs.cpp.
osg::ref_ptr< osg::Geode > WMTeemGlyphs::GlyphGeneration::getGraphics | ( | ) |
|
private |
Makes the radii of the glyph be distributed between [0,1].
glyph | The glyph that will be normalized given as teem's limnPolyData. |
nbVertCoords | Number of coordinates per vertex for the glyph poly-data |
Definition at line 406 of file WMTeemGlyphs.cpp.
void WMTeemGlyphs::GlyphGeneration::operator() | ( | size_t | id, |
size_t | numThreads, | ||
WBoolFlag & | b | ||
) |
Computes the glyphs.
id | Thread id. |
numThreads | The number of threads accessing this function simultaneously |
b | A 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().
|
private |
Colors of the vertices of the glyphs.
Definition at line 245 of file WMTeemGlyphs.h.
Referenced by GlyphGeneration().
|
private |
Pointer to possible GFA data set.
Definition at line 241 of file WMTeemGlyphs.h.
|
private |
Pointer to the treated data set.
Definition at line 240 of file WMTeemGlyphs.h.
|
private |
Indices of the vertices of the triangles of the glyphs.
Definition at line 246 of file WMTeemGlyphs.h.
Referenced by GlyphGeneration().
|
private |
Pointer to the grid of the treated data set.
Definition at line 242 of file WMTeemGlyphs.h.
Referenced by GlyphGeneration().
|
private |
Stores option from property.
Definition at line 258 of file WMTeemGlyphs.h.
|
private |
Store option from property.
Definition at line 253 of file WMTeemGlyphs.h.
Referenced by GlyphGeneration().
|
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().
|
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().
|
private |
Normals of the vertices of the glyphs.
Definition at line 244 of file WMTeemGlyphs.h.
Referenced by GlyphGeneration().
|
private |
Number of voxels in x direction.
Definition at line 237 of file WMTeemGlyphs.h.
Referenced by GlyphGeneration().
|
private |
Number of voxels in y direction.
Definition at line 238 of file WMTeemGlyphs.h.
Referenced by GlyphGeneration().
|
private |
Number of voxels in z direction.
Definition at line 239 of file WMTeemGlyphs.h.
Referenced by GlyphGeneration().
|
private |
Stores option from property.
Definition at line 250 of file WMTeemGlyphs.h.
|
private |
Stores option from property.
Definition at line 255 of file WMTeemGlyphs.h.
|
private |
Stores option from property.
Definition at line 249 of file WMTeemGlyphs.h.
Referenced by GlyphGeneration().
|
private |
Stores option from property.
Definition at line 251 of file WMTeemGlyphs.h.
|
private |
The geometry of the subdivided icosahedron.
Definition at line 260 of file WMTeemGlyphs.h.
Referenced by GlyphGeneration().
|
private |
Store option from property.
Definition at line 252 of file WMTeemGlyphs.h.
Referenced by GlyphGeneration().
|
private |
Stores the GFA threshold from the property.
Definition at line 248 of file WMTeemGlyphs.h.
|
private |
Stores option from property.
Definition at line 256 of file WMTeemGlyphs.h.
|
private |
Stores option from property.
Definition at line 254 of file WMTeemGlyphs.h.
|
private |
Stores option from property.
Definition at line 257 of file WMTeemGlyphs.h.
|
private |
Vertices of the triangles of the glyphs.
Definition at line 243 of file WMTeemGlyphs.h.
Referenced by GlyphGeneration().