00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __itkVTKImageIO_h
00021 #define __itkVTKImageIO_h
00022
00023 #include <fstream>
00024 #include "itkImageIOBase.h"
00025
00026
00027 namespace itk
00028 {
00029
00035 class ITK_EXPORT VTKImageIO : public ImageIOBase
00036 {
00037 public:
00039 typedef VTKImageIO Self;
00040 typedef ImageIOBase Superclass;
00041 typedef SmartPointer<Self> Pointer;
00042
00044 itkNewMacro(Self);
00045
00047 itkTypeMacro(VTKImageIO, Superclass);
00048
00049
00050
00053 virtual bool CanReadFile(const char*);
00054
00056 virtual void ReadImageInformation();
00057
00059 virtual void Read(void* buffer);
00060
00061
00062
00065 virtual bool CanWriteFile(const char*);
00066
00069 virtual void WriteImageInformation() {};
00070
00073 virtual void Write(const void* buffer);
00074
00075 protected:
00076 VTKImageIO();
00077 ~VTKImageIO();
00078 void PrintSelf(std::ostream& os, Indent indent) const;
00079
00080 bool OpenVTKFileForReading(std::ifstream& os, const char* filename);
00081 bool OpenVTKFileForWriting(std::ofstream& os, const char* filename);
00082 void InternalReadImageInformation(std::ifstream& file);
00083
00084 private:
00085 VTKImageIO(const Self&);
00086 void operator=(const Self&);
00087 };
00088
00089 }
00090
00091 #endif // __itkVTKImageIO_h