VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkDEMReader.h,v $ 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 =========================================================================*/ 00031 #ifndef __vtkDEMReader_h 00032 #define __vtkDEMReader_h 00033 00034 #include "vtkImageAlgorithm.h" 00035 00036 class VTK_IO_EXPORT vtkDEMReader : public vtkImageAlgorithm 00037 { 00038 public: 00039 static vtkDEMReader *New(); 00040 vtkTypeRevisionMacro(vtkDEMReader,vtkImageAlgorithm); 00041 void PrintSelf(ostream& os, vtkIndent indent); 00042 00044 00045 vtkSetStringMacro(FileName); 00046 vtkGetStringMacro(FileName); 00048 00049 //BTX 00050 enum {REFERENCE_SEA_LEVEL=0,REFERENCE_ELEVATION_BOUNDS}; 00051 //ETX 00052 00054 00057 vtkSetClampMacro(ElevationReference,int,REFERENCE_SEA_LEVEL, 00058 REFERENCE_ELEVATION_BOUNDS); 00059 vtkGetMacro(ElevationReference,int); 00060 void SetElevationReferenceToSeaLevel() 00061 {this->SetElevationReference(REFERENCE_SEA_LEVEL);} 00062 void SetElevationReferenceToElevationBounds() 00063 {this->SetElevationReference(REFERENCE_ELEVATION_BOUNDS);} 00064 const char *GetElevationReferenceAsString(void); 00066 00068 00069 vtkGetStringMacro(MapLabel); 00071 00073 00074 vtkGetMacro(DEMLevel,int); 00076 00078 00079 vtkGetMacro(ElevationPattern, int); 00081 00083 00084 vtkGetMacro(GroundSystem, int); 00086 00088 00089 vtkGetMacro(GroundZone, int); 00091 00093 00094 vtkGetVectorMacro(ProjectionParameters,float,15); 00096 00098 00101 vtkGetMacro(PlaneUnitOfMeasure, int); 00103 00105 00107 vtkGetMacro(ElevationUnitOfMeasure, int); 00109 00111 00113 vtkGetMacro(PolygonSize, int); 00115 00117 00119 vtkGetVectorMacro(ElevationBounds,float,2); 00121 00123 00126 vtkGetMacro(LocalRotation, float); 00128 00130 00131 vtkGetMacro(AccuracyCode, int); 00133 00135 00138 vtkGetVectorMacro(SpatialResolution,float,3); 00140 00142 00143 vtkGetVectorMacro(ProfileDimension,int,2); 00145 00147 00150 virtual int RequestInformation (vtkInformation *, vtkInformationVector **, 00151 vtkInformationVector *); 00153 00154 protected: 00155 vtkDEMReader(); 00156 ~vtkDEMReader(); 00157 00158 vtkTimeStamp ReadHeaderTime; 00159 int NumberOfColumns; 00160 int NumberOfRows; 00161 int WholeExtent[6]; 00162 char *FileName; 00163 char MapLabel[145]; 00164 int DEMLevel; 00165 int ElevationPattern; 00166 int GroundSystem; 00167 int GroundZone; 00168 float ProjectionParameters[15]; 00169 int PlaneUnitOfMeasure; 00170 int ElevationUnitOfMeasure; 00171 int PolygonSize; 00172 float GroundCoords[4][2]; 00173 float ElevationBounds[2]; 00174 float LocalRotation; 00175 int AccuracyCode; 00176 float SpatialResolution[3]; 00177 int ProfileDimension[2]; 00178 int ProfileSeekOffset; 00179 int ElevationReference; 00180 00181 void ComputeExtentOriginAndSpacing (int extent[6], 00182 double origin[6], 00183 double spacing[6]); 00184 int ReadTypeARecord (); 00185 int ReadProfiles (vtkImageData *data); 00186 virtual int RequestData( vtkInformation* request, 00187 vtkInformationVector** inputVector, 00188 vtkInformationVector* outputVector); 00189 00190 private: 00191 vtkDEMReader(const vtkDEMReader&); // Not implemented. 00192 void operator=(const vtkDEMReader&); // Not implemented. 00193 }; 00194 00195 #endif 00196