VTK
vtkXMLUnstructuredGridReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLUnstructuredGridReader.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 vtkXMLUnstructuredGridReader_h
35 #define vtkXMLUnstructuredGridReader_h
36 
37 #include "vtkIOXMLModule.h" // For export macro
39 
41 class vtkIdTypeArray;
42 
44 {
45 public:
47  void PrintSelf(ostream& os, vtkIndent indent);
49 
51 
52  vtkUnstructuredGrid *GetOutput();
53  vtkUnstructuredGrid *GetOutput(int idx);
55 
56 protected:
59 
60  const char* GetDataSetName();
61  void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel);
62  void SetupOutputTotals();
63  void SetupPieces(int numPieces);
64  void DestroyPieces();
65 
66  void SetupOutputData();
67  int ReadPiece(vtkXMLDataElement* ePiece);
68  void SetupNextPiece();
69  int ReadPieceData();
70 
71  // Read a data array whose tuples correspond to cells.
72  virtual int ReadArrayForCells(vtkXMLDataElement* da,
73  vtkAbstractArray* outArray);
74 
75  // Get the number of cells in the given piece. Valid after
76  // UpdateInformation.
77  virtual vtkIdType GetNumberOfCellsInPiece(int piece);
78 
79  virtual int FillOutputPortInformation(int, vtkInformation*);
80 
81  // The index of the cell in the output where the current piece
82  // begins.
84 
85  // The Cells element for each piece.
88 
90  unsigned long CellsOffset;
91 
92 private:
94  void operator=(const vtkXMLUnstructuredGridReader&); // Not implemented.
95 };
96 
97 #endif
virtual const char * GetDataSetName()=0
Represents an XML element and those nested inside.
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.
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:275
virtual int FillOutputPortInformation(int port, vtkInformation *info)
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKIOXML_EXPORT
dataset represents arbitrary combinations of all possible cell types
Read VTK XML UnstructuredGrid files.
virtual void GetOutputUpdateExtent(int &piece, int &numberOfPieces, int &ghostLevel)=0
static vtkAlgorithm * New()
virtual int ReadArrayForCells(vtkXMLDataElement *da, vtkAbstractArray *outArray)
virtual void SetupOutputTotals()
int ReadPiece(vtkXMLDataElement *ePiece)
void PrintSelf(ostream &os, vtkIndent indent)