Mantid
Loading...
Searching...
No Matches
CoordTransformAffine.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
14#include "MantidKernel/Matrix.h"
15#include "MantidKernel/VMD.h"
16
17namespace Mantid {
18namespace DataObjects {
19
35class MANTID_DATAOBJECTS_DLL CoordTransformAffine : public Mantid::API::CoordTransform {
36public:
37 CoordTransformAffine(const size_t inD, const size_t outD);
38
42
43 CoordTransform *clone() const override;
44 ~CoordTransformAffine() override;
45 std::string toXMLString() const override;
46 std::string id() const override;
47 void addTranslation(const coord_t *translationVector);
48 const Mantid::Kernel::Matrix<coord_t> &getMatrix() const;
49 Mantid::Kernel::Matrix<coord_t> makeAffineMatrix() const override;
50 void setMatrix(const Mantid::Kernel::Matrix<coord_t> &newMatrix);
51 void buildOrthogonal(const Mantid::Kernel::VMD &origin, const std::vector<Mantid::Kernel::VMD> &axes,
52 const Mantid::Kernel::VMD &scaling);
53
54 void buildNonOrthogonal(const Mantid::Kernel::VMD &origin, const std::vector<Mantid::Kernel::VMD> &axes,
55 const Mantid::Kernel::VMD &scaling);
56
57 void apply(const coord_t *inputVector, coord_t *outVector) const override;
58
59 static CoordTransformAffine *combineTransformations(CoordTransform *first, CoordTransform *second);
60
61protected:
69
74
75 void copyRawMatrix();
76};
77
78} // namespace DataObjects
79} // namespace Mantid
Unique SingleValueParameter Declaration for InputNDimensions.
Generic class to transform from M input dimensions to N output dimensions.
coord_t ** m_rawMatrix
Raw pointer to the same underlying matrix as affineMatrix.
coord_t * m_rawMemory
raw pointer to the memory block, referred by the raw Matrix;
Mantid::Kernel::Matrix< coord_t > m_affineMatrix
Affine Matrix to perform the transformation.
Numerical Matrix class.
Definition: Matrix.h:42
void swap(MDLeanEvent< nd > &first, MDLeanEvent< nd > &second)
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