Mantid
Loading...
Searching...
No Matches
Projection.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2015 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 <stdexcept>
14
15#include <memory>
16
17namespace Mantid {
18namespace API {
19
28 RLU, // r.l.u
29 INV_ANG // inverse angstroms
30};
31
32class MANTID_API_DLL Projection {
33public:
35 Projection();
37 Projection(const Kernel::V3D &u, const Kernel::V3D &v);
39 Projection(const Kernel::V3D &u, const Kernel::V3D &v, const Kernel::V3D &w);
41 Projection(const ITableWorkspace &ws);
43 virtual ~Projection() = default;
45 double getOffset(size_t nd);
47 Kernel::V3D getAxis(size_t nd);
49 ProjectionUnit getUnit(size_t nd);
51 void setOffset(size_t nd, double offset);
53 void setAxis(size_t nd, const Kernel::V3D &axis);
55 void setUnit(size_t nd, ProjectionUnit unit);
56
57 Kernel::V3D &U() { return m_dimensions[0]; }
58 Kernel::V3D &V() { return m_dimensions[1]; }
59 Kernel::V3D &W() { return m_dimensions[2]; }
60
61protected:
63 Kernel::V3D m_dimensions[3];
65 double m_offsets[3];
67 ProjectionUnit m_units[3];
68};
69
70using Projection_sptr = std::shared_ptr<Projection>;
71
72} // namespace API
73} // namespace Mantid
ITableWorkspace is an implementation of Workspace in which the data are organised in columns of same ...
virtual ~Projection()=default
Destructor.
Kernel::V3D & W()
Definition: Projection.h:59
Kernel::V3D & U()
Definition: Projection.h:57
Kernel::V3D & V()
Definition: Projection.h:58
Class for 3D vectors.
Definition: V3D.h:34
ProjectionUnit
Represents 3 dimensional projections.
Definition: Projection.h:27
std::shared_ptr< Projection > Projection_sptr
Definition: Projection.h:70
Helper class which provides the Collimation Length for SANS instruments.