VTK
dox/IO/Image/vtkDEMReader.h
Go to the documentation of this file.
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 "vtkIOImageModule.h" // For export macro
00038 #include "vtkImageAlgorithm.h"
00039 
00040 class VTKIOIMAGE_EXPORT vtkDEMReader : public vtkImageAlgorithm
00041 {
00042 public:
00043   static vtkDEMReader *New();
00044   vtkTypeMacro(vtkDEMReader,vtkImageAlgorithm);
00045   void PrintSelf(ostream& os, vtkIndent indent);
00046 
00048 
00049   vtkSetStringMacro(FileName);
00050   vtkGetStringMacro(FileName);
00052 
00053 //BTX
00054   enum {REFERENCE_SEA_LEVEL=0,REFERENCE_ELEVATION_BOUNDS};
00055 //ETX
00056 
00058 
00061   vtkSetClampMacro(ElevationReference,int,REFERENCE_SEA_LEVEL,
00062                    REFERENCE_ELEVATION_BOUNDS);
00063   vtkGetMacro(ElevationReference,int);
00064   void SetElevationReferenceToSeaLevel()
00065     {this->SetElevationReference(REFERENCE_SEA_LEVEL);}
00066   void SetElevationReferenceToElevationBounds()
00067     {this->SetElevationReference(REFERENCE_ELEVATION_BOUNDS);}
00068   const char *GetElevationReferenceAsString(void);
00070 
00072 
00073   vtkGetStringMacro(MapLabel);
00075 
00077 
00078   vtkGetMacro(DEMLevel,int);
00080 
00082 
00083   vtkGetMacro(ElevationPattern,  int);
00085 
00087 
00088   vtkGetMacro(GroundSystem,  int);
00090 
00092 
00093   vtkGetMacro(GroundZone,  int);
00095 
00097 
00098   vtkGetVectorMacro(ProjectionParameters,float,15);
00100 
00102 
00105   vtkGetMacro(PlaneUnitOfMeasure,  int);
00107 
00109 
00111   vtkGetMacro(ElevationUnitOfMeasure,  int);
00113 
00115 
00117   vtkGetMacro(PolygonSize,  int);
00119 
00121 
00123   vtkGetVectorMacro(ElevationBounds,float,2);
00125 
00127 
00130   vtkGetMacro(LocalRotation,  float);
00132 
00134 
00135   vtkGetMacro(AccuracyCode,  int);
00137 
00139 
00142   vtkGetVectorMacro(SpatialResolution,float,3);
00144 
00146 
00147   vtkGetVectorMacro(ProfileDimension,int,2);
00149 
00151 
00154   virtual int RequestInformation (vtkInformation *, vtkInformationVector **,
00155                                   vtkInformationVector *);
00157 
00158 protected:
00159   vtkDEMReader();
00160   ~vtkDEMReader();
00161 
00162   vtkTimeStamp ReadHeaderTime;
00163   int NumberOfColumns;
00164   int NumberOfRows;
00165   int WholeExtent[6];
00166   char *FileName;
00167   char MapLabel[145];
00168   int DEMLevel;
00169   int ElevationPattern;
00170   int GroundSystem;
00171   int GroundZone;
00172   float ProjectionParameters[15];
00173   int PlaneUnitOfMeasure;
00174   int ElevationUnitOfMeasure;
00175   int PolygonSize;
00176   float GroundCoords[4][2];
00177   float ElevationBounds[2];
00178   float LocalRotation;
00179   int AccuracyCode;
00180   float SpatialResolution[3];
00181   int ProfileDimension[2];
00182   int ProfileSeekOffset;
00183   int ElevationReference;
00184 
00185   void ComputeExtentOriginAndSpacing (int extent[6],
00186                                       double origin[6],
00187                                       double spacing[6]);
00188   int ReadTypeARecord ();
00189   int ReadProfiles (vtkImageData *data);
00190   virtual int RequestData(  vtkInformation* request,
00191                             vtkInformationVector** inputVector,
00192                             vtkInformationVector* outputVector);
00193 
00194 private:
00195   vtkDEMReader(const vtkDEMReader&);  // Not implemented.
00196   void operator=(const vtkDEMReader&);  // Not implemented.
00197 };
00198 
00199 #endif
00200