00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkPNGImageIO_h
00018 #define __itkPNGImageIO_h
00019
00020 #ifdef _MSC_VER
00021 #pragma warning ( disable : 4786 )
00022 #endif
00023
00024 #include "itkImageIOBase.h"
00025
00026 namespace itk
00027 {
00028
00029
00030
00031
00032
00033
00034 class ITK_EXPORT PNGImageIO : public ImageIOBase
00035 {
00036 public:
00038 typedef PNGImageIO Self;
00039 typedef ImageIOBase Superclass;
00040 typedef SmartPointer<Self> Pointer;
00041
00043 itkNewMacro(Self);
00044
00046 itkTypeMacro(PNGImageIO, ImageIOBase);
00047
00050 itkSetMacro(CompressionLevel, int);
00051 itkGetMacro(CompressionLevel, int);
00052
00053
00054
00057 virtual bool CanReadFile(const char*);
00058
00060 virtual void ReadImageInformation();
00061
00063 virtual void Read(void* buffer);
00064
00066 virtual void ReadVolume(void* buffer);
00067
00068
00069
00072 virtual bool CanWriteFile(const char*);
00073
00076 virtual void WriteImageInformation();
00077
00080 virtual void Write(const void* buffer);
00081
00082 protected:
00083 PNGImageIO();
00084 ~PNGImageIO();
00085 void PrintSelf(std::ostream& os, Indent indent) const;
00086
00087 void WriteSlice(std::string& fileName, const void* buffer);
00088
00091 int m_CompressionLevel;
00092
00093 private:
00094 PNGImageIO(const Self&);
00095 void operator=(const Self&);
00096
00097
00098 };
00099
00100 }
00101
00102 #endif // __itkPNGImageIO_h
00103