27 #include "WDataSetFiberClustering.h"
59 return "DataSetFiberClustering";
64 return "A collection of fiber clusters.";
77 throw WInvalidID(
"The cluster with the specified ID does not exist." );
84 ClusterMap::const_iterator it =
m_clusters.find(
id );
87 throw WInvalidID(
"The cluster with the specified ID does not exist." );
size_t size() const
Returns the amount of clusters in the clustering.
std::map< size_t, WFiberCluster::SPtr > m_clusters
The map between ID and cluster.
static boost::shared_ptr< WPrototyped > m_prototype
Prototype for this dataset.
virtual void removeCluster(size_t id)
Removes the cluster with the specified ID.
Represents a cluster of indices of a WDataSetFiberVector.
virtual ~WDataSetFiberClustering()
Destructor.
virtual WFiberCluster::SPtr getOrCreateCluster(size_t id)
Returns the cluster with the given ID.
ClusterMap::const_iterator begin() const
The begin iterator of the clustering for const iteration.
virtual void setCluster(size_t id, WFiberCluster::SPtr cluster)
Sets the cluster at the given ID.
virtual const std::string getDescription() const
The description of this transferable.
ClusterMap::const_iterator end() const
The end iterator of the clustering for const iteration.
WDataSetFiberClustering()
Default constructor.
std::map< size_t, WFiberCluster::SPtr > ClusterMap
The type of the cluster map.
boost::shared_ptr< WFiberCluster > SPtr
Shared pointer abbreviation.
Indicates invalid element access of a container.
boost::shared_ptr< const WFiberCluster > ConstSPtr
Const shared pointer abbreviation.
virtual WFiberCluster::SPtr getCluster(size_t id)
Returns the cluster with the given ID.
static boost::shared_ptr< WPrototyped > getPrototype()
Returns a prototype instantiated with the true type of the deriving class.
virtual const std::string getName() const
The name of this transferable.