itkVTKImageIO.h
Go to the documentation of this file.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 #ifdef _MSC_VER
00024 #pragma warning ( disable : 4786 )
00025 #endif
00026
00027 #include <fstream>
00028 #include "itkImageIOBase.h"
00029
00030
00031 namespace itk
00032 {
00033
00041 class ITK_EXPORT VTKImageIO : public ImageIOBase
00042 {
00043 public:
00045 typedef VTKImageIO Self;
00046 typedef ImageIOBase Superclass;
00047 typedef SmartPointer<Self> Pointer;
00048
00050 itkNewMacro(Self);
00051
00053 itkTypeMacro(VTKImageIO, Superclass);
00054
00055
00056
00059 virtual bool CanReadFile(const char*);
00060
00062 virtual void ReadImageInformation();
00063
00065 virtual void Read(void* buffer);
00066
00067
00068
00071 virtual bool CanWriteFile(const char*);
00072
00075 virtual void WriteImageInformation() {};
00076
00079 virtual void Write(const void* buffer);
00080
00081 protected:
00082 VTKImageIO();
00083 ~VTKImageIO();
00084 void PrintSelf(std::ostream& os, Indent indent) const;
00085
00086 bool OpenVTKFileForReading(std::ifstream& os, const char* filename);
00087 bool OpenVTKFileForWriting(std::ofstream& os, const char* filename);
00088 void InternalReadImageInformation(std::ifstream& file);
00089
00090 private:
00091 VTKImageIO(const Self&);
00092 void operator=(const Self&);
00093 };
00094
00095 }
00096
00097 #endif // __itkVTKImageIO_h
00098