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 #include "itkImageIOBase.h"
00021
00022 namespace itk
00023 {
00024
00025
00026
00027
00028
00029
00030 class ITK_EXPORT PNGImageIO : public ImageIOBase
00031 {
00032 public:
00034 typedef PNGImageIO Self;
00035 typedef ImageIOBase Superclass;
00036 typedef SmartPointer<Self> Pointer;
00037
00039 itkNewMacro(Self);
00040
00042 itkTypeMacro(PNGImageIO, ImageIOBase);
00043
00045 itkSetMacro(UseCompression, bool);
00046
00049 itkSetMacro(CompressionLevel, int);
00050 itkGetMacro(CompressionLevel, int);
00051
00052
00053
00056 virtual bool CanReadFile(const char*);
00057
00059 virtual void ReadImageInformation();
00060
00062 virtual const std::type_info& GetPixelType() const;
00063
00065 virtual void Read(void* buffer);
00066
00068 virtual void ReadVolume(void* buffer);
00069
00073 virtual unsigned int GetComponentSize() const;
00074
00075
00076
00079 virtual bool CanWriteFile(const char*);
00080
00083 virtual void WriteImageInformation();
00084
00087 virtual void Write(const void* buffer);
00088
00089 protected:
00090 PNGImageIO();
00091 ~PNGImageIO();
00092 void PrintSelf(std::ostream& os, Indent indent) const;
00093
00094 void WriteSlice(std::string& fileName, const void* buffer,
00095 unsigned long offset);
00096
00099 bool m_UseCompression;
00102 int m_CompressionLevel;
00103
00104 private:
00105 PNGImageIO(const Self&);
00106 void operator=(const Self&);
00107
00108
00109 };
00110
00111 }
00112
00113 #endif // __itkPNGImageIO_h
00114