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_INT64 , 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 &is)
 Construct from input stream, read all. More...
 
const stringheader () const noexcept
 Header. More...
 
const stringtitle () const noexcept
 Title. More...
 
const stringdataType () const noexcept
 DataType. More...
 
const pointFieldpoints () const noexcept
 Points. More...
 
pointFieldpoints () noexcept
 
const cellShapeListcells () const noexcept
 3D cells More...
 
cellShapeListcells () noexcept
 
const labelListcellMap () const noexcept
 
const faceListfaces () const noexcept
 2D cells (=faces) More...
 
faceListfaces () noexcept
 
const labelListfaceMap () const noexcept
 
const labelListListlines () const noexcept
 1D cells (=open lines) More...
 
labelListListlines () noexcept
 
const labelListlineMap () const noexcept
 
const objectRegistrycellData () const noexcept
 Cell based fields. More...
 
objectRegistrycellData () noexcept
 
const objectRegistrypointData () const noexcept
 Point based fields. More...
 
objectRegistrypointData () noexcept
 
const objectRegistryotherData () const noexcept
 Other fields. More...
 
objectRegistryotherData () noexcept
 

Static Public Member Functions

template<class Type >
static void printFieldStats (const objectRegistry &)
 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 67 of file vtkUnstructuredReader.H.

Member Enumeration Documentation

◆ vtkDataType

Enumeration defining the vtk data types.

Enumerator
VTK_INT 
VTK_INT64 
VTK_UINT 
VTK_LONG 
VTK_ULONG 
VTK_FLOAT 
VTK_DOUBLE 
VTK_STRING 
VTK_ID 

Definition at line 74 of file vtkUnstructuredReader.H.

◆ vtkDataSetType

Enumeration defining the vtk dataset types.

Enumerator
VTK_FIELD 
VTK_SCALARS 
VTK_VECTORS 

Definition at line 91 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 102 of file vtkUnstructuredReader.H.

Constructor & Destructor Documentation

◆ vtkUnstructuredReader()

vtkUnstructuredReader ( const objectRegistry obr,
ISstream is 
)

Construct from input stream, read all.

Definition at line 593 of file vtkUnstructuredReader.C.

Member Function Documentation

◆ ClassName()

ClassName ( "vtkUnstructuredReader"  )

Runtime type information.

◆ header()

const string & header ( ) const
inlinenoexcept

Header.

Definition at line 236 of file vtkUnstructuredReader.H.

◆ title()

const string & title ( ) const
inlinenoexcept

Title.

Definition at line 242 of file vtkUnstructuredReader.H.

◆ dataType()

const string & dataType ( ) const
inlinenoexcept

DataType.

Definition at line 248 of file vtkUnstructuredReader.H.

◆ points() [1/2]

const pointField & points ( ) const
inlinenoexcept

Points.

Definition at line 255 of file vtkUnstructuredReader.H.

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

Here is the caller graph for this function:

◆ points() [2/2]

pointField & points ( )
inlinenoexcept

Definition at line 260 of file vtkUnstructuredReader.H.

◆ cells() [1/2]

const cellShapeList & cells ( ) const
inlinenoexcept

3D cells

Definition at line 266 of file vtkUnstructuredReader.H.

◆ cells() [2/2]

cellShapeList & cells ( )
inlinenoexcept

Definition at line 271 of file vtkUnstructuredReader.H.

◆ cellMap()

const labelList & cellMap ( ) const
inlinenoexcept

Definition at line 276 of file vtkUnstructuredReader.H.

◆ faces() [1/2]

const faceList & faces ( ) const
inlinenoexcept

2D cells (=faces)

Definition at line 282 of file vtkUnstructuredReader.H.

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

Here is the caller graph for this function:

◆ faces() [2/2]

faceList & faces ( )
inlinenoexcept

Definition at line 287 of file vtkUnstructuredReader.H.

◆ faceMap()

const labelList & faceMap ( ) const
inlinenoexcept

Definition at line 292 of file vtkUnstructuredReader.H.

◆ lines() [1/2]

const labelListList & lines ( ) const
inlinenoexcept

1D cells (=open lines)

Definition at line 298 of file vtkUnstructuredReader.H.

Referenced by VTKedgeFormat::read().

Here is the caller graph for this function:

◆ lines() [2/2]

labelListList & lines ( )
inlinenoexcept

Definition at line 303 of file vtkUnstructuredReader.H.

◆ lineMap()

const labelList & lineMap ( ) const
inlinenoexcept

Definition at line 308 of file vtkUnstructuredReader.H.

◆ cellData() [1/2]

const objectRegistry & cellData ( ) const
inlinenoexcept

Cell based fields.

Definition at line 314 of file vtkUnstructuredReader.H.

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

Here is the caller graph for this function:

◆ cellData() [2/2]

objectRegistry & cellData ( )
inlinenoexcept

Definition at line 319 of file vtkUnstructuredReader.H.

◆ pointData() [1/2]

const objectRegistry & pointData ( ) const
inlinenoexcept

Point based fields.

Definition at line 325 of file vtkUnstructuredReader.H.

◆ pointData() [2/2]

objectRegistry & pointData ( )
inlinenoexcept

Definition at line 330 of file vtkUnstructuredReader.H.

◆ otherData() [1/2]

const objectRegistry & otherData ( ) const
inlinenoexcept

Other fields.

Definition at line 336 of file vtkUnstructuredReader.H.

◆ otherData() [2/2]

objectRegistry & otherData ( )
inlinenoexcept

Definition at line 341 of file vtkUnstructuredReader.H.

◆ printFieldStats()

void printFieldStats ( const objectRegistry obj)
static

Debug: print contents of objectRegistry.

Definition at line 34 of file vtkUnstructuredReaderTemplates.C.

References Foam::endl(), Foam::Info, objectRegistry::lookupObject(), Foam::nl, UList< T >::size(), and objectRegistry::sortedNames().

Here is the call graph for this function:

Member Data Documentation

◆ vtkDataTypeNames

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

Definition at line 87 of file vtkUnstructuredReader.H.

◆ vtkDataSetTypeNames

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

Definition at line 98 of file vtkUnstructuredReader.H.

◆ parseModeNames

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

Definition at line 111 of file vtkUnstructuredReader.H.


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