ITK  4.6.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 TScalar = double >
62 // Data type for scalars (float or double)
64  public Rigid2DTransform< TScalar >
65 {
66 public:
72 
74  itkNewMacro(Self);
75 
78 
80  itkStaticConstMacro(SpaceDimension, unsigned int, 2);
81  itkStaticConstMacro(InputSpaceDimension, unsigned int, 2);
82  itkStaticConstMacro(OutputSpaceDimension, unsigned int, 2);
83  itkStaticConstMacro(ParametersDimension, unsigned int, 4);
85 
88  typedef TScalar ScaleType;
89 
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  void SetParameters(const ParametersType & parameters);
141 
151  const ParametersType & GetParameters(void) const;
152 
156  virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const;
157 
159  virtual void SetIdentity(void);
160 
165  void CloneInverseTo(Pointer & newinverse) const;
166 
168  bool GetInverse(Self *inverse) const;
169 
172 
177  void CloneTo(Pointer & clone) const;
178 
192  virtual void SetMatrix(const MatrixType & matrix);
193 
194 protected:
195  Similarity2DTransform(unsigned int outputSpaceDimension, unsigned int parametersDimension);
196  Similarity2DTransform(unsigned int parametersDimension);
198 
200  {
201  }
202  void PrintSelf(std::ostream & os, Indent indent) const;
203 
207  virtual void ComputeMatrix(void);
208 
213  virtual void ComputeMatrixParameters(void);
214 
216  void SetVarScale(ScaleType scale)
217  {
218  m_Scale = scale;
219  }
220 
221 private:
222  Similarity2DTransform(const Self &); // purposely not implemented
223  void operator=(const Self &); // purposely not implemented
224 
226 }; // class Similarity2DTransform
227 } // namespace itk
228 
229 #ifndef ITK_MANUAL_INSTANTIATION
230 #include "itkSimilarity2DTransform.hxx"
231 #endif
232 
233 #endif /* __itkSimilarity2DTransform_h */
static const unsigned int SpaceDimension
Superclass::ParametersType ParametersType
void SetScale(ScaleType scale)
Light weight base class for most itk classes.
bool GetInverse(Self *inverse) const
Similarity2DTransform of a vector space (e.g. space coordinates)
virtual void SetIdentity(void)
static const unsigned int ParametersDimension
Superclass::OffsetValueType OffsetValueType
Superclass::InputVnlVectorType InputVnlVectorType
Superclass::OutputVectorType OutputVectorType
static const unsigned int InputSpaceDimension
Superclass::MatrixType MatrixType
virtual InverseTransformBasePointer GetInverseTransform() const
Superclass::OutputPointType OutputPointType
virtual void ComputeJacobianWithRespectToParameters(const InputPointType &p, JacobianType &jacobian) const
void CloneInverseTo(Pointer &newinverse) const
Superclass::OutputVnlVectorType OutputVnlVectorType
Superclass::InverseTransformBaseType InverseTransformBaseType
Superclass::JacobianType JacobianType
Superclass::ParametersValueType ParametersValueType
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Superclass::OffsetValueType OffsetValueType
Superclass::ScalarType ScalarType
Rigid2DTransform< TScalar > Superclass
Superclass::InputPointType InputPointType
Superclass::JacobianType JacobianType
const ParametersType & GetParameters(void) const
Superclass::InputCovariantVectorType InputCovariantVectorType
void PrintSelf(std::ostream &os, Indent indent) const
Superclass::InputVectorType InputVectorType
Superclass::ScalarType ScalarType
Superclass::ParametersType ParametersType
Superclass::ParametersValueType ParametersValueType
Superclass::InputVnlVectorType InputVnlVectorType
InverseTransformBaseType::Pointer InverseTransformBasePointer
void CloneTo(Pointer &clone) const
Superclass::OutputPointType OutputPointType
Superclass::OutputVectorType OutputVectorType
virtual void ComputeMatrixParameters(void)
Superclass::OutputVnlVectorType OutputVnlVectorType
Rigid2DTransform of a vector space (e.g. space coordinates)
Superclass::OutputCovariantVectorType OutputCovariantVectorType
SmartPointer< const Self > ConstPointer
Superclass::InputCovariantVectorType InputCovariantVectorType
Superclass::InputVectorType InputVectorType
Superclass::InputPointType InputPointType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::OffsetType OffsetType
Superclass::InverseTransformBaseType InverseTransformBaseType
Superclass::OffsetType OffsetType
void operator=(const Self &)
Superclass::MatrixValueType MatrixValueType
InverseTransformBaseType::Pointer InverseTransformBasePointer
virtual void SetMatrix(const MatrixType &matrix)
void SetParameters(const ParametersType &parameters)
virtual void ComputeMatrix(void)
static const unsigned int OutputSpaceDimension
Superclass::MatrixValueType MatrixValueType