ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkSimilarity3DTransform.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 itkSimilarity3DTransform_h
19 #define itkSimilarity3DTransform_h
20 
21 #include <iostream>
23 
24 namespace itk
25 {
46 template<typename TParametersValueType=double>
47 class ITK_TEMPLATE_EXPORT Similarity3DTransform :
48  public VersorRigid3DTransform<TParametersValueType>
49 {
50 public:
51  ITK_DISALLOW_COPY_AND_ASSIGN(Similarity3DTransform);
52 
58 
60  itkNewMacro(Self);
61 
64 
66  static constexpr unsigned int SpaceDimension = 3;
67  static constexpr unsigned int InputSpaceDimension = 3;
68  static constexpr unsigned int OutputSpaceDimension = 3;
69  static constexpr unsigned int ParametersDimension = 7;
70 
72  using ParametersType = typename Superclass::ParametersType;
73  using FixedParametersType = typename Superclass::FixedParametersType;
74  using JacobianType = typename Superclass::JacobianType;
75  using JacobianPositionType = typename Superclass::JacobianPositionType;
76  using InverseJacobianPositionType = typename Superclass::InverseJacobianPositionType;
77  using ScalarType = typename Superclass::ScalarType;
78  using InputPointType = typename Superclass::InputPointType;
79  using OutputPointType = typename Superclass::OutputPointType;
80  using InputVectorType = typename Superclass::InputVectorType;
81  using OutputVectorType = typename Superclass::OutputVectorType;
82  using InputVnlVectorType = typename Superclass::InputVnlVectorType;
83  using OutputVnlVectorType = typename Superclass::OutputVnlVectorType;
84  using InputCovariantVectorType = typename Superclass::InputCovariantVectorType;
85  using OutputCovariantVectorType = typename Superclass::OutputCovariantVectorType;
86  using MatrixType = typename Superclass::MatrixType;
87  using InverseMatrixType = typename Superclass::InverseMatrixType;
88  using CenterType = typename Superclass::CenterType;
89  using OffsetType = typename Superclass::OffsetType;
90  using TranslationType = typename Superclass::TranslationType;
91 
93  using VersorType = typename Superclass::VersorType;
94  using AxisType = typename Superclass::AxisType;
95  using AngleType = typename Superclass::AngleType;
96  using ScaleType = TParametersValueType;
97 
99  void SetIdentity() override;
100 
107  void SetMatrix(const MatrixType & matrix) override;
108 
115  void SetMatrix(const MatrixType & matrix, const TParametersValueType tolerance) override;
116 
121  void SetParameters(const ParametersType & parameters) override;
122 
123  const ParametersType & GetParameters() const override;
124 
126  void SetScale(ScaleType scale);
127 
128  itkGetConstReferenceMacro(Scale, ScaleType);
129 
134  void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const override;
135 
136 protected:
137  Similarity3DTransform(const MatrixType & matrix, const OutputVectorType & offset);
138  Similarity3DTransform(unsigned int paramDim);
140  ~Similarity3DTransform() override = default;
141 
142  void PrintSelf(std::ostream & os, Indent indent) const override;
143 
146  void ComputeMatrix() override;
147 
149  void ComputeMatrixParameters() override;
150 
151 private:
153 }; // class Similarity3DTransform
154 } // namespace itk
155 
156 #ifndef ITK_MANUAL_INSTANTIATION
157 #include "itkSimilarity3DTransform.hxx"
158 #endif
159 
160 #endif /* itkSimilarity3DTransform_h */
typename Superclass::FixedParametersType FixedParametersType
typename Superclass::OutputCovariantVectorType OutputCovariantVectorType
Light weight base class for most itk classes.
typename Superclass::MatrixType MatrixType
typename Superclass::JacobianType JacobianType
typename Superclass::InputCovariantVectorType InputCovariantVectorType
VersorRigid3DTransform of a vector space (e.g. space coordinates)
typename Superclass::OutputVnlVectorType OutputVnlVectorType
typename Superclass::ParametersType ParametersType
typename Superclass::AngleType AngleType
typename Superclass::OutputVectorType OutputVectorType
typename Superclass::InverseMatrixType InverseMatrixType
typename Superclass::AxisType AxisType
typename Superclass::InputVnlVectorType InputVnlVectorType
typename Superclass::VersorType VersorType
typename Superclass::CenterType CenterType
typename Superclass::OutputPointType OutputPointType
Similarity3DTransform of a vector space (e.g. space coordinates)
typename Superclass::TranslationType TranslationType
typename Superclass::InputPointType InputPointType
typename Superclass::InputVectorType InputVectorType
typename Superclass::JacobianPositionType JacobianPositionType
typename Superclass::OffsetType OffsetType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename Superclass::InverseJacobianPositionType InverseJacobianPositionType
typename Superclass::ScalarType ScalarType