ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkScaleSkewVersor3DTransform.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 itkScaleSkewVersor3DTransform_h
19 #define itkScaleSkewVersor3DTransform_h
20 
21 #include <iostream>
23 
24 namespace itk
25 {
53 template<typename TParametersValueType=double>
54 class ITK_TEMPLATE_EXPORT ScaleSkewVersor3DTransform :
55  public VersorRigid3DTransform<TParametersValueType>
56 {
57 public:
58  ITK_DISALLOW_COPY_AND_ASSIGN(ScaleSkewVersor3DTransform);
59 
65 
67  itkNewMacro(Self);
68 
71 
73  static constexpr unsigned int InputSpaceDimension = 3;
74  static constexpr unsigned int OutputSpaceDimension = 3;
75  static constexpr unsigned int ParametersDimension = 15;
76 
78  using ParametersType = typename Superclass::ParametersType;
79  using FixedParametersType = typename Superclass::FixedParametersType;
80  using JacobianType = typename Superclass::JacobianType;
81  using JacobianPositionType = typename Superclass::JacobianPositionType;
82  using InverseJacobianPositionType = typename Superclass::InverseJacobianPositionType;
83  using ScalarType = typename Superclass::ScalarType;
84  using InputPointType = typename Superclass::InputPointType;
85  using OutputPointType = typename Superclass::OutputPointType;
86  using InputVectorType = typename Superclass::InputVectorType;
87  using OutputVectorType = typename Superclass::OutputVectorType;
88  using InputVnlVectorType = typename Superclass::InputVnlVectorType;
89  using OutputVnlVectorType = typename Superclass::OutputVnlVectorType;
90  using InputCovariantVectorType = typename Superclass::InputCovariantVectorType;
91  using OutputCovariantVectorType = typename Superclass::OutputCovariantVectorType;
92  using MatrixType = typename Superclass::MatrixType;
93  using InverseMatrixType = typename Superclass::InverseMatrixType;
94  using CenterType = typename Superclass::CenterType;
95  using OffsetType = typename Superclass::OffsetType;
96  using TranslationType = typename Superclass::TranslationType;
97 
98  using VersorType = typename Superclass::VersorType;
99  using AxisType = typename Superclass::AxisType;
100  using AngleType = typename Superclass::AngleType;
101 
105 
108  using TranslationValueType = typename TranslationType::ValueType;
109 
110  using AxisValueType = typename Superclass::AxisValueType;
111  using ParametersValueType = typename Superclass::ParametersValueType;
112 
118  void SetMatrix(const MatrixType & matrix) override;
119  void SetMatrix(const MatrixType & matrix, const TParametersValueType tolerance) override;
121 
130  void SetParameters(const ParametersType & parameters) override;
131 
132  const ParametersType & GetParameters() const override;
133 
134  void SetScale(const ScaleVectorType & scale);
135 
136  itkGetConstReferenceMacro(Scale, ScaleVectorType);
137 
138  void SetSkew(const SkewVectorType & skew);
139 
140  itkGetConstReferenceMacro(Skew, SkewVectorType);
141 
142  void SetIdentity() override;
143 
148  void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const override;
149 
150 protected:
152  ScaleSkewVersor3DTransform(const MatrixType & matrix, const OutputVectorType & offset);
153  ScaleSkewVersor3DTransform(unsigned int paramDims);
154  ~ScaleSkewVersor3DTransform() override = default;
155 
156  void PrintSelf(std::ostream & os, Indent indent) const override;
157 
158  void SetVarScale(const ScaleVectorType & scale)
159  {
160  m_Scale = scale;
161  }
162 
163  void SetVarSkew(const SkewVectorType & skew)
164  {
165  m_Skew = skew;
166  }
167 
169  void ComputeMatrix() override;
170 
171  void ComputeMatrixParameters() override;
172 
173 private:
176 
179 }; // class ScaleSkewVersor3DTransform
180 } // namespace itk
181 
182 #ifndef ITK_MANUAL_INSTANTIATION
183 #include "itkScaleSkewVersor3DTransform.hxx"
184 #endif
185 
186 #endif /* __ScaleSkewVersor3DTransform_h */
typename TranslationType::ValueType TranslationValueType
typename Superclass::AxisType AxisType
typename Superclass::FixedParametersType FixedParametersType
void SetVarSkew(const SkewVectorType &skew)
typename Superclass::OutputCovariantVectorType OutputCovariantVectorType
Light weight base class for most itk classes.
typename Superclass::MatrixType MatrixType
typename Superclass::JacobianType JacobianType
TParametersValueType ValueType
Definition: itkVector.h:71
typename Superclass::InputCovariantVectorType InputCovariantVectorType
VersorRigid3DTransform of a vector space (e.g. space coordinates)
typename Superclass::OutputVnlVectorType OutputVnlVectorType
typename Superclass::ParametersType ParametersType
void SetVarScale(const ScaleVectorType &scale)
typename ScaleVectorType::ValueType ScaleVectorValueType
typename Superclass::OutputVectorType OutputVectorType
typename Superclass::InverseMatrixType InverseMatrixType
typename Superclass::InputVnlVectorType InputVnlVectorType
typename Superclass::CenterType CenterType
typename Superclass::OutputPointType OutputPointType
typename Superclass::TranslationType TranslationType
typename Superclass::InputPointType InputPointType
typename Superclass::AngleType AngleType
ScaleSkewVersor3DTransform of a vector space (e.g. space coordinates)
typename Superclass::InputVectorType InputVectorType
typename SkewVectorType::ValueType SkewVectorValueType
typename Superclass::JacobianPositionType JacobianPositionType
typename Superclass::ParametersValueType ParametersValueType
typename Superclass::VersorType VersorType
typename Superclass::AxisValueType AxisValueType
typename Superclass::OffsetType OffsetType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename Superclass::InverseJacobianPositionType InverseJacobianPositionType
typename Superclass::ScalarType ScalarType