VTK
vtkPNMReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPNMReader.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 =========================================================================*/
38 #ifndef vtkPNMReader_h
39 #define vtkPNMReader_h
40 
41 #include "vtkIOImageModule.h" // For export macro
42 #include "vtkImageReader.h"
43 
44 class VTKIOIMAGE_EXPORT vtkPNMReader : public vtkImageReader
45 {
46 public:
47  static vtkPNMReader *New();
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
51  int CanReadFile(const char* fname) override;
55  const char* GetFileExtensions() override
56  {
57  return ".pnm .pgm .ppm";
58  }
59 
63  const char* GetDescriptiveName() override
64  {
65  return "PNM";
66  }
67 
68 protected:
70  ~vtkPNMReader() override {}
71  void ExecuteInformation() override;
72 private:
73  vtkPNMReader(const vtkPNMReader&) = delete;
74  void operator=(const vtkPNMReader&) = delete;
75 };
76 
77 #endif
78 
79 
read pnm (i.e., portable anymap) files
Definition: vtkPNMReader.h:44
static vtkImageReader * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int CanReadFile(const char *vtkNotUsed(fname))
Return non zero if the reader can read the given file name.
a simple class to control print indentation
Definition: vtkIndent.h:39
Superclass of transformable binary file readers.
virtual void ExecuteInformation()
const char * GetDescriptiveName() override
PNM.
Definition: vtkPNMReader.h:63
const char * GetFileExtensions() override
.pnm .pgm .ppm
Definition: vtkPNMReader.h:55
~vtkPNMReader() override
Definition: vtkPNMReader.h:70