VTK  9.3.0
vtkXMLUniformGridAMRReader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright (c) Kitware, Inc.
3// SPDX-License-Identifier: BSD-3-Clause
32#ifndef vtkXMLUniformGridAMRReader_h
33#define vtkXMLUniformGridAMRReader_h
34
35#include "vtkIOXMLModule.h" // For export macro
36#include "vtkSmartPointer.h" // needed for vtkSmartPointer.
38
39VTK_ABI_NAMESPACE_BEGIN
42
44{
45public:
48 void PrintSelf(ostream& os, vtkIndent indent) override;
49
51
60 vtkSetMacro(MaximumLevelsToReadByDefault, unsigned int);
61 vtkGetMacro(MaximumLevelsToReadByDefault, unsigned int);
63
64protected:
67
74 int CanReadFileWithDataType(const char* dsname) override;
75
82 int ReadVTKFile(vtkXMLDataElement* eVTKFile) override;
83
90 int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
91
98 vtkInformationVector* outputVector) override;
99
105 vtkInformationVector* outputVector) override;
106
107 // Get the name of the data set being read.
108 const char* GetDataSetName() override;
109
110 // Read the XML element for the subtree of a the composite dataset.
111 // dataSetIndex is used to rank the leaf nodes in an inorder traversal.
113 const char* filePath, unsigned int& dataSetIndex) override;
114
115 // Read the vtkDataSet (a leaf) in the composite dataset.
116 vtkDataSet* ReadDataset(vtkXMLDataElement* xmlElem, const char* filePath) override;
117
120
121private:
123 void operator=(const vtkXMLUniformGridAMRReader&) = delete;
124
125 void SynchronizeDataArraySelectionRecursively(
126 vtkXMLDataElement* element, const std::string& filePath);
127
128 char* OutputDataType;
129 vtkSetStringMacro(OutputDataType);
130};
131
132VTK_ABI_NAMESPACE_END
133#endif
abstract superclass for composite (multi-block or AMR) datasets
abstract class to specify dataset behavior
Definition vtkDataSet.h:62
a simple class to control print indentation
Definition vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
hierarchical dataset of vtkUniformGrids
Hold a reference to a vtkObjectBase instance.
a concrete implementation of vtkCompositeDataSet
Reader for multi-group datasets.
Represents an XML element and those nested inside.
Reader for amr datasets (vtkOverlappingAMR or vtkNonOverlappingAMR).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int ReadVTKFile(vtkXMLDataElement *eVTKFile) override
Read the top-level element from the file.
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Overridden to put vtkOverlappingAMR in the pipeline if available/applicable.
~vtkXMLUniformGridAMRReader() override
vtkSmartPointer< vtkOverlappingAMR > Metadata
void ReadComposite(vtkXMLDataElement *element, vtkCompositeDataSet *composite, const char *filePath, unsigned int &dataSetIndex) override
const char * GetDataSetName() override
Get the name of the data set being read.
int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Overridden to create an output data object based on the type in the file.
vtkDataSet * ReadDataset(vtkXMLDataElement *xmlElem, const char *filePath) override
int CanReadFileWithDataType(const char *dsname) override
This method is used by CanReadFile() to check if the reader can read an XML with the primary element ...
int ReadPrimaryElement(vtkXMLDataElement *ePrimary) override
Read the meta-data from the AMR from the file.
static vtkXMLUniformGridAMRReader * New()