VTK
vtkPNGReader.h
Go to the documentation of this file.
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=========================================================================*/
32#ifndef vtkPNGReader_h
33#define vtkPNGReader_h
34
35#include "vtkIOImageModule.h" // For export macro
36#include "vtkImageReader2.h"
37
38class VTKIOIMAGE_EXPORT vtkPNGReader : public vtkImageReader2
39{
40public:
41 static vtkPNGReader *New();
43 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
44
48 virtual int CanReadFile(const char* fname);
49
55 virtual const char* GetFileExtensions()
56 {
57 return ".png";
58 }
59
63 virtual const char* GetDescriptiveName()
64 {
65 return "PNG";
66 }
67
73 void GetTextChunks(const char* key, int beginEndIndex[2]);
77 const char* GetTextKey(int index);
83 const char* GetTextValue(int index);
89
90protected:
93
94 virtual void ExecuteInformation();
96 template <class OT>
98 template <class OT>
100 OT *outPtr, int *outExt, vtkIdType *outInc, long pixSize);
101
102
103private:
104 vtkPNGReader(const vtkPNGReader&) VTK_DELETE_FUNCTION;
105 void operator=(const vtkPNGReader&) VTK_DELETE_FUNCTION;
106
107 class vtkInternals;
108 vtkInternals* Internals;
109};
110#endif
general representation of visualization data
Definition: vtkDataObject.h:65
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
Superclass of binary file readers.
a simple class to control print indentation
Definition: vtkIndent.h:40
Store vtkAlgorithm input/output information.
read PNG files
Definition: vtkPNGReader.h:39
const char * GetTextValue(int index)
Returns the text value stored at 'index'.
virtual void ExecuteDataWithInformation(vtkDataObject *out, vtkInformation *outInfo)
This is a convenience method that is implemented in many subclasses instead of RequestData.
virtual const char * GetDescriptiveName()
Return a descriptive name for the file format that might be useful in a GUI.
Definition: vtkPNGReader.h:63
size_t GetNumberOfTextChunks()
Return the number of text chunks in the PNG file.
void vtkPNGReaderUpdate(vtkImageData *data, OT *outPtr)
virtual const char * GetFileExtensions()
Get the file extensions for this format.
Definition: vtkPNGReader.h:55
static vtkPNGReader * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void ExecuteInformation()
void vtkPNGReaderUpdate2(OT *outPtr, int *outExt, vtkIdType *outInc, long pixSize)
const char * GetTextKey(int index)
Returns the text key stored at 'index'.
void GetTextChunks(const char *key, int beginEndIndex[2])
Given a 'key' for the text chunks, fills in 'beginEndIndex' with the begin and end indexes.
virtual int CanReadFile(const char *fname)
Is the given file a PNG file?
@ key
Definition: vtkX3D.h:257
@ index
Definition: vtkX3D.h:246
@ data
Definition: vtkX3D.h:315
int vtkIdType
Definition: vtkType.h:287