IGSTK
igstkPerspectiveTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Image Guided Surgery Software Toolkit
4  Module: $RCSfile: igstkPerspectiveTransform.h,v $
5  Language: C++
6  Date: $Date: 2009-06-15 19:56:58 $
7  Version: $Revision: 1.2 $
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 __igstkPerspectiveTransform_h
19 #define __igstkPerspectiveTransform_h
20 
21 #include "igstkTransformBase.h"
22 
23 #include "vtkMatrix4x4.h"
24 #include "vtkPerspectiveTransform.h"
25 #include "itkMatrix.h"
26 
27 #include "igstkMacros.h"
28 
29 namespace igstk
30 {
31 
47 {
48 public:
50  typedef ::itk::Matrix<double, 3, 4> ExtrinsicMatrixType;
52  typedef ::itk::Matrix<double, 3, 3> IntrinsicMatrixType;
53 
54 public:
55 
59  virtual ~PerspectiveTransform();
60 
63  const PerspectiveTransform & inputTransform );
64 
65 
70  void SetTransform( const ExtrinsicMatrixType &extrinsic,
71  const IntrinsicMatrixType &intrinsic,
72  ErrorType errorValue,
73  TimePeriodType millisecondsToExpiration );
74 
75 
82  void ExportTransform( vtkPerspectiveTransform &outMatrix ) const;
83 
84 
89  void ExportExtrinsicParameters( vtkMatrix4x4 & matrix ) const;
90 
91 
95  void ExportIntrinsicParameters( vtkPerspectiveTransform &outMatrix ) const;
96 
97 
99  void Print( std::ostream& os, itk::Indent indent ) const;
100 
101 
102 protected:
103 
104  void PrintHeader( std::ostream& os, itk::Indent indent ) const;
105 
106  void PrintTrailer( std::ostream& itkNotUsed(os),
107  itk::Indent itkNotUsed(indent) ) const;
108 
110  virtual void PrintSelf( std::ostream& os, itk::Indent indent ) const;
111 
112 private:
113  ExtrinsicMatrixType m_ExtrinsicTransform;
114  IntrinsicMatrixType m_IntrinsicTransform;
115 };
116 
117 std::ostream& operator<<( std::ostream& os,
118  const igstk::PerspectiveTransform& o );
119 }
120 
121 #endif