VTK
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 =========================================================================*/
33 #ifndef vtkXMLUniformGridAMRReader_h
34 #define vtkXMLUniformGridAMRReader_h
35 
36 #include "vtkIOXMLModule.h" // For export macro
38 #include "vtkSmartPointer.h" // needed for vtkSmartPointer.
39 
40 class vtkOverlappingAMR;
41 class vtkUniformGridAMR;
42 
45 {
46 public:
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
52 
59  vtkSetMacro(MaximumLevelsToReadByDefault, unsigned int);
60  vtkGetMacro(MaximumLevelsToReadByDefault, unsigned int);
62 
63 protected:
66 
71  virtual int CanReadFileWithDataType(const char* dsname);
72 
76  virtual int ReadVTKFile(vtkXMLDataElement* eVTKFile);
77 
82  virtual int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
83 
85 
88  virtual int RequestDataObject(vtkInformation *request,
89  vtkInformationVector **inputVector, vtkInformationVector *outputVector);
91 
93 
95  virtual int RequestInformation(vtkInformation *request,
96  vtkInformationVector **inputVector, vtkInformationVector *outputVector);
98 
99  // Get the name of the data set being read.
100  virtual const char* GetDataSetName();
101 
102  // Read the XML element for the subtree of a the composite dataset.
103  // dataSetIndex is used to rank the leaf nodes in an inorder traversal.
104  virtual void ReadComposite(vtkXMLDataElement* element,
105  vtkCompositeDataSet* composite, const char* filePath,
106  unsigned int &dataSetIndex);
107 
108  // Read the vtkDataSet (a leaf) in the composite dataset.
109  virtual vtkDataSet* ReadDataset(vtkXMLDataElement* xmlElem, const char* filePath);
110 
113 
114 private:
115  vtkXMLUniformGridAMRReader(const vtkXMLUniformGridAMRReader&); // Not implemented.
116  void operator=(const vtkXMLUniformGridAMRReader&); // Not implemented.
117 
118  char* OutputDataType;
119  vtkSetStringMacro(OutputDataType);
120 };
121 
122 #endif
virtual const char * GetDataSetName()
Represents an XML element and those nested inside.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:61
Reader for multi-group datasets.
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
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKIOXML_EXPORT
virtual int CanReadFileWithDataType(const char *dsname)
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int RequestDataObject(vtkInformation *vtkNotUsed(request), vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector *vtkNotUsed(outputVector))
Definition: vtkXMLReader.h:274
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()
virtual int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
void PrintSelf(ostream &os, vtkIndent indent)