OpenWalnut  1.5.0dev
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes | Private Attributes | Friends | List of all members
WJoinContourTree Class Reference

Processes a dataset for join tree computation. More...

#include <WJoinContourTree.h>

+ Inheritance diagram for WJoinContourTree:
+ Collaboration diagram for WJoinContourTree:

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< WPrototypedgetPrototype ()
 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< WPrototypedm_prototype = std::shared_ptr< WPrototyped >()
 The prototype as singleton. More...
 

Private Attributes

std::shared_ptr< WGridRegular3Dm_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...
 

Detailed Description

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:

Note
You may use this join tree also for finding the vertices belonging to the volume enclosed by the biggest isosurface for a given isovalue. Then you don't need "simulation of simplicity" to make the data points disjoint also you don't need simplicial meshes.

Definition at line 54 of file WJoinContourTree.h.

Constructor & Destructor Documentation

◆ WJoinContourTree()

WJoinContourTree::WJoinContourTree ( std::shared_ptr< WDataSetSingle dataset)
explicit

Initialize this with a data set for which the join tree should be computed.

Exceptions
WNotImplementedIf the dataset is not a scalar double field
Parameters
datasetReference 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Function Documentation

◆ buildJoinTree()

void WJoinContourTree::buildJoinTree ( )

◆ getDescription()

const std::string WJoinContourTree::getDescription ( ) const
inlinevirtual

Gets the description for this prototype.

Returns
the description

Implements WPrototyped.

Definition at line 154 of file WJoinContourTree.h.

◆ getName()

const std::string WJoinContourTree::getName ( ) const
inlinevirtual

Gets the name of this prototype.

Returns
the name.

Implements WPrototyped.

Definition at line 149 of file WJoinContourTree.h.

◆ getPrototype()

std::shared_ptr< WPrototyped > WJoinContourTree::getPrototype ( )
static

Returns a prototype instantiated with the true type of the deriving class.

Returns
the prototype.

Definition at line 145 of file WJoinContourTree.cpp.

References m_prototype.

◆ getVolumeVoxelsEnclosedByIsoSurface()

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.

Parameters
isoValueThe isovalue
Returns
Set of voxel indices

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sortIndexArray()

void WJoinContourTree::sortIndexArray ( )
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().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ WJoinContourTreeTest

friend class WJoinContourTreeTest
friend

Access for test class.

Definition at line 56 of file WJoinContourTree.h.

Member Data Documentation

◆ m_elementIndices

std::vector< size_t > WJoinContourTree::m_elementIndices
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().

◆ m_grid

std::shared_ptr< WGridRegular3D > WJoinContourTree::m_grid
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().

◆ m_joinTree

std::vector< size_t > WJoinContourTree::m_joinTree
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().

◆ m_lowestVoxel

std::vector< size_t > WJoinContourTree::m_lowestVoxel
private

Stores the index of lowest element for the i'th component.

Definition at line 118 of file WJoinContourTree.h.

Referenced by buildJoinTree().

◆ m_prototype

std::shared_ptr< WPrototyped > WJoinContourTree::m_prototype = std::shared_ptr< WPrototyped >()
staticprotected

The prototype as singleton.

Definition at line 110 of file WJoinContourTree.h.

Referenced by getPrototype().

◆ m_valueSet

std::shared_ptr< WValueSet< double > > WJoinContourTree::m_valueSet
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().


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