Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/IO/vtkEnSight6BinaryReader.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkEnSight6BinaryReader.h,v $ 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 =========================================================================*/ 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 // Returns 1 if successful. Sets file size as a side action. 00057 int OpenFile(const char* filename); 00058 00061 virtual int ReadGeometryFile(char* fileName, int timeStep); 00062 00065 virtual int ReadMeasuredGeometryFile(char* fileName, int timeStep); 00066 00068 00072 virtual int ReadScalarsPerNode(char* fileName, char* description, 00073 int timeStep, int measured = 0, 00074 int numberOfComponents = 1, 00075 int component = 0); 00077 00079 00081 virtual int ReadVectorsPerNode(char* fileName, char* description, 00082 int timeStep, int measured = 0); 00084 00086 00088 virtual int ReadTensorsPerNode(char* fileName, char* description, 00089 int timeStep); 00091 00093 00097 virtual int ReadScalarsPerElement(char* fileName, char* description, 00098 int timeStep, int numberOfComponents = 1, 00099 int component = 0); 00101 00103 00105 virtual int ReadVectorsPerElement(char* fileName, char* description, 00106 int timeStep); 00108 00110 00112 virtual int ReadTensorsPerElement(char* fileName, 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 00139 int ReadIntNumber(int *result); 00140 00143 int ReadIntArray(int *result, int numInts); 00144 00147 int ReadFloatArray(float *result, int numFloats); 00148 00150 00151 void SkipTimeStep(); 00152 int SkipStructuredGrid(char line[256]); 00153 int SkipUnstructuredGrid(char line[256]); 00155 00156 // global list of points for the unstructured parts of the model 00157 int NumberOfUnstructuredPoints; 00158 vtkPoints* UnstructuredPoints; 00159 vtkIdTypeArray* UnstructuredNodeIds; // matching of node ids to point ids 00160 00161 int ElementIdsListed; 00162 00163 // The size of the file is used to choose byte order. 00164 int FileSize; 00165 00166 ifstream *IFile; 00167 private: 00168 vtkEnSight6BinaryReader(const vtkEnSight6BinaryReader&); // Not implemented. 00169 void operator=(const vtkEnSight6BinaryReader&); // Not implemented. 00170 }; 00171 00172 #endif 00173