IGSTK
/build/buildd/igstk-4.4.0/Source/igstkAffineTransform.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Image Guided Surgery Software Toolkit
00004   Module:    $RCSfile: igstkAffineTransform.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-06-17 14:31:53 $
00007   Version:   $Revision: 1.4 $
00008 
00009   Copyright (c) ISC  Insight Software Consortium.  All rights reserved.
00010   See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 
00018 #ifndef __igstkAffineTransform_h
00019 #define __igstkAffineTransform_h
00020 
00021 #include "igstkTransformBase.h"
00022 #include <itkAffineTransform.h>
00023 #include "vtkMatrix4x4.h"
00024 
00025 #include "igstkMacros.h"
00026 
00027 namespace igstk 
00028 {
00029  
00043 class AffineTransform : public TransformBase
00044 {
00045 
00046 public:
00047 
00048   typedef ::itk::AffineTransform<double, 3>::MatrixType          MatrixType;
00049   typedef ::itk::AffineTransform<double, 3>::OutputVectorType    OffsetType;
00050   
00051 public:
00052 
00055   AffineTransform();
00056   AffineTransform( const AffineTransform & t );
00057   virtual ~AffineTransform();
00058 
00059 
00061   static AffineTransform TransformCompose( AffineTransform &leftTransform, 
00062                                            AffineTransform &rightTransform );
00063 
00064 
00066   const AffineTransform & operator=( const AffineTransform & inputTransform );
00067 
00068 
00073   void SetMatrixAndOffset( const  MatrixType &matrix,
00074                            const OffsetType &offset, 
00075                            ErrorType errorValue,
00076                            TimeStamp::TimePeriodType millisecondsToExpiration );
00077 
00078  
00084   void ExportTransform( vtkMatrix4x4 & matrix ) const;
00085 
00086 
00088   void Print( std::ostream& os, itk::Indent indent ) const;
00089 
00090 
00091 protected:
00092 
00093   void PrintHeader( std::ostream& os, itk::Indent indent ) const;
00094 
00095   void PrintTrailer( std::ostream& itkNotUsed(os), 
00096                      itk::Indent itkNotUsed(indent) ) const;
00097 
00099   virtual void PrintSelf( std::ostream& os, itk::Indent indent ) const; 
00100 
00101 private:
00102 
00103   ::itk::AffineTransform<double, 3>::Pointer m_Transform;
00104 
00105 };
00106 
00107 std::ostream& operator<<( std::ostream& os, const igstk::AffineTransform& o );
00108 }
00109 
00110 #endif