|
Mantid
|
Cluster : Image cluster used by connected component labeling. More...
#include <Cluster.h>
Public Member Functions | |
| void | addIndex (const size_t &index) override |
| Track a linear IMDHistoWorkspace index that belongs to the cluster. More... | |
| Cluster (const size_t &label) | |
| Constructor. More... | |
| bool | containsLabel (const size_t &label) const override |
| Does the cluster contain the label. More... | |
| size_t | getLabel () const override |
| Get the cluster label. More... | |
| size_t | getOriginalLabel () const override |
| Get the original label. More... | |
| size_t | getRepresentitiveIndex () const override |
| Get a representative index of the cluster. More... | |
| ClusterIntegratedValues | integrate (std::shared_ptr< const Mantid::API::IMDHistoWorkspace > ws) const override |
| integrate the cluster More... | |
| bool | operator== (const Cluster &other) const |
| Overloaded equals. More... | |
| void | setRootCluster (ICluster const *root) override |
| Set the root cluster. More... | |
| size_t | size () const override |
| Number of indexes tracked. More... | |
| void | toUniformMinimum (std::vector< DisjointElement > &disjointSet) override |
| Resolve the proper label for this cluster. More... | |
| void | writeTo (std::shared_ptr< Mantid::API::IMDHistoWorkspace > ws) const override |
| Apply labels to the workspace. More... | |
Public Member Functions inherited from Mantid::Crystal::ICluster | |
| virtual void | addIndex (const size_t &index)=0 |
| Track a linear IMDHistoWorkspace index that belongs to the cluster. More... | |
| virtual bool | containsLabel (const size_t &label) const =0 |
| Is the label contained in the cluster. More... | |
| virtual size_t | getLabel () const =0 |
| Get the cluster label. More... | |
| virtual size_t | getOriginalLabel () const =0 |
| Get the originally set label. More... | |
| virtual size_t | getRepresentitiveIndex () const =0 |
| Get a represetiative index of the cluster. More... | |
| virtual ClusterIntegratedValues | integrate (std::shared_ptr< const Mantid::API::IMDHistoWorkspace > ws) const =0 |
| integrate the cluster More... | |
| virtual void | setRootCluster (ICluster const *root)=0 |
| Set the root cluster. More... | |
| virtual size_t | size () const =0 |
| Number of indexes tracked. More... | |
| virtual void | toUniformMinimum (std::vector< DisjointElement > &disjointSet)=0 |
| Resolve the proper label for this cluster. More... | |
| virtual void | writeTo (std::shared_ptr< Mantid::API::IMDHistoWorkspace > ws) const =0 |
| Apply labels to the workspace. More... | |
| virtual | ~ICluster ()=default |
| Virtual destructor. More... | |
Private Member Functions | |
| Cluster (const Cluster &) | |
| Disabled copy construction. More... | |
| Cluster & | operator= (const Cluster &) |
| Disabled assignement. More... | |
Private Attributes | |
| std::vector< size_t > | m_indexes |
| indexes belonging to cluster. This is how we track cluster objects. More... | |
| size_t | m_originalLabel |
| original label on cluster More... | |
| ICluster const * | m_rootCluster |
| Root cluster. More... | |
Additional Inherited Members | |
Public Types inherited from Mantid::Crystal::ICluster | |
| using | ClusterIntegratedValues = boost::tuple< double, double > |
Cluster : Image cluster used by connected component labeling.
| Mantid::Crystal::Cluster::Cluster | ( | const size_t & | label | ) |
Constructor.
| label | : Label (taken as original) for Cluster |
Definition at line 20 of file Cluster.cpp.
References m_indexes.
|
private |
Disabled copy construction.
|
overridevirtual |
Track a linear IMDHistoWorkspace index that belongs to the cluster.
Add the index to the cluster.
| index | : index to add |
Implements Mantid::Crystal::ICluster.
Definition at line 51 of file Cluster.cpp.
References m_indexes.
|
overridevirtual |
Does the cluster contain the label.
| label | : Label to find |
Implements Mantid::Crystal::ICluster.
Definition at line 121 of file Cluster.cpp.
References getLabel().
|
overridevirtual |
Get the cluster label.
Get the label.
Implements Mantid::Crystal::ICluster.
Definition at line 26 of file Cluster.cpp.
References Mantid::Crystal::ICluster::getLabel(), m_originalLabel, and m_rootCluster.
Referenced by containsLabel(), operator==(), and writeTo().
|
overridevirtual |
Get the original label.
Implements Mantid::Crystal::ICluster.
Definition at line 38 of file Cluster.cpp.
References m_originalLabel.
|
overridevirtual |
Get a representative index of the cluster.
Get a representative index which is part of this cluster.
Implements Mantid::Crystal::ICluster.
Definition at line 101 of file Cluster.cpp.
References m_indexes.
|
overridevirtual |
integrate the cluster
Integrate the image over cluster region.
| ws | : Image |
Implements Mantid::Crystal::ICluster.
Definition at line 70 of file Cluster.cpp.
References m_indexes.
| bool Mantid::Crystal::Cluster::operator== | ( | const Cluster & | other | ) | const |
Overloaded equals.
Overlaoded equals operator.
| other | : To compare with |
Definition at line 114 of file Cluster.cpp.
References getLabel().
|
overridevirtual |
Set the root cluster.
| root | : Root cluster |
Implements Mantid::Crystal::ICluster.
Definition at line 107 of file Cluster.cpp.
References m_rootCluster.
|
overridevirtual |
Number of indexes tracked.
Get the number of indexes which are part of this cluster.
i.e. the size of the cluster
Implements Mantid::Crystal::ICluster.
Definition at line 45 of file Cluster.cpp.
References m_indexes.
|
overridevirtual |
Resolve the proper label for this cluster.
Allow the cluster to adopt the uniform minimum value.
| disjointSet |
Implements Mantid::Crystal::ICluster.
Definition at line 87 of file Cluster.cpp.
References Mantid::Crystal::ICluster::getRepresentitiveIndex(), m_indexes, and m_rootCluster.
|
overridevirtual |
Apply labels to the workspace.
Apply the cluster to the image.
| ws | : Image to stencil itself onto |
Implements Mantid::Crystal::ICluster.
Definition at line 57 of file Cluster.cpp.
References getLabel(), and m_indexes.
|
private |
indexes belonging to cluster. This is how we track cluster objects.
Definition at line 69 of file Cluster.h.
Referenced by addIndex(), Cluster(), getRepresentitiveIndex(), integrate(), size(), toUniformMinimum(), and writeTo().
|
private |
original label on cluster
Definition at line 67 of file Cluster.h.
Referenced by getLabel(), and getOriginalLabel().
|
private |
Root cluster.
Definition at line 71 of file Cluster.h.
Referenced by getLabel(), setRootCluster(), and toUniformMinimum().