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: 2002/08/29 20:25:16 $
00007   Version:   $Revision: 1.15 $
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 class ITK_EXPORT PNGImageIO : public ImageIOBase
00026 {
00027 public:
00029   typedef PNGImageIO            Self;
00030   typedef ImageIOBase  Superclass;
00031   typedef SmartPointer<Self>  Pointer;
00032   
00034   itkNewMacro(Self);
00035 
00037   itkTypeMacro(PNGImageIO, ImageIOBase);
00038 
00040   itkSetMacro(UseCompression, bool);
00041 
00044   itkSetMacro(CompressionLevel, int);
00045   itkGetMacro(CompressionLevel, int);
00046 
00047   /*-------- This part of the interface deals with reading data. ------ */
00048 
00051   virtual bool CanReadFile(const char*);
00052   
00054   virtual void ReadImageInformation();
00055   
00057   virtual const std::type_info& GetPixelType() const;
00058 
00060   virtual void Read(void* buffer);
00061 
00063   virtual void ReadVolume(void* buffer);
00064 
00068   virtual unsigned int GetComponentSize() const;
00069 
00070   /*-------- This part of the interfaces deals with writing data. ----- */
00071 
00074   virtual bool CanWriteFile(const char*);
00075 
00078   virtual void WriteImageInformation();
00079 
00082   virtual void Write(const void* buffer);
00083 
00084 protected:
00085   PNGImageIO();
00086   ~PNGImageIO();
00087   void PrintSelf(std::ostream& os, Indent indent) const;
00088 
00089   void WriteSlice(std::string& fileName, const void* buffer,
00090                   unsigned long offset);
00091 
00094   bool m_UseCompression;
00097   int m_CompressionLevel;
00098 
00099 private:
00100   PNGImageIO(const Self&); //purposely not implemented
00101   void operator=(const Self&); //purposely not implemented
00102 
00103 
00104 };
00105 
00106 } // end namespace itk
00107 
00108 #endif // __itkPNGImageIO_h
00109 

Generated at Wed Mar 12 01:13:09 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000