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 =========================================================================*/
34 #ifndef __vtkXMLPolyDataReader_h
35 #define __vtkXMLPolyDataReader_h
36 
38 
39 class vtkPolyData;
40 
42 {
43 public:
45  void PrintSelf(ostream& os, vtkIndent indent);
46  static vtkXMLPolyDataReader *New();
47 
49 
50  vtkPolyData *GetOutput();
51  vtkPolyData *GetOutput(int idx);
53 
55 
56  virtual vtkIdType GetNumberOfVerts();
57  virtual vtkIdType GetNumberOfLines();
58  virtual vtkIdType GetNumberOfStrips();
59  virtual vtkIdType GetNumberOfPolys();
61 
62 protected:
65 
66  const char* GetDataSetName();
67  void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel);
68  void SetupOutputTotals();
69  void SetupNextPiece();
70  void SetupPieces(int numPieces);
71  void DestroyPieces();
72 
73  void SetupOutputData();
74  int ReadPiece(vtkXMLDataElement* ePiece);
75  int ReadPieceData();
76 
77  // Read a data array whose tuples coorrespond to cells.
78  virtual int ReadArrayForCells(vtkXMLDataElement* da,
79  vtkAbstractArray* outArray);
80 
81  // Get the number of cells in the given piece. Valid after
82  // UpdateInformation.
83  virtual vtkIdType GetNumberOfCellsInPiece(int piece);
84 
85  virtual int FillOutputPortInformation(int, vtkInformation*);
86 
87  // The size of the UpdatePiece.
96 
97  // The cell elements for each piece.
106 
107  // For TimeStep support
109  unsigned long VertsOffset;
111  unsigned long LinesOffset;
113  unsigned long StripsOffset;
115  unsigned long PolysOffset;
116 
117 private:
118  vtkXMLPolyDataReader(const vtkXMLPolyDataReader&); // Not implemented.
119  void operator=(const vtkXMLPolyDataReader&); // Not implemented.
120 };
121 
122 #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:255
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:81
virtual int FillOutputPortInformation(int port, vtkInformation *info)
a simple class to control print indentation
Definition: vtkIndent.h:37
vtkXMLDataElement ** StripElements
virtual void GetOutputUpdateExtent(int &piece, int &numberOfPieces, int &ghostLevel)=0
static vtkAlgorithm * New()
#define VTK_IO_EXPORT
vtkXMLDataElement ** VertElements
virtual int ReadArrayForCells(vtkXMLDataElement *da, vtkAbstractArray *outArray)
virtual void SetupOutputTotals()
int ReadPiece(vtkXMLDataElement *ePiece)
void PrintSelf(ostream &os, vtkIndent indent)