VTK: IO/XML/vtkXMLPUnstructuredDataReader.h Source File

| VTK 9.3.1

vtkXMLPUnstructuredDataReader.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
14 #ifndef vtkXMLPUnstructuredDataReader_h
15 #define vtkXMLPUnstructuredDataReader_h
16
17 #include "vtkIOXMLModule.h" // For export macro
18 #include "vtkXMLPDataReader.h"
19
20 VTK_ABI_NAMESPACE_BEGIN
21 class vtkAbstractArray;
22 class vtkPointSet;
23 class vtkCellArray;
24 class vtkXMLUnstructuredDataReader;
25
26 class VTKIOXML_EXPORT vtkXMLPUnstructuredDataReader : public vtkXMLPDataReader
27 {
28 public:
29 vtkTypeMacro(vtkXMLPUnstructuredDataReader, vtkXMLPDataReader);
30 void PrintSelf(ostream& os, vtkIndent indent) override;
31
32 // For the specified port, copy the information this reader sets up in
33 // SetupOutputInformation to outInfo
34 void CopyOutputInformation(vtkInformation* outInfo, int port) override;
35
36 protected:
37 vtkXMLPUnstructuredDataReader();
38 ~vtkXMLPUnstructuredDataReader() override;
39
40 int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
41 vtkInformationVector* outputVector) override;
42
43 vtkPointSet* GetOutputAsPointSet();
44 vtkPointSet* GetPieceInputAsPointSet(int piece);
45 virtual void SetupOutputTotals();
46 virtual void SetupNextPiece();
47 vtkIdType GetNumberOfPoints() override;
48 vtkIdType GetNumberOfCells() override;
49 void CopyArrayForPoints(vtkAbstractArray* inArray, vtkAbstractArray* outArray) override;
50
51 void SetupEmptyOutput() override;
52
53 // Setup the output's information.
54 void SetupOutputInformation(vtkInformation* outInfo) override;
55
56 void SetupOutputData() override;
57 virtual void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel) = 0;
58
59 // Pipeline execute data driver. Called by vtkXMLReader.
60 void ReadXMLData() override;
61 int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
62 void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel);
63
64 int ReadPieceData() override;
65 void CopyCellArray(vtkIdType totalNumberOfCells, vtkCellArray* inCells, vtkCellArray* outCells);
66
67 // Get the number of points/cells in the given piece. Valid after
68 // UpdateInformation.
69 virtual vtkIdType GetNumberOfPointsInPiece(int piece);
70 virtual vtkIdType GetNumberOfCellsInPiece(int piece);
71
72 // The update request.
73 int UpdatePieceId;
74 int UpdateNumberOfPieces;
75 int UpdateGhostLevel;
76
77 // The range of pieces from the file that will form the UpdatePiece.
78 int StartPiece;
79 int EndPiece;
80 vtkIdType TotalNumberOfPoints;
81 vtkIdType TotalNumberOfCells;
82 vtkIdType StartPoint;
83
84 // The PPoints element with point information.
85 vtkXMLDataElement* PPointsElement;
86
87 private:
88 vtkXMLPUnstructuredDataReader(const vtkXMLPUnstructuredDataReader&) = delete;
89 void operator=(const vtkXMLPUnstructuredDataReader&) = delete;
90 };
91
92 VTK_ABI_NAMESPACE_END
93 #endif
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:76
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:185
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPointSet
concrete class for storing a set of points
Definition: vtkPointSet.h:68
vtkXMLDataElement
Represents an XML element and those nested inside.
Definition: vtkXMLDataElement.h:26
vtkXMLPDataReader
Superclass for PVTK XML file readers that read vtkDataSets.
Definition: vtkXMLPDataReader.h:27
vtkXMLPUnstructuredDataReader
Superclass for parallel unstructured data XML readers.
Definition: vtkXMLPUnstructuredDataReader.h:27
vtkXMLPUnstructuredDataReader::SetupOutputTotals
virtual void SetupOutputTotals()
vtkXMLPUnstructuredDataReader::CopyOutputInformation
void CopyOutputInformation(vtkInformation *outInfo, int port) override
vtkXMLPUnstructuredDataReader::SetupNextPiece
virtual void SetupNextPiece()
vtkXMLPUnstructuredDataReader::GetNumberOfPoints
vtkIdType GetNumberOfPoints() override
vtkXMLPUnstructuredDataReader::PPointsElement
vtkXMLDataElement * PPointsElement
Definition: vtkXMLPUnstructuredDataReader.h:85
vtkXMLPUnstructuredDataReader::SetupOutputInformation
void SetupOutputInformation(vtkInformation *outInfo) override
vtkXMLPUnstructuredDataReader::~vtkXMLPUnstructuredDataReader
~vtkXMLPUnstructuredDataReader() override
vtkXMLPUnstructuredDataReader::GetPieceInputAsPointSet
vtkPointSet * GetPieceInputAsPointSet(int piece)
vtkXMLPUnstructuredDataReader::SetupUpdateExtent
void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel)
vtkXMLPUnstructuredDataReader::RequestInformation
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
vtkXMLPUnstructuredDataReader::CopyCellArray
void CopyCellArray(vtkIdType totalNumberOfCells, vtkCellArray *inCells, vtkCellArray *outCells)
vtkXMLPUnstructuredDataReader::EndPiece
int EndPiece
Definition: vtkXMLPUnstructuredDataReader.h:79
vtkXMLPUnstructuredDataReader::GetOutputAsPointSet
vtkPointSet * GetOutputAsPointSet()
vtkXMLPUnstructuredDataReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkXMLPUnstructuredDataReader::GetOutputUpdateExtent
virtual void GetOutputUpdateExtent(int &piece, int &numberOfPieces, int &ghostLevel)=0
vtkXMLPUnstructuredDataReader::UpdateNumberOfPieces
int UpdateNumberOfPieces
Definition: vtkXMLPUnstructuredDataReader.h:74
vtkXMLPUnstructuredDataReader::GetNumberOfPointsInPiece
virtual vtkIdType GetNumberOfPointsInPiece(int piece)
vtkXMLPUnstructuredDataReader::ReadPieceData
int ReadPieceData() override
Actually read the current piece data.
vtkXMLPUnstructuredDataReader::SetupOutputData
void SetupOutputData() override
Initialize the output data.
vtkXMLPUnstructuredDataReader::TotalNumberOfPoints
vtkIdType TotalNumberOfPoints
Definition: vtkXMLPUnstructuredDataReader.h:80
vtkXMLPUnstructuredDataReader::UpdatePieceId
int UpdatePieceId
Definition: vtkXMLPUnstructuredDataReader.h:73
vtkXMLPUnstructuredDataReader::ReadPrimaryElement
int ReadPrimaryElement(vtkXMLDataElement *ePrimary) override
Read the information relative to the dataset and allocate the needed structures according to it.
vtkXMLPUnstructuredDataReader::StartPoint
vtkIdType StartPoint
Definition: vtkXMLPUnstructuredDataReader.h:82
vtkXMLPUnstructuredDataReader::SetupEmptyOutput
void SetupEmptyOutput() override
Setup the output with no data available.
vtkXMLPUnstructuredDataReader::TotalNumberOfCells
vtkIdType TotalNumberOfCells
Definition: vtkXMLPUnstructuredDataReader.h:81
vtkXMLPUnstructuredDataReader::GetNumberOfCellsInPiece
virtual vtkIdType GetNumberOfCellsInPiece(int piece)
vtkXMLPUnstructuredDataReader::GetNumberOfCells
vtkIdType GetNumberOfCells() override
vtkXMLPUnstructuredDataReader::vtkXMLPUnstructuredDataReader
vtkXMLPUnstructuredDataReader()
vtkXMLPUnstructuredDataReader::ReadXMLData
void ReadXMLData() override
Pipeline execution methods to be defined by subclass.
vtkXMLPUnstructuredDataReader::UpdateGhostLevel
int UpdateGhostLevel
Definition: vtkXMLPUnstructuredDataReader.h:75
vtkXMLPUnstructuredDataReader::CopyArrayForPoints
void CopyArrayForPoints(vtkAbstractArray *inArray, vtkAbstractArray *outArray) override
vtkXMLPUnstructuredDataReader::StartPiece
int StartPiece
Definition: vtkXMLPUnstructuredDataReader.h:78
vtkXMLUnstructuredDataReader
Superclass for unstructured data XML readers.
Definition: vtkXMLUnstructuredDataReader.h:27
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkIdType
int vtkIdType
Definition: vtkType.h:315
vtkXMLPDataReader.h