VTK  9.0.1
vtkXMLPHyperTreeGridReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLPHyperTreeGridReader.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 =========================================================================*/
28 #ifndef vtkXMLPHyperTreeGridReader_h
29 #define vtkXMLPHyperTreeGridReader_h
30 
31 #include "vtkIOXMLModule.h" // For export macro
33 
34 class vtkHyperTreeCursor;
35 class vtkHyperTreeGrid;
38 
40 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
47 
50  vtkHyperTreeGrid* GetOutput();
51  vtkHyperTreeGrid* GetOutput(int idx);
53 
58  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
59 
60 protected:
62  ~vtkXMLPHyperTreeGridReader() override;
63 
67  const char* GetDataSetName() override;
68 
72  vtkIdType GetNumberOfPoints();
73  vtkIdType GetNumberOfPointsInPiece(int piece);
74 
75  vtkHyperTreeGrid* GetOutputAsHyperTreeGrid();
76  vtkHyperTreeGrid* GetPieceInputAsHyperTreeGrid(int piece);
77 
82  void GetOutputUpdateExtent(int& piece, int& numberOfPieces);
83 
87  void SetupEmptyOutput() override;
88 
92  void SetupOutputData() override;
93 
97  void SetupOutputInformation(vtkInformation* outInfo) override;
98 
102  void SetupOutputTotals();
103 
107  void SetupNextPiece();
108 
112  void SetupPieces(int numPieces) override;
113 
117  void SetupUpdateExtent(int piece, int numberOfPieces);
118 
122  void ReadXMLData() override;
123 
127  int CanReadPiece(int index) override;
128 
132  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
133 
137  void DestroyPieces() override;
138 
140 
144  int ReadPiece(vtkXMLDataElement* ePiece) override;
145 
149  int ReadPieceData(int index);
150  int ReadPieceData();
151  void RecursivelyProcessTree(
153 
157  vtkXMLHyperTreeGridReader* CreatePieceReader();
158 
159  int FillOutputPortInformation(int, vtkInformation*) override;
160 
161  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
162  vtkInformationVector* outputVector) override;
163 
167  void PieceProgressCallback() override;
168 
174 
179  int EndPiece;
180 
183 
185 
186 private:
188  void operator=(const vtkXMLPHyperTreeGridReader&) = delete;
189 };
190 
191 #endif
Read VTK XML HyperTreeGrid files.
virtual const char * GetDataSetName()=0
virtual void SetupEmptyOutput()=0
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()
int vtkIdType
Definition: vtkType.h:338
Objects for traversal a HyperTreeGrid.
vtkXMLHyperTreeGridReader ** PieceReaders
Objects for depth-first traversal HyperTrees.
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:33
void SetupOutputData() override
Initialize the output data.
virtual void SetupOutputInformation(vtkInformation *vtkNotUsed(outInfo))
Definition: vtkXMLReader.h:201
Superclass for PVTK XML file readers.
virtual void SetupPieces(int numPieces)
Setup the number of pieces to be read and allocate space accordingly.
virtual int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
virtual void DestroyPieces()
Delete all piece readers and related information.
Read PVTK XML HyperTreeGrid files.
virtual void CopyOutputInformation(vtkInformation *vtkNotUsed(outInfo), int vtkNotUsed(port))
Definition: vtkXMLReader.h:135
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()
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.