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
23 #ifndef vtkXMLPolyDataReader_h
24 #define vtkXMLPolyDataReader_h
25 
26 #include "vtkIOXMLModule.h" // For export macro
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class vtkPolyData;
31 
32 class VTKIOXML_EXPORT vtkXMLPolyDataReader : public vtkXMLUnstructuredDataReader
33 {
34 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37  static vtkXMLPolyDataReader* New();
38 
40 
43  vtkPolyData* GetOutput();
44  vtkPolyData* GetOutput(int idx);
46 
48 
51  virtual vtkIdType GetNumberOfVerts();
52  virtual vtkIdType GetNumberOfLines();
53  virtual vtkIdType GetNumberOfStrips();
54  virtual vtkIdType GetNumberOfPolys();
56 
57 protected:
59  ~vtkXMLPolyDataReader() override;
60 
61  const char* GetDataSetName() override;
62  void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel) override;
63  void SetupOutputTotals() override;
64  void SetupNextPiece() override;
65  void SetupPieces(int numPieces) override;
66  void DestroyPieces() override;
67 
68  void SetupOutputData() override;
69  int ReadPiece(vtkXMLDataElement* ePiece) override;
70  int ReadPieceData() override;
71 
72  // Read a data array whose tuples coorrespond 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 size of the UpdatePiece.
90 
91  // The cell elements for each piece.
100 
101  // For TimeStep support
103  unsigned long VertsOffset;
105  unsigned long LinesOffset;
107  unsigned long StripsOffset;
109  unsigned long PolysOffset;
110 
111 private:
113  void operator=(const vtkXMLPolyDataReader&) = delete;
114 };
115 
116 VTK_ABI_NAMESPACE_END
117 #endif
vtkXMLDataElement ** LineElements
vtkXMLDataElement ** PolyElements
virtual const char * GetDataSetName()=0
Get the name of the data set being read.
Represents an XML element and those nested inside.
Read VTK XML PolyData files.
Store vtkAlgorithm input/output information.
Abstract superclass for all arrays.
virtual vtkIdType GetNumberOfCellsInPiece(int piece)=0
Superclass for unstructured data XML readers.
void SetupPieces(int numPieces) override
int vtkIdType
Definition: vtkType.h:315
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkXMLDataElement ** StripElements
void SetupOutputData() override
Setup the output's data with allocation.
virtual void GetOutputUpdateExtent(int &piece, int &numberOfPieces, int &ghostLevel)=0
static vtkAlgorithm * New()
vtkXMLDataElement ** VertElements
virtual int ReadArrayForCells(vtkXMLDataElement *da, vtkAbstractArray *outArray)
int ReadPiece(vtkXMLDataElement *ePiece) override
void DestroyPieces() override
virtual void SetupOutputTotals()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.