VTK
vtkEnSight6BinaryReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkEnSight6BinaryReader.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
38#ifndef vtkEnSight6BinaryReader_h
39#define vtkEnSight6BinaryReader_h
40
41#include "vtkIOEnSightModule.h" // For export macro
42#include "vtkEnSightReader.h"
43
45class vtkIdTypeArray;
46class vtkPoints;
47
48class VTKIOENSIGHT_EXPORT vtkEnSight6BinaryReader : public vtkEnSightReader
49{
50public:
53 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
54
55protected:
58
59 // Returns 1 if successful. Sets file size as a side action.
60 int OpenFile(const char* filename);
61
65 virtual int ReadGeometryFile(const char* fileName, int timeStep,
66 vtkMultiBlockDataSet *output);
67
72 virtual int ReadMeasuredGeometryFile(const char* fileName, int timeStep,
73 vtkMultiBlockDataSet *output);
74
80 virtual int ReadScalarsPerNode(const char* fileName, const char* description,
81 int timeStep, vtkMultiBlockDataSet *output,
82 int measured = 0, int numberOfComponents = 1,
83 int component = 0);
84
89 virtual int ReadVectorsPerNode(const char* fileName, const char* description,
90 int timeStep, vtkMultiBlockDataSet *output,
91 int measured = 0);
92
97 virtual int ReadTensorsPerNode(const char* fileName, const char* description,
98 int timeStep, vtkMultiBlockDataSet *output);
99
105 virtual int ReadScalarsPerElement(const char* fileName,
106 const char* description, int timeStep,
107 vtkMultiBlockDataSet *output,
108 int numberOfComponents = 1,
109 int component = 0);
110
115 virtual int ReadVectorsPerElement(const char* fileName, const char* description,
116 int timeStep, vtkMultiBlockDataSet *output);
117
122 virtual int ReadTensorsPerElement(const char* fileName, const char* description,
123 int timeStep, vtkMultiBlockDataSet *output);
124
129 virtual int CreateUnstructuredGridOutput(int partId,
130 char line[256],
131 const char* name,
132 vtkMultiBlockDataSet *output);
133
138 virtual int CreateStructuredGridOutput(int partId,
139 char line[256],
140 const char* name,
141 vtkMultiBlockDataSet *output);
142
147 int ReadLine(char result[80]);
148
154 int ReadIntNumber(int *result);
155
160 int ReadIntArray(int *result, int numInts);
161
166 int ReadFloatArray(float *result, int numFloats);
167
169
173 int SkipStructuredGrid(char line[256]);
174 int SkipUnstructuredGrid(char line[256]);
176
177 // global list of points for the unstructured parts of the model
180 vtkIdTypeArray* UnstructuredNodeIds; // matching of node ids to point ids
181
183
184 // The size of the file is used to choose byte order.
186
187 ifstream *IFile;
188private:
189 vtkEnSight6BinaryReader(const vtkEnSight6BinaryReader&) VTK_DELETE_FUNCTION;
190 void operator=(const vtkEnSight6BinaryReader&) VTK_DELETE_FUNCTION;
191};
192
193#endif
194
class to read binary EnSight6 files
virtual int ReadScalarsPerNode(const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output, int measured=0, int numberOfComponents=1, int component=0)
Read scalars per node for this dataset.
int SkipStructuredGrid(char line[256])
virtual int ReadTensorsPerElement(const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output)
Read tensors per element for this dataset.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int ReadTensorsPerNode(const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output)
Read tensors per node for this dataset.
int ReadFloatArray(float *result, int numFloats)
Internal function to read in a float array.
virtual int ReadVectorsPerElement(const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output)
Read vectors per element for this dataset.
virtual int ReadScalarsPerElement(const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output, int numberOfComponents=1, int component=0)
Read scalars per element for this dataset.
virtual int ReadMeasuredGeometryFile(const char *fileName, int timeStep, vtkMultiBlockDataSet *output)
Read the measured geometry file.
static vtkEnSight6BinaryReader * New()
int ReadLine(char result[80])
Internal function to read in a line up to 80 characters.
int SkipUnstructuredGrid(char line[256])
virtual int ReadGeometryFile(const char *fileName, int timeStep, vtkMultiBlockDataSet *output)
Read the geometry file.
int ReadIntArray(int *result, int numInts)
Internal function to read in an integer array.
int ReadIntNumber(int *result)
Internal function to read in a single integer.
virtual int CreateStructuredGridOutput(int partId, char line[256], const char *name, vtkMultiBlockDataSet *output)
Read a structured part from the geometry file and create a vtkStructuredGridOutput.
int SkipTimeStep()
Read to the next time step in the geometry file.
virtual int CreateUnstructuredGridOutput(int partId, char line[256], const char *name, vtkMultiBlockDataSet *output)
Read an unstructured part (partId) from the geometry file and create a vtkUnstructuredGrid output.
int OpenFile(const char *filename)
virtual int ReadVectorsPerNode(const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output, int measured=0)
Read vectors per node for this dataset.
superclass for EnSight file readers
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition: vtkIndent.h:40
Composite dataset that organizes datasets into blocks.
represent and manipulate 3D points
Definition: vtkPoints.h:40
@ component
Definition: vtkX3D.h:175
@ description
Definition: vtkX3D.h:322
@ name
Definition: vtkX3D.h:219