VTK: IO/XML/vtkXMLUnstructuredGridReader.h Source File

| VTK 9.3.1

vtkXMLUnstructuredGridReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
32 #ifndef vtkXMLUnstructuredGridReader_h
33 #define vtkXMLUnstructuredGridReader_h
34
35 #include "vtkIOXMLModule.h" // For export macro
36 #include "vtkXMLUnstructuredDataReader.h"
37
38 VTK_ABI_NAMESPACE_BEGIN
39 class vtkUnstructuredGrid;
40 class vtkIdTypeArray;
41
42 class VTKIOXML_EXPORT vtkXMLUnstructuredGridReader : public vtkXMLUnstructuredDataReader
43 {
44 public:
45 vtkTypeMacro(vtkXMLUnstructuredGridReader, vtkXMLUnstructuredDataReader);
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47 static vtkXMLUnstructuredGridReader* New();
48
50
53 vtkUnstructuredGrid* GetOutput();
54 vtkUnstructuredGrid* GetOutput(int idx);
56
57 protected:
58 vtkXMLUnstructuredGridReader();
59 ~vtkXMLUnstructuredGridReader() override;
60
61 const char* GetDataSetName() override;
62 void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel) override;
63 void SetupOutputTotals() override;
64 void SetupPieces(int numPieces) override;
65 void DestroyPieces() override;
66
67 void SetupOutputData() override;
68 int ReadPiece(vtkXMLDataElement* ePiece) override;
69 void SetupNextPiece() override;
70 int ReadPieceData() override;
71
72 // Read a data array whose tuples correspond to cells.
73 int ReadArrayForCells(vtkXMLDataElement* da, vtkAbstractArray* outArray) override;
74
75 // Get the number of cells in the given piece. Valid after
76 // UpdateInformation.
77 vtkIdType GetNumberOfCellsInPiece(int piece) override;
78
79 int FillOutputPortInformation(int, vtkInformation*) override;
80
81 // The index of the cell in the output where the current piece
82 // begins.
83 vtkIdType StartCell;
84
85 // The Cells element for each piece.
86 vtkXMLDataElement** CellElements;
87 vtkIdType* NumberOfCells;
88
89 int CellsTimeStep;
90 unsigned long CellsOffset;
91
92 private:
93 vtkXMLUnstructuredGridReader(const vtkXMLUnstructuredGridReader&) = delete;
94 void operator=(const vtkXMLUnstructuredGridReader&) = delete;
95 };
96
97 VTK_ABI_NAMESPACE_END
98 #endif
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:76
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:37
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:99
vtkXMLDataElement
Represents an XML element and those nested inside.
Definition: vtkXMLDataElement.h:26
vtkXMLUnstructuredDataReader
Superclass for unstructured data XML readers.
Definition: vtkXMLUnstructuredDataReader.h:27
vtkXMLUnstructuredGridReader
Read VTK XML UnstructuredGrid files.
Definition: vtkXMLUnstructuredGridReader.h:43
vtkXMLUnstructuredGridReader::SetupNextPiece
void SetupNextPiece() override
vtkXMLUnstructuredGridReader::SetupPieces
void SetupPieces(int numPieces) override
vtkXMLUnstructuredGridReader::GetOutput
vtkUnstructuredGrid * GetOutput()
Get the reader's output.
vtkXMLUnstructuredGridReader::GetOutput
vtkUnstructuredGrid * GetOutput(int idx)
Get the reader's output.
vtkXMLUnstructuredGridReader::SetupOutputData
void SetupOutputData() override
Setup the output's data with allocation.
vtkXMLUnstructuredGridReader::CellElements
vtkXMLDataElement ** CellElements
Definition: vtkXMLUnstructuredGridReader.h:86
vtkXMLUnstructuredGridReader::DestroyPieces
void DestroyPieces() override
vtkXMLUnstructuredGridReader::GetDataSetName
const char * GetDataSetName() override
Get the name of the data set being read.
vtkXMLUnstructuredGridReader::FillOutputPortInformation
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
vtkXMLUnstructuredGridReader::New
static vtkXMLUnstructuredGridReader * New()
vtkXMLUnstructuredGridReader::ReadPiece
int ReadPiece(vtkXMLDataElement *ePiece) override
vtkXMLUnstructuredGridReader::NumberOfCells
vtkIdType * NumberOfCells
Definition: vtkXMLUnstructuredGridReader.h:87
vtkXMLUnstructuredGridReader::SetupOutputTotals
void SetupOutputTotals() override
vtkXMLUnstructuredGridReader::CellsOffset
unsigned long CellsOffset
Definition: vtkXMLUnstructuredGridReader.h:90
vtkXMLUnstructuredGridReader::vtkXMLUnstructuredGridReader
vtkXMLUnstructuredGridReader()
vtkXMLUnstructuredGridReader::GetNumberOfCellsInPiece
vtkIdType GetNumberOfCellsInPiece(int piece) override
vtkXMLUnstructuredGridReader::ReadArrayForCells
int ReadArrayForCells(vtkXMLDataElement *da, vtkAbstractArray *outArray) override
vtkXMLUnstructuredGridReader::ReadPieceData
int ReadPieceData() override
vtkXMLUnstructuredGridReader::GetOutputUpdateExtent
void GetOutputUpdateExtent(int &piece, int &numberOfPieces, int &ghostLevel) override
vtkXMLUnstructuredGridReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkXMLUnstructuredGridReader::StartCell
vtkIdType StartCell
Definition: vtkXMLUnstructuredGridReader.h:83
vtkXMLUnstructuredGridReader::CellsTimeStep
int CellsTimeStep
Definition: vtkXMLUnstructuredGridReader.h:89
vtkXMLUnstructuredGridReader::~vtkXMLUnstructuredGridReader
~vtkXMLUnstructuredGridReader() override
vtkIdType
int vtkIdType
Definition: vtkType.h:315
vtkXMLUnstructuredDataReader.h