OpenWalnut  1.4.0
Public Types | Public Member Functions | Static Public Member Functions | Static Protected Attributes | Private Attributes
WDataSetFiberClustering Class Reference

This is a dataset which represent a clustering of fibers. More...

#include <WDataSetFiberClustering.h>

+ Inheritance diagram for WDataSetFiberClustering:

List of all members.

Public Types

typedef boost::shared_ptr
< WDataSetFiberClustering
SPtr
 Convenience typedef for a boost::shared_ptr< WDataSetFiberClustering >.
typedef boost::shared_ptr
< const
WDataSetFiberClustering
ConstSPtr
 Convenience typedef for a boost::shared_ptr< const WDataSetFiberClustering >.
typedef std::map< size_t,
WFiberCluster::SPtr
ClusterMap
 The type of the cluster map.

Public Member Functions

 WDataSetFiberClustering ()
 Default constructor.
 WDataSetFiberClustering (const ClusterMap &clustering)
 constructor with cluster list.
virtual ~WDataSetFiberClustering ()
 Destructor.
virtual const std::string getName () const
 The name of this transferable.
virtual const std::string getDescription () const
 The description of this transferable.
virtual void setCluster (size_t id, WFiberCluster::SPtr cluster)
 Sets the cluster at the given ID.
virtual WFiberCluster::SPtr getCluster (size_t id)
 Returns the cluster with the given ID.
virtual WFiberCluster::ConstSPtr getCluster (size_t id) const
 Returns the cluster with the given ID.
virtual WFiberCluster::SPtr getOrCreateCluster (size_t id)
 Returns the cluster with the given ID.
virtual void removeCluster (size_t id)
 Removes the cluster with the specified ID.
ClusterMap::const_iterator begin () const
 The begin iterator of the clustering for const iteration.
ClusterMap::iterator begin ()
 The begin iterator of the clustering for non-const iteration.
ClusterMap::const_iterator end () const
 The end iterator of the clustering for const iteration.
ClusterMap::iterator end ()
 The end iterator of the clustering for non-const iteration.
size_t size () const
 Returns the amount of clusters in the clustering.

Static Public Member Functions

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

Static Protected Attributes

static boost::shared_ptr
< WPrototyped
m_prototype = boost::shared_ptr< WPrototyped >()
 Prototype for this dataset.

Private Attributes

std::map< size_t,
WFiberCluster::SPtr
m_clusters
 The map between ID and cluster.

Detailed Description

This is a dataset which represent a clustering of fibers.

It does not itself contain the fiber-data. This dataset only contains the indices of fibers belonging to the clusters.

Each cluster has its own ID. A mapping between names and IDs is possible.

Definition at line 44 of file WDataSetFiberClustering.h.


Member Typedef Documentation

The type of the cluster map.

Definition at line 60 of file WDataSetFiberClustering.h.

typedef boost::shared_ptr< const WDataSetFiberClustering > WDataSetFiberClustering::ConstSPtr

Convenience typedef for a boost::shared_ptr< const WDataSetFiberClustering >.

Definition at line 55 of file WDataSetFiberClustering.h.

Convenience typedef for a boost::shared_ptr< WDataSetFiberClustering >.

Definition at line 50 of file WDataSetFiberClustering.h.


Constructor & Destructor Documentation

Default constructor.

Definition at line 32 of file WDataSetFiberClustering.cpp.

Referenced by getPrototype().

constructor with cluster list.

Parameters:
clusteringthe cluster map defining the clustering

Definition at line 37 of file WDataSetFiberClustering.cpp.

References m_clusters.

Destructor.

Definition at line 43 of file WDataSetFiberClustering.cpp.


Member Function Documentation

WDataSetFiberClustering::ClusterMap::const_iterator WDataSetFiberClustering::begin ( ) const

The begin iterator of the clustering for const iteration.

Returns:
the begin iterator

Definition at line 114 of file WDataSetFiberClustering.cpp.

References m_clusters.

WDataSetFiberClustering::ClusterMap::iterator WDataSetFiberClustering::begin ( )

The begin iterator of the clustering for non-const iteration.

Returns:
the begin iterator

Definition at line 119 of file WDataSetFiberClustering.cpp.

References m_clusters.

WDataSetFiberClustering::ClusterMap::const_iterator WDataSetFiberClustering::end ( ) const

The end iterator of the clustering for const iteration.

Returns:
the begin iterator

Definition at line 124 of file WDataSetFiberClustering.cpp.

References m_clusters.

WDataSetFiberClustering::ClusterMap::iterator WDataSetFiberClustering::end ( )

The end iterator of the clustering for non-const iteration.

Returns:
the end iterator

Definition at line 129 of file WDataSetFiberClustering.cpp.

References m_clusters.

Returns the cluster with the given ID.

Exceptions:
WInvalidIDif the ID is not known.
Parameters:
idthe ID of the cluster to get
Returns:
the cluster

Definition at line 72 of file WDataSetFiberClustering.cpp.

References m_clusters.

Returns the cluster with the given ID.

Exceptions:
WInvalidIDif the ID is not known.
Parameters:
idthe ID of the cluster to get
Returns:
the cluster

Definition at line 82 of file WDataSetFiberClustering.cpp.

References m_clusters.

const std::string WDataSetFiberClustering::getDescription ( ) const [virtual]

The description of this transferable.

This is useful information for the users.

Returns:
A description

Implements WPrototyped.

Definition at line 62 of file WDataSetFiberClustering.cpp.

const std::string WDataSetFiberClustering::getName ( ) const [virtual]

The name of this transferable.

This is useful information for the users.

Returns:
the name.

Implements WPrototyped.

Definition at line 57 of file WDataSetFiberClustering.cpp.

Returns the cluster with the given ID.

If there is no cluster with this ID, an empty one is returned.

Parameters:
idthe ID of the cluster to get
Returns:
the cluster

Definition at line 92 of file WDataSetFiberClustering.cpp.

References m_clusters.

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

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

Returns:
the prototype.

Definition at line 48 of file WDataSetFiberClustering.cpp.

References m_prototype, and WDataSetFiberClustering().

Removes the cluster with the specified ID.

If it does not exist, nothing happens.

Parameters:
idthe id of the cluster

Definition at line 105 of file WDataSetFiberClustering.cpp.

References m_clusters.

void WDataSetFiberClustering::setCluster ( size_t  id,
WFiberCluster::SPtr  cluster 
) [virtual]

Sets the cluster at the given ID.

If there is a cluster at this ID, it is replaced.

Parameters:
idthe ID of the cluster
clusterthe cluster

Definition at line 67 of file WDataSetFiberClustering.cpp.

References m_clusters.

Returns the amount of clusters in the clustering.

Returns:
the amount of clusters in the clustering

Definition at line 134 of file WDataSetFiberClustering.cpp.

References m_clusters.


Member Data Documentation

The map between ID and cluster.

Definition at line 191 of file WDataSetFiberClustering.h.

Referenced by begin(), end(), getCluster(), getOrCreateCluster(), removeCluster(), setCluster(), size(), and WDataSetFiberClustering().

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

Prototype for this dataset.

Definition at line 186 of file WDataSetFiberClustering.h.

Referenced by getPrototype().


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