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
24namespace itk::simple
25{
26
35{
36public:
39
41
42 // construct identity
44
46
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
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>
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
108protected:
109 void
110 SetPimpleTransform(std::unique_ptr<PimpleTransformBase> && pimpleTransform) override;
111
112private:
113 void
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
ScaleSkewVersor3DTransform(const std::vector< double > &scale, const std::vector< double > &skew, const std::vector< double > &axis, double angle, const std::vector< double > &translation=std::vector< double >(3, 0.0), const std::vector< double > &fixedCenter=std::vector< double >(3, 0.0))
Self & SetSkew(const std::vector< double > &skew)
std::function< std::vector< double >()> m_pfGetVersor
std::function< void(const std::vector< double > &)> m_pfSetScale
std::function< void(const std::vector< double > &)> m_pfSetRotation1
ScaleSkewVersor3DTransform(const Transform &)
ScaleSkewVersor3DTransform(const ScaleSkewVersor3DTransform &)
void InternalInitialization(TransformType *transform)
std::function< void(const std::vector< double > &)> m_pfSetSkew
std::vector< double > GetCenter() const
Self & SetTranslation(const std::vector< double > &translation)
std::function< void(const std::vector< double > &)> m_pfTranslate
std::vector< double > GetSkew() const
ScaleSkewVersor3DTransform(const std::vector< double > &scale, const std::vector< double > &skew, const std::vector< double > &versor, const std::vector< double > &translation=std::vector< double >(3, 0.0), const std::vector< double > &fixedCenter=std::vector< double >(3, 0.0))
void SetPimpleTransform(std::unique_ptr< PimpleTransformBase > &&pimpleTransform) override
Self & SetCenter(const std::vector< double > &params)
std::function< std::vector< double >()> m_pfGetSkew
Self & SetRotation(const std::vector< double > &axis, double angle)
std::function< void(const std::vector< double > &)> m_pfSetTranslation
std::vector< double > GetVersor() const
std::function< std::vector< double >()> m_pfGetScale
std::function< std::vector< double >()> m_pfGetCenter
std::function< std::vector< double >()> m_pfGetTranslation
std::function< void(const std::vector< double > &, double)> m_pfSetRotation2
std::vector< double > GetTranslation() const
std::function< std::vector< double >()> m_pfGetMatrix
Self & SetScale(const std::vector< double > &scale)
void InternalInitialization(itk::TransformBase *transform)
Self & Translate(const std::vector< double > &offset)
Self & SetRotation(const std::vector< double > &versor)
std::vector< double > GetMatrix() const
std::function< void(const std::vector< double > &)> m_pfSetCenter
ScaleSkewVersor3DTransform & operator=(const ScaleSkewVersor3DTransform &)
std::vector< double > GetScale() const
Transform()
By default a 3-d identity transform is constructed.
TransformBaseTemplate< double > TransformBase
#define SITKCommon_EXPORT
Definition sitkCommon.h:41