Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Mantid::API::CoordTransform Class Referenceabstract

Unique SingleValueParameter Declaration for InputNDimensions. More...

#include <CoordTransform.h>

Inheritance diagram for Mantid::API::CoordTransform:
Mantid::API::NullCoordTransform Mantid::DataObjects::CoordTransformAffine Mantid::DataObjects::CoordTransformAligned Mantid::DataObjects::CoordTransformDistance

Public Member Functions

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 CoordTransformclone () 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_tmakeAffineMatrix () const
 
virtual std::string toXMLString () const =0
 Pure abstract methods to be implemented. More...
 
virtual ~CoordTransform ()=default
 

Protected Attributes

size_t inD
 Input number of dimensions. More...
 
size_t outD
 Output number of dimensions. More...
 

Detailed Description

Unique SingleValueParameter Declaration for InputNDimensions.

Unique SingleValueParaemter Declaration for OutputNDimensions Abstract class for transforming coordinate systems. This will be subclassed by e.g. CoordTransformAffine to perform rotations, etc.

Author
Janik Zikovsky
Date
2011-04-14

Definition at line 32 of file CoordTransform.h.

Constructor & Destructor Documentation

◆ CoordTransform()

Mantid::API::CoordTransform::CoordTransform ( const size_t  inD,
const size_t  outD 
)

Constructor.

Validates the inputs

Parameters
inD:: input number of dimensions, >= 1
outD:: output number of dimensions, <= inD
Exceptions
std::runtime_errorif outD > inD

Definition at line 28 of file CoordTransform.cpp.

References inD, and outD.

◆ ~CoordTransform()

virtual Mantid::API::CoordTransform::~CoordTransform ( )
virtualdefault

Member Function Documentation

◆ apply()

virtual void Mantid::API::CoordTransform::apply ( const coord_t inputVector,
coord_t outVector 
) const
pure virtual

◆ applyVMD()

Mantid::Kernel::VMD Mantid::API::CoordTransform::applyVMD ( const Mantid::Kernel::VMD inputVector) const

Wrapper for VMD.

Apply the transformation to an input vector (as a VMD type).

This wraps the apply(in,out) method (and will be slower!)

Parameters
inputVector:: an inD-length vector
Returns
the output vector as VMD

Definition at line 45 of file CoordTransform.cpp.

References apply(), Mantid::Kernel::VMDBase< TYPE >::getBareArray(), Mantid::Kernel::VMDBase< TYPE >::getNumDims(), inD, and outD.

Referenced by Mantid::MDAlgorithms::SlicingAlgorithm::createGeneralTransform(), Mantid::MDAlgorithms::QueryMDWorkspace::exec(), and Mantid::MDAlgorithms::SlicingAlgorithm::makeBasisVectorFromString().

◆ clone()

virtual CoordTransform * Mantid::API::CoordTransform::clone ( ) const
pure virtual

◆ getInD()

size_t Mantid::API::CoordTransform::getInD ( ) const
inline
Returns
the number of input dimensions

Definition at line 47 of file CoordTransform.h.

Referenced by Mantid::DataObjects::CoordTransformAffine::combineTransformations().

◆ getOutD()

size_t Mantid::API::CoordTransform::getOutD ( ) const
inline
Returns
the number of output dimensions

Definition at line 50 of file CoordTransform.h.

Referenced by Mantid::DataObjects::CoordTransformAffine::combineTransformations().

◆ id()

virtual std::string Mantid::API::CoordTransform::id ( ) const
pure virtual

◆ makeAffineMatrix()

virtual Mantid::Kernel::Matrix< coord_t > Mantid::API::CoordTransform::makeAffineMatrix ( ) const
inlinevirtual
Returns
the affine matrix equivalent to this transformation, if possible
Exceptions
std::runtime_errorif there is no possible affine matrix

Reimplemented in Mantid::DataObjects::CoordTransformAffine, and Mantid::DataObjects::CoordTransformAligned.

Definition at line 54 of file CoordTransform.h.

Referenced by Mantid::MDAlgorithms::SlicingAlgorithm::createTransform(), and Mantid::DataObjects::MDBoxFlatTree::saveAffineTransformMatrix().

◆ toXMLString()

virtual std::string Mantid::API::CoordTransform::toXMLString ( ) const
pure virtual

Member Data Documentation

◆ inD

size_t Mantid::API::CoordTransform::inD
protected

◆ outD

size_t Mantid::API::CoordTransform::outD
protected

The documentation for this class was generated from the following files: