OpenWalnut
1.5.0dev
|
Processes a dataset for join tree computation. More...
#include <WJoinContourTree.h>
Classes | |
class | IndirectCompare |
Comperator for indirect sort so the value set is not modified. More... | |
Public Member Functions | |
WJoinContourTree (std::shared_ptr< WDataSetSingle > dataset) | |
Initialize this with a data set for which the join tree should be computed. More... | |
void | buildJoinTree () |
Build the join tree. More... | |
std::shared_ptr< std::set< size_t > > | getVolumeVoxelsEnclosedByIsoSurface (const double isoValue) const |
For a given isovalue all the voxel which are enclosed by the biggest isosurface are computed. More... | |
virtual const std::string | getName () const |
Gets the name of this prototype. More... | |
virtual const std::string | getDescription () const |
Gets the description for this prototype. More... | |
Public Member Functions inherited from WTransferable | |
WTransferable () | |
Default constructor. More... | |
virtual | ~WTransferable () |
Destructor. More... | |
Public Member Functions inherited from WPrototyped | |
WPrototyped () | |
Default constructor. More... | |
virtual | ~WPrototyped () |
Destructor. More... | |
template<typename T > | |
bool | isA () |
Checks whether the actual prototype has the specified runtime type. More... | |
Static Public Member Functions | |
static std::shared_ptr< WPrototyped > | getPrototype () |
Returns a prototype instantiated with the true type of the deriving class. More... | |
Protected Member Functions | |
void | sortIndexArray () |
Sort the indices on their element value of the value set in descending order. More... | |
Static Protected Attributes | |
static std::shared_ptr< WPrototyped > | m_prototype = std::shared_ptr< WPrototyped >() |
The prototype as singleton. More... | |
Private Attributes | |
std::shared_ptr< WGridRegular3D > | m_grid |
Stores the reference to the grid of the given dataset to get the neighbours of a voxel. More... | |
std::shared_ptr< WValueSet< double > > | m_valueSet |
Stores reference to the isovalues, so we may sort them indirect on their value. More... | |
std::vector< size_t > | m_elementIndices |
Stores the component number for the i'th vertex in the value set. More... | |
std::vector< size_t > | m_joinTree |
For each index stores which node it is connected to. More... | |
std::vector< size_t > | m_lowestVoxel |
Stores the index of lowest element for the i'th component. More... | |
Friends | |
class | WJoinContourTreeTest |
Access for test class. More... | |
Processes a dataset for join tree computation.
This is a part of those famous contur trees.
Every leaf in that tree represents a local maximum. A branch is a collection of vertices belonging to the same component and nodes joining branches represent a data point which melds multiple (at least two) branches.
With the Split tree then you may compute the contour tree, but for that you may need to fullfil at least two conditions:
Definition at line 54 of file WJoinContourTree.h.
|
explicit |
Initialize this with a data set for which the join tree should be computed.
WNotImplemented | If the dataset is not a scalar double field |
dataset | Reference to the dataset. |
Definition at line 43 of file WJoinContourTree.cpp.
References m_elementIndices, m_grid, m_joinTree, m_valueSet, and WJoinContourTree().
Referenced by WJoinContourTree().
void WJoinContourTree::buildJoinTree | ( | ) |
Build the join tree.
Definition at line 75 of file WJoinContourTree.cpp.
References WUnionFind::find(), m_elementIndices, m_grid, m_joinTree, m_lowestVoxel, m_valueSet, WUnionFind::merge(), and sortIndexArray().
Referenced by WJoinContourTreeTest::testbuildJoinTreeOnRegular2DGrid(), WJoinContourTreeTest::testGetVolumeVoxelsEnclosedByIsoSurfaceWithMerges(), and WJoinContourTreeTest::testGetVolumeVoxelsEnclosedByIsoSurfaceWithOutMerge().
|
inlinevirtual |
Gets the description for this prototype.
Implements WPrototyped.
Definition at line 154 of file WJoinContourTree.h.
|
inlinevirtual |
Gets the name of this prototype.
Implements WPrototyped.
Definition at line 149 of file WJoinContourTree.h.
|
static |
Returns a prototype instantiated with the true type of the deriving class.
Definition at line 145 of file WJoinContourTree.cpp.
References m_prototype.
std::shared_ptr< std::set< size_t > > WJoinContourTree::getVolumeVoxelsEnclosedByIsoSurface | ( | const double | isoValue | ) | const |
For a given isovalue all the voxel which are enclosed by the biggest isosurface are computed.
isoValue | The isovalue |
Definition at line 102 of file WJoinContourTree.cpp.
References WUnionFind::getMaxSet(), m_elementIndices, m_joinTree, m_valueSet, and WUnionFind::merge().
Referenced by WJoinContourTreeTest::testGetVolumeVoxelsEnclosedByIsoSurfaceWithMerges(), and WJoinContourTreeTest::testGetVolumeVoxelsEnclosedByIsoSurfaceWithOutMerge().
|
protected |
Sort the indices on their element value of the value set in descending order.
Definition at line 69 of file WJoinContourTree.cpp.
References m_elementIndices, and m_valueSet.
Referenced by buildJoinTree().
|
friend |
Access for test class.
Definition at line 56 of file WJoinContourTree.h.
|
private |
Stores the component number for the i'th vertex in the value set.
Definition at line 116 of file WJoinContourTree.h.
Referenced by buildJoinTree(), getVolumeVoxelsEnclosedByIsoSurface(), sortIndexArray(), and WJoinContourTree().
|
private |
Stores the reference to the grid of the given dataset to get the neighbours of a voxel.
Definition at line 113 of file WJoinContourTree.h.
Referenced by buildJoinTree(), and WJoinContourTree().
|
private |
For each index stores which node it is connected to.
Definition at line 117 of file WJoinContourTree.h.
Referenced by buildJoinTree(), getVolumeVoxelsEnclosedByIsoSurface(), WJoinContourTreeTest::testbuildJoinTreeOnRegular2DGrid(), and WJoinContourTree().
|
private |
Stores the index of lowest element for the i'th component.
Definition at line 118 of file WJoinContourTree.h.
Referenced by buildJoinTree().
|
staticprotected |
The prototype as singleton.
Definition at line 110 of file WJoinContourTree.h.
Referenced by getPrototype().
|
private |
Stores reference to the isovalues, so we may sort them indirect on their value.
Definition at line 114 of file WJoinContourTree.h.
Referenced by buildJoinTree(), getVolumeVoxelsEnclosedByIsoSurface(), WJoinContourTree::IndirectCompare::operator()(), sortIndexArray(), and WJoinContourTree().