Mantid
Loading...
Searching...
No Matches
CoordTransformAligned.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2011 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"
12
13namespace Mantid {
14namespace DataObjects {
15
17DECLARE_VECTOR_PARAMETER(DimensionsToBinFromParam, size_t)
18
19
20DECLARE_VECTOR_PARAMETER(OriginOffsetParam, coord_t)
21
22
24
25
38class MANTID_DATAOBJECTS_DLL CoordTransformAligned : public Mantid::API::CoordTransform {
39public:
40 CoordTransformAligned(const size_t inD, const size_t outD, const size_t *dimensionToBinFrom, const coord_t *origin,
41 const coord_t *scaling);
42 CoordTransformAligned(const size_t inD, const size_t outD, std::vector<size_t> dimensionToBinFrom,
43 std::vector<coord_t> origin, std::vector<coord_t> scaling);
44 CoordTransform *clone() const override;
45
46 std::string toXMLString() const override;
47 std::string id() const override;
48 void apply(const coord_t *inputVector, coord_t *outVector) const override;
49 Mantid::Kernel::Matrix<coord_t> makeAffineMatrix() const override;
50
51protected:
54 std::vector<size_t> m_dimensionToBinFrom;
56 std::vector<coord_t> m_origin;
58 std::vector<coord_t> m_scaling;
59};
60
61} // namespace DataObjects
62} // namespace Mantid
#define DECLARE_VECTOR_PARAMETER(classname, type_)
Unique SingleValueParameter Declaration for InputNDimensions.
Unique type declaration for which dimensions are used in the input workspace.
std::vector< coord_t > m_scaling
Scaling from the input to the output dimension, sized [outD].
std::vector< size_t > m_dimensionToBinFrom
For each dimension in the output, index in the input workspace of which dimension it is.
std::vector< coord_t > m_origin
Offset (minimum) position in each of the output dimensions, sized [outD].
Numerical Matrix class.
Definition: Matrix.h:42
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