VTK  9.3.20240419
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 
41  vtkInformationVector* outputVector) override;
42 
45  virtual void SetupOutputTotals();
46  virtual void SetupNextPiece();
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
Abstract superclass for all arrays.
object to represent cell connectivity
Definition: vtkCellArray.h:286
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
concrete class for storing a set of points
Definition: vtkPointSet.h:98
Represents an XML element and those nested inside.
Superclass for PVTK XML file readers that read vtkDataSets.
Superclass for parallel unstructured data XML readers.
virtual void SetupOutputTotals()
void CopyOutputInformation(vtkInformation *outInfo, int port) override
vtkIdType GetNumberOfPoints() override
void SetupOutputInformation(vtkInformation *outInfo) override
~vtkXMLPUnstructuredDataReader() override
vtkPointSet * GetPieceInputAsPointSet(int piece)
void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel)
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
void CopyCellArray(vtkIdType totalNumberOfCells, vtkCellArray *inCells, vtkCellArray *outCells)
vtkPointSet * GetOutputAsPointSet()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void GetOutputUpdateExtent(int &piece, int &numberOfPieces, int &ghostLevel)=0
virtual vtkIdType GetNumberOfPointsInPiece(int piece)
int ReadPieceData() override
Actually read the current piece data.
void SetupOutputData() override
Initialize the output data.
int ReadPrimaryElement(vtkXMLDataElement *ePrimary) override
Read the information relative to the dataset and allocate the needed structures according to it.
void SetupEmptyOutput() override
Setup the output with no data available.
virtual vtkIdType GetNumberOfCellsInPiece(int piece)
vtkIdType GetNumberOfCells() override
void ReadXMLData() override
Pipeline execution methods to be defined by subclass.
void CopyArrayForPoints(vtkAbstractArray *inArray, vtkAbstractArray *outArray) override
Superclass for unstructured data XML readers.
@ port
Definition: vtkX3D.h:447
int vtkIdType
Definition: vtkType.h:315