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
vtkXMLPDataObjectReader::ReadPiece
int ReadPiece(vtkXMLDataElement *ePiece, int index)
Setup the piece reader at the given index.
vtkXMLPDataObjectReader
Superclass for PVTK XML file readers.
Definition: vtkXMLPDataObjectReader.h:29
vtkXMLReader::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkXMLReader::ReadPrimaryElement
virtual int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkXMLPHyperTreeGridReader
Read PVTK XML HyperTreeGrid files.
Definition: vtkXMLPHyperTreeGridReader.h:39
vtkXMLPDataObjectReader::PieceProgressCallback
virtual void PieceProgressCallback()=0
vtkXMLPHyperTreeGridReader::UpdatePiece
int UpdatePiece
The update request.
Definition: vtkXMLPHyperTreeGridReader.h:172
vtkHyperTreeGridNonOrientedCursor
Objects for traversal a HyperTreeGrid.
Definition: vtkHyperTreeGridNonOrientedCursor.h:50
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkXMLPHyperTreeGridReader::EndPiece
int EndPiece
Definition: vtkXMLPHyperTreeGridReader.h:179
vtkHyperTreeCursor
Objects for depth-first traversal HyperTrees.
Definition: vtkHyperTreeCursor.h:42
vtkXMLReader::ReadXMLData
virtual void ReadXMLData()
vtkXMLReader::SetupEmptyOutput
virtual void SetupEmptyOutput()=0
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkXMLPHyperTreeGridReader::StartPiece
int StartPiece
The range of pieces from the file that will form the UpdatePiece.
Definition: vtkXMLPHyperTreeGridReader.h:178
vtkXMLPDataObjectReader::DestroyPieces
virtual void DestroyPieces()
Delete all piece readers and related information.
vtkXMLReader::GetDataSetName
virtual const char * GetDataSetName()=0
vtkXMLDataElement
Represents an XML element and those nested inside.
Definition: vtkXMLDataElement.h:36
vtkXMLPHyperTreeGridReader::TotalNumberOfPoints
vtkIdType TotalNumberOfPoints
Definition: vtkXMLPHyperTreeGridReader.h:181
vtkXMLPDataObjectReader::SetupOutputData
void SetupOutputData() override
Initialize the output data.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkXMLHyperTreeGridReader
Read VTK XML HyperTreeGrid files.
Definition: vtkXMLHyperTreeGridReader.h:56
vtkXMLReader::SetupOutputInformation
virtual void SetupOutputInformation(vtkInformation *vtkNotUsed(outInfo))
Definition: vtkXMLReader.h:201
vtkXMLPDataObjectReader::SetupPieces
virtual void SetupPieces(int numPieces)
Setup the number of pieces to be read and allocate space accordingly.
vtkXMLPHyperTreeGridReader::UpdateNumberOfPieces
int UpdateNumberOfPieces
Definition: vtkXMLPHyperTreeGridReader.h:173
vtkXMLPHyperTreeGridReader::PieceReaders
vtkXMLHyperTreeGridReader ** PieceReaders
Definition: vtkXMLPHyperTreeGridReader.h:184
vtkXMLPHyperTreeGridReader::PieceStartIndex
vtkIdType PieceStartIndex
Definition: vtkXMLPHyperTreeGridReader.h:182
vtkXMLPDataObjectReader.h
vtkXMLReader::CopyOutputInformation
virtual void CopyOutputInformation(vtkInformation *vtkNotUsed(outInfo), int vtkNotUsed(port))
Definition: vtkXMLReader.h:135
vtkX3D::index
@ index
Definition: vtkX3D.h:252
vtkXMLPDataObjectReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAlgorithm::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
vtkXMLPDataObjectReader::CanReadPiece
virtual int CanReadPiece(int index)=0
Whether or not the current reader can read the current piece.
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:96