SimpleITK  
sitkScaleVersor3DTransform.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 sitkScaleVersor3DTransform_h
19#define sitkScaleVersor3DTransform_h
20
21#include "sitkCommon.h"
22#include "sitkTransform.h"
23
24namespace itk::simple
25{
26
27
36{
37public:
40
42
43 // construct identity
45
47
49
50 ScaleVersor3DTransform(const std::vector<double> & scale,
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 ScaleVersor3DTransform(const std::vector<double> & scale,
56 const std::vector<double> & axis,
57 double angle,
58 const std::vector<double> & translation = std::vector<double>(3, 0.0),
59 const std::vector<double> & fixedCenter = std::vector<double>(3, 0.0));
60
63
65 std::string
66 GetName() const override
67 {
68 return std::string("ScaleVersor3DTransform");
69 }
70
72 SITK_RETURN_SELF_TYPE_HEADER
73 SetCenter(const std::vector<double> & params);
74 std::vector<double>
75 GetCenter() const;
76
77
79 SITK_RETURN_SELF_TYPE_HEADER
80 SetRotation(const std::vector<double> & versor);
81 SITK_RETURN_SELF_TYPE_HEADER
82 SetRotation(const std::vector<double> & axis, double angle);
83 std::vector<double>
84 GetVersor() const;
85
86 std::vector<double>
88 SITK_RETURN_SELF_TYPE_HEADER
89 SetTranslation(const std::vector<double> & translation);
90
91 std::vector<double>
92 GetScale() const;
93 SITK_RETURN_SELF_TYPE_HEADER
94 SetScale(const std::vector<double> & scale);
95
97 SITK_RETURN_SELF_TYPE_HEADER
98 Translate(const std::vector<double> & offset);
99 std::vector<double>
100 GetMatrix() const;
101
102protected:
103 void
104 SetPimpleTransform(std::unique_ptr<PimpleTransformBase> && pimpleTransform) override;
105
106private:
107 void
109
110 template <typename TransformType>
111 void
112 InternalInitialization(TransformType * transform);
113
114
115 std::function<void(const std::vector<double> &)> m_pfSetCenter;
116 std::function<std::vector<double>()> m_pfGetCenter;
117 std::function<void(const std::vector<double> &)> m_pfSetRotation1;
118 std::function<void(const std::vector<double> &, double)> m_pfSetRotation2;
119 std::function<std::vector<double>()> m_pfGetVersor;
120 std::function<void(const std::vector<double> &)> m_pfSetTranslation;
121 std::function<std::vector<double>()> m_pfGetTranslation;
122 std::function<void(const std::vector<double> &)> m_pfSetScale;
123 std::function<std::vector<double>()> m_pfGetScale;
124 std::function<void(const std::vector<double> &)> m_pfTranslate;
125 std::function<std::vector<double>()> m_pfGetMatrix;
126};
127
128} // namespace itk::simple
129
130#endif // sitkVersorTransform_h
std::function< std::vector< double >()> m_pfGetMatrix
Self & SetCenter(const std::vector< double > &params)
std::vector< double > GetMatrix() const
void InternalInitialization(TransformType *transform)
std::function< std::vector< double >()> m_pfGetCenter
std::function< void(const std::vector< double > &)> m_pfSetTranslation
std::function< void(const std::vector< double > &)> m_pfTranslate
std::vector< double > GetCenter() const
ScaleVersor3DTransform(const ScaleVersor3DTransform &)
std::function< std::vector< double >()> m_pfGetTranslation
std::function< void(const std::vector< double > &)> m_pfSetCenter
void InternalInitialization(itk::TransformBase *transform)
Self & SetScale(const std::vector< double > &scale)
void SetPimpleTransform(std::unique_ptr< PimpleTransformBase > &&pimpleTransform) override
std::vector< double > GetTranslation() const
Self & SetTranslation(const std::vector< double > &translation)
std::function< void(const std::vector< double > &)> m_pfSetScale
ScaleVersor3DTransform(const std::vector< double > &scale, 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::vector< double > GetScale() const
std::function< std::vector< double >()> m_pfGetVersor
std::function< void(const std::vector< double > &, double)> m_pfSetRotation2
ScaleVersor3DTransform & operator=(const ScaleVersor3DTransform &)
Self & SetRotation(const std::vector< double > &axis, double angle)
ScaleVersor3DTransform(const std::vector< double > &scale, 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))
Self & SetRotation(const std::vector< double > &versor)
std::function< void(const std::vector< double > &)> m_pfSetRotation1
std::vector< double > GetVersor() const
Self & Translate(const std::vector< double > &offset)
std::function< std::vector< double >()> m_pfGetScale
ScaleVersor3DTransform(const Transform &)
Transform()
By default a 3-d identity transform is constructed.
TransformBaseTemplate< double > TransformBase
#define SITKCommon_EXPORT
Definition sitkCommon.h:41