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/01/08 07:00:22 $
00007   Version:   $Revision: 1.16 $
00008 
00009   Copyright (c) 2002 Insight 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 #include "itkImageIOBase.h"
00021 
00022 namespace itk
00023 {
00024 
00025 /* \brief ImageIO object for reading and writing PNG images
00026  *
00027  * \ingroup IOFilters
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   /*-------- This part of the interface deals with reading data. ------ */
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   /*-------- This part of the interfaces deals with writing data. ----- */
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&); //purposely not implemented
00106   void operator=(const Self&); //purposely not implemented
00107 
00108 
00109 };
00110 
00111 } // end namespace itk
00112 
00113 #endif // __itkPNGImageIO_h
00114 

Generated at Fri May 21 01:15:12 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000