VTK
vtkXMLUnstructuredDataReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkXMLUnstructuredDataReader.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=========================================================================*/
26#ifndef vtkXMLUnstructuredDataReader_h
27#define vtkXMLUnstructuredDataReader_h
28
29#include "vtkIOXMLModule.h" // For export macro
30#include "vtkXMLDataReader.h"
31
32class vtkCellArray;
33class vtkIdTypeArray;
34class vtkPointSet;
36
37class VTKIOXML_EXPORT vtkXMLUnstructuredDataReader : public vtkXMLDataReader
38{
39public:
41 void PrintSelf(ostream& os, vtkIndent indent);
42
47
52
57
64 void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel);
65
66 // For the specified port, copy the information this reader sets up in
67 // SetupOutputInformation to outInfo
68 virtual void CopyOutputInformation(vtkInformation *outInfo, int port);
69
70
71protected:
74
77 const char* name);
80
81 // Pipeline execute data driver. Called by vtkXMLReader.
83
84 virtual void SetupEmptyOutput();
85 virtual void GetOutputUpdateExtent(int& piece, int& numberOfPieces,
86 int& ghostLevel)=0;
87 virtual void SetupOutputTotals();
88 virtual void SetupNextPiece();
89 void SetupPieces(int numPieces);
91
92 // Setup the output's information.
94
98 int ReadCellArray(vtkIdType numberOfCells, vtkIdType totalNumberOfCells,
99 vtkXMLDataElement* eCells, vtkCellArray* outCells);
100
101 // Read faces and faceoffsets arrays for unstructured grid with polyhedon cells
102 int ReadFaceArray(vtkIdType numberOfCells, vtkXMLDataElement* eCells,
103 vtkIdTypeArray* outFaces, vtkIdTypeArray* outFaceOffsets);
104
105 // Read a data array whose tuples coorrespond to points.
107
108 // Get the number of points/cells in the given piece. Valid after
109 // UpdateInformation.
111 virtual vtkIdType GetNumberOfCellsInPiece(int piece)=0;
112
113 // The update request.
117
118 // The range of pieces from the file that will form the UpdatePiece.
124
125 // The Points element for each piece.
128
130 unsigned long PointsOffset;
132 int CellsNeedToReadTimeStep(vtkXMLDataElement *eNested, int &cellstimestep,
133 unsigned long &cellsoffset);
134
135
136private:
138 void operator=(const vtkXMLUnstructuredDataReader&) VTK_DELETE_FUNCTION;
139};
140
141#endif
Abstract superclass for all arrays.
object to represent cell connectivity
Definition: vtkCellArray.h:51
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition: vtkIndent.h:40
Store vtkAlgorithm input/output information.
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:43
dynamic, self-adjusting array of unsigned char
Represents an XML element and those nested inside.
Superclass for VTK XML file readers.
Superclass for unstructured data XML readers.
void SetupOutputInformation(vtkInformation *outInfo)
int ReadPiece(vtkXMLDataElement *ePiece)
virtual vtkIdType GetNumberOfCellsInPiece(int piece)=0
vtkPointSet * GetOutputAsPointSet()
int ReadFaceArray(vtkIdType numberOfCells, vtkXMLDataElement *eCells, vtkIdTypeArray *outFaces, vtkIdTypeArray *outFaceOffsets)
int ReadCellArray(vtkIdType numberOfCells, vtkIdType totalNumberOfCells, vtkXMLDataElement *eCells, vtkCellArray *outCells)
vtkUnsignedCharArray * ConvertToUnsignedCharArray(vtkDataArray *a)
vtkIdTypeArray * ConvertToIdTypeArray(vtkDataArray *a)
virtual vtkIdType GetNumberOfPointsInPiece(int piece)
void SetupPieces(int numPieces)
int CellsNeedToReadTimeStep(vtkXMLDataElement *eNested, int &cellstimestep, unsigned long &cellsoffset)
virtual void GetOutputUpdateExtent(int &piece, int &numberOfPieces, int &ghostLevel)=0
void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel)
Setup the reader as if the given update extent were requested by its output.
virtual vtkIdType GetNumberOfPieces()
Get the number of pieces in the file.
virtual void SetupOutputTotals()
virtual vtkIdType GetNumberOfPoints()
Get the number of points in the output.
virtual void CopyOutputInformation(vtkInformation *outInfo, int port)
virtual void SetupEmptyOutput()
virtual vtkIdType GetNumberOfCells()
Get the number of cells in the output.
virtual int ReadArrayForPoints(vtkXMLDataElement *da, vtkAbstractArray *outArray)
int PointsNeedToReadTimeStep(vtkXMLDataElement *eNested)
vtkXMLDataElement * FindDataArrayWithName(vtkXMLDataElement *eParent, const char *name)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
@ port
Definition: vtkX3D.h:447
@ name
Definition: vtkX3D.h:219
int vtkIdType
Definition: vtkType.h:287