|
Mantid
|
Unique type declaration for which dimensions are used in the input workspace. More...
#include <CoordTransformAligned.h>
Public Member Functions | |
| void | apply (const coord_t *inputVector, coord_t *outVector) const override |
| Apply the coordinate transformation. More... | |
| CoordTransform * | clone () const override |
| Virtual cloner. More... | |
| CoordTransformAligned (const size_t inD, const size_t outD, const size_t *dimensionToBinFrom, const coord_t *origin, const coord_t *scaling) | |
| Constructor. More... | |
| CoordTransformAligned (const size_t inD, const size_t outD, std::vector< size_t > dimensionToBinFrom, std::vector< coord_t > origin, std::vector< coord_t > scaling) | |
| Constructor. More... | |
| std::string | id () const override |
| Coordinate transform id. More... | |
| Mantid::Kernel::Matrix< coord_t > | makeAffineMatrix () const override |
| Create an equivalent affine transformation matrix out of the parameters of this axis-aligned transformation. More... | |
| std::string | toXMLString () const override |
| Serialize the coordinate transform. More... | |
Public Member Functions inherited from Mantid::API::CoordTransform | |
| virtual void | apply (const coord_t *inputVector, coord_t *outVector) const =0 |
| Mantid::Kernel::VMD | applyVMD (const Mantid::Kernel::VMD &inputVector) const |
| Wrapper for VMD. More... | |
| virtual CoordTransform * | clone () const =0 |
| CoordTransform (const size_t inD, const size_t outD) | |
| Constructor. More... | |
| size_t | getInD () const |
| size_t | getOutD () const |
| virtual std::string | id () const =0 |
| virtual Mantid::Kernel::Matrix< coord_t > | makeAffineMatrix () const |
| virtual std::string | toXMLString () const =0 |
| Pure abstract methods to be implemented. More... | |
| virtual | ~CoordTransform ()=default |
Protected Attributes | |
| std::vector< size_t > | m_dimensionToBinFrom |
| For each dimension in the output, index in the input workspace of which dimension it is. More... | |
| std::vector< coord_t > | m_origin |
| Offset (minimum) position in each of the output dimensions, sized [outD]. More... | |
| std::vector< coord_t > | m_scaling |
| Scaling from the input to the output dimension, sized [outD]. More... | |
Protected Attributes inherited from Mantid::API::CoordTransform | |
| size_t | inD |
| Input number of dimensions. More... | |
| size_t | outD |
| Output number of dimensions. More... | |
Unique type declaration for which dimensions are used in the input workspace.
Unique type declaration for the offset of coordinates Unique type declaration for the step size in transformation A restricted version of CoordTransform which transforms from one set of dimensions to another, allowing:
While a normal Affine matrix would handle this case, this special case is used in order to reduce the number of calculation.
Definition at line 38 of file CoordTransformAligned.h.
| Mantid::DataObjects::CoordTransformAligned::CoordTransformAligned | ( | const size_t | inD, |
| const size_t | outD, | ||
| const size_t * | dimensionToBinFrom, | ||
| const coord_t * | origin, | ||
| const coord_t * | scaling | ||
| ) |
Constructor.
| inD | :: input number of dimensions, >= 1 |
| outD | :: output number of dimensions, <= inD |
| dimensionToBinFrom | :: For each dimension in the output, index in the input workspace of which dimension it is |
| origin | :: Offset (minimum) position in each of the output dimensions, sized [outD] |
| scaling | :: Scaling from the input to the output dimension, sized [outD] |
| std::runtime_error | if outD > inD or if an invalid index is in dimensionToBinFrom |
Definition at line 30 of file CoordTransformAligned.cpp.
References Mantid::Geometry::d, Mantid::API::CoordTransform::inD, m_dimensionToBinFrom, m_origin, m_scaling, Mantid::API::CoordTransform::outD, and std::to_string().
| Mantid::DataObjects::CoordTransformAligned::CoordTransformAligned | ( | const size_t | inD, |
| const size_t | outD, | ||
| std::vector< size_t > | dimensionToBinFrom, | ||
| std::vector< coord_t > | origin, | ||
| std::vector< coord_t > | scaling | ||
| ) |
Constructor.
| inD | :: input number of dimensions, >= 1 |
| outD | :: output number of dimensions, <= inD |
| dimensionToBinFrom | :: For each dimension in the output, index in the input workspace of which dimension it is |
| origin | :: Offset (minimum) position in each of the output dimensions, sized [outD] |
| scaling | :: Scaling from the input to the output dimension, sized [outD] |
| std::runtime_error | if outD > inD or if an invalid index is in dimensionToBinFrom |
Definition at line 63 of file CoordTransformAligned.cpp.
References Mantid::Geometry::d, Mantid::API::CoordTransform::inD, m_dimensionToBinFrom, m_origin, m_scaling, Mantid::API::CoordTransform::outD, and std::to_string().
|
overridevirtual |
Apply the coordinate transformation.
| inputVector | :: fixed-size array of input coordinates, of size inD |
| outVector | :: fixed-size array of output coordinates, of size outD |
Implements Mantid::API::CoordTransform.
Definition at line 93 of file CoordTransformAligned.cpp.
References m_dimensionToBinFrom, m_origin, m_scaling, Mantid::API::CoordTransform::outD, and Mantid::Geometry::x.
Referenced by Mantid::MDAlgorithms::TransposeMD::exec().
|
overridevirtual |
Virtual cloner.
Implements Mantid::API::CoordTransform.
Definition at line 83 of file CoordTransformAligned.cpp.
References Mantid::API::CoordTransform::inD, m_dimensionToBinFrom, m_origin, m_scaling, and Mantid::API::CoordTransform::outD.
|
overridevirtual |
Coordinate transform id.
Implements Mantid::API::CoordTransform.
Definition at line 172 of file CoordTransformAligned.cpp.
|
overridevirtual |
Create an equivalent affine transformation matrix out of the parameters of this axis-aligned transformation.
The output can be used to merge CoordTransforms together.
Reimplemented from Mantid::API::CoordTransform.
Definition at line 112 of file CoordTransformAligned.cpp.
References Mantid::API::CoordTransform::inD, m_dimensionToBinFrom, m_origin, m_scaling, and Mantid::API::CoordTransform::outD.
|
overridevirtual |
Serialize the coordinate transform.
Implements Mantid::API::CoordTransform.
Definition at line 136 of file CoordTransformAligned.cpp.
References Mantid::API::CoordTransform::inD, and Mantid::API::CoordTransform::outD.
|
protected |
For each dimension in the output, index in the input workspace of which dimension it is.
Definition at line 54 of file CoordTransformAligned.h.
Referenced by apply(), clone(), CoordTransformAligned(), and makeAffineMatrix().
|
protected |
Offset (minimum) position in each of the output dimensions, sized [outD].
Definition at line 56 of file CoordTransformAligned.h.
Referenced by apply(), clone(), CoordTransformAligned(), and makeAffineMatrix().
|
protected |
Scaling from the input to the output dimension, sized [outD].
Definition at line 58 of file CoordTransformAligned.h.
Referenced by apply(), clone(), CoordTransformAligned(), and makeAffineMatrix().