SimpleITK  2.1.0
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
25 {
26 namespace simple
27 {
28 
42  : public Transform
43 {
44 public:
47 
49 
50  // construct identity
52 
54 
55  explicit ComposeScaleSkewVersor3DTransform( const Transform & );
56 
57  ComposeScaleSkewVersor3DTransform( const std::vector< double > &scale,
58  const std::vector< double> &skew,
59  const std::vector< double > &versor,
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  ComposeScaleSkewVersor3DTransform( const std::vector< double > &scale,
64  const std::vector< double> &skew,
65  const std::vector< double > &axis, double angle,
66  const std::vector< double > &translation=std::vector< double >(3, 0.0),
67  const std::vector< double> &fixedCenter=std::vector< double >(3, 0.0) );
68 
70 
72  std::string GetName() const override { return std::string ("ComposeScaleSkewVersor3DTransform"); }
73 
75  SITK_RETURN_SELF_TYPE_HEADER SetCenter(const std::vector<double> &params);
76  std::vector<double> GetCenter( ) const;
77 
78 
80  SITK_RETURN_SELF_TYPE_HEADER SetRotation(const std::vector<double> &versor);
81  SITK_RETURN_SELF_TYPE_HEADER SetRotation(const std::vector<double> &axis, double angle);
82  std::vector<double> GetVersor() const;
83 
84  std::vector<double> GetTranslation( ) const;
85  SITK_RETURN_SELF_TYPE_HEADER SetTranslation(const std::vector<double>& translation);
86 
87  std::vector<double> GetScale( ) const;
88  SITK_RETURN_SELF_TYPE_HEADER SetScale( const std::vector<double> & scale );
89 
90  std::vector<double> GetSkew( ) const;
91  SITK_RETURN_SELF_TYPE_HEADER SetSkew( const std::vector<double> & skew );
92 
94  SITK_RETURN_SELF_TYPE_HEADER Translate(const std::vector<double> &offset);
95  std::vector<double> GetMatrix() const;
96 
97 protected:
98 
99  void SetPimpleTransform( PimpleTransformBase *pimpleTransform ) override;
100 
101 private:
102 
103  void InternalInitialization(itk::TransformBase *transform);
104 
105  template <typename TransformType>
106  void InternalInitialization(TransformType *transform);
107 
108 
109  std::function<void(const std::vector<double>&)> m_pfSetCenter;
110  std::function<std::vector<double>()> m_pfGetCenter;
111  std::function<void(const std::vector<double>&)> m_pfSetRotation1;
112  std::function<void(const std::vector<double>&,double)> m_pfSetRotation2;
113  std::function<std::vector<double>()> m_pfGetVersor;
114  std::function<void(const std::vector<double>&)> m_pfSetTranslation;
115  std::function<std::vector<double>()> m_pfGetTranslation;
116  std::function<void(const std::vector<double>&)> m_pfSetScale;
117  std::function<std::vector<double>()> m_pfGetScale;
118  std::function<void(const std::vector<double>&)> m_pfSetSkew;
119  std::function<std::vector<double>()> m_pfGetSkew;
120  std::function<void(const std::vector<double> &)> m_pfTranslate;
121  std::function<std::vector<double>()> m_pfGetMatrix;
122 };
123 
124 }
125 }
126 
127 #endif // sitkComposeScaleSkewVersor3DTransform_h
itk::simple::ComposeScaleSkewVersor3DTransform::m_pfSetRotation2
std::function< void(const std::vector< double > &, double)> m_pfSetRotation2
Definition: sitkComposeScaleSkewVersor3DTransform.h:112
itk::simple::ComposeScaleSkewVersor3DTransform::m_pfSetCenter
std::function< void(const std::vector< double > &)> m_pfSetCenter
Definition: sitkComposeScaleSkewVersor3DTransform.h:109
itk::simple::Transform
A simplified wrapper around a variety of ITK transforms.
Definition: sitkTransform.h:81
itk::simple::ComposeScaleSkewVersor3DTransform::m_pfSetRotation1
std::function< void(const std::vector< double > &)> m_pfSetRotation1
Definition: sitkComposeScaleSkewVersor3DTransform.h:111
sitkCommon.h
itk::simple::ComposeScaleSkewVersor3DTransform::m_pfGetTranslation
std::function< std::vector< double >)> m_pfGetTranslation
Definition: sitkComposeScaleSkewVersor3DTransform.h:115
itk::simple::ComposeScaleSkewVersor3DTransform
This transform applies a versor rotation and translation & scale/skew to the space.
Definition: sitkComposeScaleSkewVersor3DTransform.h:41
itk::simple::ComposeScaleSkewVersor3DTransform::m_pfTranslate
std::function< void(const std::vector< double > &)> m_pfTranslate
Definition: sitkComposeScaleSkewVersor3DTransform.h:120
itk::simple::ComposeScaleSkewVersor3DTransform::m_pfGetScale
std::function< std::vector< double >)> m_pfGetScale
Definition: sitkComposeScaleSkewVersor3DTransform.h:117
itk::simple::ComposeScaleSkewVersor3DTransform::m_pfGetSkew
std::function< std::vector< double >)> m_pfGetSkew
Definition: sitkComposeScaleSkewVersor3DTransform.h:119
itk::simple::ComposeScaleSkewVersor3DTransform::GetName
std::string GetName() const override
Definition: sitkComposeScaleSkewVersor3DTransform.h:72
SITKCommon_EXPORT
#define SITKCommon_EXPORT
Definition: sitkCommon.h:41
itk::simple::ComposeScaleSkewVersor3DTransform::m_pfSetScale
std::function< void(const std::vector< double > &)> m_pfSetScale
Definition: sitkComposeScaleSkewVersor3DTransform.h:116
itk::simple::ComposeScaleSkewVersor3DTransform::m_pfGetCenter
std::function< std::vector< double >)> m_pfGetCenter
Definition: sitkComposeScaleSkewVersor3DTransform.h:110
sitkTransform.h
itk::simple::ComposeScaleSkewVersor3DTransform::m_pfGetMatrix
std::function< std::vector< double >)> m_pfGetMatrix
Definition: sitkComposeScaleSkewVersor3DTransform.h:121
itk
itk::simple::ComposeScaleSkewVersor3DTransform::m_pfSetSkew
std::function< void(const std::vector< double > &)> m_pfSetSkew
Definition: sitkComposeScaleSkewVersor3DTransform.h:118
itk::simple::ComposeScaleSkewVersor3DTransform::m_pfSetTranslation
std::function< void(const std::vector< double > &)> m_pfSetTranslation
Definition: sitkComposeScaleSkewVersor3DTransform.h:114
itk::simple::ComposeScaleSkewVersor3DTransform::m_pfGetVersor
std::function< std::vector< double >)> m_pfGetVersor
Definition: sitkComposeScaleSkewVersor3DTransform.h:113
itk::TransformBaseTemplate
Definition: sitkTransform.h:30