VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkDEMReader.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00034 #ifndef __vtkDEMReader_h 00035 #define __vtkDEMReader_h 00036 00037 #include "vtkImageAlgorithm.h" 00038 00039 class VTK_IO_EXPORT vtkDEMReader : public vtkImageAlgorithm 00040 { 00041 public: 00042 static vtkDEMReader *New(); 00043 vtkTypeMacro(vtkDEMReader,vtkImageAlgorithm); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 00047 00048 vtkSetStringMacro(FileName); 00049 vtkGetStringMacro(FileName); 00051 00052 //BTX 00053 enum {REFERENCE_SEA_LEVEL=0,REFERENCE_ELEVATION_BOUNDS}; 00054 //ETX 00055 00057 00060 vtkSetClampMacro(ElevationReference,int,REFERENCE_SEA_LEVEL, 00061 REFERENCE_ELEVATION_BOUNDS); 00062 vtkGetMacro(ElevationReference,int); 00063 void SetElevationReferenceToSeaLevel() 00064 {this->SetElevationReference(REFERENCE_SEA_LEVEL);} 00065 void SetElevationReferenceToElevationBounds() 00066 {this->SetElevationReference(REFERENCE_ELEVATION_BOUNDS);} 00067 const char *GetElevationReferenceAsString(void); 00069 00071 00072 vtkGetStringMacro(MapLabel); 00074 00076 00077 vtkGetMacro(DEMLevel,int); 00079 00081 00082 vtkGetMacro(ElevationPattern, int); 00084 00086 00087 vtkGetMacro(GroundSystem, int); 00089 00091 00092 vtkGetMacro(GroundZone, int); 00094 00096 00097 vtkGetVectorMacro(ProjectionParameters,float,15); 00099 00101 00104 vtkGetMacro(PlaneUnitOfMeasure, int); 00106 00108 00110 vtkGetMacro(ElevationUnitOfMeasure, int); 00112 00114 00116 vtkGetMacro(PolygonSize, int); 00118 00120 00122 vtkGetVectorMacro(ElevationBounds,float,2); 00124 00126 00129 vtkGetMacro(LocalRotation, float); 00131 00133 00134 vtkGetMacro(AccuracyCode, int); 00136 00138 00141 vtkGetVectorMacro(SpatialResolution,float,3); 00143 00145 00146 vtkGetVectorMacro(ProfileDimension,int,2); 00148 00150 00153 virtual int RequestInformation (vtkInformation *, vtkInformationVector **, 00154 vtkInformationVector *); 00156 00157 protected: 00158 vtkDEMReader(); 00159 ~vtkDEMReader(); 00160 00161 vtkTimeStamp ReadHeaderTime; 00162 int NumberOfColumns; 00163 int NumberOfRows; 00164 int WholeExtent[6]; 00165 char *FileName; 00166 char MapLabel[145]; 00167 int DEMLevel; 00168 int ElevationPattern; 00169 int GroundSystem; 00170 int GroundZone; 00171 float ProjectionParameters[15]; 00172 int PlaneUnitOfMeasure; 00173 int ElevationUnitOfMeasure; 00174 int PolygonSize; 00175 float GroundCoords[4][2]; 00176 float ElevationBounds[2]; 00177 float LocalRotation; 00178 int AccuracyCode; 00179 float SpatialResolution[3]; 00180 int ProfileDimension[2]; 00181 int ProfileSeekOffset; 00182 int ElevationReference; 00183 00184 void ComputeExtentOriginAndSpacing (int extent[6], 00185 double origin[6], 00186 double spacing[6]); 00187 int ReadTypeARecord (); 00188 int ReadProfiles (vtkImageData *data); 00189 virtual int RequestData( vtkInformation* request, 00190 vtkInformationVector** inputVector, 00191 vtkInformationVector* outputVector); 00192 00193 private: 00194 vtkDEMReader(const vtkDEMReader&); // Not implemented. 00195 void operator=(const vtkDEMReader&); // Not implemented. 00196 }; 00197 00198 #endif 00199