VTK  9.2.5
vtkXMLUniformGridAMRReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkXMLUniformGridAMRReader.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
53 #ifndef vtkXMLUniformGridAMRReader_h
54 #define vtkXMLUniformGridAMRReader_h
55 
56 #include "vtkIOXMLModule.h" // For export macro
57 #include "vtkSmartPointer.h" // needed for vtkSmartPointer.
59 
60 class vtkOverlappingAMR;
61 class vtkUniformGridAMR;
62 
64 {
65 public:
68  void PrintSelf(ostream& os, vtkIndent indent) override;
69 
71 
80  vtkSetMacro(MaximumLevelsToReadByDefault, unsigned int);
81  vtkGetMacro(MaximumLevelsToReadByDefault, unsigned int);
83 
84 protected:
87 
94  int CanReadFileWithDataType(const char* dsname) override;
95 
102  int ReadVTKFile(vtkXMLDataElement* eVTKFile) override;
103 
110  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
111 
118  vtkInformationVector* outputVector) override;
119 
125  vtkInformationVector* outputVector) override;
126 
127  // Get the name of the data set being read.
128  const char* GetDataSetName() override;
129 
130  // Read the XML element for the subtree of a the composite dataset.
131  // dataSetIndex is used to rank the leaf nodes in an inorder traversal.
133  const char* filePath, unsigned int& dataSetIndex) override;
134 
135  // Read the vtkDataSet (a leaf) in the composite dataset.
136  vtkDataSet* ReadDataset(vtkXMLDataElement* xmlElem, const char* filePath) override;
137 
140 
141 private:
143  void operator=(const vtkXMLUniformGridAMRReader&) = delete;
144 
145  void SynchronizeDataArraySelectionRecursively(
146  vtkXMLDataElement* element, const std::string& filePath);
147 
148  char* OutputDataType;
149  vtkSetStringMacro(OutputDataType);
150 };
151 
152 #endif
abstract superclass for composite (multi-block or AMR) datasets
abstract class to specify dataset behavior
Definition: vtkDataSet.h:172
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
hierarchical dataset of vtkUniformGrids
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).
static vtkXMLUniformGridAMRReader * New()
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
vtkDataSet * ReadDataset(vtkXMLDataElement *xmlElem, const char *filePath) override
vtkSmartPointer< vtkOverlappingAMR > Metadata
void ReadComposite(vtkXMLDataElement *element, vtkCompositeDataSet *composite, const char *filePath, unsigned int &dataSetIndex) override
const char * GetDataSetName() override
int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Overridden to create an output data object based on the type in the file.
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.
@ string
Definition: vtkX3D.h:496