Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkPNGImageIO.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkPNGImageIO.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:35 $ 00007 Version: $Revision: 1.20 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 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 /* \brief ImageIO object for reading and writing PNG images 00030 * 00031 * \ingroup IOFilters 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 /*-------- This part of the interface deals with reading data. ------ */ 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 /*-------- This part of the interfaces deals with writing data. ----- */ 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&); //purposely not implemented 00109 void operator=(const Self&); //purposely not implemented 00110 00111 00112 }; 00113 00114 } // end namespace itk 00115 00116 #endif // __itkPNGImageIO_h 00117

Generated at Sat Mar 31 02:27:19 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000