SimpleITK  1.3.0.dev466
sitkScaleSkewVersor3DTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright Insight Software Consortium
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
25 {
26 namespace simple
27 {
28 
37  : public Transform
38 {
39 public:
42 
43  virtual ~ScaleSkewVersor3DTransform();
44 
45  // construct identity
47 
49 
50  explicit ScaleSkewVersor3DTransform( const Transform & );
51 
52  ScaleSkewVersor3DTransform( const std::vector< double > &scale,
53  const std::vector< double> &skew,
54  const std::vector< double > &versor,
55  const std::vector< double > &translation=std::vector< double >(3, 0.0),
56  const std::vector< double> &fixedCenter=std::vector< double >(3, 0.0) );
57 
58  ScaleSkewVersor3DTransform( const std::vector< double > &scale,
59  const std::vector< double> &skew,
60  const std::vector< double > &axis, double angle,
61  const std::vector< double > &translation=std::vector< double >(3, 0.0),
62  const std::vector< double> &fixedCenter=std::vector< double >(3, 0.0) );
63 
65 
67  std::string GetName() const { return std::string ("ScaleSkewVersor3DTransform"); }
68 
70  SITK_RETURN_SELF_TYPE_HEADER SetCenter(const std::vector<double> &params);
71  std::vector<double> GetCenter( ) const;
72 
73 
75  SITK_RETURN_SELF_TYPE_HEADER SetRotation(const std::vector<double> &versor);
76  SITK_RETURN_SELF_TYPE_HEADER SetRotation(const std::vector<double> &axis, double angle);
77  std::vector<double> GetVersor() const;
78 
79  std::vector<double> GetTranslation( ) const;
80  SITK_RETURN_SELF_TYPE_HEADER SetTranslation(const std::vector<double>& translation);
81 
82  std::vector<double> GetScale( ) const;
83  SITK_RETURN_SELF_TYPE_HEADER SetScale( const std::vector<double> & scale );
84 
85  std::vector<double> GetSkew( ) const;
86  SITK_RETURN_SELF_TYPE_HEADER SetSkew( const std::vector<double> & skew );
87 
89  SITK_RETURN_SELF_TYPE_HEADER Translate(const std::vector<double> &offset);
90  std::vector<double> GetMatrix() const;
91 
92 protected:
93 
94  virtual void SetPimpleTransform( PimpleTransformBase *pimpleTransform );
95 
96 private:
97 
98  using Superclass::AddTransform;
99 
100  void InternalInitialization(itk::TransformBase *transform);
101 
102  template <typename TransformType>
103  void InternalInitialization(TransformType *transform);
104 
105 
106  nsstd::function<void(const std::vector<double>&)> m_pfSetCenter;
107  nsstd::function<std::vector<double>()> m_pfGetCenter;
108  nsstd::function<void(const std::vector<double>&)> m_pfSetRotation1;
109  nsstd::function<void(const std::vector<double>&,double)> m_pfSetRotation2;
110  nsstd::function<std::vector<double>()> m_pfGetVersor;
111  nsstd::function<void(const std::vector<double>&)> m_pfSetTranslation;
112  nsstd::function<std::vector<double>()> m_pfGetTranslation;
113  nsstd::function<void(const std::vector<double>&)> m_pfSetScale;
114  nsstd::function<std::vector<double>()> m_pfGetScale;
115  nsstd::function<void(const std::vector<double>&)> m_pfSetSkew;
116  nsstd::function<std::vector<double>()> m_pfGetSkew;
117  nsstd::function<void(const std::vector<double> &)> m_pfTranslate;
118  nsstd::function<std::vector<double>()> m_pfGetMatrix;
119 };
120 
121 }
122 }
123 
124 #endif // sitkVersorTransform_h
A simplified wrapper around a variety of ITK transforms.
Definition: sitkTransform.h:84
#define SITKCommon_EXPORT
Definition: sitkCommon.h:41
A over parameterized 3D Affine transform composed of the addition of a versor rotation matrix...