SimpleITK  
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::simple
25 {
26 
27 
36  : public Transform
37 {
38 public:
41 
42  ~ScaleVersor3DTransform() override;
43 
44 // construct identity
46 
48 
49  explicit ScaleVersor3DTransform( const Transform & );
50 
51  ScaleVersor3DTransform( const std::vector< double > &scale,
52  const std::vector< double > &versor,
53  const std::vector< double > &translation=std::vector< double >(3, 0.0),
54  const std::vector< double> &fixedCenter=std::vector< double >(3, 0.0) );
55 
56  ScaleVersor3DTransform( const std::vector< double > &scale,
57  const std::vector< double > &axis, double angle,
58  const std::vector< double > &translation=std::vector< double >(3, 0.0),
59  const std::vector< double> &fixedCenter=std::vector< double >(3, 0.0) );
60 
61  ScaleVersor3DTransform &operator=( const ScaleVersor3DTransform & );
62 
64  std::string GetName() const override { return std::string ("ScaleVersor3DTransform"); }
65 
67  SITK_RETURN_SELF_TYPE_HEADER SetCenter(const std::vector<double> &params);
68  std::vector<double> GetCenter( ) const;
69 
70 
72  SITK_RETURN_SELF_TYPE_HEADER SetRotation(const std::vector<double> &versor);
73  SITK_RETURN_SELF_TYPE_HEADER SetRotation(const std::vector<double> &axis, double angle);
74  std::vector<double> GetVersor() const;
75 
76  std::vector<double> GetTranslation( ) const;
77  SITK_RETURN_SELF_TYPE_HEADER SetTranslation(const std::vector<double>& translation);
78 
79  std::vector<double> GetScale( ) const;
80  SITK_RETURN_SELF_TYPE_HEADER SetScale( const std::vector<double> & scale );
81 
83  SITK_RETURN_SELF_TYPE_HEADER Translate(const std::vector<double> &offset);
84  std::vector<double> GetMatrix() const;
85 
86 protected:
87 
88  void SetPimpleTransform(std::unique_ptr<PimpleTransformBase> && pimpleTransform ) override;
89 
90 private:
91 
92  void InternalInitialization(itk::TransformBase *transform);
93 
94  template <typename TransformType>
95  void InternalInitialization(TransformType *transform);
96 
97 
98  std::function<void(const std::vector<double>&)> m_pfSetCenter;
99  std::function<std::vector<double>()> m_pfGetCenter;
100  std::function<void(const std::vector<double>&)> m_pfSetRotation1;
101  std::function<void(const std::vector<double>&,double)> m_pfSetRotation2;
102  std::function<std::vector<double>()> m_pfGetVersor;
103  std::function<void(const std::vector<double>&)> m_pfSetTranslation;
104  std::function<std::vector<double>()> m_pfGetTranslation;
105  std::function<void(const std::vector<double>&)> m_pfSetScale;
106  std::function<std::vector<double>()> m_pfGetScale;
107  std::function<void(const std::vector<double> &)> m_pfTranslate;
108  std::function<std::vector<double>()> m_pfGetMatrix;
109 };
110 
111 }
112 
113 #endif // sitkVersorTransform_h
itk::simple::ScaleVersor3DTransform::m_pfGetCenter
std::function< std::vector< double >)> m_pfGetCenter
Definition: sitkScaleVersor3DTransform.h:99
itk::simple::Transform
A simplified wrapper around a variety of ITK transforms.
Definition: sitkTransform.h:81
itk::simple::ScaleVersor3DTransform::m_pfTranslate
std::function< void(const std::vector< double > &)> m_pfTranslate
Definition: sitkScaleVersor3DTransform.h:107
sitkCommon.h
itk::simple::ScaleVersor3DTransform::m_pfGetMatrix
std::function< std::vector< double >)> m_pfGetMatrix
Definition: sitkScaleVersor3DTransform.h:108
itk::simple::ScaleVersor3DTransform::m_pfSetTranslation
std::function< void(const std::vector< double > &)> m_pfSetTranslation
Definition: sitkScaleVersor3DTransform.h:103
itk::simple::ScaleVersor3DTransform::m_pfGetScale
std::function< std::vector< double >)> m_pfGetScale
Definition: sitkScaleVersor3DTransform.h:106
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:105
itk::simple::ScaleVersor3DTransform
A parameterized 3D transform composed of the addition of a versor rotation matrix and a scale matrix ...
Definition: sitkScaleVersor3DTransform.h:35
itk::simple::ScaleVersor3DTransform::GetName
std::string GetName() const override
Definition: sitkScaleVersor3DTransform.h:64
sitkTransform.h
itk::simple::ScaleVersor3DTransform::m_pfGetVersor
std::function< std::vector< double >)> m_pfGetVersor
Definition: sitkScaleVersor3DTransform.h:102
itk::simple::ScaleVersor3DTransform::m_pfSetRotation1
std::function< void(const std::vector< double > &)> m_pfSetRotation1
Definition: sitkScaleVersor3DTransform.h:100
itk::simple::ScaleVersor3DTransform::m_pfSetRotation2
std::function< void(const std::vector< double > &, double)> m_pfSetRotation2
Definition: sitkScaleVersor3DTransform.h:101
itk::simple::ScaleVersor3DTransform::m_pfSetCenter
std::function< void(const std::vector< double > &)> m_pfSetCenter
Definition: sitkScaleVersor3DTransform.h:98
itk::simple
Definition: sitkAdditionalProcedures.h:28
itk::TransformBaseTemplate
Definition: sitkTransform.h:30
itk::simple::ScaleVersor3DTransform::m_pfGetTranslation
std::function< std::vector< double >)> m_pfGetTranslation
Definition: sitkScaleVersor3DTransform.h:104