SimpleITK  
sitkScaleSkewVersor3DTransform.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 sitkScaleSkewVersor3DTransform_h
19 #define sitkScaleSkewVersor3DTransform_h
20 
21 #include "sitkCommon.h"
22 #include "sitkTransform.h"
23 
24 namespace itk::simple
25 {
26 
35 {
36 public:
39 
40  ~ScaleSkewVersor3DTransform() override;
41 
42  // construct identity
44 
46 
47  explicit ScaleSkewVersor3DTransform(const Transform &);
48 
49  ScaleSkewVersor3DTransform(const std::vector<double> & scale,
50  const std::vector<double> & skew,
51  const std::vector<double> & versor,
52  const std::vector<double> & translation = std::vector<double>(3, 0.0),
53  const std::vector<double> & fixedCenter = std::vector<double>(3, 0.0));
54 
55  ScaleSkewVersor3DTransform(const std::vector<double> & scale,
56  const std::vector<double> & skew,
57  const std::vector<double> & axis,
58  double angle,
59  const std::vector<double> & translation = std::vector<double>(3, 0.0),
60  const std::vector<double> & fixedCenter = std::vector<double>(3, 0.0));
61 
63  operator=(const ScaleSkewVersor3DTransform &);
64 
66  std::string
67  GetName() const override
68  {
69  return std::string("ScaleSkewVersor3DTransform");
70  }
71 
73  SITK_RETURN_SELF_TYPE_HEADER
74  SetCenter(const std::vector<double> & params);
75  std::vector<double>
76  GetCenter() const;
77 
78 
80  SITK_RETURN_SELF_TYPE_HEADER
81  SetRotation(const std::vector<double> & versor);
82  SITK_RETURN_SELF_TYPE_HEADER
83  SetRotation(const std::vector<double> & axis, double angle);
84  std::vector<double>
85  GetVersor() const;
86 
87  std::vector<double>
88  GetTranslation() const;
89  SITK_RETURN_SELF_TYPE_HEADER
90  SetTranslation(const std::vector<double> & translation);
91 
92  std::vector<double>
93  GetScale() const;
94  SITK_RETURN_SELF_TYPE_HEADER
95  SetScale(const std::vector<double> & scale);
96 
97  std::vector<double>
98  GetSkew() const;
99  SITK_RETURN_SELF_TYPE_HEADER
100  SetSkew(const std::vector<double> & skew);
101 
103  SITK_RETURN_SELF_TYPE_HEADER
104  Translate(const std::vector<double> & offset);
105  std::vector<double>
106  GetMatrix() const;
107 
108 protected:
109  void
110  SetPimpleTransform(std::unique_ptr<PimpleTransformBase> && pimpleTransform) override;
111 
112 private:
113  void
114  InternalInitialization(itk::TransformBase * transform);
115 
116  template <typename TransformType>
117  void
118  InternalInitialization(TransformType * transform);
119 
120 
121  std::function<void(const std::vector<double> &)> m_pfSetCenter;
122  std::function<std::vector<double>()> m_pfGetCenter;
123  std::function<void(const std::vector<double> &)> m_pfSetRotation1;
124  std::function<void(const std::vector<double> &, double)> m_pfSetRotation2;
125  std::function<std::vector<double>()> m_pfGetVersor;
126  std::function<void(const std::vector<double> &)> m_pfSetTranslation;
127  std::function<std::vector<double>()> m_pfGetTranslation;
128  std::function<void(const std::vector<double> &)> m_pfSetScale;
129  std::function<std::vector<double>()> m_pfGetScale;
130  std::function<void(const std::vector<double> &)> m_pfSetSkew;
131  std::function<std::vector<double>()> m_pfGetSkew;
132  std::function<void(const std::vector<double> &)> m_pfTranslate;
133  std::function<std::vector<double>()> m_pfGetMatrix;
134 };
135 
136 } // namespace itk::simple
137 
138 #endif // sitkVersorTransform_h
itk::simple::ScaleSkewVersor3DTransform::m_pfSetScale
std::function< void(const std::vector< double > &)> m_pfSetScale
Definition: sitkScaleSkewVersor3DTransform.h:128
itk::simple::ScaleSkewVersor3DTransform::m_pfSetRotation2
std::function< void(const std::vector< double > &, double)> m_pfSetRotation2
Definition: sitkScaleSkewVersor3DTransform.h:124
itk::simple::ScaleSkewVersor3DTransform::m_pfSetCenter
std::function< void(const std::vector< double > &)> m_pfSetCenter
Definition: sitkScaleSkewVersor3DTransform.h:121
itk::simple::ScaleSkewVersor3DTransform::m_pfSetSkew
std::function< void(const std::vector< double > &)> m_pfSetSkew
Definition: sitkScaleSkewVersor3DTransform.h:130
itk::simple::Transform
A simplified wrapper around a variety of ITK transforms.
Definition: sitkTransform.h:86
itk::simple::ScaleSkewVersor3DTransform
A over parameterized 3D Affine transform composed of the addition of a versor rotation matrix,...
Definition: sitkScaleSkewVersor3DTransform.h:34
sitkCommon.h
itk::simple::ScaleSkewVersor3DTransform::m_pfTranslate
std::function< void(const std::vector< double > &)> m_pfTranslate
Definition: sitkScaleSkewVersor3DTransform.h:132
itk::simple::ScaleSkewVersor3DTransform::m_pfGetTranslation
std::function< std::vector< double >)> m_pfGetTranslation
Definition: sitkScaleSkewVersor3DTransform.h:127
SITKCommon_EXPORT
#define SITKCommon_EXPORT
Definition: sitkCommon.h:41
itk::simple::ScaleSkewVersor3DTransform::GetName
std::string GetName() const override
Definition: sitkScaleSkewVersor3DTransform.h:67
itk::simple::ScaleSkewVersor3DTransform::m_pfGetSkew
std::function< std::vector< double >)> m_pfGetSkew
Definition: sitkScaleSkewVersor3DTransform.h:131
itk::simple::ScaleSkewVersor3DTransform::m_pfSetRotation1
std::function< void(const std::vector< double > &)> m_pfSetRotation1
Definition: sitkScaleSkewVersor3DTransform.h:123
sitkTransform.h
itk::simple::ScaleSkewVersor3DTransform::m_pfGetVersor
std::function< std::vector< double >)> m_pfGetVersor
Definition: sitkScaleSkewVersor3DTransform.h:125
itk::simple::ScaleSkewVersor3DTransform::m_pfGetMatrix
std::function< std::vector< double >)> m_pfGetMatrix
Definition: sitkScaleSkewVersor3DTransform.h:133
itk::simple::ScaleSkewVersor3DTransform::m_pfGetCenter
std::function< std::vector< double >)> m_pfGetCenter
Definition: sitkScaleSkewVersor3DTransform.h:122
itk::simple
Definition: sitkAdditionalProcedures.h:28
itk::simple::ScaleSkewVersor3DTransform::m_pfSetTranslation
std::function< void(const std::vector< double > &)> m_pfSetTranslation
Definition: sitkScaleSkewVersor3DTransform.h:126
itk::simple::ScaleSkewVersor3DTransform::m_pfGetScale
std::function< std::vector< double >)> m_pfGetScale
Definition: sitkScaleSkewVersor3DTransform.h:129
itk::TransformBaseTemplate
Definition: sitkTransform.h:32