Mantid
Loading...
Searching...
No Matches
CoordTransformDistance.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2018 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
11#include "MantidDataObjects/DllConfig.h"
13#include "MantidKernel/Matrix.h"
14
15namespace Mantid {
16namespace DataObjects {
19DECLARE_VECTOR_PARAMETER(CoordCenterVectorParam, coord_t)
20
21
23DECLARE_VECTOR_PARAMETER(DimensionsUsedVectorParam, bool)
24
25
39class MANTID_DATAOBJECTS_DLL CoordTransformDistance : public Mantid::API::CoordTransform {
40public:
41 CoordTransformDistance(const size_t inD, const coord_t *center, const bool *dimensionsUsed, const size_t outD = 1,
42 const std::vector<Kernel::V3D> &eigenvects = std::vector<Kernel::V3D>(0),
43 const std::vector<double> &eigenvals = std::vector<double>(0, 0.0));
44
45 CoordTransform *clone() const override;
46 std::string toXMLString() const override;
47 std::string id() const override;
48
49 void apply(const coord_t *inputVector, coord_t *outVector) const override;
50
52 const std::vector<coord_t> &getCenter() { return m_center; }
53
55 const std::vector<bool> &getDimensionsUsed() { return m_dimensionsUsed; }
56
57protected:
59 std::vector<coord_t> m_center;
60
63 std::vector<bool> m_dimensionsUsed;
64
65 // Eigenvectors and radii for nd ellipsoid
66 std::vector<Kernel::V3D> m_eigenvects;
67 std::vector<double> m_eigenvals;
69};
70} // namespace DataObjects
71} // namespace Mantid
#define DECLARE_VECTOR_PARAMETER(classname, type_)
Unique SingleValueParameter Declaration for InputNDimensions.
Unique CoordCenterVectorParam type declaration for ndimensional coordinate centers.
std::vector< coord_t > m_center
Coordinates at the center.
std::vector< bool > m_dimensionsUsed
Parmeter where True is set for those dimensions that are considered when calculating distance.
const std::vector< bool > & getDimensionsUsed()
Return the dimensions used bool array.
const std::vector< coord_t > & getCenter()
Return the center coordinate array.
Helper class which provides the Collimation Length for SANS instruments.
float coord_t
Typedef for the data type to use for coordinate axes in MD objects such as MDBox, MDEventWorkspace,...
Definition: MDTypes.h:27