OpenWalnut  1.4.0
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes | Private Attributes | Friends
WJoinContourTree Class Reference

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

#include <WJoinContourTree.h>

+ Inheritance diagram for WJoinContourTree:

List of all members.

Classes

class  IndirectCompare
 Comperator for indirect sort so the value set is not modified. More...

Public Member Functions

 WJoinContourTree (boost::shared_ptr< WDataSetSingle > dataset)
 Initialize this with a data set for which the join tree should be computed.
void buildJoinTree ()
 Build the join tree.
boost::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.
virtual const std::string getName () const
 Gets the name of this prototype.
virtual const std::string getDescription () const
 Gets the description for this prototype.

Static Public Member Functions

static boost::shared_ptr
< WPrototyped
getPrototype ()
 Returns a prototype instantiated with the true type of the deriving class.

Protected Member Functions

void sortIndexArray ()
 Sort the indices on their element value of the value set in descending order.

Static Protected Attributes

static boost::shared_ptr
< WPrototyped
m_prototype = boost::shared_ptr< WPrototyped >()
 The prototype as singleton.

Private Attributes

boost::shared_ptr< WGridRegular3Dm_grid
 Stores the reference to the grid of the given dataset to get the neighbours of a voxel.
boost::shared_ptr< WValueSet
< double > > 
m_valueSet
 Stores reference to the isovalues, so we may sort them indirect on their value.
std::vector< size_tm_elementIndices
 Stores the component number for the i'th vertex in the value set.
std::vector< size_tm_joinTree
 For each index stores which node it is connected to.
std::vector< size_tm_lowestVoxel
 Stores the index of lowest element for the i'th component.

Friends

class WJoinContourTreeTest

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:

Notes:
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 ( boost::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 42 of file WJoinContourTree.cpp.

References m_elementIndices, m_grid, m_joinTree, m_valueSet, and WJoinContourTree().

Referenced by WJoinContourTree().


Member Function Documentation

const std::string WJoinContourTree::getDescription ( ) const [inline, virtual]

Gets the description for this prototype.

Returns:
the description

Implements WPrototyped.

Definition at line 154 of file WJoinContourTree.h.

const std::string WJoinContourTree::getName ( ) const [inline, virtual]

Gets the name of this prototype.

Returns:
the name.

Implements WPrototyped.

Definition at line 149 of file WJoinContourTree.h.

boost::shared_ptr< WPrototyped > WJoinContourTree::getPrototype ( ) [static]

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

Returns:
the prototype.

Definition at line 144 of file WJoinContourTree.cpp.

References m_prototype.

boost::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 101 of file WJoinContourTree.cpp.

References m_elementIndices, m_joinTree, and m_valueSet.

Referenced by WJoinContourTreeTest::testGetVolumeVoxelsEnclosedByIsoSurfaceWithMerges(), and WJoinContourTreeTest::testGetVolumeVoxelsEnclosedByIsoSurfaceWithOutMerge().

void WJoinContourTree::sortIndexArray ( ) [protected]

Sort the indices on their element value of the value set in descending order.

Definition at line 68 of file WJoinContourTree.cpp.

References m_elementIndices, and m_valueSet.

Referenced by buildJoinTree().


Member Data Documentation

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

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

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

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

boost::shared_ptr< WPrototyped > WJoinContourTree::m_prototype = boost::shared_ptr< WPrototyped >() [static, protected]

The prototype as singleton.

Definition at line 110 of file WJoinContourTree.h.

Referenced by getPrototype().

boost::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: