ITK  4.13.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:
56 
58  itkNewMacro(Self);
59 
62 
64  itkStaticConstMacro(SpaceDimension, unsigned int, 3);
65  itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
66  itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
67  itkStaticConstMacro(ParametersDimension, unsigned int, 7);
69 
71  typedef typename Superclass::ParametersType ParametersType;
72  typedef typename Superclass::FixedParametersType FixedParametersType;
73  typedef typename Superclass::JacobianType JacobianType;
74  typedef typename Superclass::ScalarType ScalarType;
75  typedef typename Superclass::InputPointType InputPointType;
76  typedef typename Superclass::OutputPointType OutputPointType;
77  typedef typename Superclass::InputVectorType InputVectorType;
78  typedef typename Superclass::OutputVectorType OutputVectorType;
79  typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
80  typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
81  typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
82  typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
83  typedef typename Superclass::MatrixType MatrixType;
84  typedef typename Superclass::InverseMatrixType InverseMatrixType;
85  typedef typename Superclass::CenterType CenterType;
86  typedef typename Superclass::OffsetType OffsetType;
87  typedef typename Superclass::TranslationType TranslationType;
88 
90  typedef typename Superclass::VersorType VersorType;
91  typedef typename Superclass::AxisType AxisType;
92  typedef typename Superclass::AngleType AngleType;
93  typedef TParametersValueType ScaleType;
94 
96  virtual void SetIdentity(void) ITK_OVERRIDE;
97 
104  virtual void SetMatrix(const MatrixType & matrix) ITK_OVERRIDE;
105 
112  virtual void SetMatrix(const MatrixType & matrix, const TParametersValueType tolerance) ITK_OVERRIDE;
113 
118  void SetParameters(const ParametersType & parameters) ITK_OVERRIDE;
119 
120  virtual const ParametersType & GetParameters(void) const ITK_OVERRIDE;
121 
123  void SetScale(ScaleType scale);
124 
125  itkGetConstReferenceMacro(Scale, ScaleType);
126 
131  virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const ITK_OVERRIDE;
132 
133 protected:
134  Similarity3DTransform(const MatrixType & matrix, const OutputVectorType & offset);
135  Similarity3DTransform(unsigned int paramDim);
137  ~Similarity3DTransform() ITK_OVERRIDE {}
138 
139  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
140 
143  void ComputeMatrix() ITK_OVERRIDE;
144 
146  void ComputeMatrixParameters() ITK_OVERRIDE;
147 
148 private:
149  ITK_DISALLOW_COPY_AND_ASSIGN(Similarity3DTransform);
150 
151  ScaleType m_Scale;
152 }; // class Similarity3DTransform
153 } // namespace itk
154 
155 #ifndef ITK_MANUAL_INSTANTIATION
156 #include "itkSimilarity3DTransform.hxx"
157 #endif
158 
159 #endif /* itkSimilarity3DTransform_h */
Superclass::OutputVnlVectorType OutputVnlVectorType
Superclass::InverseMatrixType InverseMatrixType
Superclass::OutputPointType OutputPointType
Light weight base class for most itk classes.
Superclass::InputVnlVectorType InputVnlVectorType
Superclass::MatrixType MatrixType
VersorRigid3DTransform of a vector space (e.g. space coordinates)
Superclass::InputCovariantVectorType InputCovariantVectorType
VersorRigid3DTransform< TParametersValueType > Superclass
Superclass::MatrixType MatrixType
Superclass::OutputVectorType OutputVectorType
Superclass::InputVectorType InputVectorType
Superclass::FixedParametersType FixedParametersType
Superclass::OutputVectorType OutputVectorType
Superclass::ScalarType ScalarType
Similarity3DTransform of a vector space (e.g. space coordinates)
Superclass::JacobianType JacobianType
Superclass::VersorType VersorType
Superclass::ParametersType ParametersType
Superclass::JacobianType JacobianType
Superclass::OffsetType OffsetType
Superclass::InputPointType InputPointType
Superclass::TranslationType TranslationType
Superclass::ParametersType ParametersType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::CenterType CenterType
Superclass::InputPointType InputPointType
Superclass::OutputCovariantVectorType OutputCovariantVectorType
SmartPointer< const Self > ConstPointer