VTK  9.1.0
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 "vtkEnSightReader.h"
42#include "vtkIOEnSightModule.h" // For export macro
43
45class vtkIdTypeArray;
46class vtkPoints;
47
48class VTKIOENSIGHT_EXPORT vtkEnSight6BinaryReader : public vtkEnSightReader
49{
50public:
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
55protected:
58
59 // Returns 1 if successful. Sets file size as a side action.
60 int OpenFile(const char* filename);
61
65 int ReadGeometryFile(const char* fileName, int timeStep, vtkMultiBlockDataSet* output) override;
66
72 const char* fileName, int timeStep, vtkMultiBlockDataSet* output) override;
73
79 int ReadScalarsPerNode(const char* fileName, const char* description, int timeStep,
80 vtkMultiBlockDataSet* output, int measured = 0, int numberOfComponents = 1,
81 int component = 0) override;
82
87 int ReadVectorsPerNode(const char* fileName, const char* description, int timeStep,
88 vtkMultiBlockDataSet* output, int measured = 0) override;
89
93 int ReadAsymmetricTensorsPerNode(const char* fileName, const char* description, int timeStep,
94 vtkMultiBlockDataSet* output) override;
95
100 int ReadTensorsPerNode(const char* fileName, const char* description, int timeStep,
101 vtkMultiBlockDataSet* output) override;
102
108 int ReadScalarsPerElement(const char* fileName, const char* description, int timeStep,
109 vtkMultiBlockDataSet* output, int numberOfComponents = 1, int component = 0) override;
110
115 int ReadVectorsPerElement(const char* fileName, const char* description, int timeStep,
116 vtkMultiBlockDataSet* output) override;
117
121 int ReadAsymmetricTensorsPerElement(const char* fileName, const char* description, int timeStep,
122 vtkMultiBlockDataSet* output) override;
123
128 int ReadTensorsPerElement(const char* fileName, const char* description, int timeStep,
129 vtkMultiBlockDataSet* output) override;
130
136 int partId, char line[256], const char* name, vtkMultiBlockDataSet* output) override;
137
143 int partId, char line[256], const char* name, vtkMultiBlockDataSet* output) override;
144
149 int ReadLine(char result[80]);
150
156 int ReadIntNumber(int* result);
157
162 int ReadIntArray(int* result, int numInts);
163
168 int ReadFloatArray(float* result, int numFloats);
169
171
175 int SkipStructuredGrid(char line[256]);
176 int SkipUnstructuredGrid(char line[256]);
178
179 // global list of points for the unstructured parts of the model
182 vtkIdTypeArray* UnstructuredNodeIds; // matching of node ids to point ids
183
185
186 // The size of the file is used to choose byte order.
187 vtkTypeUInt64 FileSize;
188
189 istream* BinaryIFile;
190
191private:
193 void operator=(const vtkEnSight6BinaryReader&) = delete;
194};
195
196#endif
class to read binary EnSight6 files
int SkipStructuredGrid(char line[256])
Read to the next time step in the geometry file.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int ReadAsymmetricTensorsPerNode(const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output) override
Not implemented, always return 0;.
int ReadTensorsPerElement(const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output) override
Read tensors per element for this dataset.
int ReadFloatArray(float *result, int numFloats)
Internal function to read in a float array.
int ReadScalarsPerNode(const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output, int measured=0, int numberOfComponents=1, int component=0) override
Read scalars per node for this dataset.
~vtkEnSight6BinaryReader() override
int CreateUnstructuredGridOutput(int partId, char line[256], const char *name, vtkMultiBlockDataSet *output) override
Read an unstructured part (partId) from the geometry file and create a vtkUnstructuredGrid output.
int ReadScalarsPerElement(const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output, int numberOfComponents=1, int component=0) override
Read scalars per element for this dataset.
int ReadGeometryFile(const char *fileName, int timeStep, vtkMultiBlockDataSet *output) override
Read the geometry file.
int ReadTensorsPerNode(const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output) override
Read tensors per node for this dataset.
int CreateStructuredGridOutput(int partId, char line[256], const char *name, vtkMultiBlockDataSet *output) override
Read a structured part from the geometry file and create a vtkStructuredGridOutput.
int ReadAsymmetricTensorsPerElement(const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output) override
Not implemented, always return 0;.
static vtkEnSight6BinaryReader * New()
int ReadVectorsPerNode(const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output, int measured=0) override
Read vectors per node for this dataset.
int ReadLine(char result[80])
Internal function to read in a line up to 80 characters.
int SkipUnstructuredGrid(char line[256])
Read to the next time step in the geometry file.
int ReadIntArray(int *result, int numInts)
Internal function to read in an integer array.
int ReadMeasuredGeometryFile(const char *fileName, int timeStep, vtkMultiBlockDataSet *output) override
Read the measured geometry file.
int ReadIntNumber(int *result)
Internal function to read in a single integer.
int SkipTimeStep()
Read to the next time step in the geometry file.
int OpenFile(const char *filename)
int ReadVectorsPerElement(const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output) override
Read vectors per element for this dataset.
superclass for EnSight file readers
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition: vtkIndent.h:113
Composite dataset that organizes datasets into blocks.
represent and manipulate 3D points
Definition: vtkPoints.h:143