VTK  9.6.20260613
vtkXMLPStructuredDataReader.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
15#ifndef vtkXMLPStructuredDataReader_h
16#define vtkXMLPStructuredDataReader_h
17
18#include "vtkIOXMLModule.h" // For export macro
19#include "vtkXMLPDataReader.h"
20
21VTK_ABI_NAMESPACE_BEGIN
25
26class VTKIOXML_EXPORT vtkXMLPStructuredDataReader : public vtkXMLPDataReader
27{
28public:
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
36protected:
39
42 void CopyArrayForPoints(vtkAbstractArray* inArray, vtkAbstractArray* outArray) override;
43 void CopyArrayForCells(vtkAbstractArray* inArray, vtkAbstractArray* outArray) override;
44
45 virtual void SetOutputExtent(VTK_FUTURE_CONST int extent[6]) = 0;
46 virtual void GetPieceInputExtent(int index, int extent[6]) = 0;
47
48 // Pipeline execute data driver. Called by vtkXMLReader.
49 void ReadXMLData() override;
50 int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
51
52 void SetupOutputData() override;
53
54 void SetupPieces(int numPieces) override;
55 void DestroyPieces() override;
56 int ReadPiece(vtkXMLDataElement* ePiece) override;
57 int ReadPieceData() override;
58 void CopySubExtent(VTK_FUTURE_CONST int inExtent[6], int* inDimensions, vtkIdType* inIncrements,
59 VTK_FUTURE_CONST int outExtent[6], int* outDimensions, vtkIdType* outIncrements,
60 VTK_FUTURE_CONST int subExtent[6], int* subDimensions, vtkAbstractArray* inArray,
61 vtkAbstractArray* outArray);
63
65
66 // The extent to be updated in the output.
72
73 // The extent currently being read from a piece.
74 int SubExtent[6];
82
83 // Information per-piece.
85
87 vtkInformationVector* outputVector) override;
88
89private:
91 void operator=(const vtkXMLPStructuredDataReader&) = delete;
92};
93
94VTK_ABI_NAMESPACE_END
95#endif
Abstract superclass for all arrays.
Split an extent across other extents.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Represents an XML element and those nested inside.
void CopySubExtent(VTK_FUTURE_CONST int inExtent[6], int *inDimensions, vtkIdType *inIncrements, VTK_FUTURE_CONST int outExtent[6], int *outDimensions, vtkIdType *outIncrements, VTK_FUTURE_CONST int subExtent[6], int *subDimensions, vtkAbstractArray *inArray, vtkAbstractArray *outArray)
void ReadXMLData() override
Pipeline execution methods to be defined by subclass.
void CopyArrayForCells(vtkAbstractArray *inArray, vtkAbstractArray *outArray) override
void CopyOutputInformation(vtkInformation *outInfo, int port) override
For the specified port, copy the information this reader sets up in SetupOutputInformation to outInfo...
void DestroyPieces() override
Delete all piece readers and related information.
~vtkXMLPStructuredDataReader() override
void SetupOutputData() override
Initialize the output data.
void CopyArrayForPoints(vtkAbstractArray *inArray, vtkAbstractArray *outArray) override
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
int ReadPiece(vtkXMLDataElement *ePiece) override
Setup the current piece reader.
virtual void GetPieceInputExtent(int index, int extent[6])=0
vtkIdType GetNumberOfCells() override
int ReadPieceData() override
Actually read the current piece data.
virtual void SetOutputExtent(VTK_FUTURE_CONST int extent[6])=0
int ReadPrimaryElement(vtkXMLDataElement *ePrimary) override
Read the information relative to the dataset and allocate the needed structures according to it.
vtkIdType GetNumberOfPoints() override
void SetupPieces(int numPieces) override
Setup the number of pieces to be read and allocate space accordingly.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Superclass for structured data XML readers.
int vtkIdType
Definition vtkType.h:363