VTK
vtkXMLPUnstructuredDataReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLPUnstructuredDataReader.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 vtkXMLPUnstructuredDataReader_h
26 #define vtkXMLPUnstructuredDataReader_h
27 
28 #include "vtkIOXMLModule.h" // For export macro
29 #include "vtkXMLPDataReader.h"
30 
31 class vtkPointSet;
32 class vtkCellArray;
34 
36 {
37 public:
39  void PrintSelf(ostream& os, vtkIndent indent);
40 
41  // For the specified port, copy the information this reader sets up in
42  // SetupOutputInformation to outInfo
43  virtual void CopyOutputInformation(vtkInformation *outInfo, int port);
44 
45 protected:
48 
49  virtual int RequestInformation(vtkInformation *request,
50  vtkInformationVector **inputVector,
51  vtkInformationVector *outputVector);
52 
53 
54  vtkPointSet* GetOutputAsPointSet();
55  vtkPointSet* GetPieceInputAsPointSet(int piece);
56  virtual void SetupOutputTotals();
57  virtual void SetupNextPiece();
60  void CopyArrayForPoints(vtkDataArray* inArray, vtkDataArray* outArray);
61 
62  void SetupEmptyOutput();
63 
64  // Setup the output's information.
66 
67  void SetupOutputData();
68  virtual void GetOutputUpdateExtent(int& piece, int& numberOfPieces,
69  int& ghostLevel)=0;
70 
71  // Pipeline execute data driver. Called by vtkXMLReader.
72  void ReadXMLData();
74  void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel);
75 
76  int ReadPieceData();
77  void CopyCellArray(vtkIdType totalNumberOfCells, vtkCellArray* inCells,
78  vtkCellArray* outCells);
79 
80  // Get the number of points/cells in the given piece. Valid after
81  // UpdateInformation.
82  virtual vtkIdType GetNumberOfPointsInPiece(int piece);
83  virtual vtkIdType GetNumberOfCellsInPiece(int piece);
84 
85  // The update request.
89 
90  // The range of pieces from the file that will form the UpdatePiece.
92  int EndPiece;
96 
97  // The PPoints element with point information.
99 
100 private:
102  void operator=(const vtkXMLPUnstructuredDataReader&); // Not implemented.
103 };
104 
105 #endif
virtual vtkIdType GetNumberOfPoints()=0
virtual void SetupOutputInformation(vtkInformation *outInfo)
virtual void SetupEmptyOutput()=0
Represents an XML element and those nested inside.
Store vtkAlgorithm input/output information.
virtual vtkIdType GetNumberOfCells()=0
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:44
Superclass for unstructured data XML readers.
virtual void ReadXMLData()
int vtkIdType
Definition: vtkType.h:275
int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKIOXML_EXPORT
virtual void CopyArrayForPoints(vtkDataArray *inArray, vtkDataArray *outArray)=0
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
Superclass for parallel unstructured data XML readers.
Superclass for PVTK XML file readers.
void PrintSelf(ostream &os, vtkIndent indent)
virtual int ReadPieceData()
object to represent cell connectivity
Definition: vtkCellArray.h:49
virtual void CopyOutputInformation(vtkInformation *outInfo, int port)
Store zero or more vtkInformation instances.