go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkAdvancedRigid2DTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright UMC Utrecht and contributors
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 /*=========================================================================
19 
20  Program: Insight Segmentation & Registration Toolkit
21  Module: $RCSfile: itkAdvancedRigid2DTransform.h,v $
22  Language: C++
23  Date: $Date: 2009-01-14 18:39:05 $
24  Version: $Revision: 1.22 $
25 
26  Copyright (c) Insight Software Consortium. All rights reserved.
27  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
28 
29  This software is distributed WITHOUT ANY WARRANTY; without even
30  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
31  PURPOSE. See the above copyright notices for more information.
32 
33 =========================================================================*/
34 #ifndef __itkAdvancedRigid2DTransform_h
35 #define __itkAdvancedRigid2DTransform_h
36 
37 #include <iostream>
39 #include "itkExceptionObject.h"
40 
41 namespace itk
42 {
43 
74 template< class TScalarType = double >
75 // Data type for scalars (float or double)
77  public AdvancedMatrixOffsetTransformBase< TScalarType, 2, 2 > // Dimensions of input and output spaces
78 {
79 public:
80 
85  typedef SmartPointer< const Self > ConstPointer;
86 
89 
91  itkNewMacro( Self );
92 
94  itkStaticConstMacro( InputSpaceDimension, unsigned int, 2 );
95  itkStaticConstMacro( OutputSpaceDimension, unsigned int, 2 );
96  itkStaticConstMacro( ParametersDimension, unsigned int, 3 );
97 
100 
104 
107 
110 
113 
117 
121 
125 
129 
130  typedef typename Superclass
133  typedef typename Superclass
136  typedef typename Superclass
139 
152  virtual void SetMatrix( const MatrixType & matrix );
153 
159  virtual void SetRotationMatrix( const MatrixType & matrix )
160  { this->SetMatrix( matrix ); }
162  { return this->GetMatrix(); }
163 
171  void Translate( const OffsetType & offset, bool pre = false );
172 
181  inline InputPointType BackTransform( const OutputPointType & point ) const;
182 
183  inline InputVectorType BackTransform( const OutputVectorType & vector ) const;
184 
185  inline InputVnlVectorType BackTransform( const OutputVnlVectorType & vector ) const;
186 
188  const OutputCovariantVectorType & vector ) const;
189 
191  void SetAngle( TScalarType angle );
192 
193  itkGetConstReferenceMacro( Angle, TScalarType );
194 
197 
201  void SetRotation( TScalarType angle )
202  { this->SetAngle( angle ); }
203  virtual const TScalarType & GetRotation() const
204  { return m_Angle; }
205 
214  void SetParameters( const ParametersType & parameters );
215 
224  const ParametersType & GetParameters( void ) const;
225 
230  virtual void GetJacobian(
231  const InputPointType &,
232  JacobianType &,
233  NonZeroJacobianIndicesType & ) const;
234 
239  void CloneInverseTo( Pointer & newinverse ) const;
240 
245  void CloneTo( Pointer & clone ) const;
246 
248  virtual void SetIdentity( void );
249 
250 protected:
251 
253  AdvancedRigid2DTransform( unsigned int parametersDimension );
254  AdvancedRigid2DTransform( unsigned int outputSpaceDimension, unsigned int parametersDimension );
255 
257 
261  void PrintSelf( std::ostream & os, Indent indent ) const;
262 
267  virtual void ComputeMatrix( void );
268 
273  virtual void ComputeMatrixParameters( void );
274 
276  void SetVarAngle( TScalarType angle )
277  { m_Angle = angle; }
278 
281 
282 private:
283 
284  AdvancedRigid2DTransform( const Self & ); // purposely not implemented
285  void operator=( const Self & ); // purposely not implemented
286 
288 
289 };
290 
291 // Back transform a point
292 template< class TScalarType >
293 inline
296 {
297  itkWarningMacro(
298  << "BackTransform(): This method is slated to be removed from ITK. Instead, please use GetInverse() to generate an inverse transform and then perform the transform using that inverted transform."
299  );
300  return this->GetInverseMatrix() * ( point - this->GetOffset() );
301 }
302 
303 
304 // Back transform a vector
305 template< class TScalarType >
306 inline
309 ::BackTransform( const OutputVectorType & vect ) const
310 {
311  itkWarningMacro(
312  << "BackTransform(): This method is slated to be removed from ITK. Instead, please use GetInverse() to generate an inverse transform and then perform the transform using that inverted transform."
313  );
314  return this->GetInverseMatrix() * vect;
315 }
316 
317 
318 // Back transform a vnl_vector
319 template< class TScalarType >
320 inline
324 {
325  itkWarningMacro(
326  << "BackTransform(): This method is slated to be removed from ITK. Instead, please use GetInverse() to generate an inverse transform and then perform the transform using that inverted transform."
327  );
328  return this->GetInverseMatrix() * vect;
329 }
330 
331 
332 // Back Transform a CovariantVector
333 template< class TScalarType >
334 inline
338 {
339  itkWarningMacro(
340  << "BackTransform(): This method is slated to be removed from ITK. Instead, please use GetInverse() to generate an inverse transform and then perform the transform using that inverted transform."
341  );
342  return this->GetMatrix() * vect;
343 }
344 
345 
346 } // namespace itk
347 
348 #ifndef ITK_MANUAL_INSTANTIATION
349 #include "itkAdvancedRigid2DTransform.hxx"
350 #endif
351 
352 #endif /* __itkAdvancedRigid2DTransform_h */
itk::AdvancedRigid2DTransform::SetRotationMatrix
virtual void SetRotationMatrix(const MatrixType &matrix)
Definition: itkAdvancedRigid2DTransform.h:159
itk::AdvancedRigid2DTransform::GetJacobian
virtual void GetJacobian(const InputPointType &, JacobianType &, NonZeroJacobianIndicesType &) const
itk::AdvancedTransform< float, NInputDimensions, NOutputDimensions >::OutputPointType
Superclass::OutputPointType OutputPointType
Definition: itkAdvancedTransform.h:125
itk::AdvancedTransform< float, NInputDimensions, NOutputDimensions >::SpatialJacobianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
Definition: itkAdvancedTransform.h:143
itk::AdvancedRigid2DTransform::GetParameters
const ParametersType & GetParameters(void) const
itk::AdvancedRigid2DTransform::ParametersType
Superclass::ParametersType ParametersType
Definition: itkAdvancedRigid2DTransform.h:102
itk::AdvancedMatrixOffsetTransformBase< float, 2, 2 >::ParametersType
Superclass::ParametersType ParametersType
Definition: itkAdvancedMatrixOffsetTransformBase.h:123
itk::AdvancedRigid2DTransform::Superclass
AdvancedMatrixOffsetTransformBase< TScalarType, 2, 2 > Superclass
Definition: itkAdvancedRigid2DTransform.h:83
itk::AdvancedTransform< float, NInputDimensions, NOutputDimensions >::InputCovariantVectorType
Superclass ::InputCovariantVectorType InputCovariantVectorType
Definition: itkAdvancedTransform.h:119
itk::AdvancedTransform< float, NInputDimensions, NOutputDimensions >::InputPointType
Superclass::InputPointType InputPointType
Definition: itkAdvancedTransform.h:124
SmartPointer< Self >
itk::AdvancedRigid2DTransform::ScalarType
Superclass::ScalarType ScalarType
Definition: itkAdvancedRigid2DTransform.h:99
itk::AdvancedRigid2DTransform::OutputVectorType
Superclass::OutputVectorType OutputVectorType
Definition: itkAdvancedRigid2DTransform.h:116
itk::AdvancedTransform< float, NInputDimensions, NOutputDimensions >::InputVnlVectorType
Superclass::InputVnlVectorType InputVnlVectorType
Definition: itkAdvancedTransform.h:122
itk::AdvancedRigid2DTransform
AdvancedRigid2DTransform of a vector space (e.g. space coordinates)
Definition: itkAdvancedRigid2DTransform.h:78
itk::AdvancedRigid2DTransform::BackTransform
InputVnlVectorType BackTransform(const OutputVnlVectorType &vector) const
Definition: itkAdvancedRigid2DTransform.h:323
itk::AdvancedRigid2DTransform::SetIdentity
virtual void SetIdentity(void)
itk::AdvancedMatrixOffsetTransformBase< float, 2, 2 >::OutputPointType
Superclass::OutputPointType OutputPointType
Definition: itkAdvancedMatrixOffsetTransformBase.h:137
itk::AdvancedRigid2DTransform::NonZeroJacobianIndicesType
Superclass ::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Definition: itkAdvancedRigid2DTransform.h:131
itk::AdvancedMatrixOffsetTransformBase::MatrixType
Matrix< TScalarType, itkGetStaticConstMacro(OutputSpaceDimension), itkGetStaticConstMacro(InputSpaceDimension) > MatrixType
Definition: itkAdvancedMatrixOffsetTransformBase.h:153
itk::AdvancedRigid2DTransform::AdvancedRigid2DTransform
AdvancedRigid2DTransform()
itk::AdvancedRigid2DTransform::m_Angle
TScalarType m_Angle
Definition: itkAdvancedRigid2DTransform.h:287
itk::AdvancedRigid2DTransform::SetAngleInDegrees
void SetAngleInDegrees(TScalarType angle)
itk::AdvancedMatrixOffsetTransformBase
Definition: itkAdvancedMatrixOffsetTransformBase.h:99
itk::AdvancedRigid2DTransform::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAdvancedRigid2DTransform.h:85
itk::AdvancedRigid2DTransform::BackTransform
InputPointType BackTransform(const OutputPointType &point) const
Definition: itkAdvancedRigid2DTransform.h:295
itk::AdvancedMatrixOffsetTransformBase< double, 2, 2 >::GetMatrix
const MatrixType & GetMatrix(void) const
Definition: itkAdvancedMatrixOffsetTransformBase.h:199
itk::AdvancedTransform< float, NInputDimensions, NOutputDimensions >::ScalarType
Superclass::ScalarType ScalarType
Definition: itkAdvancedTransform.h:109
itk::AdvancedRigid2DTransform::InputPointType
Superclass::InputPointType InputPointType
Standard coordinate point type for this class.
Definition: itkAdvancedRigid2DTransform.h:127
itk::AdvancedRigid2DTransform::AdvancedRigid2DTransform
AdvancedRigid2DTransform(const Self &)
itk::AdvancedRigid2DTransform::CloneTo
void CloneTo(Pointer &clone) const
itk::AdvancedMatrixOffsetTransformBase::OffsetType
OutputVectorType OffsetType
Definition: itkAdvancedMatrixOffsetTransformBase.h:162
itk::AdvancedRigid2DTransform::Self
AdvancedRigid2DTransform Self
Definition: itkAdvancedRigid2DTransform.h:82
itk::AdvancedRigid2DTransform::SetAngle
void SetAngle(TScalarType angle)
itk::AdvancedRigid2DTransform::GetRotation
virtual const TScalarType & GetRotation() const
Definition: itkAdvancedRigid2DTransform.h:203
itk::AdvancedRigid2DTransform::InputVnlVectorType
Superclass::InputVnlVectorType InputVnlVectorType
Standard vnl_vector type for this class.
Definition: itkAdvancedRigid2DTransform.h:123
itk::AdvancedRigid2DTransform::operator=
void operator=(const Self &)
itk::AdvancedRigid2DTransform::~AdvancedRigid2DTransform
~AdvancedRigid2DTransform()
itk::AdvancedMatrixOffsetTransformBase< float, 2, 2 >::OutputVnlVectorType
Superclass::OutputVnlVectorType OutputVnlVectorType
Definition: itkAdvancedMatrixOffsetTransformBase.h:135
itk::AdvancedRigid2DTransform::InputVectorType
Superclass::InputVectorType InputVectorType
Standard vector type for this class.
Definition: itkAdvancedRigid2DTransform.h:115
itk::AdvancedRigid2DTransform::itkStaticConstMacro
itkStaticConstMacro(OutputSpaceDimension, unsigned int, 2)
itk::AdvancedRigid2DTransform::SetVarAngle
void SetVarAngle(TScalarType angle)
Definition: itkAdvancedRigid2DTransform.h:276
itk::AdvancedRigid2DTransform::AdvancedRigid2DTransform
AdvancedRigid2DTransform(unsigned int outputSpaceDimension, unsigned int parametersDimension)
itk::AdvancedRigid2DTransform::SetRotation
void SetRotation(TScalarType angle)
Definition: itkAdvancedRigid2DTransform.h:201
itk::AdvancedMatrixOffsetTransformBase::NonZeroJacobianIndicesType
Superclass ::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Definition: itkAdvancedMatrixOffsetTransformBase.h:141
itk::AdvancedMatrixOffsetTransformBase< float, 2, 2 >::OutputCovariantVectorType
Superclass ::OutputCovariantVectorType OutputCovariantVectorType
Definition: itkAdvancedMatrixOffsetTransformBase.h:133
itk::AdvancedRigid2DTransform::SpatialJacobianType
Superclass::SpatialJacobianType SpatialJacobianType
Definition: itkAdvancedRigid2DTransform.h:132
itk::AdvancedRigid2DTransform::itkStaticConstMacro
itkStaticConstMacro(ParametersDimension, unsigned int, 3)
itk::AdvancedRigid2DTransform::OutputPointType
Superclass::OutputPointType OutputPointType
Definition: itkAdvancedRigid2DTransform.h:128
itk::AdvancedRigid2DTransform::MatrixType
Superclass::MatrixType MatrixType
Standard matrix type for this class.
Definition: itkAdvancedRigid2DTransform.h:109
itk::AdvancedTransform< float, NInputDimensions, NOutputDimensions >::JacobianType
Superclass::JacobianType JacobianType
Definition: itkAdvancedTransform.h:115
itk::AdvancedMatrixOffsetTransformBase< float, 2, 2 >::InputPointType
Superclass::InputPointType InputPointType
Definition: itkAdvancedMatrixOffsetTransformBase.h:136
itk::AdvancedRigid2DTransform::SpatialHessianType
Superclass::SpatialHessianType SpatialHessianType
Definition: itkAdvancedRigid2DTransform.h:135
itk::AdvancedTransform< float, NInputDimensions, NOutputDimensions >::InternalMatrixType
SpatialJacobianType::InternalMatrixType InternalMatrixType
Definition: itkAdvancedTransform.h:151
itk::AdvancedMatrixOffsetTransformBase::JacobianOfSpatialHessianType
Superclass ::JacobianOfSpatialHessianType JacobianOfSpatialHessianType
Definition: itkAdvancedMatrixOffsetTransformBase.h:147
itk::AdvancedRigid2DTransform::SetMatrix
virtual void SetMatrix(const MatrixType &matrix)
itk::AdvancedRigid2DTransform::itkStaticConstMacro
itkStaticConstMacro(InputSpaceDimension, unsigned int, 2)
itk::AdvancedTransform< float, NInputDimensions, NOutputDimensions >::SpatialHessianType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
Definition: itkAdvancedTransform.h:149
itk::AdvancedRigid2DTransform::ComputeMatrix
virtual void ComputeMatrix(void)
itk::AdvancedTransform< float, NInputDimensions, NOutputDimensions >::InputVectorType
Superclass::InputVectorType InputVectorType
Definition: itkAdvancedTransform.h:116
itk::AdvancedMatrixOffsetTransformBase< float, 2, 2 >::InputVnlVectorType
Superclass::InputVnlVectorType InputVnlVectorType
Definition: itkAdvancedMatrixOffsetTransformBase.h:134
itk::AdvancedMatrixOffsetTransformBase::JacobianOfSpatialJacobianType
Superclass ::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
Definition: itkAdvancedMatrixOffsetTransformBase.h:144
itk::AdvancedRigid2DTransform::PrecomputeJacobianOfSpatialJacobian
virtual void PrecomputeJacobianOfSpatialJacobian(void)
itk::AdvancedRigid2DTransform::JacobianOfSpatialJacobianType
Superclass ::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
Definition: itkAdvancedRigid2DTransform.h:134
itk::AdvancedRigid2DTransform::AdvancedRigid2DTransform
AdvancedRigid2DTransform(unsigned int parametersDimension)
itk::AdvancedRigid2DTransform::BackTransform
InputVectorType BackTransform(const OutputVectorType &vector) const
Definition: itkAdvancedRigid2DTransform.h:309
itk::AdvancedRigid2DTransform::OffsetType
Superclass::OffsetType OffsetType
Standard vector type for this class.
Definition: itkAdvancedRigid2DTransform.h:112
Matrix< float, itkGetStaticConstMacro(OutputSpaceDimension), itkGetStaticConstMacro(InputSpaceDimension) >
itk::AdvancedMatrixOffsetTransformBase< float, 2, 2 >::InputCovariantVectorType
Superclass ::InputCovariantVectorType InputCovariantVectorType
Definition: itkAdvancedMatrixOffsetTransformBase.h:131
itk::AdvancedMatrixOffsetTransformBase< float, 2, 2 >::OutputVectorType
Superclass::OutputVectorType OutputVectorType
Definition: itkAdvancedMatrixOffsetTransformBase.h:129
itk::AdvancedRigid2DTransform::BackTransform
InputCovariantVectorType BackTransform(const OutputCovariantVectorType &vector) const
Definition: itkAdvancedRigid2DTransform.h:337
itk::AdvancedRigid2DTransform::CloneInverseTo
void CloneInverseTo(Pointer &newinverse) const
itk
Definition: itkAdvancedImageToImageMetric.h:40
itk::AdvancedTransform< float, NInputDimensions, NOutputDimensions >::OutputVectorType
Superclass::OutputVectorType OutputVectorType
Definition: itkAdvancedTransform.h:117
itk::AdvancedRigid2DTransform::GetRotationMatrix
const MatrixType & GetRotationMatrix() const
Definition: itkAdvancedRigid2DTransform.h:161
itk::AdvancedRigid2DTransform::InputCovariantVectorType
Superclass::InputCovariantVectorType InputCovariantVectorType
Standard covariant vector type for this class.
Definition: itkAdvancedRigid2DTransform.h:119
itk::AdvancedRigid2DTransform::JacobianOfSpatialHessianType
Superclass ::JacobianOfSpatialHessianType JacobianOfSpatialHessianType
Definition: itkAdvancedRigid2DTransform.h:137
itk::AdvancedMatrixOffsetTransformBase< float, 2, 2 >::JacobianType
Superclass::JacobianType JacobianType
Definition: itkAdvancedMatrixOffsetTransformBase.h:127
itk::AdvancedRigid2DTransform::OutputVnlVectorType
Superclass::OutputVnlVectorType OutputVnlVectorType
Definition: itkAdvancedRigid2DTransform.h:124
itk::AdvancedTransform< float, NInputDimensions, NOutputDimensions >::NumberOfParametersType
Superclass::NumberOfParametersType NumberOfParametersType
Definition: itkAdvancedTransform.h:113
itk::AdvancedRigid2DTransform::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const
itk::AdvancedRigid2DTransform::SetParameters
void SetParameters(const ParametersType &parameters)
itk::AdvancedMatrixOffsetTransformBase< float, 2, 2 >::InputVectorType
Superclass::InputVectorType InputVectorType
Definition: itkAdvancedMatrixOffsetTransformBase.h:128
itk::AdvancedRigid2DTransform::OutputCovariantVectorType
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Definition: itkAdvancedRigid2DTransform.h:120
TScalarType
itk::AdvancedTransform< float, NInputDimensions, NOutputDimensions >::ParametersType
Superclass::ParametersType ParametersType
Definition: itkAdvancedTransform.h:110
itk::AdvancedRigid2DTransform::Pointer
SmartPointer< Self > Pointer
Definition: itkAdvancedRigid2DTransform.h:84
itk::AdvancedRigid2DTransform::Translate
void Translate(const OffsetType &offset, bool pre=false)
itk::AdvancedRigid2DTransform::InternalMatrixType
Superclass::InternalMatrixType InternalMatrixType
Definition: itkAdvancedRigid2DTransform.h:138
itkAdvancedMatrixOffsetTransformBase.h
itk::AdvancedRigid2DTransform::NumberOfParametersType
Superclass::NumberOfParametersType NumberOfParametersType
Definition: itkAdvancedRigid2DTransform.h:103
itk::AdvancedTransform< float, NInputDimensions, NOutputDimensions >::OutputVnlVectorType
Superclass::OutputVnlVectorType OutputVnlVectorType
Definition: itkAdvancedTransform.h:123
itk::AdvancedTransform< float, NInputDimensions, NOutputDimensions >::OutputCovariantVectorType
Superclass ::OutputCovariantVectorType OutputCovariantVectorType
Definition: itkAdvancedTransform.h:121
itk::AdvancedRigid2DTransform::ComputeMatrixParameters
virtual void ComputeMatrixParameters(void)
itk::AdvancedRigid2DTransform::JacobianType
Superclass::JacobianType JacobianType
Definition: itkAdvancedRigid2DTransform.h:106


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.18 elastix logo