00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00042 #ifndef __vtkEnSightGoldBinaryReader_h
00043 #define __vtkEnSightGoldBinaryReader_h
00044
00045 #include "vtkEnSightReader.h"
00046
00047 class vtkMultiBlockDataSet;
00048
00049 class VTK_IO_EXPORT vtkEnSightGoldBinaryReader : public vtkEnSightReader
00050 {
00051 public:
00052 static vtkEnSightGoldBinaryReader *New();
00053 vtkTypeMacro(vtkEnSightGoldBinaryReader, vtkEnSightReader);
00054 virtual void PrintSelf(ostream& os, vtkIndent indent);
00055
00056 protected:
00057 vtkEnSightGoldBinaryReader();
00058 ~vtkEnSightGoldBinaryReader();
00059
00060
00061 int OpenFile(const char* filename);
00062
00063
00064
00065
00066 int InitializeFile(const char* filename);
00067
00069
00071 virtual int ReadGeometryFile(const char* fileName, int timeStep,
00072 vtkMultiBlockDataSet *output);
00074
00076
00078 virtual int ReadMeasuredGeometryFile(const char* fileName, int timeStep,
00079 vtkMultiBlockDataSet *output);
00081
00083
00086 virtual int ReadScalarsPerNode(const char* fileName, const char* description,
00087 int timeStep, vtkMultiBlockDataSet *output,
00088 int measured = 0, int numberOfComponents = 1,
00089 int component = 0);
00091
00093
00095 virtual int ReadVectorsPerNode(const char* fileName, const char* description,
00096 int timeStep, vtkMultiBlockDataSet *output,
00097 int measured = 0);
00099
00101
00103 virtual int ReadTensorsPerNode(const char* fileName, const char* description,
00104 int timeStep, vtkMultiBlockDataSet *output);
00106
00108
00111 virtual int ReadScalarsPerElement(const char* fileName, const char* description,
00112 int timeStep, vtkMultiBlockDataSet *output,
00113 int numberOfComponents = 1,
00114 int component = 0);
00116
00118
00120 virtual int ReadVectorsPerElement(const char* fileName, const char* description,
00121 int timeStep, vtkMultiBlockDataSet *output);
00123
00125
00127 virtual int ReadTensorsPerElement(const char* fileName, const char* description,
00128 int timeStep, vtkMultiBlockDataSet *output);
00130
00132
00135 virtual int CreateUnstructuredGridOutput(int partId,
00136 char line[80],
00137 const char* name,
00138 vtkMultiBlockDataSet *output);
00140
00142
00144 virtual int CreateStructuredGridOutput(int partId,
00145 char line[256],
00146 const char* name,
00147 vtkMultiBlockDataSet *output);
00149
00151
00153 int CreateRectilinearGridOutput(int partId, char line[256], const char* name,
00154 vtkMultiBlockDataSet *output);
00156
00158
00160 int CreateImageDataOutput(int partId, char line[80], const char* name,
00161 vtkMultiBlockDataSet *output);
00163
00166 int ReadLine(char result[80]);
00167
00169
00171 int ReadInt(int *result);
00172 int ReadPartId(int *result);
00174
00177 int ReadIntArray(int *result, int numInts);
00178
00181 int ReadFloatArray(float *result, int numFloats);
00182
00187 int CountTimeSteps();
00188
00190
00191 int SkipTimeStep();
00192 int SkipStructuredGrid(char line[256]);
00193 int SkipUnstructuredGrid(char line[256]);
00194 int SkipRectilinearGrid(char line[256]);
00195 int SkipImageData(char line[256]);
00197
00198 int NodeIdsListed;
00199 int ElementIdsListed;
00200 int Fortran;
00201
00202 ifstream *IFile;
00203
00204 vtkIdType FileSize;
00205
00206 private:
00207 int SizeOfInt;
00208 vtkEnSightGoldBinaryReader(const vtkEnSightGoldBinaryReader&);
00209 void operator=(const vtkEnSightGoldBinaryReader&);
00210 };
00211
00212 #endif