VTK
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 =========================================================================*/
34 #ifndef __vtkDEMReader_h
35 #define __vtkDEMReader_h
36 
37 #include "vtkImageAlgorithm.h"
38 
40 {
41 public:
42  static vtkDEMReader *New();
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
47 
48  vtkSetStringMacro(FileName);
49  vtkGetStringMacro(FileName);
51 
52 //BTX
53  enum {REFERENCE_SEA_LEVEL=0,REFERENCE_ELEVATION_BOUNDS};
54 //ETX
55 
57 
60  vtkSetClampMacro(ElevationReference,int,REFERENCE_SEA_LEVEL,
61  REFERENCE_ELEVATION_BOUNDS);
62  vtkGetMacro(ElevationReference,int);
63  void SetElevationReferenceToSeaLevel()
64  {this->SetElevationReference(REFERENCE_SEA_LEVEL);}
65  void SetElevationReferenceToElevationBounds()
66  {this->SetElevationReference(REFERENCE_ELEVATION_BOUNDS);}
67  const char *GetElevationReferenceAsString(void);
69 
71 
72  vtkGetStringMacro(MapLabel);
74 
76 
77  vtkGetMacro(DEMLevel,int);
79 
81 
82  vtkGetMacro(ElevationPattern, int);
84 
86 
87  vtkGetMacro(GroundSystem, int);
89 
91 
92  vtkGetMacro(GroundZone, int);
94 
96 
97  vtkGetVectorMacro(ProjectionParameters,float,15);
99 
101 
104  vtkGetMacro(PlaneUnitOfMeasure, int);
106 
108 
110  vtkGetMacro(ElevationUnitOfMeasure, int);
112 
114 
116  vtkGetMacro(PolygonSize, int);
118 
120 
122  vtkGetVectorMacro(ElevationBounds,float,2);
124 
126 
129  vtkGetMacro(LocalRotation, float);
131 
133 
134  vtkGetMacro(AccuracyCode, int);
136 
138 
141  vtkGetVectorMacro(SpatialResolution,float,3);
143 
145 
146  vtkGetVectorMacro(ProfileDimension,int,2);
148 
150 
156 
157 protected:
158  vtkDEMReader();
159  ~vtkDEMReader();
160 
164  int WholeExtent[6];
165  char *FileName;
166  char MapLabel[145];
167  int DEMLevel;
171  float ProjectionParameters[15];
175  float GroundCoords[4][2];
176  float ElevationBounds[2];
179  float SpatialResolution[3];
180  int ProfileDimension[2];
183 
184  void ComputeExtentOriginAndSpacing (int extent[6],
185  double origin[6],
186  double spacing[6]);
187  int ReadTypeARecord ();
188  int ReadProfiles (vtkImageData *data);
189  virtual int RequestData( vtkInformation* request,
190  vtkInformationVector** inputVector,
191  vtkInformationVector* outputVector);
192 
193 private:
194  vtkDEMReader(const vtkDEMReader&); // Not implemented.
195  void operator=(const vtkDEMReader&); // Not implemented.
196 };
197 
198 #endif
199