IGSTK
igstkAffineTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Image Guided Surgery Software Toolkit
4  Module: $RCSfile: igstkAffineTransform.h,v $
5  Language: C++
6  Date: $Date: 2009-06-17 14:31:53 $
7  Version: $Revision: 1.4 $
8 
9  Copyright (c) ISC Insight Software Consortium. All rights reserved.
10  See IGSTKCopyright.txt or http://www.igstk.org/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 
18 #ifndef __igstkAffineTransform_h
19 #define __igstkAffineTransform_h
20 
21 #include "igstkTransformBase.h"
22 #include <itkAffineTransform.h>
23 #include "vtkMatrix4x4.h"
24 
25 #include "igstkMacros.h"
26 
27 namespace igstk
28 {
29 
44 {
45 
46 public:
47 
48  typedef ::itk::AffineTransform<double, 3>::MatrixType MatrixType;
49  typedef ::itk::AffineTransform<double, 3>::OutputVectorType OffsetType;
50 
51 public:
52 
56  AffineTransform( const AffineTransform & t );
57  virtual ~AffineTransform();
58 
59 
61  static AffineTransform TransformCompose( AffineTransform &leftTransform,
62  AffineTransform &rightTransform );
63 
64 
66  const AffineTransform & operator=( const AffineTransform & inputTransform );
67 
68 
73  void SetMatrixAndOffset( const MatrixType &matrix,
74  const OffsetType &offset,
75  ErrorType errorValue,
76  TimeStamp::TimePeriodType millisecondsToExpiration );
77 
78 
84  void ExportTransform( vtkMatrix4x4 & matrix ) const;
85 
86 
88  void Print( std::ostream& os, itk::Indent indent ) const;
89 
90 
91 protected:
92 
93  void PrintHeader( std::ostream& os, itk::Indent indent ) const;
94 
95  void PrintTrailer( std::ostream& itkNotUsed(os),
96  itk::Indent itkNotUsed(indent) ) const;
97 
99  virtual void PrintSelf( std::ostream& os, itk::Indent indent ) const;
100 
101 private:
102 
103  ::itk::AffineTransform<double, 3>::Pointer m_Transform;
104 
105 };
106 
107 std::ostream& operator<<( std::ostream& os, const igstk::AffineTransform& o );
108 }
109 
110 #endif