VTK  9.2.6
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 =========================================================================*/
34 #ifndef vtkXMLUniformGridAMRReader_h
35 #define vtkXMLUniformGridAMRReader_h
36 
37 #include "vtkIOXMLModule.h" // For export macro
38 #include "vtkSmartPointer.h" // needed for vtkSmartPointer.
40 
41 class vtkOverlappingAMR;
42 class vtkUniformGridAMR;
43 
45 {
46 public:
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
52 
61  vtkSetMacro(MaximumLevelsToReadByDefault, unsigned int);
62  vtkGetMacro(MaximumLevelsToReadByDefault, unsigned int);
64 
65 protected:
67  ~vtkXMLUniformGridAMRReader() override;
68 
75  int CanReadFileWithDataType(const char* dsname) override;
76 
83  int ReadVTKFile(vtkXMLDataElement* eVTKFile) override;
84 
91  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
92 
98  int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
99  vtkInformationVector* outputVector) override;
100 
105  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
106  vtkInformationVector* outputVector) override;
107 
108  // Get the name of the data set being read.
109  const char* GetDataSetName() override;
110 
111  // Read the XML element for the subtree of a the composite dataset.
112  // dataSetIndex is used to rank the leaf nodes in an inorder traversal.
113  void ReadComposite(vtkXMLDataElement* element, vtkCompositeDataSet* composite,
114  const char* filePath, unsigned int& dataSetIndex) override;
115 
116  // Read the vtkDataSet (a leaf) in the composite dataset.
117  vtkDataSet* ReadDataset(vtkXMLDataElement* xmlElem, const char* filePath) override;
118 
121 
122 private:
124  void operator=(const vtkXMLUniformGridAMRReader&) = delete;
125 
126  void SynchronizeDataArraySelectionRecursively(
127  vtkXMLDataElement* element, const std::string& filePath);
128 
129  char* OutputDataType;
130  vtkSetStringMacro(OutputDataType);
131 };
132 
133 #endif
Represents an XML element and those nested inside.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
Reader for multi-group datasets.
int ReadPrimaryElement(vtkXMLDataElement *ePrimary) override
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkSmartPointer< vtkOverlappingAMR > Metadata
virtual vtkDataSet * ReadDataset(vtkXMLDataElement *xmlElem, const char *filePath)
Reader for amr datasets (vtkOverlappingAMR or vtkNonOverlappingAMR).
virtual int ReadVTKFile(vtkXMLDataElement *eVTKFile)
abstract superclass for composite (multi-block or AMR) datasets
const char * GetDataSetName() override
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual int CanReadFileWithDataType(const char *dsname)
This method is used by CanReadFile() to check if the reader can read an XML with the primary element ...
virtual int RequestDataObject(vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *vtkNotUsed(outputVector))
Definition: vtkXMLReader.h:389
hierarchical dataset of vtkUniformGrids
virtual void ReadComposite(vtkXMLDataElement *element, vtkCompositeDataSet *composite, const char *filePath, unsigned int &dataSetIndex)=0
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a concrete implementation of vtkCompositeDataSet