ANIMA  4.0
animaSplitAffine3DTransform.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, 3 >
12 {
13 public:
16  typedef itk::MatrixOffsetTransformBase <TScalarType, 3, 3> Superclass;
17  typedef itk::SmartPointer <Self> Pointer;
18  typedef itk::SmartPointer <const Self> ConstPointer;
19 
21  itkNewMacro(Self)
22 
23 
24  itkTypeMacro(SplitAffine3DTransform, MatrixOffsetTransformBase)
25 
26 
27  itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
28  itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
29  itkStaticConstMacro(ParametersDimension, unsigned int, 12);
30 
32  typedef typename Superclass::ParametersType ParametersType;
33  typedef typename Superclass::ScalarType ScalarType;
34  typedef typename Superclass::MatrixType MatrixType;
35  typedef typename Superclass::OffsetType OffsetType;
36  typedef typename Superclass::TranslationType TranslationType;
37 
39  typedef itk::Vector<TScalarType, 3> VectorType;
40 
49  virtual void SetParameters(const ParametersType & parameters) ITK_OVERRIDE;
50  virtual const ParametersType& GetParameters() const ITK_OVERRIDE;
51 
52  void SetFirstAngle(const VectorType &angle);
53  itkGetConstReferenceMacro(FirstAngle, VectorType)
54 
55  void SetLogScale(const VectorType &scale);
56  itkGetConstReferenceMacro(LogScale, VectorType)
57 
58  void SetSecondAngle(const VectorType &angle);
59  itkGetConstReferenceMacro(SecondAngle, VectorType)
60 
61  void SetIdentity() ITK_OVERRIDE;
62 
63 protected:
65  virtual ~SplitAffine3DTransform() {}
66 
67  void PrintSelf(std::ostream &os, itk::Indent indent) const ITK_OVERRIDE;
68 
71 
73  void ComputeMatrix() ITK_OVERRIDE;
74  void ComputeMatrixParameters() ITK_OVERRIDE;
75 
76 private:
77  SplitAffine3DTransform(const Self&); //purposely not implemented
78  void operator=(const Self&); //purposely not implemented
79 
81  VectorType m_FirstAngle, m_SecondAngle;
82 
84  VectorType m_LogScale;
85 };
86 
87 } // end of namespace anima
88 
Superclass::ParametersType ParametersType
itk::SmartPointer< const Self > ConstPointer
itk::MatrixOffsetTransformBase< TScalarType, 3, 3 > Superclass
static const unsigned int ParametersDimension
Superclass::TranslationType TranslationType
void PrintSelf(std::ostream &os, itk::Indent indent) const ITK_OVERRIDE
static const unsigned int InputSpaceDimension
void SetSecondAngle(const VectorType &angle)
static const unsigned int OutputSpaceDimension
void SetFirstAngle(const VectorType &angle)
virtual void SetParameters(const ParametersType &parameters) ITK_OVERRIDE
void SetLogScale(const VectorType &scale)
virtual const ParametersType & GetParameters() const ITK_OVERRIDE
itk::Vector< TScalarType, 3 > VectorType