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