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
void PrintTrailer(std::ostream &itkNotUsed(os), itk::Indent itkNotUsed(indent)) const
void PrintHeader(std::ostream &os, itk::Indent indent) const
void Print(std::ostream &os, itk::Indent indent) const
Method for printing the member variables of this class to an ostream.
A class representing a 3D rigid transformation followed by a perspective projection.
std::ostream & operator<<(std::ostream &os, const igstk::AffineTransform &o)
const PerspectiveTransform & operator=(const PerspectiveTransform &inputTransform)
Assign the values of one transform to another.
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const
Print the object information in a stream.
void ExportIntrinsicParameters(vtkPerspectiveTransform &outMatrix) const
Export the intrinsic camera parameters.
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.
TimeStamp::TimePeriodType TimePeriodType
void ExportExtrinsicParameters(vtkMatrix4x4 &matrix) const
Export the extrinsic camera parameters.
::itk::Matrix< double, 3, 4 > ExtrinsicMatrixType
Extrinsic perspective camera parameters [R,t].
void ExportTransform(vtkPerspectiveTransform &outMatrix) const
Export the content of the transformation into a vtkPerspective transform which represents the rigid t...
void SetTransform(const ExtrinsicMatrixType &extrinsic, const IntrinsicMatrixType &intrinsic, ErrorType errorValue, TimePeriodType millisecondsToExpiration)
Set perspective transformation.
PerspectiveTransform()
Constructor and destructor.
::itk::Matrix< double, 3, 3 > IntrinsicMatrixType
Intrinsic perspective camera parameters, upper triangular matrix.