VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkNetCDFCAMReader.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 =========================================================================*/ 00031 #ifndef vtkNetCDFCAMReader_h 00032 #define vtkNetCDFCAMReader_h 00033 00034 #include "vtkIONetCDFModule.h" // For export macro 00035 #include "vtkUnstructuredGridAlgorithm.h" 00036 00037 class NcFile; 00038 00039 class VTKIONETCDF_EXPORT vtkNetCDFCAMReader : public vtkUnstructuredGridAlgorithm 00040 { 00041 public: 00042 static vtkNetCDFCAMReader *New(); 00043 vtkTypeMacro(vtkNetCDFCAMReader,vtkUnstructuredGridAlgorithm); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 00050 static int CanReadFile(const char* fileName); 00051 00052 void SetFileName(const char* fileName); 00053 vtkGetStringMacro(FileName); 00054 00055 void SetConnectivityFileName(const char* fileName); 00056 vtkGetStringMacro(ConnectivityFileName); 00057 00059 00065 vtkBooleanMacro(SingleLevel,int); 00066 vtkSetClampMacro(SingleLevel, int, 0, 1); 00067 vtkGetMacro(SingleLevel, int); 00069 00071 00074 vtkSetMacro(CellLayerRight, int); 00075 vtkGetMacro(CellLayerRight, int); 00077 00078 protected: 00079 vtkNetCDFCAMReader(); 00080 ~vtkNetCDFCAMReader(); 00081 00082 int RequestInformation(vtkInformation*, vtkInformationVector**, 00083 vtkInformationVector*); 00084 00085 virtual int RequestData(vtkInformation *, vtkInformationVector **, 00086 vtkInformationVector *); 00087 00088 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, 00089 vtkInformationVector *); 00090 00092 00095 bool GetPartitioning( 00096 int piece, int numPieces,int numCellLevels, int numCellsPerLevel, 00097 int & beginCellLevel, int & endCellLevel, int & beginCell, int & endCell); 00099 00100 private: 00101 vtkNetCDFCAMReader(const vtkNetCDFCAMReader&); // Not implemented. 00102 void operator=(const vtkNetCDFCAMReader&); // Not implemented. 00103 00105 00107 char* FileName; 00108 char* CurrentFileName; 00109 vtkSetStringMacro(CurrentFileName); 00111 00113 00114 char* ConnectivityFileName; 00115 char* CurrentConnectivityFileName; 00116 vtkSetStringMacro(CurrentConnectivityFileName); 00118 00119 int SingleLevel; 00120 00121 int CellLayerRight; 00122 00123 double * TimeSteps; 00124 00125 long NumberOfTimeSteps; 00126 00128 00130 NcFile* PointsFile; 00131 NcFile* ConnectivityFile; 00132 }; 00134 00135 #endif