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
void ExportTransform(vtkMatrix4x4 &matrix) const
Export the content of the transformation in the format of a vtkMatrix4x4.
std::ostream & operator<<(std::ostream &os, const igstk::AffineTransform &o)
void PrintTrailer(std::ostream &itkNotUsed(os), itk::Indent itkNotUsed(indent)) const
AffineTransform()
Default constructor, results in identity transform with a time stamp that is never valid (start==end=...
defines standard system-wide macros, constants, and other common parameters in the IGSTK Library...
The abstract base class for all of the IGSTK transform types.
void SetMatrixAndOffset(const MatrixType &matrix, const OffsetType &offset, ErrorType errorValue, TimeStamp::TimePeriodType millisecondsToExpiration)
Set affine transformation.
static AffineTransform TransformCompose(AffineTransform &leftTransform, AffineTransform &rightTransform)
Transform composition method.
const AffineTransform & operator=(const AffineTransform &inputTransform)
Assign the values of one transform to another.
void PrintHeader(std::ostream &os, itk::Indent indent) const
::itk::AffineTransform< double, 3 >::MatrixType MatrixType
void Print(std::ostream &os, itk::Indent indent) const
Method for printing the member variables of this class to an ostream.
::itk::AffineTransform< double, 3 >::OutputVectorType OffsetType
A class representing a 3D affine transform.
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const
Print the object information in a stream.