VTK
vtkXMLHyperTreeGridReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLHyperTreeGridReader.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 vtkXMLHyperTreeGridReader_h
29 #define vtkXMLHyperTreeGridReader_h
30 
31 #include "vtkIOXMLModule.h" // For export macro
32 #include "vtkXMLDataReader.h"
33 
34 class vtkBitArray;
35 class vtkHyperTree;
36 class vtkHyperTreeCursor;
37 class vtkHyperTreeGrid;
38 class vtkIdTypeArray;
39 
40 class VTKIOXML_EXPORT vtkXMLHyperTreeGridReader : public vtkXMLDataReader
41 {
42 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
48 
54 
55 protected:
58 
59  const char* GetDataSetName() override;
60 
61  // Setup the output with no data available. Used in error cases.
62  void SetupEmptyOutput() override;
63 
64  // Declare that this reader produces HyperTreeGrids
66 
67  //These defer to the HyperTreeGrid output.
70 
71  // Overridden here to do allocation.
73  vtkAbstractArray* outArray) override;
75  vtkAbstractArray* outArray) override;
76 
77  // The most important stuff is here.
78  // Read the rest of the file and create the HyperTreeGrid.
79  void ReadXMLData() override;
80 
81  // Read the coordinates describing the grid
83 
84  // Recover the structure of the HyperTreeGrid, used by ReadXMLData.
86 
87 protected:
88  // Used by ReadTopology to recursively build the tree
90  vtkHyperTreeCursor* treeCursor,
91  vtkHyperTree* tree,
92  unsigned int level,
93  int numChildren,
94  vtkBitArray* desc,
95  vtkIdTypeArray* posByLevel,
96  vtkIdType* cellsOnProcessor);
97 
98 
99 private:
101  void operator=(const vtkXMLHyperTreeGridReader&) = delete;
102 };
103 
104 #endif
vtkXMLHyperTreeGridReader::GetNumberOfPoints
vtkIdType GetNumberOfPoints() override
Get the number of points in the output.
vtkXMLHyperTreeGridReader::GetOutput
vtkHyperTreeGrid * GetOutput()
Get the reader's output.
vtkXMLHyperTreeGridReader::FillOutputPortInformation
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
vtkXMLHyperTreeGridReader::GetNumberOfCells
vtkIdType GetNumberOfCells() override
Get the number of cells in the output.
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkXMLHyperTreeGridReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkXMLHyperTreeGridReader::New
static vtkXMLHyperTreeGridReader * New()
vtkXMLDataReader
Superclass for VTK XML file readers.
Definition: vtkXMLDataReader.h:36
vtkXMLHyperTreeGridReader::~vtkXMLHyperTreeGridReader
~vtkXMLHyperTreeGridReader() override
vtkX3D::level
@ level
Definition: vtkX3D.h:395
vtkXMLHyperTreeGridReader::ReadCoordinates
void ReadCoordinates(vtkXMLDataElement *elem)
vtkXMLHyperTreeGridReader::GetDataSetName
const char * GetDataSetName() override
vtkXMLHyperTreeGridReader::ReadXMLData
void ReadXMLData() override
vtkXMLHyperTreeGridReader::SubdivideFromDescriptor
void SubdivideFromDescriptor(vtkHyperTreeCursor *treeCursor, vtkHyperTree *tree, unsigned int level, int numChildren, vtkBitArray *desc, vtkIdTypeArray *posByLevel, vtkIdType *cellsOnProcessor)
vtkHyperTreeCursor
Objects for depth-first traversal HyperTrees.
Definition: vtkHyperTreeCursor.h:43
vtkXMLHyperTreeGridReader::ReadTopology
void ReadTopology(vtkXMLDataElement *elem)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkXMLDataReader.h
vtkHyperTree
An object structured as a tree where each node has exactly either 2^d or 3^d children.
Definition: vtkHyperTree.h:143
vtkXMLDataElement
Represents an XML element and those nested inside.
Definition: vtkXMLDataElement.h:37
vtkXMLHyperTreeGridReader::vtkXMLHyperTreeGridReader
vtkXMLHyperTreeGridReader()
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:79
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:42
vtkXMLHyperTreeGridReader::SetupEmptyOutput
void SetupEmptyOutput() override
vtkXMLHyperTreeGridReader::ReadArrayForPoints
int ReadArrayForPoints(vtkXMLDataElement *da, vtkAbstractArray *outArray) override
vtkXMLHyperTreeGridReader
Read VTK XML HyperTreeGrid files.
Definition: vtkXMLHyperTreeGridReader.h:41
vtkBitArray
dynamic, self-adjusting array of bits
Definition: vtkBitArray.h:37
vtkXMLHyperTreeGridReader::ReadArrayForCells
int ReadArrayForCells(vtkXMLDataElement *da, vtkAbstractArray *outArray) override
vtkXMLHyperTreeGridReader::GetOutput
vtkHyperTreeGrid * GetOutput(int idx)
vtkHyperTreeGrid
A dataset containing a grid of vtkHyperTree instances arranged as a rectilinear grid.
Definition: vtkHyperTreeGrid.h:71