SimpleITK  
sitkVersorRigid3DTransform.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 sitkVersorRigid3DTransform_h
19#define sitkVersorRigid3DTransform_h
20
21#include "sitkCommon.h"
22#include "sitkTransform.h"
23
24namespace itk::simple
25{
26
27
35{
36public:
39
41
42 // construct identity
44
46
48
49 explicit VersorRigid3DTransform(const std::vector<double> & versor,
50 const std::vector<double> & translation = std::vector<double>(3, 0.0),
51 const std::vector<double> & fixedCenter = std::vector<double>(3, 0.0));
52
53 VersorRigid3DTransform(const std::vector<double> & axis,
54 double angle,
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
60
62 std::string
63 GetName() const override
64 {
65 return std::string("VersorRigid3DTransform");
66 }
67
69 SITK_RETURN_SELF_TYPE_HEADER
70 SetCenter(const std::vector<double> & params);
71 std::vector<double>
72 GetCenter() const;
73
74
76 SITK_RETURN_SELF_TYPE_HEADER
77 SetRotation(const std::vector<double> & versor);
78 SITK_RETURN_SELF_TYPE_HEADER
79 SetRotation(const std::vector<double> & axis, double angle);
80 std::vector<double>
81 GetVersor() const;
82
83 std::vector<double>
85 SITK_RETURN_SELF_TYPE_HEADER
86 SetTranslation(const std::vector<double> & translation);
87
89 SITK_RETURN_SELF_TYPE_HEADER
90 Translate(const std::vector<double> & offset);
91 std::vector<double>
92 GetMatrix() const;
93 SITK_RETURN_SELF_TYPE_HEADER
94 SetMatrix(const std::vector<double> & matrix, double tolerance = 1e-10);
95
96protected:
97 void
98 SetPimpleTransform(std::unique_ptr<PimpleTransformBase> && pimpleTransform) override;
99
100private:
101 void
103
104 template <typename TransformType>
105 void
106 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_pfTranslate;
117 std::function<std::vector<double>()> m_pfGetMatrix;
118 std::function<void(const std::vector<double> &, double)> m_pfSetMatrix;
119};
120
121} // namespace itk::simple
122
123#endif // sitkVersorTransform_h
Transform()
By default a 3-d identity transform is constructed.
std::function< void(const std::vector< double > &, double)> m_pfSetMatrix
std::vector< double > GetMatrix() const
VersorRigid3DTransform(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 & SetRotation(const std::vector< double > &versor)
VersorRigid3DTransform(const VersorRigid3DTransform &)
std::function< void(const std::vector< double > &)> m_pfSetCenter
VersorRigid3DTransform & operator=(const VersorRigid3DTransform &)
void SetPimpleTransform(std::unique_ptr< PimpleTransformBase > &&pimpleTransform) override
std::vector< double > GetCenter() const
std::function< void(const std::vector< double > &)> m_pfSetRotation1
std::function< std::vector< double >()> m_pfGetMatrix
void InternalInitialization(TransformType *transform)
Self & SetMatrix(const std::vector< double > &matrix, double tolerance=1e-10)
std::function< std::vector< double >()> m_pfGetVersor
Self & SetTranslation(const std::vector< double > &translation)
Self & SetCenter(const std::vector< double > &params)
std::vector< double > GetVersor() const
std::vector< double > GetTranslation() const
VersorRigid3DTransform(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 & Translate(const std::vector< double > &offset)
std::function< std::vector< double >()> m_pfGetTranslation
Self & SetRotation(const std::vector< double > &axis, double angle)
std::function< void(const std::vector< double > &)> m_pfTranslate
std::function< std::vector< double >()> m_pfGetCenter
void InternalInitialization(itk::TransformBase *transform)
std::function< void(const std::vector< double > &)> m_pfSetTranslation
std::function< void(const std::vector< double > &, double)> m_pfSetRotation2
VersorRigid3DTransform(const Transform &)
TransformBaseTemplate< double > TransformBase
#define SITKCommon_EXPORT
Definition sitkCommon.h:41