VTK  9.2.20230321
vtkXMLStructuredDataReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLStructuredDataReader.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 =========================================================================*/
27 #ifndef vtkXMLStructuredDataReader_h
28 #define vtkXMLStructuredDataReader_h
29 
30 #include "vtkIOXMLModule.h" // For export macro
31 #include "vtkXMLDataReader.h"
32 
33 VTK_ABI_NAMESPACE_BEGIN
34 class VTKIOXML_EXPORT vtkXMLStructuredDataReader : public vtkXMLDataReader
35 {
36 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
44 
49 
51 
57  vtkSetMacro(WholeSlices, vtkTypeBool);
58  vtkGetMacro(WholeSlices, vtkTypeBool);
59  vtkBooleanMacro(WholeSlices, vtkTypeBool);
61 
66  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
67 
68 protected:
71 
72  virtual void SetOutputExtent(int* extent) = 0;
73  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
74 
75  // Pipeline execute data driver. Called by vtkXMLReader.
76  void ReadXMLData() override;
77 
78  void SetupOutputInformation(vtkInformation* outInfo) override;
79 
80  // Internal representation of pieces in the file that may have come
81  // from a streamed write.
87 
88  // Whether to read in whole slices mode.
90 
91  // The update extent and corresponding increments and dimensions.
92  int UpdateExtent[6];
93  int PointDimensions[3];
95  vtkIdType PointIncrements[3];
96  vtkIdType CellIncrements[3];
97 
98  int WholeExtent[6];
99 
100  // The extent currently being read.
101  int SubExtent[6];
102  int SubPointDimensions[3];
103  int SubCellDimensions[3];
104 
105  // Override methods from superclass.
106  void SetupEmptyOutput() override;
107  void SetupPieces(int numPieces) override;
108  void DestroyPieces() override;
111 
112  // Internal utility methods.
113  int ReadPiece(vtkXMLDataElement* ePiece) override;
114  virtual int ReadSubExtent(int* inExtent, int* inDimensions, vtkIdType* inIncrements,
115  int* outExtent, int* outDimensions, vtkIdType* outIncrements, int* subExtent,
116  int* subDimensions, vtkXMLDataElement* da, vtkAbstractArray* array, FieldType type);
117 
118 private:
120  void operator=(const vtkXMLStructuredDataReader&) = delete;
121 };
122 
123 VTK_ABI_NAMESPACE_END
124 #endif
Abstract superclass for all arrays.
a simple class to control print indentation
Definition: vtkIndent.h:120
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
int ReadPrimaryElement(vtkXMLDataElement *ePrimary) override
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
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
const std::map< CGNS_ENUMT(ElementType_t), int > CellDimensions
@ port
Definition: vtkX3D.h:459
@ extent
Definition: vtkX3D.h:357
@ type
Definition: vtkX3D.h:528
int vtkTypeBool
Definition: vtkABI.h:71
int vtkIdType
Definition: vtkType.h:327