VTK  9.0.1
vtkDEMReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDEMReader.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 vtkDEMReader_h
30 #define vtkDEMReader_h
31 
32 #include "vtkIOImageModule.h" // For export macro
33 #include "vtkImageAlgorithm.h"
34 
35 class VTKIOIMAGE_EXPORT vtkDEMReader : public vtkImageAlgorithm
36 {
37 public:
38  static vtkDEMReader* New();
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
43 
46  vtkSetStringMacro(FileName);
47  vtkGetStringMacro(FileName);
49 
50  enum
51  {
52  REFERENCE_SEA_LEVEL = 0,
53  REFERENCE_ELEVATION_BOUNDS
54  };
55 
57 
62  vtkSetClampMacro(ElevationReference, int, REFERENCE_SEA_LEVEL, REFERENCE_ELEVATION_BOUNDS);
63  vtkGetMacro(ElevationReference, int);
64  void SetElevationReferenceToSeaLevel() { this->SetElevationReference(REFERENCE_SEA_LEVEL); }
66  {
67  this->SetElevationReference(REFERENCE_ELEVATION_BOUNDS);
68  }
69  const char* GetElevationReferenceAsString(void);
71 
73 
76  vtkGetStringMacro(MapLabel);
78 
80 
83  vtkGetMacro(DEMLevel, int);
85 
87 
90  vtkGetMacro(ElevationPattern, int);
92 
94 
97  vtkGetMacro(GroundSystem, int);
99 
101 
104  vtkGetMacro(GroundZone, int);
106 
108 
111  vtkGetVectorMacro(ProjectionParameters, float, 15);
113 
115 
119  vtkGetMacro(PlaneUnitOfMeasure, int);
121 
123 
127  vtkGetMacro(ElevationUnitOfMeasure, int);
129 
131 
135  vtkGetMacro(PolygonSize, int);
137 
139 
143  vtkGetVectorMacro(ElevationBounds, float, 2);
145 
147 
152  vtkGetMacro(LocalRotation, float);
154 
156 
159  vtkGetMacro(AccuracyCode, int);
161 
163 
167  vtkGetVectorMacro(SpatialResolution, float, 3);
169 
171 
174  vtkGetVectorMacro(ProfileDimension, int, 2);
176 
183 
184 protected:
185  vtkDEMReader();
186  ~vtkDEMReader() override;
187 
191  int WholeExtent[6];
192  char* FileName;
193  char MapLabel[145];
194  int DEMLevel;
198  float ProjectionParameters[15];
202  float GroundCoords[4][2];
203  float ElevationBounds[2];
206  float SpatialResolution[3];
207  int ProfileDimension[2];
210 
211  void ComputeExtentOriginAndSpacing(int extent[6], double origin[6], double spacing[6]);
212  int ReadTypeARecord();
213  int ReadProfiles(vtkImageData* data);
214  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
215  vtkInformationVector* outputVector) override;
216 
217 private:
218  vtkDEMReader(const vtkDEMReader&) = delete;
219  void operator=(const vtkDEMReader&) = delete;
220 };
221 
222 #endif
vtkDEMReader::AccuracyCode
int AccuracyCode
Definition: vtkDEMReader.h:205
vtkImageAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
vtkDEMReader::SetElevationReferenceToSeaLevel
void SetElevationReferenceToSeaLevel()
Definition: vtkDEMReader.h:64
vtkX3D::data
@ data
Definition: vtkX3D.h:321
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:32
vtkDEMReader::DEMLevel
int DEMLevel
Definition: vtkDEMReader.h:194
vtkDEMReader::ElevationReference
int ElevationReference
Definition: vtkDEMReader.h:209
vtkDEMReader::ReadHeaderTime
vtkTimeStamp ReadHeaderTime
Definition: vtkDEMReader.h:188
vtkImageAlgorithm.h
vtkDEMReader::PolygonSize
int PolygonSize
Definition: vtkDEMReader.h:201
vtkDEMReader::ElevationPattern
int ElevationPattern
Definition: vtkDEMReader.h:195
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:37
vtkDEMReader::ElevationUnitOfMeasure
int ElevationUnitOfMeasure
Definition: vtkDEMReader.h:200
vtkDEMReader::ProfileSeekOffset
int ProfileSeekOffset
Definition: vtkDEMReader.h:208
vtkDEMReader::NumberOfRows
int NumberOfRows
Definition: vtkDEMReader.h:190
vtkImageAlgorithm::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...
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkDEMReader::GroundSystem
int GroundSystem
Definition: vtkDEMReader.h:196
vtkDEMReader::PlaneUnitOfMeasure
int PlaneUnitOfMeasure
Definition: vtkDEMReader.h:199
vtkDEMReader::GroundZone
int GroundZone
Definition: vtkDEMReader.h:197
vtkX3D::spacing
@ spacing
Definition: vtkX3D.h:487
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkImageAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkDEMReader
read a digital elevation model (DEM) file
Definition: vtkDEMReader.h:35
vtkDEMReader::SetElevationReferenceToElevationBounds
void SetElevationReferenceToElevationBounds()
Definition: vtkDEMReader.h:65
vtkX3D::extent
@ extent
Definition: vtkX3D.h:351
vtkDEMReader::NumberOfColumns
int NumberOfColumns
Definition: vtkDEMReader.h:189
vtkDEMReader::FileName
char * FileName
Definition: vtkDEMReader.h:192
vtkDEMReader::LocalRotation
float LocalRotation
Definition: vtkDEMReader.h:204