VTK: IO/XML/vtkXMLPolyDataReader.h Source File

| VTK 9.3.1

vtkXMLPolyDataReader.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 vtkXMLPolyDataReader_h
33 #define vtkXMLPolyDataReader_h
34
35 #include "vtkIOXMLModule.h" // For export macro
36 #include "vtkXMLUnstructuredDataReader.h"
37
38 VTK_ABI_NAMESPACE_BEGIN
39 class vtkPolyData;
40
41 class VTKIOXML_EXPORT vtkXMLPolyDataReader : public vtkXMLUnstructuredDataReader
42 {
43 public:
44 vtkTypeMacro(vtkXMLPolyDataReader, vtkXMLUnstructuredDataReader);
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46 static vtkXMLPolyDataReader* New();
47
49
52 vtkPolyData* GetOutput();
53 vtkPolyData* GetOutput(int idx);
55
57
60 virtual vtkIdType GetNumberOfVerts();
61 virtual vtkIdType GetNumberOfLines();
62 virtual vtkIdType GetNumberOfStrips();
63 virtual vtkIdType GetNumberOfPolys();
65
66 protected:
67 vtkXMLPolyDataReader();
68 ~vtkXMLPolyDataReader() override;
69
70 const char* GetDataSetName() override;
71 void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel) override;
72 void SetupOutputTotals() override;
73 void SetupNextPiece() override;
74 void SetupPieces(int numPieces) override;
75 void DestroyPieces() override;
76
77 void SetupOutputData() override;
78 int ReadPiece(vtkXMLDataElement* ePiece) override;
79 int ReadPieceData() override;
80
81 // Read a data array whose tuples coorrespond to cells.
82 int ReadArrayForCells(vtkXMLDataElement* da, vtkAbstractArray* outArray) override;
83
84 // Get the number of cells in the given piece. Valid after
85 // UpdateInformation.
86 vtkIdType GetNumberOfCellsInPiece(int piece) override;
87
88 int FillOutputPortInformation(int, vtkInformation*) override;
89
90 // The size of the UpdatePiece.
91 int TotalNumberOfVerts;
92 int TotalNumberOfLines;
93 int TotalNumberOfStrips;
94 int TotalNumberOfPolys;
95 vtkIdType StartVert;
96 vtkIdType StartLine;
97 vtkIdType StartStrip;
98 vtkIdType StartPoly;
99
100 // The cell elements for each piece.
101 vtkXMLDataElement** VertElements;
102 vtkXMLDataElement** LineElements;
103 vtkXMLDataElement** StripElements;
104 vtkXMLDataElement** PolyElements;
105 vtkIdType* NumberOfVerts;
106 vtkIdType* NumberOfLines;
107 vtkIdType* NumberOfStrips;
108 vtkIdType* NumberOfPolys;
109
110 // For TimeStep support
111 int VertsTimeStep;
112 unsigned long VertsOffset;
113 int LinesTimeStep;
114 unsigned long LinesOffset;
115 int StripsTimeStep;
116 unsigned long StripsOffset;
117 int PolysTimeStep;
118 unsigned long PolysOffset;
119
120 private:
121 vtkXMLPolyDataReader(const vtkXMLPolyDataReader&) = delete;
122 void operator=(const vtkXMLPolyDataReader&) = delete;
123 };
124
125 VTK_ABI_NAMESPACE_END
126 #endif
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:76
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
vtkXMLDataElement
Represents an XML element and those nested inside.
Definition: vtkXMLDataElement.h:26
vtkXMLPolyDataReader
Read VTK XML PolyData files.
Definition: vtkXMLPolyDataReader.h:42
vtkXMLPolyDataReader::SetupNextPiece
void SetupNextPiece() override
vtkXMLPolyDataReader::LineElements
vtkXMLDataElement ** LineElements
Definition: vtkXMLPolyDataReader.h:102
vtkXMLPolyDataReader::SetupOutputTotals
void SetupOutputTotals() override
vtkXMLPolyDataReader::GetNumberOfVerts
virtual vtkIdType GetNumberOfVerts()
Get the number of verts/lines/strips/polys in the output.
vtkXMLPolyDataReader::NumberOfPolys
vtkIdType * NumberOfPolys
Definition: vtkXMLPolyDataReader.h:108
vtkXMLPolyDataReader::New
static vtkXMLPolyDataReader * New()
vtkXMLPolyDataReader::NumberOfVerts
vtkIdType * NumberOfVerts
Definition: vtkXMLPolyDataReader.h:105
vtkXMLPolyDataReader::StartPoly
vtkIdType StartPoly
Definition: vtkXMLPolyDataReader.h:98
vtkXMLPolyDataReader::TotalNumberOfPolys
int TotalNumberOfPolys
Definition: vtkXMLPolyDataReader.h:94
vtkXMLPolyDataReader::GetDataSetName
const char * GetDataSetName() override
Get the name of the data set being read.
vtkXMLPolyDataReader::SetupPieces
void SetupPieces(int numPieces) override
vtkXMLPolyDataReader::DestroyPieces
void DestroyPieces() override
vtkXMLPolyDataReader::GetNumberOfStrips
virtual vtkIdType GetNumberOfStrips()
Get the number of verts/lines/strips/polys in the output.
vtkXMLPolyDataReader::VertsOffset
unsigned long VertsOffset
Definition: vtkXMLPolyDataReader.h:112
vtkXMLPolyDataReader::VertsTimeStep
int VertsTimeStep
Definition: vtkXMLPolyDataReader.h:111
vtkXMLPolyDataReader::PolysTimeStep
int PolysTimeStep
Definition: vtkXMLPolyDataReader.h:117
vtkXMLPolyDataReader::TotalNumberOfLines
int TotalNumberOfLines
Definition: vtkXMLPolyDataReader.h:92
vtkXMLPolyDataReader::LinesTimeStep
int LinesTimeStep
Definition: vtkXMLPolyDataReader.h:113
vtkXMLPolyDataReader::GetNumberOfLines
virtual vtkIdType GetNumberOfLines()
Get the number of verts/lines/strips/polys in the output.
vtkXMLPolyDataReader::GetOutputUpdateExtent
void GetOutputUpdateExtent(int &piece, int &numberOfPieces, int &ghostLevel) override
vtkXMLPolyDataReader::vtkXMLPolyDataReader
vtkXMLPolyDataReader()
vtkXMLPolyDataReader::GetOutput
vtkPolyData * GetOutput()
Get the reader's output.
vtkXMLPolyDataReader::NumberOfStrips
vtkIdType * NumberOfStrips
Definition: vtkXMLPolyDataReader.h:107
vtkXMLPolyDataReader::TotalNumberOfVerts
int TotalNumberOfVerts
Definition: vtkXMLPolyDataReader.h:91
vtkXMLPolyDataReader::GetOutput
vtkPolyData * GetOutput(int idx)
Get the reader's output.
vtkXMLPolyDataReader::StripElements
vtkXMLDataElement ** StripElements
Definition: vtkXMLPolyDataReader.h:103
vtkXMLPolyDataReader::PolyElements
vtkXMLDataElement ** PolyElements
Definition: vtkXMLPolyDataReader.h:104
vtkXMLPolyDataReader::StartLine
vtkIdType StartLine
Definition: vtkXMLPolyDataReader.h:96
vtkXMLPolyDataReader::StripsOffset
unsigned long StripsOffset
Definition: vtkXMLPolyDataReader.h:116
vtkXMLPolyDataReader::StartVert
vtkIdType StartVert
Definition: vtkXMLPolyDataReader.h:95
vtkXMLPolyDataReader::GetNumberOfPolys
virtual vtkIdType GetNumberOfPolys()
Get the number of verts/lines/strips/polys in the output.
vtkXMLPolyDataReader::VertElements
vtkXMLDataElement ** VertElements
Definition: vtkXMLPolyDataReader.h:101
vtkXMLPolyDataReader::StartStrip
vtkIdType StartStrip
Definition: vtkXMLPolyDataReader.h:97
vtkXMLPolyDataReader::TotalNumberOfStrips
int TotalNumberOfStrips
Definition: vtkXMLPolyDataReader.h:93
vtkXMLPolyDataReader::NumberOfLines
vtkIdType * NumberOfLines
Definition: vtkXMLPolyDataReader.h:106
vtkXMLPolyDataReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkXMLPolyDataReader::ReadArrayForCells
int ReadArrayForCells(vtkXMLDataElement *da, vtkAbstractArray *outArray) override
vtkXMLPolyDataReader::ReadPieceData
int ReadPieceData() override
vtkXMLPolyDataReader::~vtkXMLPolyDataReader
~vtkXMLPolyDataReader() override
vtkXMLPolyDataReader::FillOutputPortInformation
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
vtkXMLPolyDataReader::ReadPiece
int ReadPiece(vtkXMLDataElement *ePiece) override
vtkXMLPolyDataReader::PolysOffset
unsigned long PolysOffset
Definition: vtkXMLPolyDataReader.h:118
vtkXMLPolyDataReader::LinesOffset
unsigned long LinesOffset
Definition: vtkXMLPolyDataReader.h:114
vtkXMLPolyDataReader::StripsTimeStep
int StripsTimeStep
Definition: vtkXMLPolyDataReader.h:115
vtkXMLPolyDataReader::SetupOutputData
void SetupOutputData() override
Setup the output's data with allocation.
vtkXMLPolyDataReader::GetNumberOfCellsInPiece
vtkIdType GetNumberOfCellsInPiece(int piece) override
vtkXMLUnstructuredDataReader
Superclass for unstructured data XML readers.
Definition: vtkXMLUnstructuredDataReader.h:27
vtkIdType
int vtkIdType
Definition: vtkType.h:315
vtkXMLUnstructuredDataReader.h