ANIMA  4.0
animaLogRigid3DTransform.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 >
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 
24  itkTypeMacro( LogRigid3DTransform, MatrixOffsetTransformBase );
25 
27  itkStaticConstMacro(SpaceDimension, unsigned int, 3);
28  itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
29  itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
30  itkStaticConstMacro(ParametersDimension, unsigned int, 6);
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;
40  typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
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 
58  virtual void SetParameters(const ParametersType & parameters) ITK_OVERRIDE;
59  virtual const ParametersType& GetParameters() const ITK_OVERRIDE;
60 
61  virtual const itk::Vector <TScalarType,6>& GetLogVector() const {return m_LogVector;}
62  virtual const vnl_matrix <TScalarType>& GetLogTransform() const {return m_LogTransform;}
63 
64  typedef itk::Vector<TScalarType, 3> AngleVectorType;
65 
66  void SetAngles (const AngleVectorType & logAngle);
67  itkGetConstReferenceMacro (Angles, AngleVectorType)
68 
69  virtual void SetIdentity() ITK_OVERRIDE;
70 
71 protected:
73  virtual ~LogRigid3DTransform(){}
74 
75  void PrintSelf(std::ostream &os, itk::Indent indent) const ITK_OVERRIDE;
76 
77  void ComputeMatrix() ITK_OVERRIDE;
79 
80 private:
81  LogRigid3DTransform(const Self&); //purposely not implemented
82  void operator=(const Self&); //purposely not implemented
83 
85  AngleVectorType m_Angles;
86 
87  itk::Vector <TScalarType,6> m_LogVector;
88  vnl_matrix <TScalarType> m_LogTransform;
89 
90 }; //class LogRigid3DTransform
91 
92 
93 } // end of namespace anima
94 
itk::SmartPointer< const Self > ConstPointer
Superclass::OutputCovariantVectorType OutputCovariantVectorType
itk::MatrixOffsetTransformBase< TScalarType, 3 > Superclass
Superclass::ParametersValueType ParametersValueType
static const unsigned int InputSpaceDimension
Superclass::MatrixType MatrixType
static const unsigned int SpaceDimension
Superclass::InputVnlVectorType InputVnlVectorType
itk::Matrix< ScalarType, 4, 4 > HomogeneousMatrixType
virtual const vnl_matrix< TScalarType > & GetLogTransform() const
virtual void SetIdentity() ITK_OVERRIDE
Superclass::OffsetType OffsetType
Superclass::InverseMatrixType InverseMatrixType
Superclass::OutputPointType OutputPointType
Superclass::ScalarType ScalarType
Superclass::InputCovariantVectorType InputCovariantVectorType
itk::Vector< TScalarType, 3 > AngleVectorType
Superclass::CenterType CenterType
static const unsigned int ParametersDimension
virtual void SetParameters(const ParametersType &parameters) ITK_OVERRIDE
Superclass::ParametersType ParametersType
Superclass::TranslationType TranslationType
virtual const itk::Vector< TScalarType, 6 > & GetLogVector() const
Superclass::OutputVectorType OutputVectorType
static const unsigned int OutputSpaceDimension
Superclass::InputVectorType InputVectorType
Superclass::JacobianType JacobianType
itk::SmartPointer< Self > Pointer
Superclass::OutputVnlVectorType OutputVnlVectorType
void PrintSelf(std::ostream &os, itk::Indent indent) const ITK_OVERRIDE
virtual const ParametersType & GetParameters() const ITK_OVERRIDE
Superclass::InputPointType InputPointType
void SetAngles(const AngleVectorType &logAngle)