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