00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkPNGReader.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00031 #ifndef __vtkPNGReader_h 00032 #define __vtkPNGReader_h 00033 00034 #include "vtkImageReader2.h" 00035 00036 class VTK_IO_EXPORT vtkPNGReader : public vtkImageReader2 00037 { 00038 public: 00039 static vtkPNGReader *New(); 00040 vtkTypeRevisionMacro(vtkPNGReader,vtkImageReader2); 00041 virtual void PrintSelf(ostream& os, vtkIndent indent); 00042 00043 protected: 00044 vtkPNGReader() {}; 00045 ~vtkPNGReader() {}; 00046 00048 virtual int CanReadFile(const char* fname); 00049 // Description: 00050 // Get the file extensions for this format. 00051 // Returns a string with a space separated list of extensions in 00052 // the format .extension 00053 virtual const char* GetFileExtensions() 00054 { 00055 return ".png"; 00056 } 00058 00060 00062 virtual const char* GetDescriptiveName() 00063 { 00064 return "PNG"; 00065 } 00067 00068 virtual void ExecuteInformation(); 00069 virtual void ExecuteData(vtkDataObject *out); 00070 private: 00071 vtkPNGReader(const vtkPNGReader&); // Not implemented. 00072 void operator=(const vtkPNGReader&); // Not implemented. 00073 }; 00074 #endif 00075 00076