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  : public Transform
36 {
37 public:
40 
41  ~ScaleSkewVersor3DTransform() override;
42 
43  // construct identity
45 
47 
48  explicit ScaleSkewVersor3DTransform( const Transform & );
49 
50  ScaleSkewVersor3DTransform( const std::vector< double > &scale,
51  const std::vector< double> &skew,
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  ScaleSkewVersor3DTransform( const std::vector< double > &scale,
57  const std::vector< double> &skew,
58  const std::vector< double > &axis, 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 
65  std::string GetName() const override { return std::string ("ScaleSkewVersor3DTransform"); }
66 
68  SITK_RETURN_SELF_TYPE_HEADER SetCenter(const std::vector<double> &params);
69  std::vector<double> GetCenter( ) const;
70 
71 
73  SITK_RETURN_SELF_TYPE_HEADER SetRotation(const std::vector<double> &versor);
74  SITK_RETURN_SELF_TYPE_HEADER SetRotation(const std::vector<double> &axis, double angle);
75  std::vector<double> GetVersor() const;
76 
77  std::vector<double> GetTranslation( ) const;
78  SITK_RETURN_SELF_TYPE_HEADER SetTranslation(const std::vector<double>& translation);
79 
80  std::vector<double> GetScale( ) const;
81  SITK_RETURN_SELF_TYPE_HEADER SetScale( const std::vector<double> & scale );
82 
83  std::vector<double> GetSkew( ) const;
84  SITK_RETURN_SELF_TYPE_HEADER SetSkew( const std::vector<double> & skew );
85 
87  SITK_RETURN_SELF_TYPE_HEADER Translate(const std::vector<double> &offset);
88  std::vector<double> GetMatrix() const;
89 
90 protected:
91 
92  void SetPimpleTransform(std::unique_ptr<PimpleTransformBase> && pimpleTransform ) override;
93 
94 private:
95 
96  void InternalInitialization(itk::TransformBase *transform);
97 
98  template <typename TransformType>
99  void InternalInitialization(TransformType *transform);
100 
101 
102  std::function<void(const std::vector<double>&)> m_pfSetCenter;
103  std::function<std::vector<double>()> m_pfGetCenter;
104  std::function<void(const std::vector<double>&)> m_pfSetRotation1;
105  std::function<void(const std::vector<double>&,double)> m_pfSetRotation2;
106  std::function<std::vector<double>()> m_pfGetVersor;
107  std::function<void(const std::vector<double>&)> m_pfSetTranslation;
108  std::function<std::vector<double>()> m_pfGetTranslation;
109  std::function<void(const std::vector<double>&)> m_pfSetScale;
110  std::function<std::vector<double>()> m_pfGetScale;
111  std::function<void(const std::vector<double>&)> m_pfSetSkew;
112  std::function<std::vector<double>()> m_pfGetSkew;
113  std::function<void(const std::vector<double> &)> m_pfTranslate;
114  std::function<std::vector<double>()> m_pfGetMatrix;
115 };
116 
117 }
118 
119 #endif // sitkVersorTransform_h
itk::simple::Transform
A simplified wrapper around a variety of ITK transforms.
Definition: sitkTransform.h:81
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_pfSetRotation1
std::function< void(const std::vector< double > &)> m_pfSetRotation1
Definition: sitkScaleSkewVersor3DTransform.h:104
itk::simple::ScaleSkewVersor3DTransform::m_pfSetRotation2
std::function< void(const std::vector< double > &, double)> m_pfSetRotation2
Definition: sitkScaleSkewVersor3DTransform.h:105
itk::simple::ScaleSkewVersor3DTransform::m_pfTranslate
std::function< void(const std::vector< double > &)> m_pfTranslate
Definition: sitkScaleSkewVersor3DTransform.h:113
itk::simple::ScaleSkewVersor3DTransform::m_pfGetTranslation
std::function< std::vector< double >)> m_pfGetTranslation
Definition: sitkScaleSkewVersor3DTransform.h:108
SITKCommon_EXPORT
#define SITKCommon_EXPORT
Definition: sitkCommon.h:41
itk::simple::ScaleSkewVersor3DTransform::m_pfSetTranslation
std::function< void(const std::vector< double > &)> m_pfSetTranslation
Definition: sitkScaleSkewVersor3DTransform.h:107
itk::simple::ScaleSkewVersor3DTransform::GetName
std::string GetName() const override
Definition: sitkScaleSkewVersor3DTransform.h:65
itk::simple::ScaleSkewVersor3DTransform::m_pfGetSkew
std::function< std::vector< double >)> m_pfGetSkew
Definition: sitkScaleSkewVersor3DTransform.h:112
sitkTransform.h
itk::simple::ScaleSkewVersor3DTransform::m_pfGetVersor
std::function< std::vector< double >)> m_pfGetVersor
Definition: sitkScaleSkewVersor3DTransform.h:106
itk::simple::ScaleSkewVersor3DTransform::m_pfSetSkew
std::function< void(const std::vector< double > &)> m_pfSetSkew
Definition: sitkScaleSkewVersor3DTransform.h:111
itk::simple::ScaleSkewVersor3DTransform::m_pfGetMatrix
std::function< std::vector< double >)> m_pfGetMatrix
Definition: sitkScaleSkewVersor3DTransform.h:114
itk::simple::ScaleSkewVersor3DTransform::m_pfSetCenter
std::function< void(const std::vector< double > &)> m_pfSetCenter
Definition: sitkScaleSkewVersor3DTransform.h:102
itk::simple::ScaleSkewVersor3DTransform::m_pfGetCenter
std::function< std::vector< double >)> m_pfGetCenter
Definition: sitkScaleSkewVersor3DTransform.h:103
itk::simple
Definition: sitkAdditionalProcedures.h:28
itk::simple::ScaleSkewVersor3DTransform::m_pfSetScale
std::function< void(const std::vector< double > &)> m_pfSetScale
Definition: sitkScaleSkewVersor3DTransform.h:109
itk::simple::ScaleSkewVersor3DTransform::m_pfGetScale
std::function< std::vector< double >)> m_pfGetScale
Definition: sitkScaleSkewVersor3DTransform.h:110
itk::TransformBaseTemplate
Definition: sitkTransform.h:30