Mantid
Loading...
Searching...
No Matches
Cluster.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
10#include "MantidCrystal/DllConfig.h"
12#include "MantidKernel/System.h"
13#include <boost/tuple/tuple.hpp>
14#include <memory>
15#include <vector>
16
17namespace Mantid {
18namespace Crystal {
19
22class MANTID_CRYSTAL_DLL Cluster : public ICluster {
23
24public:
26 Cluster(const size_t &label);
27
29 ClusterIntegratedValues integrate(std::shared_ptr<const Mantid::API::IMDHistoWorkspace> ws) const override;
30
32 void writeTo(std::shared_ptr<Mantid::API::IMDHistoWorkspace> ws) const override;
33
35 size_t getLabel() const override;
36
38 size_t getOriginalLabel() const override;
39
41 size_t size() const override;
42
44 void addIndex(const size_t &index) override;
45
47 void toUniformMinimum(std::vector<DisjointElement> &disjointSet) override;
48
50 bool operator==(const Cluster &other) const;
51
53 void setRootCluster(ICluster const *root) override;
54
56 size_t getRepresentitiveIndex() const override;
57
59 bool containsLabel(const size_t &label) const override;
60
61private:
63 Cluster(const Cluster &);
69 std::vector<size_t> m_indexes;
72};
73
74} // namespace Crystal
75} // namespace Mantid
Cluster : Image cluster used by connected component labeling.
Definition: Cluster.h:22
size_t m_originalLabel
original label on cluster
Definition: Cluster.h:67
std::vector< size_t > m_indexes
indexes belonging to cluster. This is how we track cluster objects.
Definition: Cluster.h:69
Cluster & operator=(const Cluster &)
Disabled assignement.
ICluster const * m_rootCluster
Root cluster.
Definition: Cluster.h:71
Cluster(const Cluster &)
Disabled copy construction.
ICluster : Abstract cluster.
Definition: ICluster.h:25
boost::tuple< double, double > ClusterIntegratedValues
Definition: ICluster.h:27
Helper class which provides the Collimation Length for SANS instruments.
constexpr bool operator==(const wide_integer< Bits, Signed > &lhs, const wide_integer< Bits2, Signed2 > &rhs)
Peak indexing algorithm, which works by assigning multiple possible HKL values to each peak and then ...
Definition: IndexSXPeaks.h:29