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 =========================================================================*/
32 #ifndef vtkGDALRasterReader_h
33 #define vtkGDALRasterReader_h
34 
35 #include <vtkImageReader2.h>
36 #include <vtkIOGDALModule.h> // For export macro
37 
38 // C++ includes
39 #include <string> // string is required
40 #include <vector> // vector is required
41 
42 class VTKIOGDAL_EXPORT vtkGDALRasterReader : public vtkImageReader2
43 {
44 public:
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
51 
53 
56  vtkSetStringMacro(FileName);
57  // Get input file name
58  vtkGetStringMacro(FileName);
60 
64  const char* GetProjectionString() const;
65 
70  const double* GetGeoCornerPoints();
71 
73 
76  vtkSetVector2Macro(TargetDimensions, int);
77  vtkGetVector2Macro(TargetDimensions, int);
79 
81 
84  vtkGetVector2Macro(RasterDimensions, int);
86 
90  const std::vector<std::string>& GetMetaData();
91 
95  double GetInvalidValue();
96 
100  std::vector<std::string> GetDomainMetaData(const std::string& domain);
101 
103 
109 
111 
112 protected:
113 
114  virtual int RequestData(vtkInformation* request,
115  vtkInformationVector** inputVector,
116  vtkInformationVector* outputVector);
117 
118  virtual int RequestInformation(vtkInformation* request,
119  vtkInformationVector** inputVector,
120  vtkInformationVector* outputVector);
121 
124 
125 protected:
126  int TargetDimensions[2];
127  int RasterDimensions[2];
132  std::vector<std::string> Domains;
133  std::vector<std::string> MetaData;
134 
135  class vtkGDALRasterReaderInternal;
136  vtkGDALRasterReaderInternal* Implementation;
137 
138 private:
139  vtkGDALRasterReader(const vtkGDALRasterReader&) VTK_DELETE_FUNCTION;
140  void operator=(const vtkGDALRasterReader&) VTK_DELETE_FUNCTION;
141 };
142 
143 #endif // vtkGDALRasterReader_h
vtkGDALRasterReader::Domains
std::vector< std::string > Domains
Definition: vtkGDALRasterReader.h:132
vtkGDALRasterReader::GetNumberOfPoints
vtkIdType GetNumberOfPoints()
vtkGDALRasterReader::Implementation
vtkGDALRasterReaderInternal * Implementation
Definition: vtkGDALRasterReader.h:135
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkGDALRasterReader::DriverShortName
std::string DriverShortName
Definition: vtkGDALRasterReader.h:130
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkGDALRasterReader
Read raster file formats using GDAL.
Definition: vtkGDALRasterReader.h:43
vtkGDALRasterReader::GetInvalidValue
double GetInvalidValue()
Return the invalid value for a pixel (for blanking purposes)
vtkGDALRasterReader::DomainMetaData
std::string DomainMetaData
Definition: vtkGDALRasterReader.h:129
vtkGDALRasterReader::vtkGDALRasterReader
vtkGDALRasterReader()
vtkGDALRasterReader::GetDriverLongName
const std::string & GetDriverLongName()
vtkGDALRasterReader::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
vtkGDALRasterReader::GetDriverShortName
const std::string & GetDriverShortName()
Return driver name which was used to read the current data.
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkGDALRasterReader::New
static vtkGDALRasterReader * New()
vtkGDALRasterReader::GetProjectionString
const char * GetProjectionString() const
Return proj4 spatial reference.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkImageReader2
Superclass of binary file readers.
Definition: vtkImageReader2.h:59
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkGDALRasterReader::GetMetaData
const std::vector< std::string > & GetMetaData()
Return metadata as reported by GDAL.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::string
@ string
Definition: vtkX3D.h:490
vtkGDALRasterReader::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkGDALRasterReader::MetaData
std::vector< std::string > MetaData
Definition: vtkGDALRasterReader.h:133
vtkGDALRasterReader::GetDomainMetaData
std::vector< std::string > GetDomainMetaData(const std::string &domain)
Return domain metadata.
vtkGDALRasterReader::GetGeoCornerPoints
const double * GetGeoCornerPoints()
Return geo-referenced corner points (Upper left, lower left, lower right, upper right)
vtkGDALRasterReader::DriverLongName
std::string DriverLongName
Definition: vtkGDALRasterReader.h:131
vtkGDALRasterReader::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
These method should be reimplemented by subclasses that have more than a single input or single outpu...
vtkGDALRasterReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkGDALRasterReader::Projection
std::string Projection
Definition: vtkGDALRasterReader.h:128
vtkGDALRasterReader::~vtkGDALRasterReader
virtual ~vtkGDALRasterReader()
vtkImageReader2.h