VTK  9.7.1
vtkXMLPHyperTreeGridReader.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
16 #ifndef vtkXMLPHyperTreeGridReader_h
17 #define vtkXMLPHyperTreeGridReader_h
18 
19 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_7_0
20 #include "vtkIOXMLModule.h" // For export macro
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 class vtkHyperTreeGrid;
27 
29  "Use vtkHyperTreeGridReader instead") VTKIOXML_EXPORT vtkXMLPHyperTreeGridReader
31 {
32 public:
34  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
38 
41  vtkHyperTreeGrid* GetOutput();
42  vtkHyperTreeGrid* GetOutput(int idx);
44 
49  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
50 
51 protected:
53  ~vtkXMLPHyperTreeGridReader() override;
54 
58  const char* GetDataSetName() override;
59 
63  vtkIdType GetNumberOfPoints();
64  vtkIdType GetNumberOfPointsInPiece(int piece);
65 
66  vtkHyperTreeGrid* GetOutputAsHyperTreeGrid();
67  vtkHyperTreeGrid* GetPieceInputAsHyperTreeGrid(int piece);
68 
73  void GetOutputUpdateExtent(int& piece, int& numberOfPieces);
74 
78  void SetupEmptyOutput() override;
79 
83  void SetupOutputData() override;
84 
88  void SetupOutputInformation(vtkInformation* outInfo) override;
89 
93  void SetupOutputTotals();
94 
98  void SetupNextPiece();
99 
103  void SetupPieces(int numPieces) override;
104 
108  void SetupUpdateExtent(int piece, int numberOfPieces);
109 
113  void ReadXMLData() override;
114 
118  int CanReadPiece(int index) override;
119 
123  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
124 
128  void DestroyPieces() override;
129 
131 
135  int ReadPiece(vtkXMLDataElement* ePiece) override;
136 
140  int ReadPieceData(int index);
141  int ReadPieceData();
142  void RecursivelyProcessTree(
144 
148  vtkXMLHyperTreeGridReader* CreatePieceReader();
149 
150  int FillOutputPortInformation(int, vtkInformation*) override;
151 
152  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
153  vtkInformationVector* outputVector) override;
154 
158  void PieceProgressCallback() override;
159 
165 
170  int EndPiece;
171 
174 
176 
177 private:
179  void operator=(const vtkXMLPHyperTreeGridReader&) = delete;
180 };
181 
182 VTK_ABI_NAMESPACE_END
183 #endif
Read VTK XML HyperTreeGrid files.
virtual const char * GetDataSetName()=0
Get the name of the data set being read.
virtual void SetupEmptyOutput()=0
Setup the output with no data available.
virtual int CanReadPiece(int index)=0
Whether or not the current reader can read the current piece.
Represents an XML element and those nested inside.
Store vtkAlgorithm input/output information.
virtual void PieceProgressCallback()=0
Callback registered with the PieceProgressObserver.
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual void ReadXMLData()
Pipeline execution methods to be defined by subclass.
int vtkIdType
Definition: vtkType.h:363
Objects for traversal a HyperTreeGrid.
vtkXMLHyperTreeGridReader ** PieceReaders
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
a simple class to control print indentation
Definition: vtkIndent.h:28
void SetupOutputData() override
Initialize the output data.
Superclass for PVTK XML file readers.
virtual void CopyOutputInformation(vtkInformation *outInfo, int port)
Definition: vtkXMLReader.h:209
virtual void SetupPieces(int numPieces)
Setup the number of pieces to be read and allocate space accordingly.
virtual int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
Read the primary element from the file.
virtual void DestroyPieces()
Delete all piece readers and related information.
Read PVTK XML HyperTreeGrid files.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
virtual void SetupOutputInformation(vtkInformation *outInfo)
Setup the output's information.
Definition: vtkXMLReader.h:292
#define VTK_DEPRECATED_IN_9_7_0(reason)
int StartPiece
The range of pieces from the file that will form the UpdatePiece.
int ReadPiece(vtkXMLDataElement *ePiece, int index)
Setup the piece reader at the given index.