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);
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:
71 
72  const char* GetDataSetName();
73  void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel);
74  void SetupOutputTotals();
75  void SetupNextPiece();
76  void SetupPieces(int numPieces);
77  void DestroyPieces();
78 
79  void SetupOutputData();
80  int ReadPiece(vtkXMLDataElement* ePiece);
81  int ReadPieceData();
82 
83  // Read a data array whose tuples coorrespond to cells.
84  virtual int ReadArrayForCells(vtkXMLDataElement* da,
85  vtkAbstractArray* outArray);
86 
87  // Get the number of cells in the given piece. Valid after
88  // UpdateInformation.
89  virtual vtkIdType GetNumberOfCellsInPiece(int piece);
90 
91  virtual int FillOutputPortInformation(int, vtkInformation*);
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:
124  vtkXMLPolyDataReader(const vtkXMLPolyDataReader&) VTK_DELETE_FUNCTION;
125  void operator=(const vtkXMLPolyDataReader&) VTK_DELETE_FUNCTION;
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
void SetupPieces(int numPieces)
Superclass for unstructured data XML readers.
int vtkIdType
Definition: vtkType.h:287
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
virtual void GetOutputUpdateExtent(int &piece, int &numberOfPieces, int &ghostLevel)=0
static vtkAlgorithm * New()
vtkXMLDataElement ** VertElements
virtual int ReadArrayForCells(vtkXMLDataElement *da, vtkAbstractArray *outArray)
virtual void SetupOutputTotals()
int ReadPiece(vtkXMLDataElement *ePiece)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.