vtkUnstructuredReader Class Reference

Reader for vtk UNSTRUCTURED_GRID legacy files. Supports single CELLS, POINTS etc. entry only. More...

Collaboration diagram for vtkUnstructuredReader:
[legend]

Public Types

enum  vtkDataType {
  VTK_INT, VTK_UINT, VTK_LONG, VTK_ULONG,
  VTK_FLOAT, VTK_DOUBLE, VTK_STRING, VTK_ID
}
 Enumeration defining the vtk data types. More...
 
enum  vtkDataSetType { VTK_FIELD, VTK_SCALARS, VTK_VECTORS }
 Enumeration defining the vtk dataset types. More...
 
enum  parseMode {
  NOMODE, UNSTRUCTURED_GRID, POLYDATA, CELL_DATA,
  POINT_DATA
}
 Enumeration defining the parse mode - type of data being read. More...
 

Public Member Functions

 ClassName ("vtkUnstructuredReader")
 Runtime type information. More...
 
 vtkUnstructuredReader (const objectRegistry &obr, ISstream &)
 Construct from Istream, read all. More...
 
const string header () const
 Header. More...
 
const stringtitle () const
 Title. More...
 
const stringdataType () const
 DataType. More...
 
const pointFieldpoints () const
 Points. More...
 
pointFieldpoints ()
 
const cellShapeListcells () const
 3D cells. More...
 
cellShapeListcells ()
 
const labelListcellMap () const
 
const faceListfaces () const
 2D cells (=faces) More...
 
faceListfaces ()
 
const labelListfaceMap () const
 
const labelListListlines () const
 1D cells (=open lines) More...
 
labelListListlines ()
 
const labelListlineMap () const
 
const objectRegistrycellData () const
 Cell based fields. More...
 
objectRegistrycellData ()
 
const objectRegistrypointData () const
 Point based fields. More...
 
objectRegistrypointData ()
 
const objectRegistryotherData () const
 Other fields. More...
 
objectRegistryotherData ()
 
template<class Type >
void printFieldStats (const objectRegistry &) const
 Debug: print contents of objectRegistry. More...
 

Static Public Attributes

static const Enum< vtkDataTypevtkDataTypeNames
 
static const Enum< vtkDataSetTypevtkDataSetTypeNames
 
static const Enum< parseModeparseModeNames
 

Detailed Description

Reader for vtk UNSTRUCTURED_GRID legacy files. Supports single CELLS, POINTS etc. entry only.

- all integer types (int, unsigned_int, long etc.) become Foam::label

  • all real types (float, double) become Foam::scalar
  • POINTS becomes OpenFOAM points
  • CELLS gets split into OpenFOAM
    • cells
    • faces
    • lines
  • CELL_DATA or POINT_DATA gets stored on the corresponding objectRegistry in original vtk numbering order so use e.g. faceMap() to go from entry in faces() back to vtk numbering.
Source files

Definition at line 66 of file vtkUnstructuredReader.H.

Member Enumeration Documentation

◆ vtkDataType

Enumeration defining the vtk data types.

Enumerator
VTK_INT 
VTK_UINT 
VTK_LONG 
VTK_ULONG 
VTK_FLOAT 
VTK_DOUBLE 
VTK_STRING 
VTK_ID 

Definition at line 73 of file vtkUnstructuredReader.H.

◆ vtkDataSetType

Enumeration defining the vtk dataset types.

Enumerator
VTK_FIELD 
VTK_SCALARS 
VTK_VECTORS 

Definition at line 89 of file vtkUnstructuredReader.H.

◆ parseMode

enum parseMode

Enumeration defining the parse mode - type of data being read.

Enumerator
NOMODE 
UNSTRUCTURED_GRID 
POLYDATA 
CELL_DATA 
POINT_DATA 

Definition at line 100 of file vtkUnstructuredReader.H.

Constructor & Destructor Documentation

◆ vtkUnstructuredReader()

vtkUnstructuredReader ( const objectRegistry obr,
ISstream inFile 
)

Construct from Istream, read all.

Definition at line 506 of file vtkUnstructuredReader.C.

References Foam::read().

Here is the call graph for this function:

Member Function Documentation

◆ ClassName()

ClassName ( "vtkUnstructuredReader"  )

Runtime type information.

◆ header()

const string header ( ) const
inline

Header.

Definition at line 226 of file vtkUnstructuredReader.H.

◆ title()

const string& title ( ) const
inline

Title.

Definition at line 232 of file vtkUnstructuredReader.H.

◆ dataType()

const string& dataType ( ) const
inline

DataType.

Definition at line 238 of file vtkUnstructuredReader.H.

◆ points() [1/2]

const pointField& points ( ) const
inline

Points.

Definition at line 245 of file vtkUnstructuredReader.H.

Referenced by VTKedgeFormat::read(), and VTKsurfaceFormat< Face >::read().

Here is the caller graph for this function:

◆ points() [2/2]

pointField& points ( )
inline

Definition at line 250 of file vtkUnstructuredReader.H.

◆ cells() [1/2]

const cellShapeList& cells ( ) const
inline

3D cells.

Definition at line 256 of file vtkUnstructuredReader.H.

◆ cells() [2/2]

cellShapeList& cells ( )
inline

Definition at line 261 of file vtkUnstructuredReader.H.

◆ cellMap()

const labelList& cellMap ( ) const
inline

Definition at line 266 of file vtkUnstructuredReader.H.

◆ faces() [1/2]

const faceList& faces ( ) const
inline

2D cells (=faces)

Definition at line 272 of file vtkUnstructuredReader.H.

Referenced by VTKsurfaceFormat< Face >::read().

Here is the caller graph for this function:

◆ faces() [2/2]

faceList& faces ( )
inline

Definition at line 277 of file vtkUnstructuredReader.H.

◆ faceMap()

const labelList& faceMap ( ) const
inline

Definition at line 282 of file vtkUnstructuredReader.H.

◆ lines() [1/2]

const labelListList& lines ( ) const
inline

1D cells (=open lines)

Definition at line 288 of file vtkUnstructuredReader.H.

Referenced by VTKedgeFormat::read().

Here is the caller graph for this function:

◆ lines() [2/2]

labelListList& lines ( )
inline

Definition at line 293 of file vtkUnstructuredReader.H.

◆ lineMap()

const labelList& lineMap ( ) const
inline

Definition at line 298 of file vtkUnstructuredReader.H.

◆ cellData() [1/2]

const objectRegistry& cellData ( ) const
inline

Cell based fields.

Definition at line 304 of file vtkUnstructuredReader.H.

Referenced by VTKsurfaceFormat< Face >::read().

Here is the caller graph for this function:

◆ cellData() [2/2]

objectRegistry& cellData ( )
inline

Definition at line 309 of file vtkUnstructuredReader.H.

◆ pointData() [1/2]

const objectRegistry& pointData ( ) const
inline

Point based fields.

Definition at line 315 of file vtkUnstructuredReader.H.

◆ pointData() [2/2]

objectRegistry& pointData ( )
inline

Definition at line 320 of file vtkUnstructuredReader.H.

◆ otherData() [1/2]

const objectRegistry& otherData ( ) const
inline

Other fields.

Definition at line 326 of file vtkUnstructuredReader.H.

◆ otherData() [2/2]

objectRegistry& otherData ( )
inline

Definition at line 331 of file vtkUnstructuredReader.H.

◆ printFieldStats()

void printFieldStats ( const objectRegistry obj) const

Debug: print contents of objectRegistry.

Definition at line 55 of file vtkUnstructuredReaderTemplates.C.

References Foam::endl(), Foam::Info, objectRegistry::lookupObject(), objectRegistry::names(), and Foam::nl.

Here is the call graph for this function:

Member Data Documentation

◆ vtkDataTypeNames

const Foam::Enum< Foam::vtkUnstructuredReader::vtkDataType > vtkDataTypeNames
static

Definition at line 85 of file vtkUnstructuredReader.H.

◆ vtkDataSetTypeNames

const Foam::Enum< Foam::vtkUnstructuredReader::vtkDataSetType > vtkDataSetTypeNames
static

Definition at line 96 of file vtkUnstructuredReader.H.

◆ parseModeNames

const Foam::Enum< Foam::vtkUnstructuredReader::parseMode > parseModeNames
static

Definition at line 109 of file vtkUnstructuredReader.H.


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