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) 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.
85  vtkAbstractArray* outArray) override;
86 
87  // Get the number of cells in the given piece. Valid after
88  // UpdateInformation.
89  vtkIdType GetNumberOfCellsInPiece(int piece) override;
90 
91  int FillOutputPortInformation(int, vtkInformation*) override;
92 
93  // The size of the UpdatePiece.
102 
103  // The cell elements for each piece.
112 
113  // For TimeStep support
115  unsigned long VertsOffset;
117  unsigned long LinesOffset;
119  unsigned long StripsOffset;
121  unsigned long PolysOffset;
122 
123 private:
125  void operator=(const vtkXMLPolyDataReader&) = delete;
126 };
127 
128 #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:347
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
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.