VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
vtkGenericEnSightReader Class Reference

class to read any type of EnSight files More...

#include <vtkGenericEnSightReader.h>

Inheritance diagram for vtkGenericEnSightReader:
Inheritance graph
[legend]
Collaboration diagram for vtkGenericEnSightReader:
Collaboration graph
[legend]

List of all members.

Public Types

enum  FileTypes {
  ENSIGHT_6 = 0, ENSIGHT_6_BINARY = 1, ENSIGHT_GOLD = 2, ENSIGHT_GOLD_BINARY = 3,
  ENSIGHT_MASTER_SERVER = 4
}
enum  { FILE_BIG_ENDIAN = 0, FILE_LITTLE_ENDIAN = 1, FILE_UNKNOWN_ENDIAN = 2 }
typedef
vtkMultiBlockDataSetAlgorithm 
Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkGenericEnSightReaderNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
const char * GetDescription (int n)
const char * GetComplexDescription (int n)
const char * GetDescription (int n, int type)
int DetermineEnSightVersion (int quiet=0)
vtkGenericEnSightReaderGetReader ()
void SetCaseFileName (const char *fileName)
virtual char * GetCaseFileName ()
virtual void SetFilePath (const char *)
virtual char * GetFilePath ()
virtual int GetEnSightVersion ()
virtual int GetNumberOfVariables ()
virtual int GetNumberOfComplexVariables ()
int GetNumberOfVariables (int type)
virtual int GetNumberOfScalarsPerNode ()
virtual int GetNumberOfVectorsPerNode ()
virtual int GetNumberOfTensorsSymmPerNode ()
virtual int GetNumberOfScalarsPerElement ()
virtual int GetNumberOfVectorsPerElement ()
virtual int GetNumberOfTensorsSymmPerElement ()
virtual int GetNumberOfScalarsPerMeasuredNode ()
virtual int GetNumberOfVectorsPerMeasuredNode ()
virtual int GetNumberOfComplexScalarsPerNode ()
virtual int GetNumberOfComplexVectorsPerNode ()
virtual int GetNumberOfComplexScalarsPerElement ()
virtual int GetNumberOfComplexVectorsPerElement ()
int GetVariableType (int n)
int GetComplexVariableType (int n)
virtual void SetTimeValue (float value)
virtual float GetTimeValue ()
virtual float GetMinimumTimeValue ()
virtual float GetMaximumTimeValue ()
virtual vtkDataArrayCollectionGetTimeSets ()
virtual void ReadAllVariablesOn ()
virtual void ReadAllVariablesOff ()
virtual void SetReadAllVariables (int)
virtual int GetReadAllVariables ()
virtual vtkDataArraySelectionGetPointDataArraySelection ()
virtual vtkDataArraySelectionGetCellDataArraySelection ()
int GetNumberOfPointArrays ()
int GetNumberOfCellArrays ()
const char * GetPointArrayName (int index)
const char * GetCellArrayName (int index)
int GetPointArrayStatus (const char *name)
int GetCellArrayStatus (const char *name)
void SetPointArrayStatus (const char *name, int status)
void SetCellArrayStatus (const char *name, int status)
void SetByteOrderToBigEndian ()
void SetByteOrderToLittleEndian ()
virtual void SetByteOrder (int)
virtual int GetByteOrder ()
const char * GetByteOrderAsString ()
virtual char * GetGeometryFileName ()
virtual void SetParticleCoordinatesByIndex (int)
virtual int GetParticleCoordinatesByIndex ()
virtual void ParticleCoordinatesByIndexOn ()
virtual void ParticleCoordinatesByIndexOff ()

Static Public Member Functions

static vtkGenericEnSightReaderNew ()
static int IsTypeOf (const char *type)
static vtkGenericEnSightReaderSafeDownCast (vtkObjectBase *o)
static int CanReadFile (const char *casefilename)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkGenericEnSightReader ()
 ~vtkGenericEnSightReader ()
virtual int FillOutputPortInformation (int port, vtkInformation *info)
virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
int ReadLine (char result[256])
int ReadBinaryLine (char result[80])
int ReadNextDataLine (char result[256])
void SelectionModified ()
char ** CreateStringArray (int numStrings)
void DestroyStringArray (int numStrings, char **strings)
void SetDataArraySelectionSetsFromVariables ()
void SetDataArraySelectionSetsFromReader ()
void SetReaderDataArraySelectionSetsFromSelf ()
virtual void SetTimeSets (vtkDataArrayCollection *)
int InsertNewPartId (int partId)
virtual void SetGeometryFileName (const char *)
void AddVariableDescription (const char *description)
void AddComplexVariableDescription (const char *description)
void AddVariableType (int variableType)
void AddComplexVariableType (int variableType)
int ReplaceWildcards (char *fileName, int timeSet, int fileSet)
void ReplaceWildcardsHelper (char *fileName, int num)

Static Protected Member Functions

static void SelectionModifiedCallback (vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)

Protected Attributes

istream * IS
FILE * IFile
vtkGenericEnSightReaderReader
char * CaseFileName
char * GeometryFileName
char * FilePath
intVariableTypes
intComplexVariableTypes
char ** VariableDescriptions
char ** ComplexVariableDescriptions
int NumberOfVariables
int NumberOfComplexVariables
int NumberOfScalarsPerNode
int NumberOfVectorsPerNode
int NumberOfTensorsSymmPerNode
int NumberOfScalarsPerElement
int NumberOfVectorsPerElement
int NumberOfTensorsSymmPerElement
int NumberOfScalarsPerMeasuredNode
int NumberOfVectorsPerMeasuredNode
int NumberOfComplexScalarsPerNode
int NumberOfComplexVectorsPerNode
int NumberOfComplexScalarsPerElement
int NumberOfComplexVectorsPerElement
float TimeValue
float MinimumTimeValue
float MaximumTimeValue
int TimeValueInitialized
vtkDataArrayCollectionTimeSets
int ReadAllVariables
int ByteOrder
int ParticleCoordinatesByIndex
int EnSightVersion
vtkDataArraySelectionPointDataArraySelection
vtkDataArraySelectionCellDataArraySelection
vtkCallbackCommandSelectionObserver
int SelectionModifiedDoNotCallModified
TranslationTableType * TranslationTable

Detailed Description

class to read any type of EnSight files

The class vtkGenericEnSightReader allows the user to read an EnSight data set without a priori knowledge of what type of EnSight data set it is.

Tests:
vtkGenericEnSightReader (Tests)

Definition at line 54 of file vtkGenericEnSightReader.h.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
ENSIGHT_6 
ENSIGHT_6_BINARY 
ENSIGHT_GOLD 
ENSIGHT_GOLD_BINARY 
ENSIGHT_MASTER_SERVER 

Definition at line 183 of file vtkGenericEnSightReader.h.

anonymous enum
Enumerator:
FILE_BIG_ENDIAN 
FILE_LITTLE_ENDIAN 
FILE_UNKNOWN_ENDIAN 

Definition at line 205 of file vtkGenericEnSightReader.h.


Constructor & Destructor Documentation


Member Function Documentation

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

Reimplemented from vtkMultiBlockDataSetAlgorithm.

Reimplemented in vtkEnSightGoldBinaryReader, vtkEnSightGoldReader, vtkEnSight6BinaryReader, vtkEnSight6Reader, and vtkEnSightMasterServerReader.

static int vtkGenericEnSightReader::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 vtkMultiBlockDataSetAlgorithm.

Reimplemented in vtkEnSightGoldBinaryReader, vtkEnSightGoldReader, vtkEnSight6BinaryReader, vtkEnSight6Reader, vtkEnSightReader, and vtkEnSightMasterServerReader.

virtual int vtkGenericEnSightReader::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 vtkMultiBlockDataSetAlgorithm.

Reimplemented in vtkEnSightGoldBinaryReader, vtkEnSightGoldReader, vtkEnSight6BinaryReader, vtkEnSight6Reader, vtkEnSightReader, and vtkEnSightMasterServerReader.

virtual vtkObjectBase* vtkGenericEnSightReader::NewInstanceInternal ( ) const [protected, virtual]
void vtkGenericEnSightReader::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 vtkMultiBlockDataSetAlgorithm.

Reimplemented in vtkEnSightGoldBinaryReader, vtkEnSightGoldReader, vtkEnSight6BinaryReader, vtkEnSight6Reader, vtkEnSightReader, and vtkEnSightMasterServerReader.

void vtkGenericEnSightReader::SetCaseFileName ( const char *  fileName)

Set/Get the Case file name.

virtual char* vtkGenericEnSightReader::GetCaseFileName ( ) [virtual]

Set/Get the Case file name.

virtual void vtkGenericEnSightReader::SetFilePath ( const char *  ) [virtual]

Set/Get the file path.

virtual char* vtkGenericEnSightReader::GetFilePath ( ) [virtual]

Set/Get the file path.

Get the EnSight file version being read.

Get the number of variables listed in the case file.

Get the number of variables listed in the case file.

Get the number of variables of a particular type.

Get the number of variables of a particular type.

Get the number of variables of a particular type.

Get the number of variables of a particular type.

Get the number of variables of a particular type.

Get the number of variables of a particular type.

Get the number of variables of a particular type.

Get the number of variables of a particular type.

Get the number of variables of a particular type.

Get the number of variables of a particular type.

Get the number of variables of a particular type.

Get the number of variables of a particular type.

Get the number of variables of a particular type.

Get the nth description for a non-complex variable.

Get the nth description for a complex variable.

const char* vtkGenericEnSightReader::GetDescription ( int  n,
int  type 
)

Get the nth description of a particular variable type. Returns NULL if no variable of this type exists in this data set. SCALAR_PER_NODE = 0; VECTOR_PER_NODE = 1; TENSOR_SYMM_PER_NODE = 2; SCALAR_PER_ELEMENT = 3; VECTOR_PER_ELEMENT = 4; TENSOR_SYMM_PER_ELEMENT = 5; SCALAR_PER_MEASURED_NODE = 6; VECTOR_PER_MEASURED_NODE = 7; COMPLEX_SCALAR_PER_NODE = 8; COMPLEX_VECTOR_PER_NODE 9; COMPLEX_SCALAR_PER_ELEMENT = 10; COMPLEX_VECTOR_PER_ELEMENT = 11

Get the variable type of variable n.

Get the variable type of variable n.

virtual void vtkGenericEnSightReader::SetTimeValue ( float  value) [virtual]

Set/Get the time value at which to get the value.

Set/Get the time value at which to get the value.

Get the minimum or maximum time value for this data set.

Get the minimum or maximum time value for this data set.

Get the time values per time set

Reads the FORMAT part of the case file to determine whether this is an EnSight6 or EnSightGold data set. Returns an identifier listed in the FileTypes enum or -1 if an error occurred or the file could not be indentified as any EnSight type.

virtual void vtkGenericEnSightReader::ReadAllVariablesOn ( ) [virtual]

Set/get the flag for whether to read all the variables

Set/get the flag for whether to read all the variables

virtual void vtkGenericEnSightReader::SetReadAllVariables ( int  ) [virtual]

Set/get the flag for whether to read all the variables

Set/get the flag for whether to read all the variables

Get the data array selection tables used to configure which data arrays are loaded by the reader.

Get the data array selection tables used to configure which data arrays are loaded by the reader.

Get the number of point or cell arrays available in the input.

Get the number of point or cell arrays available in the input.

Get the name of the point or cell array with the given index in the input.

Get the name of the point or cell array with the given index in the input.

Get/Set whether the point or cell array with the given name is to be read.

Get/Set whether the point or cell array with the given name is to be read.

void vtkGenericEnSightReader::SetPointArrayStatus ( const char *  name,
int  status 
)

Get/Set whether the point or cell array with the given name is to be read.

void vtkGenericEnSightReader::SetCellArrayStatus ( const char *  name,
int  status 
)

Get/Set whether the point or cell array with the given name is to be read.

Set the byte order of the file (remember, more Unix workstations write big endian whereas PCs write little endian). Default is big endian (since most older PLOT3D files were written by workstations).

Set the byte order of the file (remember, more Unix workstations write big endian whereas PCs write little endian). Default is big endian (since most older PLOT3D files were written by workstations).

virtual void vtkGenericEnSightReader::SetByteOrder ( int  ) [virtual]

Set the byte order of the file (remember, more Unix workstations write big endian whereas PCs write little endian). Default is big endian (since most older PLOT3D files were written by workstations).

Set the byte order of the file (remember, more Unix workstations write big endian whereas PCs write little endian). Default is big endian (since most older PLOT3D files were written by workstations).

Set the byte order of the file (remember, more Unix workstations write big endian whereas PCs write little endian). Default is big endian (since most older PLOT3D files were written by workstations).

virtual char* vtkGenericEnSightReader::GetGeometryFileName ( ) [virtual]

Get the Geometry file name. Made public to allow access from apps requiring detailed info about the Data contents

Reimplemented in vtkEnSightGoldReader.

The MeasuredGeometryFile should list particle coordinates from 0->N-1. If a file is loaded where point Ids are listed from 1-N the Id to points reference will be wrong and the data will be generated incorrectly. Setting ParticleCoordinatesByIndex to true will force all Id's to increment from 0->N-1 (relative to their order in the file) and regardless of the actual Id of of the point. Warning, if the Points are listed in non sequential order then setting this flag will reorder them.

Reimplemented in vtkEnSightReader.

The MeasuredGeometryFile should list particle coordinates from 0->N-1. If a file is loaded where point Ids are listed from 1-N the Id to points reference will be wrong and the data will be generated incorrectly. Setting ParticleCoordinatesByIndex to true will force all Id's to increment from 0->N-1 (relative to their order in the file) and regardless of the actual Id of of the point. Warning, if the Points are listed in non sequential order then setting this flag will reorder them.

Reimplemented in vtkEnSightReader.

The MeasuredGeometryFile should list particle coordinates from 0->N-1. If a file is loaded where point Ids are listed from 1-N the Id to points reference will be wrong and the data will be generated incorrectly. Setting ParticleCoordinatesByIndex to true will force all Id's to increment from 0->N-1 (relative to their order in the file) and regardless of the actual Id of of the point. Warning, if the Points are listed in non sequential order then setting this flag will reorder them.

Reimplemented in vtkEnSightReader.

The MeasuredGeometryFile should list particle coordinates from 0->N-1. If a file is loaded where point Ids are listed from 1-N the Id to points reference will be wrong and the data will be generated incorrectly. Setting ParticleCoordinatesByIndex to true will force all Id's to increment from 0->N-1 (relative to their order in the file) and regardless of the actual Id of of the point. Warning, if the Points are listed in non sequential order then setting this flag will reorder them.

Reimplemented in vtkEnSightReader.

static int vtkGenericEnSightReader::CanReadFile ( const char *  casefilename) [static]

Returns true if the file pointed to by casefilename appears to be a valid EnSight case file.

Reimplemented in vtkEnSightMasterServerReader.

Definition at line 238 of file vtkGenericEnSightReader.h.

virtual int vtkGenericEnSightReader::FillOutputPortInformation ( int  port,
vtkInformation info 
) [protected, virtual]

Fill the output port information objects for this algorithm. This is invoked by the first call to GetOutputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

This is called by the superclass. This is the method you should override.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

Reimplemented in vtkEnSightReader, and vtkEnSightMasterServerReader.

This is called by the superclass. This is the method you should override.

Reimplemented from vtkMultiBlockDataSetAlgorithm.

Reimplemented in vtkEnSightReader, and vtkEnSightMasterServerReader.

int vtkGenericEnSightReader::ReadLine ( char  result[256]) [protected]

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

int vtkGenericEnSightReader::ReadBinaryLine ( char  result[80]) [protected]

Internal function to read up to 80 characters from a binary file. Returns zero if there was an error.

int vtkGenericEnSightReader::ReadNextDataLine ( char  result[256]) [protected]
virtual void vtkGenericEnSightReader::SetGeometryFileName ( const char *  ) [protected, virtual]

Set the geometry file name.

Reimplemented in vtkEnSightGoldReader.

void vtkGenericEnSightReader::AddVariableDescription ( const char *  description) [protected]

Add a variable description to the appropriate array.

Reimplemented in vtkEnSightReader.

void vtkGenericEnSightReader::AddComplexVariableDescription ( const char *  description) [protected]

Add a variable description to the appropriate array.

void vtkGenericEnSightReader::AddVariableType ( int  variableType) [protected]

Add a variable type to the appropriate array.

void vtkGenericEnSightReader::AddComplexVariableType ( int  variableType) [protected]

Add a variable type to the appropriate array.

int vtkGenericEnSightReader::ReplaceWildcards ( char *  fileName,
int  timeSet,
int  fileSet 
) [protected]

Replace the wildcards in the geometry file name with appropriate filename numbers as specified in the time set or file set.

void vtkGenericEnSightReader::ReplaceWildcardsHelper ( char *  fileName,
int  num 
) [protected]

Replace the wildcards in the geometry file name with appropriate filename numbers as specified in the time set or file set.

static void vtkGenericEnSightReader::SelectionModifiedCallback ( vtkObject caller,
unsigned long  eid,
void *  clientdata,
void *  calldata 
) [static, protected]
char** vtkGenericEnSightReader::CreateStringArray ( int  numStrings) [protected]
void vtkGenericEnSightReader::DestroyStringArray ( int  numStrings,
char **  strings 
) [protected]
virtual void vtkGenericEnSightReader::SetTimeSets ( vtkDataArrayCollection ) [protected, virtual]

Member Data Documentation

istream* vtkGenericEnSightReader::IS [protected]

Definition at line 311 of file vtkGenericEnSightReader.h.

FILE* vtkGenericEnSightReader::IFile [protected]

Reimplemented in vtkEnSightGoldBinaryReader, and vtkEnSight6BinaryReader.

Definition at line 312 of file vtkGenericEnSightReader.h.

Definition at line 313 of file vtkGenericEnSightReader.h.

Definition at line 315 of file vtkGenericEnSightReader.h.

Definition at line 316 of file vtkGenericEnSightReader.h.

Definition at line 317 of file vtkGenericEnSightReader.h.

Definition at line 320 of file vtkGenericEnSightReader.h.

Definition at line 321 of file vtkGenericEnSightReader.h.

Definition at line 324 of file vtkGenericEnSightReader.h.

Definition at line 325 of file vtkGenericEnSightReader.h.

Definition at line 327 of file vtkGenericEnSightReader.h.

Definition at line 328 of file vtkGenericEnSightReader.h.

Definition at line 331 of file vtkGenericEnSightReader.h.

Definition at line 332 of file vtkGenericEnSightReader.h.

Definition at line 333 of file vtkGenericEnSightReader.h.

Definition at line 334 of file vtkGenericEnSightReader.h.

Definition at line 335 of file vtkGenericEnSightReader.h.

Definition at line 336 of file vtkGenericEnSightReader.h.

Definition at line 337 of file vtkGenericEnSightReader.h.

Definition at line 338 of file vtkGenericEnSightReader.h.

Definition at line 339 of file vtkGenericEnSightReader.h.

Definition at line 340 of file vtkGenericEnSightReader.h.

Definition at line 341 of file vtkGenericEnSightReader.h.

Definition at line 342 of file vtkGenericEnSightReader.h.

Definition at line 344 of file vtkGenericEnSightReader.h.

Definition at line 345 of file vtkGenericEnSightReader.h.

Definition at line 346 of file vtkGenericEnSightReader.h.

Definition at line 349 of file vtkGenericEnSightReader.h.

Definition at line 351 of file vtkGenericEnSightReader.h.

Definition at line 354 of file vtkGenericEnSightReader.h.

Definition at line 356 of file vtkGenericEnSightReader.h.

Reimplemented in vtkEnSightReader.

Definition at line 357 of file vtkGenericEnSightReader.h.

Definition at line 361 of file vtkGenericEnSightReader.h.

Definition at line 365 of file vtkGenericEnSightReader.h.

Definition at line 366 of file vtkGenericEnSightReader.h.

Definition at line 370 of file vtkGenericEnSightReader.h.

Definition at line 374 of file vtkGenericEnSightReader.h.

TranslationTableType* vtkGenericEnSightReader::TranslationTable [protected]

Definition at line 380 of file vtkGenericEnSightReader.h.


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