VTK  9.3.20240712
vtkXMLStructuredDataReader.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
15#ifndef vtkXMLStructuredDataReader_h
16#define vtkXMLStructuredDataReader_h
17
18#include "vtkIOXMLModule.h" // For export macro
19#include "vtkXMLDataReader.h"
20
21VTK_ABI_NAMESPACE_BEGIN
22class VTKIOXML_EXPORT vtkXMLStructuredDataReader : public vtkXMLDataReader
23{
24public:
26 void PrintSelf(ostream& os, vtkIndent indent) override;
27
32
37
39
45 vtkSetMacro(WholeSlices, vtkTypeBool);
46 vtkGetMacro(WholeSlices, vtkTypeBool);
47 vtkBooleanMacro(WholeSlices, vtkTypeBool);
49
54 void CopyOutputInformation(vtkInformation* outInfo, int port) override;
55
56protected:
59
60 virtual void SetOutputExtent(int* extent) = 0;
61 int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
62
63 // Pipeline execute data driver. Called by vtkXMLReader.
64 void ReadXMLData() override;
65
66 void SetupOutputInformation(vtkInformation* outInfo) override;
67
68 // Internal representation of pieces in the file that may have come
69 // from a streamed write.
75
76 // Whether to read in whole slices mode.
78
79 // The update extent and corresponding increments and dimensions.
80 int UpdateExtent[6];
81 int PointDimensions[3];
82 int CellDimensions[3];
83 vtkIdType PointIncrements[3];
84 vtkIdType CellIncrements[3];
85
86 int WholeExtent[6];
87
88 // The extent currently being read.
89 int SubExtent[6];
90 int SubPointDimensions[3];
91 int SubCellDimensions[3];
92
93 // Override methods from superclass.
94 void SetupEmptyOutput() override;
95 void SetupPieces(int numPieces) override;
96 void DestroyPieces() override;
99
100 // Internal utility methods.
101 int ReadPiece(vtkXMLDataElement* ePiece) override;
102 virtual int ReadSubExtent(int* inExtent, int* inDimensions, vtkIdType* inIncrements,
103 int* outExtent, int* outDimensions, vtkIdType* outIncrements, int* subExtent,
104 int* subDimensions, vtkXMLDataElement* da, vtkAbstractArray* array, FieldType type);
105
106private:
108 void operator=(const vtkXMLStructuredDataReader&) = delete;
109};
110
111VTK_ABI_NAMESPACE_END
112#endif
Abstract superclass for all arrays.
a simple class to control print indentation
Definition vtkIndent.h:108
Store vtkAlgorithm input/output information.
Represents an XML element and those nested inside.
Superclass for VTK XML file readers.
Superclass for structured data XML readers.
virtual int ReadSubExtent(int *inExtent, int *inDimensions, vtkIdType *inIncrements, int *outExtent, int *outDimensions, vtkIdType *outIncrements, int *subExtent, int *subDimensions, vtkXMLDataElement *da, vtkAbstractArray *array, FieldType type)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int ReadArrayForCells(vtkXMLDataElement *da, vtkAbstractArray *outArray) override
void ReadXMLData() override
Pipeline execution methods to be defined by subclass.
int ReadPrimaryElement(vtkXMLDataElement *ePrimary) override
Read the primary element from the file.
vtkIdType GetNumberOfPoints() override
Get the number of points in the output.
vtkIdType GetNumberOfCells() override
Get the number of cells in the output.
void SetupEmptyOutput() override
Setup the output with no data available.
int ReadArrayForPoints(vtkXMLDataElement *da, vtkAbstractArray *outArray) override
void DestroyPieces() override
void SetupPieces(int numPieces) override
void CopyOutputInformation(vtkInformation *outInfo, int port) override
For the specified port, copy the information this reader sets up in SetupOutputInformation to outInfo...
void SetupOutputInformation(vtkInformation *outInfo) override
virtual void SetOutputExtent(int *extent)=0
~vtkXMLStructuredDataReader() override
int ReadPiece(vtkXMLDataElement *ePiece) override
int vtkTypeBool
Definition vtkABI.h:64
int vtkIdType
Definition vtkType.h:315