VTK  9.2.6
vtkXMLPolyDataReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLPolyDataReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
35 #ifndef vtkXMLPolyDataReader_h
36 #define vtkXMLPolyDataReader_h
37 
38 #include "vtkIOXMLModule.h" // For export macro
40 
41 class vtkPolyData;
42 
43 class VTKIOXML_EXPORT vtkXMLPolyDataReader : public vtkXMLUnstructuredDataReader
44 {
45 public:
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48  static vtkXMLPolyDataReader* New();
49 
51 
54  vtkPolyData* GetOutput();
55  vtkPolyData* GetOutput(int idx);
57 
59 
62  virtual vtkIdType GetNumberOfVerts();
63  virtual vtkIdType GetNumberOfLines();
64  virtual vtkIdType GetNumberOfStrips();
65  virtual vtkIdType GetNumberOfPolys();
67 
68 protected:
70  ~vtkXMLPolyDataReader() override;
71 
72  const char* GetDataSetName() override;
73  void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel) override;
74  void SetupOutputTotals() override;
75  void SetupNextPiece() override;
76  void SetupPieces(int numPieces) override;
77  void DestroyPieces() override;
78 
79  void SetupOutputData() override;
80  int ReadPiece(vtkXMLDataElement* ePiece) override;
81  int ReadPieceData() override;
82 
83  // Read a data array whose tuples coorrespond to cells.
84  int ReadArrayForCells(vtkXMLDataElement* da, vtkAbstractArray* outArray) override;
85 
86  // Get the number of cells in the given piece. Valid after
87  // UpdateInformation.
88  vtkIdType GetNumberOfCellsInPiece(int piece) override;
89 
90  int FillOutputPortInformation(int, vtkInformation*) override;
91 
92  // The size of the UpdatePiece.
101 
102  // The cell elements for each piece.
111 
112  // For TimeStep support
114  unsigned long VertsOffset;
116  unsigned long LinesOffset;
118  unsigned long StripsOffset;
120  unsigned long PolysOffset;
121 
122 private:
124  void operator=(const vtkXMLPolyDataReader&) = delete;
125 };
126 
127 #endif
vtkXMLDataElement ** LineElements
vtkXMLDataElement ** PolyElements
virtual const char * GetDataSetName()=0
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:332
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
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:39
vtkXMLDataElement ** StripElements
void SetupOutputData() override
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.