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 <boost/tuple/tuple.hpp>
13#include <memory>
14#include <vector>
15
16namespace Mantid {
17namespace Crystal {
18
21class MANTID_CRYSTAL_DLL Cluster : public ICluster {
22
23public:
25 Cluster(const size_t &label);
26
28 ClusterIntegratedValues integrate(std::shared_ptr<const Mantid::API::IMDHistoWorkspace> ws) const override;
29
31 void writeTo(std::shared_ptr<Mantid::API::IMDHistoWorkspace> ws) const override;
32
34 size_t getLabel() const override;
35
37 size_t getOriginalLabel() const override;
38
40 size_t size() const override;
41
43 void addIndex(const size_t &index) override;
44
46 void toUniformMinimum(std::vector<DisjointElement> &disjointSet) override;
47
49 bool operator==(const Cluster &other) const;
50
52 void setRootCluster(ICluster const *root) override;
53
55 size_t getRepresentitiveIndex() const override;
56
58 bool containsLabel(const size_t &label) const override;
59
60private:
62 Cluster(const Cluster &);
68 std::vector<size_t> m_indexes;
71};
72
73} // namespace Crystal
74} // namespace Mantid
Cluster : Image cluster used by connected component labeling.
Definition Cluster.h:21
size_t m_originalLabel
original label on cluster
Definition Cluster.h:66
std::vector< size_t > m_indexes
indexes belonging to cluster. This is how we track cluster objects.
Definition Cluster.h:68
Cluster & operator=(const Cluster &)
Disabled assignement.
ICluster const * m_rootCluster
Root cluster.
Definition Cluster.h:70
Cluster(const Cluster &)
Disabled copy construction.
ICluster : Abstract cluster.
Definition ICluster.h:24
boost::tuple< double, double > ClusterIntegratedValues
Definition ICluster.h:26
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 ...