VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
IO
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
=========================================================================*/
25
#ifndef __vtkXMLUnstructuredDataReader_h
26
#define __vtkXMLUnstructuredDataReader_h
27
28
#include "
vtkXMLDataReader.h
"
29
30
class
vtkCellArray
;
31
class
vtkIdTypeArray
;
32
class
vtkPointSet
;
33
class
vtkUnsignedCharArray
;
34
35
class
VTK_IO_EXPORT
vtkXMLUnstructuredDataReader
:
public
vtkXMLDataReader
36
{
37
public
:
38
vtkTypeMacro(
vtkXMLUnstructuredDataReader
,
vtkXMLDataReader
);
39
void
PrintSelf
(ostream& os,
vtkIndent
indent);
40
42
virtual
vtkIdType
GetNumberOfPoints
();
43
45
virtual
vtkIdType
GetNumberOfCells
();
46
51
void
SetupUpdateExtent(
int
piece,
int
numberOfPieces,
int
ghostLevel);
52
53
// For the specified port, copy the information this reader sets up in
54
// SetupOutputInformation to outInfo
55
virtual
void
CopyOutputInformation
(
vtkInformation
*outInfo,
int
port
);
56
57
58
protected
:
59
vtkXMLUnstructuredDataReader
();
60
~
vtkXMLUnstructuredDataReader
();
61
62
vtkPointSet
* GetOutputAsPointSet();
63
vtkXMLDataElement
* FindDataArrayWithName(
vtkXMLDataElement
* eParent,
64
const
char
*
name
);
65
vtkIdTypeArray
* ConvertToIdTypeArray(
vtkDataArray
* a);
66
vtkUnsignedCharArray
* ConvertToUnsignedCharArray(
vtkDataArray
* a);
67
68
// Pipeline execute data driver. Called by vtkXMLReader.
69
void
ReadXMLData
();
70
71
virtual
void
SetupEmptyOutput
();
72
virtual
void
GetOutputUpdateExtent(
int
& piece,
int
& numberOfPieces,
73
int
& ghostLevel)=0;
74
virtual
void
SetupOutputTotals();
75
virtual
void
SetupNextPiece();
76
void
SetupPieces
(
int
numPieces);
77
void
DestroyPieces
();
78
79
// Setup the output's information.
80
void
SetupOutputInformation
(
vtkInformation
*outInfo);
81
82
void
SetupOutputData
();
83
int
ReadPiece
(
vtkXMLDataElement
* ePiece);
84
int
ReadPieceData
();
85
int
ReadCellArray(
vtkIdType
numberOfCells,
vtkIdType
totalNumberOfCells,
86
vtkXMLDataElement
* eCells,
vtkCellArray
* outCells);
87
88
// Read faces and faceoffsets arrays for unstructured grid with polyhedon cells
89
int
ReadFaceArray(
vtkIdType
numberOfCells,
vtkXMLDataElement
* eCells,
90
vtkIdTypeArray
* outFaces,
vtkIdTypeArray
* outFaceOffsets);
91
92
// Read a data array whose tuples coorrespond to points.
93
virtual
int
ReadArrayForPoints
(
vtkXMLDataElement
* da,
vtkAbstractArray
* outArray);
94
95
// Get the number of points/cells in the given piece. Valid after
96
// UpdateInformation.
97
virtual
vtkIdType
GetNumberOfPointsInPiece(
int
piece);
98
virtual
vtkIdType
GetNumberOfCellsInPiece(
int
piece)=0;
99
100
// The update request.
101
int
UpdatePiece
;
102
int
UpdateNumberOfPieces
;
103
int
UpdateGhostLevel
;
104
105
// The range of pieces from the file that will form the UpdatePiece.
106
int
StartPiece
;
107
int
EndPiece
;
108
vtkIdType
TotalNumberOfPoints
;
109
vtkIdType
TotalNumberOfCells
;
110
vtkIdType
StartPoint
;
111
112
// The Points element for each piece.
113
vtkXMLDataElement
**
PointElements
;
114
vtkIdType
*
NumberOfPoints
;
115
116
int
PointsTimeStep
;
117
unsigned
long
PointsOffset
;
118
int
PointsNeedToReadTimeStep(
vtkXMLDataElement
*eNested);
119
int
CellsNeedToReadTimeStep(
vtkXMLDataElement
*eNested,
int
&cellstimestep,
120
unsigned
long
&cellsoffset);
121
122
123
private
:
124
vtkXMLUnstructuredDataReader
(
const
vtkXMLUnstructuredDataReader
&);
// Not implemented.
125
void
operator=(
const
vtkXMLUnstructuredDataReader
&);
// Not implemented.
126
};
127
128
#endif
Generated on Thu Mar 13 2014 08:10:24 for VTK by
1.8.1.2