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
24namespace itk::simple
25{
26
40{
41public:
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
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>
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
113protected:
114 void
115 SetPimpleTransform(std::unique_ptr<PimpleTransformBase> && pimpleTransform) override;
116
117private:
118 void
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
void InternalInitialization(TransformType *transform)
Self & SetScale(const std::vector< double > &scale)
std::function< void(const std::vector< double > &)> m_pfTranslate
ComposeScaleSkewVersor3DTransform(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))
std::vector< double > GetCenter() const
std::vector< double > GetTranslation() const
std::function< void(const std::vector< double > &)> m_pfSetScale
ComposeScaleSkewVersor3DTransform & operator=(const ComposeScaleSkewVersor3DTransform &)
std::function< void(const std::vector< double > &)> m_pfSetRotation1
std::vector< double > GetVersor() const
std::vector< double > GetScale() const
std::function< void(const std::vector< double > &)> m_pfSetTranslation
Self & SetRotation(const std::vector< double > &axis, double angle)
ComposeScaleSkewVersor3DTransform(const ComposeScaleSkewVersor3DTransform &)
Self & SetSkew(const std::vector< double > &skew)
Self & SetRotation(const std::vector< double > &versor)
Self & Translate(const std::vector< double > &offset)
Self & SetCenter(const std::vector< double > &params)
std::function< void(const std::vector< double > &)> m_pfSetSkew
void SetPimpleTransform(std::unique_ptr< PimpleTransformBase > &&pimpleTransform) override
std::function< void(const std::vector< double > &)> m_pfSetCenter
Self & SetTranslation(const std::vector< double > &translation)
std::vector< double > GetSkew() const
std::vector< double > GetMatrix() const
ComposeScaleSkewVersor3DTransform(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))
std::function< void(const std::vector< double > &, double)> m_pfSetRotation2
void InternalInitialization(itk::TransformBase *transform)
Transform()
By default a 3-d identity transform is constructed.
TransformBaseTemplate< double > TransformBase
#define SITKCommon_EXPORT
Definition sitkCommon.h:41