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 
38 
40 class vtkIdTypeArray;
41 
43 {
44 public:
46  void PrintSelf(ostream& os, vtkIndent indent);
48 
50 
51  vtkUnstructuredGrid *GetOutput();
52  vtkUnstructuredGrid *GetOutput(int idx);
54 
55 protected:
58 
59  const char* GetDataSetName();
60  void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel);
61  void SetupOutputTotals();
62  void SetupPieces(int numPieces);
63  void DestroyPieces();
64 
65  void SetupOutputData();
66  int ReadPiece(vtkXMLDataElement* ePiece);
67  void SetupNextPiece();
68  int ReadPieceData();
69 
70  // Read a data array whose tuples correspond to cells.
71  virtual int ReadArrayForCells(vtkXMLDataElement* da,
72  vtkAbstractArray* outArray);
73 
74  // Get the number of cells in the given piece. Valid after
75  // UpdateInformation.
76  virtual vtkIdType GetNumberOfCellsInPiece(int piece);
77 
78  virtual int FillOutputPortInformation(int, vtkInformation*);
79 
80  // The index of the cell in the output where the current piece
81  // begins.
83 
84  // The Cells element for each piece.
87 
89  unsigned long CellsOffset;
90 
91 private:
93  void operator=(const vtkXMLUnstructuredGridReader&); // Not implemented.
94 };
95 
96 #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:255
virtual int FillOutputPortInformation(int port, vtkInformation *info)
a simple class to control print indentation
Definition: vtkIndent.h:37
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()
#define VTK_IO_EXPORT
virtual int ReadArrayForCells(vtkXMLDataElement *da, vtkAbstractArray *outArray)
virtual void SetupOutputTotals()
int ReadPiece(vtkXMLDataElement *ePiece)
void PrintSelf(ostream &os, vtkIndent indent)