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 vtkMultiBlockDataSet;
00043 class vtkIdTypeArray;
00044 class vtkPoints;
00045
00046 class VTK_IO_EXPORT vtkEnSight6BinaryReader : public vtkEnSightReader
00047 {
00048 public:
00049 static vtkEnSight6BinaryReader *New();
00050 vtkTypeRevisionMacro(vtkEnSight6BinaryReader, vtkEnSightReader);
00051 virtual void PrintSelf(ostream& os, vtkIndent indent);
00052
00053 protected:
00054 vtkEnSight6BinaryReader();
00055 ~vtkEnSight6BinaryReader();
00056
00057
00058 int OpenFile(const char* filename);
00059
00061
00063 virtual int ReadGeometryFile(const char* fileName, int timeStep,
00064 vtkMultiBlockDataSet *output);
00066
00068
00070 virtual int ReadMeasuredGeometryFile(const char* fileName, int timeStep,
00071 vtkMultiBlockDataSet *output);
00073
00075
00079 virtual int ReadScalarsPerNode(const char* fileName, const char* description,
00080 int timeStep, vtkMultiBlockDataSet *output,
00081 int measured = 0, int numberOfComponents = 1,
00082 int component = 0);
00084
00086
00088 virtual int ReadVectorsPerNode(const char* fileName, const char* description,
00089 int timeStep, vtkMultiBlockDataSet *output,
00090 int measured = 0);
00092
00094
00096 virtual int ReadTensorsPerNode(const char* fileName, const char* description,
00097 int timeStep, vtkMultiBlockDataSet *output);
00099
00101
00105 virtual int ReadScalarsPerElement(const char* fileName,
00106 const char* description, int timeStep,
00107 vtkMultiBlockDataSet *output,
00108 int numberOfComponents = 1,
00109 int component = 0);
00111
00113
00115 virtual int ReadVectorsPerElement(const char* fileName, const char* description,
00116 int timeStep, vtkMultiBlockDataSet *output);
00118
00120
00122 virtual int ReadTensorsPerElement(const char* fileName, const char* description,
00123 int timeStep, vtkMultiBlockDataSet *output);
00125
00127
00129 virtual int CreateUnstructuredGridOutput(int partId,
00130 char line[256],
00131 const char* name,
00132 vtkMultiBlockDataSet *output);
00134
00136
00138 virtual int CreateStructuredGridOutput(int partId,
00139 char line[256],
00140 const char* name,
00141 vtkMultiBlockDataSet *output);
00143
00146 int ReadLine(char result[80]);
00147
00150 int ReadIntNumber(int *result);
00151
00154 int ReadIntArray(int *result, int numInts);
00155
00158 int ReadFloatArray(float *result, int numFloats);
00159
00161
00162 int SkipTimeStep();
00163 int SkipStructuredGrid(char line[256]);
00164 int SkipUnstructuredGrid(char line[256]);
00166
00167
00168 int NumberOfUnstructuredPoints;
00169 vtkPoints* UnstructuredPoints;
00170 vtkIdTypeArray* UnstructuredNodeIds;
00171
00172 int ElementIdsListed;
00173
00174
00175 int FileSize;
00176
00177 ifstream *IFile;
00178 private:
00179 vtkEnSight6BinaryReader(const vtkEnSight6BinaryReader&);
00180 void operator=(const vtkEnSight6BinaryReader&);
00181 };
00182
00183 #endif
00184