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

itkMetaImageIO.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkMetaImageIO.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/08/19 17:57:34 $
00007   Version:   $Revision: 1.17 $
00008 
00009   Copyright (c) 2002 Insight 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 __itkMetaImageIO_h
00018 #define __itkMetaImageIO_h
00019 
00020 #include <fstream>
00021 #include "itkImageIOBase.h"
00022 #include "metaObject.h"
00023 #include "metaImage.h"
00024 
00025 namespace itk
00026 {
00027 
00029 class ITK_EXPORT MetaImageIO : public ImageIOBase
00030 {
00031 public:
00033   typedef MetaImageIO            Self;
00034   typedef ImageIOBase  Superclass;
00035   typedef SmartPointer<Self>  Pointer;
00036   
00038   itkNewMacro(Self);
00039 
00041   itkTypeMacro(MetaImageIO, Superclass);
00042 
00043   /*-------- This part of the interfaces deals with reading data. ----- */
00044 
00047   virtual bool CanReadFile(const char*) ;
00048 
00050   virtual void ReadImageInformation();
00051   
00053   virtual void Read(void* buffer);
00054 
00055   MetaImage * GetMetaImagePointer(void);
00056   
00057   /*-------- This part of the interfaces deals with writing data. ----- */
00058 
00061   virtual bool CanWriteFile(const char*);
00062 
00064   virtual void WriteImageInformation();
00065   
00068   virtual void Write(const void* buffer);
00069 
00073   virtual void SetDataFileName( const char * filename );
00074 
00075 protected:
00076   MetaImageIO();
00077   ~MetaImageIO();
00078   void PrintSelf(std::ostream& os, Indent indent) const;
00079   
00080 private:
00081   
00082   MetaImage m_MetaImage;
00083 
00084   MetaImageIO(const Self&); //purposely not implemented
00085   void operator=(const Self&); //purposely not implemented
00086   
00087   std::ifstream   m_Ifstream;
00088 
00089   std::ofstream   m_Ofstream;
00090   
00091 };
00092 
00093 } // end namespace itk
00094 
00095 #endif // __itkMetaImageIO_h

Generated at Wed Mar 12 01:13:06 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000