1 /*========================================================================= 2 3 Program: Visualization Toolkit 4 Module: vtkPNGReader.h 5 6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 7 All rights reserved. 8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 9 10 This software is distributed WITHOUT ANY WARRANTY; without even 11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 PURPOSE. See the above copyright notice for more information. 13 14 =========================================================================*/ 15 // .NAME vtkPNGReader - read PNG files 16 // .SECTION Description 17 // vtkPNGReader is a source object that reads PNG files. 18 // It should be able to read most any PNG file 19 // 20 // .SECTION See Also 21 // vtkPNGWriter 22 23 #ifndef vtkPNGReader_h 24 #define vtkPNGReader_h 25 26 #include "vtkIOImageModule.h" // For export macro 27 #include "vtkImageReader2.h" 28 29 class VTKIOIMAGE_EXPORT vtkPNGReader : public vtkImageReader2 30 { 31 public: 32 static vtkPNGReader *New(); 33 vtkTypeMacro(vtkPNGReader,vtkImageReader2); 34 virtual void PrintSelf(ostream& os, vtkIndent indent); 35 36 // Description: 37 // Is the given file a PNG file? 38 virtual int CanReadFile(const char* fname); 39 40 // Description: 41 // Get the file extensions for this format. 42 // Returns a string with a space separated list of extensions in 43 // the format .extension GetFileExtensions()44 virtual const char* GetFileExtensions() 45 { 46 return ".png"; 47 } 48 49 // Description: 50 // Return a descriptive name for the file format that might be useful in a GUI. GetDescriptiveName()51 virtual const char* GetDescriptiveName() 52 { 53 return "PNG"; 54 } 55 56 protected: vtkPNGReader()57 vtkPNGReader() {} ~vtkPNGReader()58 ~vtkPNGReader() {} 59 60 virtual void ExecuteInformation(); 61 virtual void ExecuteDataWithInformation(vtkDataObject *out, vtkInformation *outInfo); 62 private: 63 vtkPNGReader(const vtkPNGReader&); // Not implemented. 64 void operator=(const vtkPNGReader&); // Not implemented. 65 }; 66 #endif 67 68 69