ITK  5.4.0
Insight Toolkit
itkComposeScaleSkewVersor3DTransform.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  * https://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 itkComposeScaleSkewVersor3DTransform_h
19 #define itkComposeScaleSkewVersor3DTransform_h
20 
21 #include <iostream>
23 
24 namespace itk
25 {
52 template <typename TParametersValueType = double>
53 class ITK_TEMPLATE_EXPORT ComposeScaleSkewVersor3DTransform : public VersorRigid3DTransform<TParametersValueType>
54 {
55 public:
56  ITK_DISALLOW_COPY_AND_MOVE(ComposeScaleSkewVersor3DTransform);
57 
63 
65  itkNewMacro(Self);
66 
68  itkOverrideGetNameOfClassMacro(ComposeScaleSkewVersor3DTransform);
69 
71  static constexpr unsigned int InputSpaceDimension = 3;
72  static constexpr unsigned int OutputSpaceDimension = 3;
73  static constexpr unsigned int ParametersDimension = 12;
74 
76  using typename Superclass::ParametersType;
77  using typename Superclass::FixedParametersType;
78  using typename Superclass::JacobianType;
79  using typename Superclass::JacobianPositionType;
80  using typename Superclass::InverseJacobianPositionType;
81  using typename Superclass::ScalarType;
82  using typename Superclass::InputPointType;
83  using typename Superclass::OutputPointType;
84  using typename Superclass::InputVectorType;
85  using typename Superclass::OutputVectorType;
86  using typename Superclass::InputVnlVectorType;
87  using typename Superclass::OutputVnlVectorType;
88  using typename Superclass::InputCovariantVectorType;
89  using typename Superclass::OutputCovariantVectorType;
90  using typename Superclass::MatrixType;
91  using typename Superclass::InverseMatrixType;
92  using typename Superclass::CenterType;
93  using typename Superclass::OffsetType;
94  using typename Superclass::TranslationType;
95 
96  using typename Superclass::VersorType;
97  using typename Superclass::AxisType;
98  using typename Superclass::AngleType;
99 
103 
107 
108  using typename Superclass::AxisValueType;
109  using typename Superclass::ParametersValueType;
110 
116  void
117  SetMatrix(const MatrixType & matrix) override;
118  void
119  SetMatrix(const MatrixType & matrix, const TParametersValueType tolerance) override;
130  void
131  SetParameters(const ParametersType & parameters) override;
132 
133  const ParametersType &
134  GetParameters() const override;
135 
136  void
137  SetScale(const ScaleVectorType & scale);
138 
139  itkGetConstReferenceMacro(Scale, ScaleVectorType);
140 
141  void
142  SetSkew(const SkewVectorType & skew);
143 
144  itkGetConstReferenceMacro(Skew, SkewVectorType);
145 
146  void
147  SetIdentity() override;
148 
149  /* This function is not implemented for this transform. An exception
150  * is thrown if this function is called. */
151  void
152  ComputeJacobianWithRespectToParameters(const InputPointType & p, JacobianType & jacobian) const override;
153 
154 protected:
156  ComposeScaleSkewVersor3DTransform(const MatrixType & matrix, const OutputVectorType & offset);
157  ComposeScaleSkewVersor3DTransform(unsigned int parametersDimension);
158  ~ComposeScaleSkewVersor3DTransform() override = default;
159 
160  void
161  PrintSelf(std::ostream & os, Indent indent) const override;
162 
163  void
165  {
166  m_Scale = scale;
167  }
168 
169  void
171  {
172  m_Skew = skew;
173  }
174 
176  void
177  ComputeMatrix() override;
178 
179  void
180  ComputeMatrixParameters() override;
181 
182 private:
184  ScaleVectorType m_Scale{};
185 
187  SkewVectorType m_Skew{};
188 }; // class ComposeScaleSkewVersor3DTransform
189 } // namespace itk
190 
191 #ifndef ITK_MANUAL_INSTANTIATION
192 # include "itkComposeScaleSkewVersor3DTransform.hxx"
193 #endif
194 
195 #endif /* __ComposeScaleSkewVersor3DTransform_h */
itk::OptimizerParameters
Class to hold and manage different parameter types used during optimization.
Definition: itkOptimizerParameters.h:36
itk::ComposeScaleSkewVersor3DTransform::SetVarScale
void SetVarScale(const ScaleVectorType &scale)
Definition: itkComposeScaleSkewVersor3DTransform.h:164
itk::ComposeScaleSkewVersor3DTransform
ComposeScaleSkewVersor3DTransform of a vector space (space coords)
Definition: itkComposeScaleSkewVersor3DTransform.h:53
itk::VersorRigid3DTransform
VersorRigid3DTransform of a vector space (e.g. space coordinates)
Definition: itkVersorRigid3DTransform.h:46
itk::Vector< TParametersValueType, 3 >
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::Vector< TParametersValueType, 3 >::ValueType
TParametersValueType ValueType
Definition: itkVector.h:71
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itkVersorRigid3DTransform.h
itk::Matrix< TParametersValueType, Self::OutputSpaceDimension, Self::InputSpaceDimension >
itk::ComposeScaleSkewVersor3DTransform::ScaleVectorValueType
typename ScaleVectorType::ValueType ScaleVectorValueType
Definition: itkComposeScaleSkewVersor3DTransform.h:104
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ComposeScaleSkewVersor3DTransform::SetVarSkew
void SetVarSkew(const SkewVectorType &skew)
Definition: itkComposeScaleSkewVersor3DTransform.h:170
itk::Point
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:53
itk::Array2D
Array2D class representing a 2D array.
Definition: itkArray2D.h:42
itk::ComposeScaleSkewVersor3DTransform::SkewVectorValueType
typename SkewVectorType::ValueType SkewVectorValueType
Definition: itkComposeScaleSkewVersor3DTransform.h:105
itk::ComposeScaleSkewVersor3DTransform::TranslationValueType
typename TranslationType::ValueType TranslationValueType
Definition: itkComposeScaleSkewVersor3DTransform.h:106