VTK  9.3.1
vtkXMLPUnstructuredDataReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
14 #ifndef vtkXMLPUnstructuredDataReader_h
15 #define vtkXMLPUnstructuredDataReader_h
16 
17 #include "vtkIOXMLModule.h" // For export macro
18 #include "vtkXMLPDataReader.h"
19 
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkAbstractArray;
22 class vtkPointSet;
23 class vtkCellArray;
25 
26 class VTKIOXML_EXPORT vtkXMLPUnstructuredDataReader : public vtkXMLPDataReader
27 {
28 public:
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
32  // For the specified port, copy the information this reader sets up in
33  // SetupOutputInformation to outInfo
34  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
35 
36 protected:
39 
40  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
41  vtkInformationVector* outputVector) override;
42 
43  vtkPointSet* GetOutputAsPointSet();
44  vtkPointSet* GetPieceInputAsPointSet(int piece);
45  virtual void SetupOutputTotals();
46  virtual void SetupNextPiece();
47  vtkIdType GetNumberOfPoints() override;
48  vtkIdType GetNumberOfCells() override;
49  void CopyArrayForPoints(vtkAbstractArray* inArray, vtkAbstractArray* outArray) override;
50 
51  void SetupEmptyOutput() override;
52 
53  // Setup the output's information.
54  void SetupOutputInformation(vtkInformation* outInfo) override;
55 
56  void SetupOutputData() override;
57  virtual void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel) = 0;
58 
59  // Pipeline execute data driver. Called by vtkXMLReader.
60  void ReadXMLData() override;
61  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
62  void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel);
63 
64  int ReadPieceData() override;
65  void CopyCellArray(vtkIdType totalNumberOfCells, vtkCellArray* inCells, vtkCellArray* outCells);
66 
67  // Get the number of points/cells in the given piece. Valid after
68  // UpdateInformation.
69  virtual vtkIdType GetNumberOfPointsInPiece(int piece);
70  virtual vtkIdType GetNumberOfCellsInPiece(int piece);
71 
72  // The update request.
76 
77  // The range of pieces from the file that will form the UpdatePiece.
79  int EndPiece;
83 
84  // The PPoints element with point information.
86 
87 private:
89  void operator=(const vtkXMLPUnstructuredDataReader&) = delete;
90 };
91 
92 VTK_ABI_NAMESPACE_END
93 #endif
virtual vtkIdType GetNumberOfPoints()=0
virtual void SetupEmptyOutput()=0
Setup the output with no data available.
Represents an XML element and those nested inside.
Store vtkAlgorithm input/output information.
void SetupOutputInformation(vtkInformation *outInfo) override
Pipeline execute information driver.
Abstract superclass for all arrays.
virtual vtkIdType GetNumberOfCells()=0
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
concrete class for storing a set of points
Definition: vtkPointSet.h:58
Superclass for unstructured data XML readers.
virtual void ReadXMLData()
Pipeline execution methods to be defined by subclass.
int vtkIdType
Definition: vtkType.h:315
virtual void CopyArrayForPoints(vtkAbstractArray *inArray, vtkAbstractArray *outArray)=0
int ReadPrimaryElement(vtkXMLDataElement *ePrimary) override
Read the information relative to the dataset and allocate the needed structures according to it...
void CopyOutputInformation(vtkInformation *outInfo, int port) override
For the specified port, copy the information this reader sets up in SetupOutputInformation to outInfo...
a simple class to control print indentation
Definition: vtkIndent.h:28
Superclass for parallel unstructured data XML readers.
Superclass for PVTK XML file readers that read vtkDataSets.
virtual int ReadPieceData()
Actually read the current piece data.
object to represent cell connectivity
Definition: vtkCellArray.h:175
Store zero or more vtkInformation instances.
void SetupOutputData() override
Initialize the output data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.