Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
vtkUnstructuredReader Class Reference

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

Collaboration diagram for vtkUnstructuredReader:
Collaboration graph
[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 - what type of data is being. More...
 
enum  vtkTypes {
  VTK_EMPTY_CELL = 0, VTK_VERTEX = 1, VTK_POLY_VERTEX = 2, VTK_LINE = 3,
  VTK_POLY_LINE = 4, VTK_TRIANGLE = 5, VTK_TRIANGLE_STRIP = 6, VTK_POLYGON = 7,
  VTK_PIXEL = 8, VTK_QUAD = 9, VTK_TETRA = 10, VTK_VOXEL = 11,
  VTK_HEXAHEDRON = 12, VTK_WEDGE = 13, VTK_PYRAMID = 14, VTK_PENTAGONAL_PRISM = 15,
  VTK_HEXAGONAL_PRISM = 16
}
 Enumeration defining the cell types. 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 NamedEnum< vtkDataType, 8 > vtkDataTypeNames
 
static const NamedEnum< vtkDataSetType, 3 > vtkDataSetTypeNames
 
static const NamedEnum< parseMode, 5 > parseModeNames
 

Private Member Functions

template<class T >
void readBlock (Istream &inFile, const label n, List< T > &lst) const
 
void warnUnhandledType (Istream &inFile, const label type, labelHashSet &warningGiven) const
 
void extractCells (Istream &inFile, const labelList &cellTypes, const labelList &cellVertData)
 
void readField (ISstream &inFile, objectRegistry &obj, const word &arrayName, const word &dataType, const label size) const
 
wordList readFieldArray (ISstream &inFile, objectRegistry &obj, const label wantedSize) const
 
objectRegistryselectRegistry (const parseMode readMode)
 
void read (ISstream &inFile)
 
void operator= (const vtkUnstructuredReader &)
 Dissallow assignment. More...
 

Private Attributes

string header_
 Header. More...
 
string title_
 Title. More...
 
string dataType_
 DataType. More...
 
pointField points_
 Points. More...
 
cellShapeList cells_
 3D cells. More...
 
labelList cellMap_
 Map from cells back to original ID. More...
 
faceList faces_
 2D cells (=faces) More...
 
labelList faceMap_
 Map from faces back to original ID. More...
 
labelListList lines_
 1D cells (=edges) More...
 
labelList lineMap_
 
objectRegistry cellData_
 Cell based fields. More...
 
objectRegistry pointData_
 Point based fields. More...
 
objectRegistry otherData_
 Other fields. More...
 

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

Source files

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

◆ vtkDataSetType

Enumeration defining the vtk dataset types.

Enumerator
VTK_FIELD 
VTK_SCALARS 
VTK_VECTORS 

Definition at line 86 of file vtkUnstructuredReader.H.

◆ parseMode

enum parseMode

Enumeration defining the parse mode - what type of data is being.

read

Enumerator
NOMODE 
UNSTRUCTURED_GRID 
POLYDATA 
CELL_DATA 
POINT_DATA 

Definition at line 98 of file vtkUnstructuredReader.H.

◆ vtkTypes

enum vtkTypes

Enumeration defining the cell types.

Enumerator
VTK_EMPTY_CELL 
VTK_VERTEX 
VTK_POLY_VERTEX 
VTK_LINE 
VTK_POLY_LINE 
VTK_TRIANGLE 
VTK_TRIANGLE_STRIP 
VTK_POLYGON 
VTK_PIXEL 
VTK_QUAD 
VTK_TETRA 
VTK_VOXEL 
VTK_HEXAHEDRON 
VTK_WEDGE 
VTK_PYRAMID 
VTK_PENTAGONAL_PRISM 
VTK_HEXAGONAL_PRISM 

Definition at line 111 of file vtkUnstructuredReader.H.

Constructor & Destructor Documentation

◆ vtkUnstructuredReader()

vtkUnstructuredReader ( const objectRegistry obr,
ISstream inFile 
)

Construct from Istream, read all.

Definition at line 538 of file vtkUnstructuredReader.C.

References Foam::read().

Here is the call graph for this function:

Member Function Documentation

◆ readBlock()

void readBlock ( Istream inFile,
const label  n,
List< T > &  lst 
) const
private

Definition at line 37 of file vtkUnstructuredReaderTemplates.C.

References forAll, n, and List::setSize().

Referenced by vtkUnstructuredReader::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ warnUnhandledType()

void warnUnhandledType ( Istream inFile,
const label  type,
labelHashSet warningGiven 
) const
private

Definition at line 86 of file vtkUnstructuredReader.C.

References Foam::endl(), HashSet< Key, Hash >::insert(), IOWarningInFunction, and Foam::type().

Here is the call graph for this function:

◆ extractCells()

void extractCells ( Istream inFile,
const labelList cellTypes,
const labelList cellVertData 
)
private

Definition at line 102 of file vtkUnstructuredReader.C.

References Foam::endl(), Foam::exit(), f(), Foam::FatalIOError, FatalIOErrorInFunction, forAll, Foam::hex(), Foam::Info, lookup(), and List::size().

Referenced by vtkUnstructuredReader::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readField()

void readField ( ISstream inFile,
objectRegistry obj,
const word arrayName,
const word dataType,
const label  size 
) const
private

Definition at line 361 of file vtkUnstructuredReader.C.

References Foam::endl(), forAll, ISstream::getLine(), Foam::Info, and IOWarningInFunction.

Referenced by vtkUnstructuredReader::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readFieldArray()

Foam::wordList readFieldArray ( ISstream inFile,
objectRegistry obj,
const label  wantedSize 
) const
private

Definition at line 463 of file vtkUnstructuredReader.C.

References Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, fields, Foam::Info, Foam::Pout, readField(), and Foam::readLabel().

Referenced by vtkUnstructuredReader::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ selectRegistry()

Foam::objectRegistry & selectRegistry ( const parseMode  readMode)
private

Definition at line 516 of file vtkUnstructuredReader.C.

Referenced by vtkUnstructuredReader::read().

Here is the caller graph for this function:

◆ read()

void read ( ISstream inFile)
private

◆ operator=()

void operator= ( const vtkUnstructuredReader )
private

Dissallow assignment.

◆ ClassName()

ClassName ( "vtkUnstructuredReader"  )

Runtime type information.

◆ header()

const string header ( ) const
inline

Header.

Definition at line 242 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::header_.

◆ title()

const string& title ( ) const
inline

Title.

Definition at line 248 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::title_.

◆ dataType()

const string& dataType ( ) const
inline

DataType.

Definition at line 254 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::dataType_.

Referenced by vtkUnstructuredReader::read().

Here is the caller graph for this function:

◆ points() [1/2]

const pointField& points ( ) const
inline

Points.

Definition at line 261 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::points_.

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

Here is the caller graph for this function:

◆ points() [2/2]

pointField& points ( )
inline

Definition at line 266 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::points_.

◆ cells() [1/2]

const cellShapeList& cells ( ) const
inline

3D cells.

Definition at line 272 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::cells_.

◆ cells() [2/2]

cellShapeList& cells ( )
inline

Definition at line 277 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::cells_.

◆ cellMap()

const labelList& cellMap ( ) const
inline

Definition at line 282 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::cellMap_.

◆ faces() [1/2]

const faceList& faces ( ) const
inline

2D cells (=faces)

Definition at line 288 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::faces_.

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

Here is the caller graph for this function:

◆ faces() [2/2]

faceList& faces ( )
inline

Definition at line 293 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::faces_.

◆ faceMap()

const labelList& faceMap ( ) const
inline

Definition at line 298 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::faceMap_.

◆ lines() [1/2]

const labelListList& lines ( ) const
inline

1D cells (=open lines)

Definition at line 304 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::lines_.

Referenced by VTKedgeFormat::read().

Here is the caller graph for this function:

◆ lines() [2/2]

labelListList& lines ( )
inline

Definition at line 309 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::lines_.

◆ lineMap()

const labelList& lineMap ( ) const
inline

Definition at line 314 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::lineMap_.

◆ cellData() [1/2]

const objectRegistry& cellData ( ) const
inline

Cell based fields.

Definition at line 320 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::cellData_.

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

Here is the caller graph for this function:

◆ cellData() [2/2]

objectRegistry& cellData ( )
inline

Definition at line 325 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::cellData_.

◆ pointData() [1/2]

const objectRegistry& pointData ( ) const
inline

Point based fields.

Definition at line 331 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::pointData_.

◆ pointData() [2/2]

Definition at line 336 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::pointData_.

◆ otherData() [1/2]

const objectRegistry& otherData ( ) const
inline

Other fields.

Definition at line 342 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::otherData_.

◆ otherData() [2/2]

objectRegistry& otherData ( )
inline

Definition at line 347 of file vtkUnstructuredReader.H.

References vtkUnstructuredReader::otherData_.

◆ printFieldStats()

void printFieldStats ( const objectRegistry obj) const

Debug: print contents of objectRegistry.

Definition at line 53 of file vtkUnstructuredReaderTemplates.C.

References Foam::endl(), fieldNames, forAll, Foam::Info, objectRegistry::lookupObject(), objectRegistry::names(), Foam::nl, and List::size().

Here is the call graph for this function:

Field Documentation

◆ vtkDataTypeNames

const NamedEnum< vtkUnstructuredReader::vtkDataType, 8 > vtkDataTypeNames
static

Definition at line 82 of file vtkUnstructuredReader.H.

Referenced by vtkUnstructuredReader::read().

◆ vtkDataSetTypeNames

const NamedEnum< vtkUnstructuredReader::vtkDataSetType, 3 > vtkDataSetTypeNames
static

Definition at line 93 of file vtkUnstructuredReader.H.

◆ parseModeNames

const NamedEnum< vtkUnstructuredReader::parseMode, 5 > parseModeNames
static

Definition at line 107 of file vtkUnstructuredReader.H.

Referenced by vtkUnstructuredReader::read().

◆ header_

string header_
private

Header.

Definition at line 136 of file vtkUnstructuredReader.H.

Referenced by vtkUnstructuredReader::header(), and vtkUnstructuredReader::read().

◆ title_

string title_
private

Title.

Definition at line 139 of file vtkUnstructuredReader.H.

Referenced by vtkUnstructuredReader::read(), and vtkUnstructuredReader::title().

◆ dataType_

string dataType_
private

DataType.

Definition at line 142 of file vtkUnstructuredReader.H.

Referenced by vtkUnstructuredReader::dataType(), and vtkUnstructuredReader::read().

◆ points_

pointField points_
private

Points.

Definition at line 148 of file vtkUnstructuredReader.H.

Referenced by vtkUnstructuredReader::points(), and vtkUnstructuredReader::read().

◆ cells_

cellShapeList cells_
private

3D cells.

Definition at line 151 of file vtkUnstructuredReader.H.

Referenced by vtkUnstructuredReader::cells(), and vtkUnstructuredReader::read().

◆ cellMap_

labelList cellMap_
private

Map from cells back to original ID.

Definition at line 154 of file vtkUnstructuredReader.H.

Referenced by vtkUnstructuredReader::cellMap().

◆ faces_

faceList faces_
private

2D cells (=faces)

Definition at line 157 of file vtkUnstructuredReader.H.

Referenced by vtkUnstructuredReader::faces(), and vtkUnstructuredReader::read().

◆ faceMap_

labelList faceMap_
private

Map from faces back to original ID.

Definition at line 160 of file vtkUnstructuredReader.H.

Referenced by vtkUnstructuredReader::faceMap(), and vtkUnstructuredReader::read().

◆ lines_

labelListList lines_
private

1D cells (=edges)

Definition at line 163 of file vtkUnstructuredReader.H.

Referenced by vtkUnstructuredReader::lines(), and vtkUnstructuredReader::read().

◆ lineMap_

labelList lineMap_
private

◆ cellData_

objectRegistry cellData_
private

Cell based fields.

Definition at line 171 of file vtkUnstructuredReader.H.

Referenced by vtkUnstructuredReader::cellData(), and vtkUnstructuredReader::read().

◆ pointData_

objectRegistry pointData_
private

Point based fields.

Definition at line 174 of file vtkUnstructuredReader.H.

Referenced by vtkUnstructuredReader::pointData(), and vtkUnstructuredReader::read().

◆ otherData_

objectRegistry otherData_
private

Other fields.

Definition at line 177 of file vtkUnstructuredReader.H.

Referenced by vtkUnstructuredReader::otherData(), and vtkUnstructuredReader::read().


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