VTK  9.0.1
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 vtkPointSet;
33 class vtkCellArray;
35 
36 class VTKIOXML_EXPORT vtkXMLPUnstructuredDataReader : public vtkXMLPDataReader
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
42  // For the specified port, copy the information this reader sets up in
43  // SetupOutputInformation to outInfo
44  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
45 
46 protected:
49 
51  vtkInformationVector* outputVector) override;
52 
55  virtual void SetupOutputTotals();
56  virtual void SetupNextPiece();
59  void CopyArrayForPoints(vtkDataArray* inArray, vtkDataArray* outArray) override;
60 
61  void SetupEmptyOutput() override;
62 
63  // Setup the output's information.
64  void SetupOutputInformation(vtkInformation* outInfo) override;
65 
66  void SetupOutputData() override;
67  virtual void GetOutputUpdateExtent(int& piece, int& numberOfPieces, int& ghostLevel) = 0;
68 
69  // Pipeline execute data driver. Called by vtkXMLReader.
70  void ReadXMLData() override;
71  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
72  void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel);
73 
74  int ReadPieceData() override;
75  void CopyCellArray(vtkIdType totalNumberOfCells, vtkCellArray* inCells, vtkCellArray* outCells);
76 
77  // Get the number of points/cells in the given piece. Valid after
78  // UpdateInformation.
79  virtual vtkIdType GetNumberOfPointsInPiece(int piece);
80  virtual vtkIdType GetNumberOfCellsInPiece(int piece);
81 
82  // The update request.
86 
87  // The range of pieces from the file that will form the UpdatePiece.
89  int EndPiece;
93 
94  // The PPoints element with point information.
96 
97 private:
99  void operator=(const vtkXMLPUnstructuredDataReader&) = delete;
100 };
101 
102 #endif
vtkXMLPUnstructuredDataReader::SetupOutputData
void SetupOutputData() override
Initialize the output data.
vtkXMLPUnstructuredDataReader
Superclass for parallel unstructured data XML readers.
Definition: vtkXMLPUnstructuredDataReader.h:37
vtkXMLPUnstructuredDataReader::GetNumberOfCellsInPiece
virtual vtkIdType GetNumberOfCellsInPiece(int piece)
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:36
vtkXMLPUnstructuredDataReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkXMLPUnstructuredDataReader::SetupOutputInformation
void SetupOutputInformation(vtkInformation *outInfo) override
vtkXMLPUnstructuredDataReader::SetupUpdateExtent
void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel)
vtkXMLPUnstructuredDataReader::GetNumberOfPointsInPiece
virtual vtkIdType GetNumberOfPointsInPiece(int piece)
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:50
vtkXMLPUnstructuredDataReader::ReadPrimaryElement
int ReadPrimaryElement(vtkXMLDataElement *ePrimary) override
Read the information relative to the dataset and allocate the needed structures according to it.
vtkXMLPUnstructuredDataReader::EndPiece
int EndPiece
Definition: vtkXMLPUnstructuredDataReader.h:89
vtkXMLPUnstructuredDataReader::vtkXMLPUnstructuredDataReader
vtkXMLPUnstructuredDataReader()
vtkXMLPUnstructuredDataReader::CopyArrayForPoints
void CopyArrayForPoints(vtkDataArray *inArray, vtkDataArray *outArray) override
vtkXMLPUnstructuredDataReader::ReadPieceData
int ReadPieceData() override
Actually read the current piece data.
vtkXMLPUnstructuredDataReader::CopyOutputInformation
void CopyOutputInformation(vtkInformation *outInfo, int port) override
vtkXMLPUnstructuredDataReader::CopyCellArray
void CopyCellArray(vtkIdType totalNumberOfCells, vtkCellArray *inCells, vtkCellArray *outCells)
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkXMLPUnstructuredDataReader::~vtkXMLPUnstructuredDataReader
~vtkXMLPUnstructuredDataReader() override
vtkXMLPUnstructuredDataReader::GetNumberOfPoints
vtkIdType GetNumberOfPoints() override
vtkXMLPUnstructuredDataReader::SetupEmptyOutput
void SetupEmptyOutput() override
vtkXMLPDataReader.h
vtkXMLUnstructuredDataReader
Superclass for unstructured data XML readers.
Definition: vtkXMLUnstructuredDataReader.h:38
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkXMLPUnstructuredDataReader::StartPoint
vtkIdType StartPoint
Definition: vtkXMLPUnstructuredDataReader.h:92
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:180
vtkXMLDataElement
Represents an XML element and those nested inside.
Definition: vtkXMLDataElement.h:37
vtkXMLPUnstructuredDataReader::PPointsElement
vtkXMLDataElement * PPointsElement
Definition: vtkXMLPUnstructuredDataReader.h:95
vtkXMLPUnstructuredDataReader::UpdateGhostLevel
int UpdateGhostLevel
Definition: vtkXMLPUnstructuredDataReader.h:85
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:65
vtkXMLPUnstructuredDataReader::GetOutputAsPointSet
vtkPointSet * GetOutputAsPointSet()
vtkXMLPUnstructuredDataReader::StartPiece
int StartPiece
Definition: vtkXMLPUnstructuredDataReader.h:88
vtkPointSet
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:63
vtkXMLPUnstructuredDataReader::GetNumberOfCells
vtkIdType GetNumberOfCells() override
vtkXMLPUnstructuredDataReader::SetupOutputTotals
virtual void SetupOutputTotals()
vtkXMLPUnstructuredDataReader::TotalNumberOfPoints
vtkIdType TotalNumberOfPoints
Definition: vtkXMLPUnstructuredDataReader.h:90
vtkXMLPUnstructuredDataReader::RequestInformation
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
vtkXMLPUnstructuredDataReader::UpdatePieceId
int UpdatePieceId
Definition: vtkXMLPUnstructuredDataReader.h:83
vtkXMLPUnstructuredDataReader::TotalNumberOfCells
vtkIdType TotalNumberOfCells
Definition: vtkXMLPUnstructuredDataReader.h:91
vtkXMLPUnstructuredDataReader::GetPieceInputAsPointSet
vtkPointSet * GetPieceInputAsPointSet(int piece)
vtkXMLPUnstructuredDataReader::GetOutputUpdateExtent
virtual void GetOutputUpdateExtent(int &piece, int &numberOfPieces, int &ghostLevel)=0
vtkXMLPDataReader
Superclass for PVTK XML file readers that read vtkDataSets.
Definition: vtkXMLPDataReader.h:38
vtkXMLPUnstructuredDataReader::ReadXMLData
void ReadXMLData() override
vtkXMLPUnstructuredDataReader::SetupNextPiece
virtual void SetupNextPiece()
vtkXMLPUnstructuredDataReader::UpdateNumberOfPieces
int UpdateNumberOfPieces
Definition: vtkXMLPUnstructuredDataReader.h:84