VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
IO
XML
vtkXMLPDataReader.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkXMLPDataReader.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 __vtkXMLPDataReader_h
27
#define __vtkXMLPDataReader_h
28
29
#include "vtkIOXMLModule.h"
// For export macro
30
#include "
vtkXMLReader.h
"
31
32
class
vtkDataArray
;
33
class
vtkDataSet
;
34
class
vtkXMLDataReader
;
35
36
class
VTKIOXML_EXPORT
vtkXMLPDataReader
:
public
vtkXMLReader
37
{
38
public
:
39
vtkTypeMacro(
vtkXMLPDataReader
,
vtkXMLReader
);
40
void
PrintSelf
(ostream& os,
vtkIndent
indent);
41
43
44
vtkGetMacro(NumberOfPieces,
int
);
46
47
// For the specified port, copy the information this reader sets up in
48
// SetupOutputInformation to outInfo
49
virtual
void
CopyOutputInformation
(
vtkInformation
*outInfo,
int
port
);
50
51
protected
:
52
vtkXMLPDataReader
();
53
~
vtkXMLPDataReader
();
54
55
// Pipeline execute information driver. Called by vtkXMLReader.
56
int
ReadXMLInformation
();
57
virtual
void
SetupOutputInformation
(
vtkInformation
*outInfo);
58
59
int
ReadPrimaryElement
(
vtkXMLDataElement
* ePrimary);
60
61
vtkDataSet
* GetPieceInputAsDataSet(
int
piece);
62
void
SetupOutputData
();
63
64
virtual
vtkXMLDataReader
* CreatePieceReader()=0;
65
virtual
vtkIdType
GetNumberOfPoints()=0;
66
virtual
vtkIdType
GetNumberOfCells()=0;
67
virtual
void
CopyArrayForPoints(
vtkDataArray
* inArray,
68
vtkDataArray
* outArray)=0;
69
virtual
void
CopyArrayForCells(
vtkDataArray
* inArray,
70
vtkDataArray
* outArray)=0;
71
72
virtual
void
SetupPieces(
int
numPieces);
73
virtual
void
DestroyPieces();
74
int
ReadPiece(
vtkXMLDataElement
* ePiece,
int
index
);
75
virtual
int
ReadPiece(
vtkXMLDataElement
* ePiece);
76
int
ReadPieceData(
int
index
);
77
virtual
int
ReadPieceData();
78
int
CanReadPiece(
int
index
);
79
80
char
* CreatePieceFileName(
const
char
* fileName);
81
void
SplitFileName();
82
83
// Callback registered with the PieceProgressObserver.
84
static
void
PieceProgressCallbackFunction(
vtkObject
*,
unsigned
long
,
void
*,
85
void
*);
86
virtual
void
PieceProgressCallback();
87
88
// Pieces from the input summary file.
89
int
NumberOfPieces
;
90
91
// The ghost level available on each input piece.
92
int
GhostLevel
;
93
94
// The piece currently being read.
95
int
Piece
;
96
97
// The path to the input file without the file name.
98
char
*
PathName
;
99
100
// Information per-piece.
101
vtkXMLDataElement
**
PieceElements
;
102
vtkXMLDataReader
**
PieceReaders
;
103
int
*
CanReadPieceFlag
;
104
105
// The PPointData and PCellData element representations.
106
vtkXMLDataElement
*
PPointDataElement
;
107
vtkXMLDataElement
*
PCellDataElement
;
108
109
// The observer to report progress from reading serial data in each
110
// piece.
111
vtkCallbackCommand
*
PieceProgressObserver
;
112
113
private
:
114
vtkXMLPDataReader
(
const
vtkXMLPDataReader
&);
// Not implemented.
115
void
operator=(
const
vtkXMLPDataReader
&);
// Not implemented.
116
};
117
118
#endif
Generated on Fri May 25 2012 22:39:32 for VTK by
1.8.1