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

vtkEnSightGoldBinaryReader.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkEnSightGoldBinaryReader.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 =========================================================================*/
00040 #ifndef __vtkEnSightGoldBinaryReader_h
00041 #define __vtkEnSightGoldBinaryReader_h
00042 
00043 #include "vtkEnSightReader.h"
00044 
00045 class VTK_IO_EXPORT vtkEnSightGoldBinaryReader : public vtkEnSightReader
00046 {
00047 public:
00048   static vtkEnSightGoldBinaryReader *New();
00049   vtkTypeRevisionMacro(vtkEnSightGoldBinaryReader, vtkEnSightReader);
00050   virtual void PrintSelf(ostream& os, vtkIndent indent);
00051  
00052 protected:
00053   vtkEnSightGoldBinaryReader();
00054   ~vtkEnSightGoldBinaryReader();
00055   
00056   // Returns 1 if successful.  Sets file size as a side action.
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 
00071   virtual int ReadScalarsPerNode(const char* fileName, const char* description,
00072                                  int timeStep, int measured = 0,
00073                                  int numberOfComponents = 1,
00074                                  int component = 0);
00076   
00078 
00080   virtual int ReadVectorsPerNode(const char* fileName, const char* description,
00081                                  int timeStep, int measured = 0);
00083 
00085 
00087   virtual int ReadTensorsPerNode(const char* fileName, const char* description,
00088                                  int timeStep);
00090 
00092 
00095   virtual int ReadScalarsPerElement(const char* fileName, const char* description,
00096                                     int timeStep, int numberOfComponents = 1,
00097                                     int component = 0);
00099 
00101 
00103   virtual int ReadVectorsPerElement(const char* fileName, const char* description,
00104                                     int timeStep);
00106 
00108 
00110   virtual int ReadTensorsPerElement(const char* fileName, const char* description,
00111                                     int timeStep);
00113 
00115 
00118   virtual int CreateUnstructuredGridOutput(int partId, 
00119                                            char line[80],
00120                                            const char* name);
00122   
00124 
00126   virtual int CreateStructuredGridOutput(int partId, 
00127                                          char line[256],
00128                                          const char* name);
00130   
00133   int CreateRectilinearGridOutput(int partId, char line[256], const char* name);
00134   
00137   int CreateImageDataOutput(int partId, char line[80], const char* name);
00138   
00141   int ReadLine(char result[80]);
00142 
00144 
00146   int ReadInt(int *result);
00147   int ReadPartId(int *result);
00149 
00152   int ReadIntArray(int *result, int numInts);
00153 
00156   int ReadFloatArray(float *result, int numFloats);
00157 
00159 
00160   int SkipTimeStep();
00161   int SkipStructuredGrid(char line[256]);
00162   int SkipUnstructuredGrid(char line[256]);
00163   int SkipRectilinearGrid(char line[256]);
00164   int SkipImageData(char line[256]);
00166   
00167   int NodeIdsListed;
00168   int ElementIdsListed;
00169   
00170   ifstream *IFile;
00171   // The size of the file could be used to choose byte order.
00172   int FileSize;
00173 
00174 private:
00175   vtkEnSightGoldBinaryReader(const vtkEnSightGoldBinaryReader&);  // Not implemented.
00176   void operator=(const vtkEnSightGoldBinaryReader&);  // Not implemented.
00177 };
00178 
00179 #endif

Generated on Mon Jan 21 23:07:31 2008 for VTK by  doxygen 1.4.3-20050530