00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00037 #ifndef __vtkEnSight6BinaryReader_h
00038 #define __vtkEnSight6BinaryReader_h
00039
00040 #include "vtkEnSightReader.h"
00041
00042 class vtkIdTypeArray;
00043 class vtkPoints;
00044
00045 class VTK_IO_EXPORT vtkEnSight6BinaryReader : public vtkEnSightReader
00046 {
00047 public:
00048 static vtkEnSight6BinaryReader *New();
00049 vtkTypeRevisionMacro(vtkEnSight6BinaryReader, vtkEnSightReader);
00050 virtual void PrintSelf(ostream& os, vtkIndent indent);
00051
00052 protected:
00053 vtkEnSight6BinaryReader();
00054 ~vtkEnSight6BinaryReader();
00055
00056
00057 int OpenFile(const char* filename);
00058
00061 virtual int ReadGeometryFile(const char* fileName, int timeStep);
00062
00065 virtual int ReadMeasuredGeometryFile(const char* fileName, int timeStep);
00066
00068
00072 virtual int ReadScalarsPerNode(const char* fileName, const char* description,
00073 int timeStep, int measured = 0,
00074 int numberOfComponents = 1,
00075 int component = 0);
00077
00079
00081 virtual int ReadVectorsPerNode(const char* fileName, const char* description,
00082 int timeStep, int measured = 0);
00084
00086
00088 virtual int ReadTensorsPerNode(const char* fileName, const char* description,
00089 int timeStep);
00091
00093
00097 virtual int ReadScalarsPerElement(const char* fileName, const char* description,
00098 int timeStep, int numberOfComponents = 1,
00099 int component = 0);
00101
00103
00105 virtual int ReadVectorsPerElement(const char* fileName, const char* description,
00106 int timeStep);
00108
00110
00112 virtual int ReadTensorsPerElement(const char* fileName, const char* description,
00113 int timeStep);
00115
00117
00119 virtual int CreateUnstructuredGridOutput(int partId,
00120 char line[256],
00121 const char* name);
00123
00125
00127 virtual int CreateStructuredGridOutput(int partId,
00128 char line[256],
00129 const char* name);
00131
00134 int ReadLine(char result[80]);
00135
00138 int ReadIntNumber(int *result);
00139
00142 int ReadIntArray(int *result, int numInts);
00143
00146 int ReadFloatArray(float *result, int numFloats);
00147
00149
00150 int SkipTimeStep();
00151 int SkipStructuredGrid(char line[256]);
00152 int SkipUnstructuredGrid(char line[256]);
00154
00155
00156 int NumberOfUnstructuredPoints;
00157 vtkPoints* UnstructuredPoints;
00158 vtkIdTypeArray* UnstructuredNodeIds;
00159
00160 int ElementIdsListed;
00161
00162
00163 int FileSize;
00164
00165 ifstream *IFile;
00166 private:
00167 vtkEnSight6BinaryReader(const vtkEnSight6BinaryReader&);
00168 void operator=(const vtkEnSight6BinaryReader&);
00169 };
00170
00171 #endif
00172