00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkMetaImageIO_h
00018 #define __itkMetaImageIO_h
00019
00020 #ifdef _MSC_VER
00021 #pragma warning ( disable : 4786 )
00022 #endif
00023
00024 #include <fstream>
00025 #include "itkImageIOBase.h"
00026 #include "metaObject.h"
00027 #include "metaImage.h"
00028
00029 namespace itk
00030 {
00031
00036 class ITK_EXPORT MetaImageIO : public ImageIOBase
00037 {
00038 public:
00040 typedef MetaImageIO Self;
00041 typedef ImageIOBase Superclass;
00042 typedef SmartPointer<Self> Pointer;
00043
00045 itkNewMacro(Self);
00046
00048 itkTypeMacro(MetaImageIO, Superclass);
00049
00055 virtual bool SupportsDimension(unsigned long )
00056 {return true;}
00057
00058
00059
00062 virtual bool CanReadFile(const char*) ;
00063
00065 virtual void ReadImageInformation();
00066
00068 virtual void Read(void* buffer);
00069
00070 MetaImage * GetMetaImagePointer(void);
00071
00072
00073
00076 virtual bool CanWriteFile(const char*);
00077
00079 virtual void WriteImageInformation();
00080
00083 virtual void Write(const void* buffer);
00084
00088 virtual void SetDataFileName( const char * filename );
00089
00090 protected:
00091 MetaImageIO();
00092 ~MetaImageIO();
00093 void PrintSelf(std::ostream& os, Indent indent) const;
00094
00095 private:
00096
00097 MetaImage m_MetaImage;
00098
00099 MetaImageIO(const Self&);
00100 void operator=(const Self&);
00101
00102 };
00103
00104 }
00105
00106 #endif // __itkMetaImageIO_h