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 =========================================================================*/
34 #ifndef vtkXMLUniformGridAMRReader_h
35 #define vtkXMLUniformGridAMRReader_h
36 
37 #include "vtkIOXMLModule.h" // For export macro
39 #include "vtkSmartPointer.h" // needed for vtkSmartPointer.
40 
41 class vtkOverlappingAMR;
42 class vtkUniformGridAMR;
43 
44 class VTKIOXML_EXPORT vtkXMLUniformGridAMRReader :
46 {
47 public:
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
53 
62  vtkSetMacro(MaximumLevelsToReadByDefault, unsigned int);
63  vtkGetMacro(MaximumLevelsToReadByDefault, unsigned int);
65 
66 protected:
69 
76  virtual int CanReadFileWithDataType(const char* dsname);
77 
84  virtual int ReadVTKFile(vtkXMLDataElement* eVTKFile);
85 
92  virtual int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
93 
99  virtual int RequestDataObject(vtkInformation *request,
100  vtkInformationVector **inputVector, vtkInformationVector *outputVector);
101 
106  virtual int RequestInformation(vtkInformation *request,
107  vtkInformationVector **inputVector, vtkInformationVector *outputVector);
108 
109  // Get the name of the data set being read.
110  virtual const char* GetDataSetName();
111 
112  // Read the XML element for the subtree of a the composite dataset.
113  // dataSetIndex is used to rank the leaf nodes in an inorder traversal.
114  virtual void ReadComposite(vtkXMLDataElement* element,
115  vtkCompositeDataSet* composite, const char* filePath,
116  unsigned int &dataSetIndex);
117 
118  // Read the vtkDataSet (a leaf) in the composite dataset.
119  virtual vtkDataSet* ReadDataset(vtkXMLDataElement* xmlElem, const char* filePath);
120 
123 
124 private:
125  vtkXMLUniformGridAMRReader(const vtkXMLUniformGridAMRReader&) VTK_DELETE_FUNCTION;
126  void operator=(const vtkXMLUniformGridAMRReader&) VTK_DELETE_FUNCTION;
127 
128  char* OutputDataType;
129  vtkSetStringMacro(OutputDataType);
130 };
131 
132 #endif
abstract superclass for composite (multi-block or AMR) datasets
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
hierarchical dataset of vtkUniformGrids
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)
Methods invoked by print to print information about the object including superclasses.
static vtkXMLUniformGridAMRReader * New()
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 const char * GetDataSetName()
virtual void ReadComposite(vtkXMLDataElement *element, vtkCompositeDataSet *composite, const char *filePath, unsigned int &dataSetIndex)
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Overridden to put vtkOverlappingAMR in the pipeline if available/applicable.
virtual int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Overridden to create an output data object based on the type in the file.
virtual vtkDataSet * ReadDataset(vtkXMLDataElement *xmlElem, const char *filePath)
vtkSmartPointer< vtkOverlappingAMR > Metadata
virtual int ReadVTKFile(vtkXMLDataElement *eVTKFile)
Read the top-level element from the file.
virtual int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
Read the meta-data from the AMR from the file.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.