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 =========================================================================*/
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) VTK_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() VTK_OVERRIDE;
71 
72  const char* GetDataSetName() VTK_OVERRIDE;
73  void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel) VTK_OVERRIDE;
74  void SetupOutputTotals() VTK_OVERRIDE;
75  void SetupNextPiece() VTK_OVERRIDE;
76  void SetupPieces(int numPieces) VTK_OVERRIDE;
77  void DestroyPieces() VTK_OVERRIDE;
78 
79  void SetupOutputData() VTK_OVERRIDE;
80  int ReadPiece(vtkXMLDataElement* ePiece) VTK_OVERRIDE;
81  int ReadPieceData() VTK_OVERRIDE;
82 
83  // Read a data array whose tuples coorrespond to cells.
84  int ReadArrayForCells(vtkXMLDataElement* da,
85  vtkAbstractArray* outArray) VTK_OVERRIDE;
86 
87  // Get the number of cells in the given piece. Valid after
88  // UpdateInformation.
89  vtkIdType GetNumberOfCellsInPiece(int piece) VTK_OVERRIDE;
90 
91  int FillOutputPortInformation(int, vtkInformation*) VTK_OVERRIDE;
92 
93  // The size of the UpdatePiece.
94  int TotalNumberOfVerts;
95  int TotalNumberOfLines;
96  int TotalNumberOfStrips;
97  int TotalNumberOfPolys;
98  vtkIdType StartVert;
99  vtkIdType StartLine;
100  vtkIdType StartStrip;
101  vtkIdType StartPoly;
102 
103  // The cell elements for each piece.
104  vtkXMLDataElement** VertElements;
105  vtkXMLDataElement** LineElements;
106  vtkXMLDataElement** StripElements;
107  vtkXMLDataElement** PolyElements;
108  vtkIdType* NumberOfVerts;
109  vtkIdType* NumberOfLines;
110  vtkIdType* NumberOfStrips;
111  vtkIdType* NumberOfPolys;
112 
113  // For TimeStep support
114  int VertsTimeStep;
115  unsigned long VertsOffset;
116  int LinesTimeStep;
117  unsigned long LinesOffset;
118  int StripsTimeStep;
119  unsigned long StripsOffset;
120  int PolysTimeStep;
121  unsigned long PolysOffset;
122 
123 private:
124  vtkXMLPolyDataReader(const vtkXMLPolyDataReader&) VTK_DELETE_FUNCTION;
125  void operator=(const vtkXMLPolyDataReader&) VTK_DELETE_FUNCTION;
126 };
127 
128 #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:85
a simple class to control print indentation
Definition: vtkIndent.h:39
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.