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 =========================================================================*/
31 #ifndef vtkGDALRasterReader_h
32 #define vtkGDALRasterReader_h
33 
34 #include <vtkImageReader2.h>
35 #include <vtkIOGDALModule.h> // For export macro
36 
37 // C++ includes
38 #include <string> // string is required
39 #include <vector> // vector is required
40 
41 class VTKIOGDAL_EXPORT vtkGDALRasterReader : public vtkImageReader2
42 {
43 public:
44  static vtkGDALRasterReader* New();
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49  virtual ~vtkGDALRasterReader();
50 
52 
53  vtkSetStringMacro(FileName);
54  // Get input file name
55  vtkGetStringMacro(FileName);
57 
59  const char* GetProjectionString() const;
60 
63  const double* GetGeoCornerPoints();
64 
66 
67  vtkSetVector2Macro(TargetDimensions, int);
68  vtkGetVector2Macro(TargetDimensions, int);
70 
72 
73  vtkGetVector2Macro(RasterDimensions, int);
75 
76  //BTX
78 
79  const std::vector<std::string>& GetMetaData();
80  //ETX
82 
84  double GetInvalidValue();
85 
86  //BTX
88 
89  std::vector<std::string> GetDomainMetaData(const std::string& domain);
90  //ETX
92 
94 
95  const std::string& GetDriverShortName();
96  const std::string& GetDriverLongName();
98 
99  vtkIdType GetNumberOfPoints();
100 
101 protected:
102 
103  virtual int RequestData(vtkInformation* request,
104  vtkInformationVector** inputVector,
105  vtkInformationVector* outputVector);
106 
107  virtual int RequestInformation(vtkInformation* request,
108  vtkInformationVector** inputVector,
109  vtkInformationVector* outputVector);
110 
111  virtual int FillOutputPortInformation(int port,
113 
114 protected:
115  int TargetDimensions[2];
116  int RasterDimensions[2];
121  std::vector<std::string> Domains;
122  std::vector<std::string> MetaData;
123 
124  class vtkGDALRasterReaderInternal;
125  vtkGDALRasterReaderInternal* Implementation;
126 
127 private:
128  vtkGDALRasterReader(const vtkGDALRasterReader&); // Not implemented.
129  void operator=(const vtkGDALRasterReader&); // Not implemented
130 };
131 
132 #endif // vtkGDALRasterReader_h
static vtkImageReader2 * New()
Store vtkAlgorithm input/output information.
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkGDALRasterReaderInternal * Implementation
int vtkIdType
Definition: vtkType.h:247
std::vector< std::string > Domains
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Superclass of binary file readers.
void PrintSelf(ostream &os, vtkIndent indent)
Store zero or more vtkInformation instances.
std::vector< std::string > MetaData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Read raster file formats using GDAL.