VTK
vtkGDALRasterReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkGDALRasterReader.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 =========================================================================*/
29 #ifndef vtkGDALRasterReader_h
30 #define vtkGDALRasterReader_h
31 
32 #include <vtkImageReader2.h>
33 #include <vtkIOGDALModule.h> // For export macro
34 
35 // C++ includes
36 #include <string> // string is required
37 #include <vector> // vector is required
38 
39 class VTKIOGDAL_EXPORT vtkGDALRasterReader : public vtkImageReader2
40 {
41 public:
42  static vtkGDALRasterReader* New();
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
47  virtual ~vtkGDALRasterReader();
48 
50 
53  vtkSetStringMacro(FileName);
54  // Get input file name
55  vtkGetStringMacro(FileName);
57 
61  const char* GetProjectionString() const;
62 
67  const double* GetGeoCornerPoints();
68 
70 
73  vtkSetVector2Macro(TargetDimensions, int);
74  vtkGetVector2Macro(TargetDimensions, int);
76 
78 
81  vtkGetVector2Macro(RasterDimensions, int);
83 
87  const std::vector<std::string>& GetMetaData();
88 
92  double GetInvalidValue();
93 
97  std::vector<std::string> GetDomainMetaData(const std::string& domain);
98 
100 
103  const std::string& GetDriverShortName();
104  const std::string& GetDriverLongName();
106 
107  vtkIdType GetNumberOfPoints();
108 
109 protected:
110 
111  virtual int RequestData(vtkInformation* request,
112  vtkInformationVector** inputVector,
113  vtkInformationVector* outputVector);
114 
115  virtual int RequestInformation(vtkInformation* request,
116  vtkInformationVector** inputVector,
117  vtkInformationVector* outputVector);
118 
119  virtual int FillOutputPortInformation(int port,
121 
122 protected:
123  int TargetDimensions[2];
124  int RasterDimensions[2];
129  std::vector<std::string> Domains;
130  std::vector<std::string> MetaData;
131 
132  class vtkGDALRasterReaderInternal;
133  vtkGDALRasterReaderInternal* Implementation;
134 
135 private:
136  vtkGDALRasterReader(const vtkGDALRasterReader&) VTK_DELETE_FUNCTION;
137  void operator=(const vtkGDALRasterReader&) VTK_DELETE_FUNCTION;
138 };
139 
140 #endif // vtkGDALRasterReader_h
static vtkImageReader2 * New()
Store vtkAlgorithm input/output information.
vtkGDALRasterReaderInternal * Implementation
int vtkIdType
Definition: vtkType.h:345
std::vector< std::string > Domains
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
Superclass of binary file readers.
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
int FillOutputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
Store zero or more vtkInformation instances.
std::vector< std::string > MetaData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Read raster file formats using GDAL.