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
00049 itkSetMacro(UseCompression, bool);
00050
00053 itkSetMacro(CompressionLevel, int);
00054 itkGetMacro(CompressionLevel, int);
00055
00056
00057
00060 virtual bool CanReadFile(const char*);
00061
00063 virtual void ReadImageInformation();
00064
00066 virtual const std::type_info& GetPixelType() const;
00067
00069 virtual void Read(void* buffer);
00070
00072 virtual void ReadVolume(void* buffer);
00073
00077 virtual unsigned int GetComponentSize() const;
00078
00079
00080
00083 virtual bool CanWriteFile(const char*);
00084
00087 virtual void WriteImageInformation();
00088
00091 virtual void Write(const void* buffer);
00092
00093 protected:
00094 PNGImageIO();
00095 ~PNGImageIO();
00096 void PrintSelf(std::ostream& os, Indent indent) const;
00097
00098 void WriteSlice(std::string& fileName, const void* buffer);
00099
00102 bool m_UseCompression;
00105 int m_CompressionLevel;
00106
00107 private:
00108 PNGImageIO(const Self&);
00109 void operator=(const Self&);
00110
00111
00112 };
00113
00114 }
00115
00116 #endif // __itkPNGImageIO_h
00117