Mantid
Loading...
Searching...
No Matches
WorkspaceNearestNeighbourInfo.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2016 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
9#include "MantidAPI/DllConfig.h"
11#include "MantidKernel/V3D.h"
12
13#include <map>
14#include <memory>
15
16namespace Mantid {
17namespace Geometry {
18class IDetector;
19}
20namespace API {
21
22class MatrixWorkspace;
23class WorkspaceNearestNeighbours;
24
28class MANTID_API_DLL WorkspaceNearestNeighbourInfo {
29public:
30 WorkspaceNearestNeighbourInfo(const MatrixWorkspace &workspace, const bool ignoreMaskedDetectors,
31 const int nNeighbours = 8);
33
34 std::map<specnum_t, Kernel::V3D> getNeighbours(const Geometry::IDetector *comp, const double radius = 0.0) const;
35 std::map<specnum_t, Kernel::V3D> getNeighbours(specnum_t spec, const double radius) const;
36 std::map<specnum_t, Kernel::V3D> getNeighboursExact(specnum_t spec) const;
37
38private:
40 std::unique_ptr<WorkspaceNearestNeighbours> m_nearestNeighbours;
41};
42
43} // namespace API
44} // namespace Mantid
IPeaksWorkspace_sptr workspace
Definition: IndexPeaks.cpp:114
double radius
Definition: Rasterize.cpp:31
Base MatrixWorkspace Abstract Class.
WorkspaceNearestNeighbourInfo provides easy access to nearest-neighbour information for a workspace.
std::unique_ptr< WorkspaceNearestNeighbours > m_nearestNeighbours
Interface class for detector objects.
Definition: IDetector.h:43
Helper class which provides the Collimation Length for SANS instruments.
int32_t specnum_t
Typedef for a spectrum Number.
Definition: IDTypes.h:16