vtkEnSightGoldBinaryReader Class Reference

#include <vtkEnSightGoldBinaryReader.h>

Inheritance diagram for vtkEnSightGoldBinaryReader:

Inheritance graph
[legend]
Collaboration diagram for vtkEnSightGoldBinaryReader:

Collaboration graph
[legend]

List of all members.


Detailed Description

class to read binary EnSight Gold files

vtkEnSightGoldBinaryReader is a class to read EnSight Gold files into vtk. Because the different parts of the EnSight data can be of various data types, this reader produces multiple outputs, one per part in the input file. All variable information is being stored in field data. The descriptions listed in the case file are used as the array names in the field data. For complex vector variables, the description is appended with _r (for the array of real values) and _i (for the array if imaginary values). Complex scalar variables are stored as a single array with 2 components, real and imaginary, listed in that order.

Warning:
You must manually call Update on this reader and then connect the rest of the pipeline because (due to the nature of the file format) it is not possible to know ahead of time how many outputs you will have or what types they will be. This reader can only handle static EnSight datasets (both static geometry and variables).
Thanks:
Thanks to Yvan Fournier for providing the code to support nfaced elements.
Tests:
vtkEnSightGoldBinaryReader (Tests)

Definition at line 49 of file vtkEnSightGoldBinaryReader.h.


Public Types

typedef vtkEnSightReader Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
virtual void PrintSelf (ostream &os, vtkIndent indent)

Static Public Member Functions

static vtkEnSightGoldBinaryReaderNew ()
static int IsTypeOf (const char *type)
static vtkEnSightGoldBinaryReaderSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkEnSightGoldBinaryReader ()
 ~vtkEnSightGoldBinaryReader ()
int OpenFile (const char *filename)
int InitializeFile (const char *filename)
int ReadLine (char result[80])
int ReadIntArray (int *result, int numInts)
int ReadFloatArray (float *result, int numFloats)
int CountTimeSteps ()
virtual int ReadGeometryFile (const char *fileName, int timeStep, vtkMultiBlockDataSet *output)
virtual int ReadMeasuredGeometryFile (const char *fileName, int timeStep, vtkMultiBlockDataSet *output)
virtual int ReadScalarsPerNode (const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output, int measured=0, int numberOfComponents=1, int component=0)
virtual int ReadVectorsPerNode (const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output, int measured=0)
virtual int ReadTensorsPerNode (const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output)
virtual int ReadScalarsPerElement (const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output, int numberOfComponents=1, int component=0)
virtual int ReadVectorsPerElement (const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output)
virtual int ReadTensorsPerElement (const char *fileName, const char *description, int timeStep, vtkMultiBlockDataSet *output)
virtual int CreateUnstructuredGridOutput (int partId, char line[80], const char *name, vtkMultiBlockDataSet *output)
virtual int CreateStructuredGridOutput (int partId, char line[256], const char *name, vtkMultiBlockDataSet *output)
int CreateRectilinearGridOutput (int partId, char line[256], const char *name, vtkMultiBlockDataSet *output)
int CreateImageDataOutput (int partId, char line[80], const char *name, vtkMultiBlockDataSet *output)
int ReadInt (int *result)
int ReadPartId (int *result)
int SkipTimeStep ()
int SkipStructuredGrid (char line[256])
int SkipUnstructuredGrid (char line[256])
int SkipRectilinearGrid (char line[256])
int SkipImageData (char line[256])

Protected Attributes

int NodeIdsListed
int ElementIdsListed
int Fortran
ifstream * IFile
int FileSize

Member Typedef Documentation

Reimplemented from vtkEnSightReader.

Definition at line 53 of file vtkEnSightGoldBinaryReader.h.


Constructor & Destructor Documentation

vtkEnSightGoldBinaryReader::vtkEnSightGoldBinaryReader (  )  [protected]

vtkEnSightGoldBinaryReader::~vtkEnSightGoldBinaryReader (  )  [protected]


Member Function Documentation

static vtkEnSightGoldBinaryReader* vtkEnSightGoldBinaryReader::New (  )  [static]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkGenericEnSightReader.

virtual const char* vtkEnSightGoldBinaryReader::GetClassName (  )  [virtual]

Reimplemented from vtkEnSightReader.

static int vtkEnSightGoldBinaryReader::IsTypeOf ( const char *  name  )  [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkEnSightReader.

virtual int vtkEnSightGoldBinaryReader::IsA ( const char *  name  )  [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkEnSightReader.

static vtkEnSightGoldBinaryReader* vtkEnSightGoldBinaryReader::SafeDownCast ( vtkObject o  )  [static]

Reimplemented from vtkEnSightReader.

virtual void vtkEnSightGoldBinaryReader::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkEnSightReader.

int vtkEnSightGoldBinaryReader::OpenFile ( const char *  filename  )  [protected]

int vtkEnSightGoldBinaryReader::InitializeFile ( const char *  filename  )  [protected]

virtual int vtkEnSightGoldBinaryReader::ReadGeometryFile ( const char *  fileName,
int  timeStep,
vtkMultiBlockDataSet output 
) [protected, virtual]

Read the geometry file. If an error occurred, 0 is returned; otherwise 1.

Implements vtkEnSightReader.

virtual int vtkEnSightGoldBinaryReader::ReadMeasuredGeometryFile ( const char *  fileName,
int  timeStep,
vtkMultiBlockDataSet output 
) [protected, virtual]

Read the measured geometry file. If an error occurred, 0 is returned; otherwise 1.

Implements vtkEnSightReader.

virtual int vtkEnSightGoldBinaryReader::ReadScalarsPerNode ( const char *  fileName,
const char *  description,
int  timeStep,
vtkMultiBlockDataSet output,
int  measured = 0,
int  numberOfComponents = 1,
int  component = 0 
) [protected, virtual]

Read scalars per node for this dataset. If an error occurred, 0 is returned; otherwise 1. If there will be more than one component in the data array, it is assumed that 0 is the first component added.

Implements vtkEnSightReader.

virtual int vtkEnSightGoldBinaryReader::ReadVectorsPerNode ( const char *  fileName,
const char *  description,
int  timeStep,
vtkMultiBlockDataSet output,
int  measured = 0 
) [protected, virtual]

Read vectors per node for this dataset. If an error occurred, 0 is returned; otherwise 1.

Implements vtkEnSightReader.

virtual int vtkEnSightGoldBinaryReader::ReadTensorsPerNode ( const char *  fileName,
const char *  description,
int  timeStep,
vtkMultiBlockDataSet output 
) [protected, virtual]

Read tensors per node for this dataset. If an error occurred, 0 is returned; otherwise 1.

Implements vtkEnSightReader.

virtual int vtkEnSightGoldBinaryReader::ReadScalarsPerElement ( const char *  fileName,
const char *  description,
int  timeStep,
vtkMultiBlockDataSet output,
int  numberOfComponents = 1,
int  component = 0 
) [protected, virtual]

Read scalars per element for this dataset. If an error occurred, 0 is returned; otherwise 1. If there will be more than one componenet in the data array, it is assumed that 0 is the first component added.

Implements vtkEnSightReader.

virtual int vtkEnSightGoldBinaryReader::ReadVectorsPerElement ( const char *  fileName,
const char *  description,
int  timeStep,
vtkMultiBlockDataSet output 
) [protected, virtual]

Read vectors per element for this dataset. If an error occurred, 0 is returned; otherwise 1.

Implements vtkEnSightReader.

virtual int vtkEnSightGoldBinaryReader::ReadTensorsPerElement ( const char *  fileName,
const char *  description,
int  timeStep,
vtkMultiBlockDataSet output 
) [protected, virtual]

Read tensors per element for this dataset. If an error occurred, 0 is returned; otherwise 1.

Implements vtkEnSightReader.

virtual int vtkEnSightGoldBinaryReader::CreateUnstructuredGridOutput ( int  partId,
char  line[80],
const char *  name,
vtkMultiBlockDataSet output 
) [protected, virtual]

Read an unstructured part (partId) from the geometry file and create a vtkUnstructuredGrid output. Return 0 if EOF reached. Return -1 if an error occurred.

Implements vtkEnSightReader.

virtual int vtkEnSightGoldBinaryReader::CreateStructuredGridOutput ( int  partId,
char  line[256],
const char *  name,
vtkMultiBlockDataSet output 
) [protected, virtual]

Read a structured part from the geometry file and create a vtkStructuredGrid output. Return 0 if EOF reached.

int vtkEnSightGoldBinaryReader::CreateRectilinearGridOutput ( int  partId,
char  line[256],
const char *  name,
vtkMultiBlockDataSet output 
) [protected]

Read a structured part from the geometry file and create a vtkRectilinearGrid output. Return 0 if EOF reached.

int vtkEnSightGoldBinaryReader::CreateImageDataOutput ( int  partId,
char  line[80],
const char *  name,
vtkMultiBlockDataSet output 
) [protected]

Read a structured part from the geometry file and create a vtkImageData output. Return 0 if EOF reached.

int vtkEnSightGoldBinaryReader::ReadLine ( char  result[80]  )  [protected]

Internal function to read in a line up to 80 characters. Returns zero if there was an error.

int vtkEnSightGoldBinaryReader::ReadInt ( int *  result  )  [protected]

Internal function to read in a single integer. Returns zero if there was an error.

int vtkEnSightGoldBinaryReader::ReadPartId ( int *  result  )  [protected]

Internal function to read in a single integer. Returns zero if there was an error.

int vtkEnSightGoldBinaryReader::ReadIntArray ( int *  result,
int  numInts 
) [protected]

Internal function to read in an integer array. Returns zero if there was an error.

int vtkEnSightGoldBinaryReader::ReadFloatArray ( float *  result,
int  numFloats 
) [protected]

Internal function to read in a float array. Returns zero if there was an error.

int vtkEnSightGoldBinaryReader::CountTimeSteps (  )  [protected]

Counts the number of timesteps in the geometry file This function assumes the file is already open and returns the number of timesteps remaining in the file The file will be closed after calling this method

int vtkEnSightGoldBinaryReader::SkipTimeStep (  )  [protected]

Read to the next time step in the geometry file.

int vtkEnSightGoldBinaryReader::SkipStructuredGrid ( char  line[256]  )  [protected]

Read to the next time step in the geometry file.

int vtkEnSightGoldBinaryReader::SkipUnstructuredGrid ( char  line[256]  )  [protected]

Read to the next time step in the geometry file.

int vtkEnSightGoldBinaryReader::SkipRectilinearGrid ( char  line[256]  )  [protected]

Read to the next time step in the geometry file.

int vtkEnSightGoldBinaryReader::SkipImageData ( char  line[256]  )  [protected]

Read to the next time step in the geometry file.


Member Data Documentation

Definition at line 198 of file vtkEnSightGoldBinaryReader.h.

Definition at line 199 of file vtkEnSightGoldBinaryReader.h.

Definition at line 200 of file vtkEnSightGoldBinaryReader.h.

ifstream* vtkEnSightGoldBinaryReader::IFile [protected]

Reimplemented from vtkGenericEnSightReader.

Definition at line 202 of file vtkEnSightGoldBinaryReader.h.

Definition at line 204 of file vtkEnSightGoldBinaryReader.h.


The documentation for this class was generated from the following file:

Generated on Mon Sep 27 18:22:45 2010 for VTK by  doxygen 1.5.6