VTK  9.2.6
vtkXMLPUnstructuredDataReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLPUnstructuredDataReader.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 =========================================================================*/
26 #ifndef vtkXMLPUnstructuredDataReader_h
27 #define vtkXMLPUnstructuredDataReader_h
28 
29 #include "vtkIOXMLModule.h" // For export macro
30 #include "vtkXMLPDataReader.h"
31 
32 class vtkAbstractArray;
33 class vtkPointSet;
34 class vtkCellArray;
36 
37 class VTKIOXML_EXPORT vtkXMLPUnstructuredDataReader : public vtkXMLPDataReader
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
43  // For the specified port, copy the information this reader sets up in
44  // SetupOutputInformation to outInfo
45  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
46 
47 protected:
50 
51  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
52  vtkInformationVector* outputVector) override;
53 
54  vtkPointSet* GetOutputAsPointSet();
55  vtkPointSet* GetPieceInputAsPointSet(int piece);
56  virtual void SetupOutputTotals();
57  virtual void SetupNextPiece();
58  vtkIdType GetNumberOfPoints() override;
59  vtkIdType GetNumberOfCells() override;
60  void CopyArrayForPoints(vtkAbstractArray* inArray, vtkAbstractArray* outArray) override;
61 
62  void SetupEmptyOutput() override;
63 
64  // Setup the output's information.
65  void SetupOutputInformation(vtkInformation* outInfo) override;
66 
67  void SetupOutputData() override;
68  virtual void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel) = 0;
69 
70  // Pipeline execute data driver. Called by vtkXMLReader.
71  void ReadXMLData() override;
72  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
73  void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel);
74 
75  int ReadPieceData() override;
76  void CopyCellArray(vtkIdType totalNumberOfCells, vtkCellArray* inCells, vtkCellArray* outCells);
77 
78  // Get the number of points/cells in the given piece. Valid after
79  // UpdateInformation.
80  virtual vtkIdType GetNumberOfPointsInPiece(int piece);
81  virtual vtkIdType GetNumberOfCellsInPiece(int piece);
82 
83  // The update request.
87 
88  // The range of pieces from the file that will form the UpdatePiece.
90  int EndPiece;
94 
95  // The PPoints element with point information.
97 
98 private:
100  void operator=(const vtkXMLPUnstructuredDataReader&) = delete;
101 };
102 
103 #endif
virtual vtkIdType GetNumberOfPoints()=0
virtual void SetupEmptyOutput()=0
Represents an XML element and those nested inside.
Store vtkAlgorithm input/output information.
void SetupOutputInformation(vtkInformation *outInfo) override
Pipeline execute information driver.
Abstract superclass for all arrays.
virtual vtkIdType GetNumberOfCells()=0
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
concrete class for storing a set of points
Definition: vtkPointSet.h:69
Superclass for unstructured data XML readers.
virtual void ReadXMLData()
int vtkIdType
Definition: vtkType.h:332
virtual void CopyArrayForPoints(vtkAbstractArray *inArray, vtkAbstractArray *outArray)=0
int ReadPrimaryElement(vtkXMLDataElement *ePrimary) override
Read the information relative to the dataset and allocate the needed structures according to it...
void CopyOutputInformation(vtkInformation *outInfo, int port) override
For the specified port, copy the information this reader sets up in SetupOutputInformation to outInfo...
a simple class to control print indentation
Definition: vtkIndent.h:39
Superclass for parallel unstructured data XML readers.
Superclass for PVTK XML file readers that read vtkDataSets.
virtual int ReadPieceData()
Actually read the current piece data.
object to represent cell connectivity
Definition: vtkCellArray.h:186
Store zero or more vtkInformation instances.
void SetupOutputData() override
Initialize the output data.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.