ANIMA  4.0
animaAxisRotationTransform.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <iostream>
4 #include <itkMatrixOffsetTransformBase.h>
5 
6 namespace anima
7 {
8 
9 template < class TScalarType=double > // Data type for scalars (double or double)
11 public itk::MatrixOffsetTransformBase <TScalarType, 3>
12 {
13 public:
16  typedef itk::MatrixOffsetTransformBase <TScalarType, 3> Superclass;
17  typedef itk::SmartPointer <Self> Pointer;
18  typedef itk::SmartPointer <const Self> ConstPointer;
19 
21  itkNewMacro(Self)
22 
23 
24  itkTypeMacro(AxisRotationTransform, MatrixOffsetTransformBase)
25 
26 
27  itkStaticConstMacro(SpaceDimension, unsigned int, 3);
28  itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
29  itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
30  itkStaticConstMacro(ParametersDimension, unsigned int, 3);
31 
32  //Check which typedefs are useful
33  typedef typename Superclass::ParametersType ParametersType;
34  typedef typename Superclass::ParametersValueType ParametersValueType;
35  typedef typename Superclass::JacobianType JacobianType;
36  typedef typename Superclass::ScalarType ScalarType;
37  typedef typename Superclass::InputVectorType InputVectorType;
38  typedef typename Superclass::OutputVectorType OutputVectorType;
39  typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
41  typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
42  typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
43  typedef typename Superclass::InputPointType InputPointType;
44  typedef typename Superclass::OutputPointType OutputPointType;
45  typedef typename Superclass::MatrixType MatrixType;
46  typedef itk::Matrix <ScalarType,4,4> HomogeneousMatrixType;
47  typedef typename Superclass::InverseMatrixType InverseMatrixType;
48  typedef typename Superclass::CenterType CenterType;
49  typedef typename Superclass::TranslationType TranslationType;
50  typedef typename Superclass::OffsetType OffsetType;
51  typedef typename Superclass::ScalarType AngleType;
52 
53  void SetParameters(const ParametersType & parameters) ITK_OVERRIDE;
54  const ParametersType& GetParameters() const ITK_OVERRIDE;
55 
56  virtual void SetIdentity() ITK_OVERRIDE;
57 
58  void SetReferencePlaneNormal(InputVectorType &refPlaneNormal);
59 
60 protected:
62  AxisRotationTransform(unsigned int outputSpaceDims,
63  unsigned int paramsSpaceDims);
64 
65  virtual ~AxisRotationTransform(){}
66 
67  void PrintSelf(std::ostream &os, itk::Indent indent) const ITK_OVERRIDE;
68 
69  void ComputeMatrix() ITK_OVERRIDE;
70 
71 private:
72  AxisRotationTransform(const Self&); //purposely not implemented
73  void operator=(const Self&); //purposely not implemented
74 
75  HomogeneousMatrixType m_ReferencePlane, m_InverseReferencePlane;
76 
77  ScalarType m_Angle;
78  ScalarType m_TranslationY;
79  ScalarType m_TranslationZ;
80 }; //class AxisRotationTransform
81 
82 } // end of namespace anima
83 
Superclass::InverseMatrixType InverseMatrixType
const ParametersType & GetParameters() const ITK_OVERRIDE
static const unsigned int InputSpaceDimension
static const unsigned int OutputSpaceDimension
Superclass::InputVectorType InputVectorType
itk::MatrixOffsetTransformBase< TScalarType, 3 > Superclass
void PrintSelf(std::ostream &os, itk::Indent indent) const ITK_OVERRIDE
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Superclass::ParametersType ParametersType
void SetParameters(const ParametersType &parameters) ITK_OVERRIDE
Superclass::JacobianType JacobianType
Superclass::InputPointType InputPointType
static const unsigned int SpaceDimension
Superclass::TranslationType TranslationType
virtual void SetIdentity() ITK_OVERRIDE
Superclass::ParametersValueType ParametersValueType
void SetReferencePlaneNormal(InputVectorType &refPlaneNormal)
Superclass::OutputPointType OutputPointType
Superclass::OutputVectorType OutputVectorType
Superclass::OutputVnlVectorType OutputVnlVectorType
Superclass::InputVnlVectorType InputVnlVectorType
Superclass::InputCovariantVectorType InputCovariantVectorType
static const unsigned int ParametersDimension
itk::Matrix< ScalarType, 4, 4 > HomogeneousMatrixType
itk::SmartPointer< const Self > ConstPointer