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: 2003/01/08 07:00:22 $
00007   Version:   $Revision: 1.18 $
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 
00032 class ITK_EXPORT MetaImageIO : public ImageIOBase
00033 {
00034 public:
00036   typedef MetaImageIO            Self;
00037   typedef ImageIOBase  Superclass;
00038   typedef SmartPointer<Self>  Pointer;
00039   
00041   itkNewMacro(Self);
00042 
00044   itkTypeMacro(MetaImageIO, Superclass);
00045 
00046   /*-------- This part of the interfaces deals with reading data. ----- */
00047 
00050   virtual bool CanReadFile(const char*) ;
00051 
00053   virtual void ReadImageInformation();
00054   
00056   virtual void Read(void* buffer);
00057 
00058   MetaImage * GetMetaImagePointer(void);
00059   
00060   /*-------- This part of the interfaces deals with writing data. ----- */
00061 
00064   virtual bool CanWriteFile(const char*);
00065 
00067   virtual void WriteImageInformation();
00068   
00071   virtual void Write(const void* buffer);
00072 
00076   virtual void SetDataFileName( const char * filename );
00077 
00078 protected:
00079   MetaImageIO();
00080   ~MetaImageIO();
00081   void PrintSelf(std::ostream& os, Indent indent) const;
00082   
00083 private:
00084   
00085   MetaImage m_MetaImage;
00086 
00087   MetaImageIO(const Self&); //purposely not implemented
00088   void operator=(const Self&); //purposely not implemented
00089   
00090   std::ifstream   m_Ifstream;
00091 
00092   std::ofstream   m_Ofstream;
00093   
00094 };
00095 
00096 } // end namespace itk
00097 
00098 #endif // __itkMetaImageIO_h

Generated at Fri May 21 01:15:03 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000