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