OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Static Public Member Functions | Static Protected Attributes | Private Attributes | List of all members
WDataSetHierarchicalClustering Class Reference

Represents a hierarchy of clusters. More...

#include <WDataSetHierarchicalClustering.h>

+ Inheritance diagram for WDataSetHierarchicalClustering:
+ Collaboration diagram for WDataSetHierarchicalClustering:

Public Types

typedef std::shared_ptr< WDataSetHierarchicalClusteringSPtr
 Pointer to dataset. More...
 
typedef std::shared_ptr< const WDataSetHierarchicalClusteringConstSPtr
 Pointer to const dataset. More...
 
- Public Types inherited from WDataSet
typedef std::shared_ptr< WDataSetSPtr
 Shared pointer abbreviation to a instance of this class. More...
 
typedef std::shared_ptr< const WDataSetConstSPtr
 Shared pointer abbreviation to a const instance of this class. More...
 

Public Member Functions

 WDataSetHierarchicalClustering (WTreeNode::SPtr rootNode, std::map< size_t, WFiberCluster::SPtr > clusterMap)
 Constructs a hierarchical clustering dataset. More...
 
 WDataSetHierarchicalClustering ()
 Constructs a new set of tracts. More...
 
virtual ~WDataSetHierarchicalClustering ()
 Destructor. 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...
 
WTreeNode::SPtr getRootNode ()
 Returns the root cluster. More...
 
std::map< size_t, WFiberCluster::SPtrgetClusterMap ()
 Returns the whole cluster map. More...
 
std::vector< WTreeNode::SPtrgetClustersDownToLevel (WTreeNode::SPtr node, size_t level)
 Returns all clusters down (root node has highest level) to a certain level in the hierarchy. More...
 
- Public Member Functions inherited from WDataSet
 WDataSet ()
 This constructor should be used if a dataSet does not stem from a file. More...
 
virtual ~WDataSet ()
 Since WDataSet is a base class and thus should be polymorphic we add virtual destructor. More...
 
void setFilename (const std::string filename)
 Set the name of the file that this data set stems from. More...
 
std::string getFilename () const
 Get the name of the file that this data set stems from. More...
 
OW_API_DEPRECATED void setFileName (const std::string filename)
 Set the name of the file that this data set stems from. More...
 
OW_API_DEPRECATED std::string getFileName () const
 Get the name of the file that this data set stems from. More...
 
virtual bool isTexture () const
 Determines whether this dataset can be used as a texture. More...
 
virtual std::shared_ptr< WDataSetVectorisVectorDataSet ()
 Checks if this dataset is a vector dataset. More...
 
virtual osg::ref_ptr< WDataTexture3DgetTexture () const
 Returns the texture- representation of the dataset. More...
 
std::shared_ptr< WPropertiesgetProperties () const
 Return a pointer to the properties object of the dataset. More...
 
std::shared_ptr< WPropertiesgetInformationProperties () const
 Return a pointer to the information properties object of the dataset. 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...
 
- Static Public Member Functions inherited from WDataSet
static std::shared_ptr< WPrototypedgetPrototype ()
 Returns a prototype instantiated with the true type of the deriving class. More...
 

Static Protected Attributes

static std::shared_ptr< WPrototypedm_prototype = std::shared_ptr< WPrototyped >()
 The prototype as singleton. More...
 
- Static Protected Attributes inherited from WDataSet
static std::shared_ptr< WPrototypedm_prototype = std::shared_ptr< WPrototyped >()
 The prototype as singleton. More...
 

Private Attributes

WTreeNode::SPtr m_rootNode
 Pointer to the root cluster. More...
 
std::map< size_t, WFiberCluster::SPtrm_clusters
 Stores the cluster map. More...
 

Additional Inherited Members

- Protected Attributes inherited from WDataSet
std::shared_ptr< WPropertiesm_properties
 The property object for the dataset. More...
 
std::shared_ptr< WPropertiesm_infoProperties
 The property object for the dataset containing only props whose purpose is "PV_PURPOSE_INFORMNATION". More...
 

Detailed Description

Represents a hierarchy of clusters.

Definition at line 44 of file WDataSetHierarchicalClustering.h.

Member Typedef Documentation

◆ ConstSPtr

Pointer to const dataset.

Definition at line 56 of file WDataSetHierarchicalClustering.h.

◆ SPtr

Pointer to dataset.

Definition at line 51 of file WDataSetHierarchicalClustering.h.

Constructor & Destructor Documentation

◆ WDataSetHierarchicalClustering() [1/2]

WDataSetHierarchicalClustering::WDataSetHierarchicalClustering ( WTreeNode::SPtr  rootNode,
std::map< size_t, WFiberCluster::SPtr clusterMap 
)

Constructs a hierarchical clustering dataset.

Parameters
rootNodethe root node of the WTreeNode-tree holding indices to the clusterMap
clusterMapa map of fiber clusters accessible via index

Definition at line 41 of file WDataSetHierarchicalClustering.cpp.

References m_clusters, and m_rootNode.

◆ WDataSetHierarchicalClustering() [2/2]

WDataSetHierarchicalClustering::WDataSetHierarchicalClustering ( )

Constructs a new set of tracts.

The constructed instance is not usable but needed for prototype mechanism.

Definition at line 36 of file WDataSetHierarchicalClustering.cpp.

Referenced by getPrototype().

+ Here is the caller graph for this function:

◆ ~WDataSetHierarchicalClustering()

WDataSetHierarchicalClustering::~WDataSetHierarchicalClustering ( )
virtual

Destructor.

Definition at line 49 of file WDataSetHierarchicalClustering.cpp.

Member Function Documentation

◆ getClusterMap()

std::map< size_t, WFiberCluster::SPtr > WDataSetHierarchicalClustering::getClusterMap ( )

Returns the whole cluster map.

Returns
the whole cluster map

Definition at line 78 of file WDataSetHierarchicalClustering.cpp.

References m_clusters.

◆ getClustersDownToLevel()

std::vector< WTreeNode::SPtr > WDataSetHierarchicalClustering::getClustersDownToLevel ( WTreeNode::SPtr  node,
size_t  level 
)

Returns all clusters down (root node has highest level) to a certain level in the hierarchy.

Parameters
nodethe node used as a starting point for the recursive lookup
levelthe maximum level for a node to be selected
Returns
the clusters down to a certain level in the hierarchy

Definition at line 84 of file WDataSetHierarchicalClustering.cpp.

◆ getDescription()

const std::string WDataSetHierarchicalClustering::getDescription ( ) const
virtual

Gets the description for this prototype.

Returns
the description

Reimplemented from WDataSet.

Definition at line 68 of file WDataSetHierarchicalClustering.cpp.

◆ getName()

const std::string WDataSetHierarchicalClustering::getName ( ) const
virtual

Gets the name of this prototype.

Returns
the name.

Reimplemented from WDataSet.

Definition at line 63 of file WDataSetHierarchicalClustering.cpp.

◆ getPrototype()

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

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

Returns
the prototype.

Definition at line 54 of file WDataSetHierarchicalClustering.cpp.

References m_prototype, and WDataSetHierarchicalClustering().

+ Here is the call graph for this function:

◆ getRootNode()

WTreeNode::SPtr WDataSetHierarchicalClustering::getRootNode ( )

Returns the root cluster.

Returns
the root cluster

Definition at line 73 of file WDataSetHierarchicalClustering.cpp.

References m_rootNode.

Member Data Documentation

◆ m_clusters

std::map< size_t, WFiberCluster::SPtr > WDataSetHierarchicalClustering::m_clusters
private

Stores the cluster map.

Definition at line 135 of file WDataSetHierarchicalClustering.h.

Referenced by getClusterMap(), and WDataSetHierarchicalClustering().

◆ m_prototype

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

The prototype as singleton.

Definition at line 124 of file WDataSetHierarchicalClustering.h.

Referenced by getPrototype().

◆ m_rootNode

WTreeNode::SPtr WDataSetHierarchicalClustering::m_rootNode
private

Pointer to the root cluster.

Definition at line 130 of file WDataSetHierarchicalClustering.h.

Referenced by getRootNode(), and WDataSetHierarchicalClustering().


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