SimpleITK  2.0.0
sitkScaleVersor3DTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18 #ifndef sitkScaleVersor3DTransform_h
19 #define sitkScaleVersor3DTransform_h
20 
21 #include "sitkCommon.h"
22 #include "sitkTransform.h"
23 
24 namespace itk
25 {
26 namespace simple
27 {
28 
29 
38  : public Transform
39 {
40 public:
43 
44  ~ScaleVersor3DTransform() override;
45 
46 // construct identity
48 
50 
51  explicit ScaleVersor3DTransform( const Transform & );
52 
53  ScaleVersor3DTransform( const std::vector< double > &scale,
54  const std::vector< double > &versor,
55  const std::vector< double > &translation=std::vector< double >(3, 0.0),
56  const std::vector< double> &fixedCenter=std::vector< double >(3, 0.0) );
57 
58  ScaleVersor3DTransform( const std::vector< double > &scale,
59  const std::vector< double > &axis, double angle,
60  const std::vector< double > &translation=std::vector< double >(3, 0.0),
61  const std::vector< double> &fixedCenter=std::vector< double >(3, 0.0) );
62 
63  ScaleVersor3DTransform &operator=( const ScaleVersor3DTransform & );
64 
66  std::string GetName() const override { return std::string ("ScaleVersor3DTransform"); }
67 
69  SITK_RETURN_SELF_TYPE_HEADER SetCenter(const std::vector<double> &params);
70  std::vector<double> GetCenter( ) const;
71 
72 
74  SITK_RETURN_SELF_TYPE_HEADER SetRotation(const std::vector<double> &versor);
75  SITK_RETURN_SELF_TYPE_HEADER SetRotation(const std::vector<double> &axis, double angle);
76  std::vector<double> GetVersor() const;
77 
78  std::vector<double> GetTranslation( ) const;
79  SITK_RETURN_SELF_TYPE_HEADER SetTranslation(const std::vector<double>& translation);
80 
81  std::vector<double> GetScale( ) const;
82  SITK_RETURN_SELF_TYPE_HEADER SetScale( const std::vector<double> & scale );
83 
85  SITK_RETURN_SELF_TYPE_HEADER Translate(const std::vector<double> &offset);
86  std::vector<double> GetMatrix() const;
87 
88 protected:
89 
90  void SetPimpleTransform( PimpleTransformBase *pimpleTransform ) override;
91 
92 private:
93 
94  void InternalInitialization(itk::TransformBase *transform);
95 
96  template <typename TransformType>
97  void InternalInitialization(TransformType *transform);
98 
99 
100  std::function<void(const std::vector<double>&)> m_pfSetCenter;
101  std::function<std::vector<double>()> m_pfGetCenter;
102  std::function<void(const std::vector<double>&)> m_pfSetRotation1;
103  std::function<void(const std::vector<double>&,double)> m_pfSetRotation2;
104  std::function<std::vector<double>()> m_pfGetVersor;
105  std::function<void(const std::vector<double>&)> m_pfSetTranslation;
106  std::function<std::vector<double>()> m_pfGetTranslation;
107  std::function<void(const std::vector<double>&)> m_pfSetScale;
108  std::function<std::vector<double>()> m_pfGetScale;
109  std::function<void(const std::vector<double> &)> m_pfTranslate;
110  std::function<std::vector<double>()> m_pfGetMatrix;
111 };
112 
113 }
114 }
115 
116 #endif // sitkVersorTransform_h
itk::simple::ScaleVersor3DTransform::m_pfGetCenter
std::function< std::vector< double >)> m_pfGetCenter
Definition: sitkScaleVersor3DTransform.h:101
itk::simple::Transform
A simplified wrapper around a variety of ITK transforms.
Definition: sitkTransform.h:80
itk::simple::ScaleVersor3DTransform::m_pfTranslate
std::function< void(const std::vector< double > &)> m_pfTranslate
Definition: sitkScaleVersor3DTransform.h:109
sitkCommon.h
itk::simple::ScaleVersor3DTransform::m_pfGetMatrix
std::function< std::vector< double >)> m_pfGetMatrix
Definition: sitkScaleVersor3DTransform.h:110
itk::simple::ScaleVersor3DTransform::m_pfSetTranslation
std::function< void(const std::vector< double > &)> m_pfSetTranslation
Definition: sitkScaleVersor3DTransform.h:105
itk::simple::ScaleVersor3DTransform::m_pfGetScale
std::function< std::vector< double >)> m_pfGetScale
Definition: sitkScaleVersor3DTransform.h:108
SITKCommon_EXPORT
#define SITKCommon_EXPORT
Definition: sitkCommon.h:41
itk::simple::ScaleVersor3DTransform::m_pfSetScale
std::function< void(const std::vector< double > &)> m_pfSetScale
Definition: sitkScaleVersor3DTransform.h:107
itk::simple::ScaleVersor3DTransform
A parameterized 3D transform composed of the addition of a versor rotation matrix and a scale matrix ...
Definition: sitkScaleVersor3DTransform.h:37
itk::simple::ScaleVersor3DTransform::GetName
std::string GetName() const override
Definition: sitkScaleVersor3DTransform.h:66
sitkTransform.h
itk::simple::ScaleVersor3DTransform::m_pfGetVersor
std::function< std::vector< double >)> m_pfGetVersor
Definition: sitkScaleVersor3DTransform.h:104
itk
itk::simple::ScaleVersor3DTransform::m_pfSetRotation1
std::function< void(const std::vector< double > &)> m_pfSetRotation1
Definition: sitkScaleVersor3DTransform.h:102
itk::simple::ScaleVersor3DTransform::m_pfSetRotation2
std::function< void(const std::vector< double > &, double)> m_pfSetRotation2
Definition: sitkScaleVersor3DTransform.h:103
itk::simple::ScaleVersor3DTransform::m_pfSetCenter
std::function< void(const std::vector< double > &)> m_pfSetCenter
Definition: sitkScaleVersor3DTransform.h:100
itk::TransformBaseTemplate
Definition: sitkTransform.h:30
itk::simple::ScaleVersor3DTransform::m_pfGetTranslation
std::function< std::vector< double >)> m_pfGetTranslation
Definition: sitkScaleVersor3DTransform.h:106