ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkSimilarity2DTransform.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 itkSimilarity2DTransform_h
19 #define itkSimilarity2DTransform_h
20 
21 #include <iostream>
22 #include "itkRigid2DTransform.h"
23 
24 namespace itk
25 {
61 template<typename TParametersValueType=double>
63  public Rigid2DTransform<TParametersValueType>
64 {
65 public:
71 
73  itkNewMacro(Self);
74 
77 
79  itkStaticConstMacro(SpaceDimension, unsigned int, 2);
80  itkStaticConstMacro(InputSpaceDimension, unsigned int, 2);
81  itkStaticConstMacro(OutputSpaceDimension, unsigned int, 2);
82  itkStaticConstMacro(ParametersDimension, unsigned int, 4);
84 
86  typedef TParametersValueType ScaleType;
87 
93 
96 
100 
104 
108 
112 
116 
120 
124  typedef typename InverseTransformBaseType::Pointer InverseTransformBasePointer;
125 
127  void SetScale(ScaleType scale);
128 
129  itkGetConstReferenceMacro(Scale, ScaleType);
130 
140  virtual void SetParameters(const ParametersType & parameters) ITK_OVERRIDE;
141 
151  virtual const ParametersType & GetParameters() const ITK_OVERRIDE;
152 
156  virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const ITK_OVERRIDE;
157 
159  virtual void SetIdentity() ITK_OVERRIDE;
160 
165  void CloneInverseTo(Pointer & newinverse) const;
166 
168  bool GetInverse(Self *inverse) const;
169 
171  virtual InverseTransformBasePointer GetInverseTransform() const ITK_OVERRIDE;
172 
177  void CloneTo(Pointer & clone) const;
178 
192  virtual void SetMatrix(const MatrixType & matrix) ITK_OVERRIDE;
193 
207  virtual void SetMatrix(const MatrixType & matrix, const TParametersValueType tolerance) ITK_OVERRIDE;
208 
209 protected:
210  Similarity2DTransform(unsigned int outputSpaceDimension, unsigned int parametersDimension);
211  Similarity2DTransform(unsigned int parametersDimension);
213 
215  {
216  }
217  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
218 
222  virtual void ComputeMatrix(void) ITK_OVERRIDE;
223 
228  virtual void ComputeMatrixParameters(void) ITK_OVERRIDE;
229 
231  void SetVarScale(ScaleType scale)
232  {
233  m_Scale = scale;
234  }
235 
236 private:
237  Similarity2DTransform(const Self &) ITK_DELETE_FUNCTION;
238  void operator=(const Self &) ITK_DELETE_FUNCTION;
239 
241 }; // class Similarity2DTransform
242 } // namespace itk
243 
244 #ifndef ITK_MANUAL_INSTANTIATION
245 #include "itkSimilarity2DTransform.hxx"
246 #endif
247 
248 #endif /* itkSimilarity2DTransform_h */
void CloneInverseTo(Pointer &newinverse) const
virtual void ComputeMatrixParameters(void) override
Superclass::MatrixValueType MatrixValueType
Light weight base class for most itk classes.
Similarity2DTransform of a vector space (e.g. space coordinates)
Rigid2DTransform< TParametersValueType > Superclass
InverseTransformBaseType::Pointer InverseTransformBasePointer
Superclass::InputPointType InputPointType
SmartPointer< const Self > ConstPointer
Superclass::InputPointType InputPointType
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Superclass::OutputVnlVectorType OutputVnlVectorType
virtual void PrintSelf(std::ostream &os, Indent indent) const override
Superclass::InputCovariantVectorType InputCovariantVectorType
Superclass::MatrixValueType MatrixValueType
virtual void ComputeMatrix(void) override
Superclass::InputCovariantVectorType InputCovariantVectorType
virtual void ComputeJacobianWithRespectToParameters(const InputPointType &p, JacobianType &jacobian) const override
virtual void SetMatrix(const MatrixType &matrix) override
Superclass::ScalarType ScalarType
Superclass::ParametersType ParametersType
Superclass::FixedParametersValueType FixedParametersValueType
virtual const ParametersType & GetParameters() const override
Superclass::OffsetType OffsetType
Superclass::JacobianType JacobianType
static const unsigned int OutputSpaceDimension
Superclass::FixedParametersValueType FixedParametersValueType
bool GetInverse(Self *inverse) const
Superclass::FixedParametersType FixedParametersType
void CloneTo(Pointer &clone) const
Superclass::ParametersValueType ParametersValueType
Superclass::InputVnlVectorType InputVnlVectorType
static const unsigned int InputSpaceDimension
virtual InverseTransformBasePointer GetInverseTransform() const override
static const unsigned int ParametersDimension
Superclass::OutputVectorType OutputVectorType
InverseTransformBaseType::Pointer InverseTransformBasePointer
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Superclass::FixedParametersType FixedParametersType
void SetScale(ScaleType scale)
Superclass::InverseTransformBaseType InverseTransformBaseType
Superclass::ParametersType ParametersType
Superclass::OutputPointType OutputPointType
Superclass::OffsetValueType OffsetValueType
Superclass::OutputPointType OutputPointType
Superclass::InputVectorType InputVectorType
Rigid2DTransform of a vector space (e.g. space coordinates)
Superclass::OutputVectorType OutputVectorType
virtual void SetParameters(const ParametersType &parameters) override
Superclass::OutputVnlVectorType OutputVnlVectorType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::InputVectorType InputVectorType
Superclass::MatrixType MatrixType
static const unsigned int SpaceDimension
Superclass::ParametersValueType ParametersValueType
Superclass::JacobianType JacobianType
Superclass::OffsetType OffsetType
Superclass::ScalarType ScalarType
Superclass::InverseTransformBaseType InverseTransformBaseType
virtual void SetIdentity() override
Superclass::InputVnlVectorType InputVnlVectorType
Superclass::OffsetValueType OffsetValueType