Orfeo Toolbox  3.16
itkEuler2DTransform.txx
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkEuler2DTransform.txx,v $
5  Language: C++
6  Date: $Date: 2009-04-09 09:23:20 $
7  Version: $Revision: 1.20 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __itkEuler2DTransform_txx
18 #define __itkEuler2DTransform_txx
19 
20 #include "itkEuler2DTransform.h"
21 
22 
23 namespace itk
24 {
25 
26 // Constructor with default arguments
27 template <class TScalarType>
30  Superclass( SpaceDimension, ParametersDimension )
31 {
32 }
33 
34 // Constructor with arguments
35 template<class TScalarType>
37 Euler2DTransform( unsigned int spaceDimension,
38  unsigned int parametersDimension):
39  Superclass(spaceDimension,parametersDimension)
40 {
41 }
42 
43 // Create and return an inverse transformation
44 template<class TScalarType>
45 void
47 CloneInverseTo( Pointer & result ) const
48 {
49  result = New();
50  this->GetInverse(result.GetPointer());
51 }
52 
53 // return an inverse transformation
54 template<class TScalarType>
55 bool
57 GetInverse( Self* inverse) const
58 {
59  if(!inverse)
60  {
61  return false;
62  }
63 
64  inverse->SetCenter( this->GetCenter() ); // inverse have the same center
65  inverse->SetAngle( -this->GetAngle() );
66  inverse->SetTranslation( -( this->GetInverseMatrix() * this->GetTranslation() ) );
67 
68  return true;
69 }
70 
71 // Return an inverse of this transform
72 template<class TScalarType>
76 {
77  Pointer inv = New();
78  return GetInverse(inv) ? inv.GetPointer() : NULL;
79 }
80 
81 // Create and return an inverse transformation
82 template<class TScalarType>
83 void
85 CloneTo( Pointer & result ) const
86 {
87  result = New();
88  result->SetCenter( this->GetCenter() );
89  result->SetAngle( this->GetAngle() );
90  result->SetTranslation( this->GetTranslation() );
91 }
92 
93 
94 // Print self
95 template<class TScalarType>
96 void
98 PrintSelf(std::ostream &os, Indent indent) const
99 {
100  this->Superclass::PrintSelf(os,indent);
101 }
102 
103 } // namespace
104 
105 #endif

Generated at Sat Feb 2 2013 23:36:04 for Orfeo Toolbox with doxygen 1.8.1.1