Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkTransformFileWriter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkTransformFileWriter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007-08-10 15:43:28 $
00007   Version:   $Revision: 1.8 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/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 #ifndef __itkTransformFileWriter_h
00018 #define __itkTransformFileWriter_h
00019 
00020 // First make sure that the configuration is available.
00021 // This line can be removed once the factory based version
00022 // gets integrated into the main directories.
00023 #include "itkConfigure.h"
00024 
00025 #ifdef ITK_USE_TRANSFORM_IO_FACTORIES
00026 #include "itkTransformFileWriterWithFactory.h"
00027 #else
00028 
00029 
00030 #include "itkLightProcessObject.h"
00031 #include "metaTransform.h"
00032 #include "itkTransformBase.h"
00033 
00034 namespace itk
00035 {
00036 
00037 class TransformFileWriter : public LightProcessObject
00038 {
00039 public:
00040 
00042   typedef TransformFileWriter    Self;
00043   typedef SmartPointer<Self>     Pointer;
00044   typedef TransformBase          TransformType;
00045   typedef TransformType::Pointer TransformPointer;
00046 
00048   itkNewMacro(Self);
00049 
00051   typedef Object Superclass;
00052   itkTypeMacro(TransformFileWriter, LightProcessObject);
00054 
00056   itkSetStringMacro(FileName);
00057 
00059   itkGetStringMacro(FileName);
00060 
00062   void SetAppendOff( );
00063   void SetAppendOn( );
00064   void SetAppendMode(bool mode);
00065   bool GetAppendMode( );
00067 
00069   void SetInput(const TransformType* transform);
00070   const TransformType * GetInput() {return *(m_TransformList.begin());}
00072 
00074   void AddTransform(const TransformType* transform);
00075 
00077   itkSetMacro(Precision,unsigned int);
00078   itkGetMacro(Precision,unsigned int);
00080 
00082   void Update();
00083 
00084 protected:
00085   TransformFileWriter(const Self&); //purposely not implemented
00086   void operator=(const Self&); //purposely not implemented
00087    
00088   std::string m_FileName;
00089 
00090   TransformFileWriter();
00091   virtual ~TransformFileWriter();
00092 
00093 private:
00094 
00095   std::list<const TransformType*>  m_TransformList;
00096   unsigned int                     m_Precision;
00097   bool                             m_AppendMode;
00098 };
00099 
00100 } // namespace itk
00101 
00102 #endif
00103 
00104 #endif // __itkTransformFileWriter_h
00105 

Generated at Mon Apr 14 14:38:50 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000