VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkXMLUniformGridAMRReader Class Reference

Reader for amr datasets (vtkOverlappingAMR or vtkNonOverlappingAMR). More...

#include <vtkXMLUniformGridAMRReader.h>

Inheritance diagram for vtkXMLUniformGridAMRReader:
Inheritance graph
[legend]
Collaboration diagram for vtkXMLUniformGridAMRReader:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkXMLCompositeDataReader Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkXMLUniformGridAMRReaderNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetMaximumLevelsToReadByDefault (unsigned int)
virtual unsigned int GetMaximumLevelsToReadByDefault ()

Static Public Member Functions

static vtkXMLUniformGridAMRReaderNew ()
static int IsTypeOf (const char *type)
static vtkXMLUniformGridAMRReaderSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkXMLUniformGridAMRReader ()
 ~vtkXMLUniformGridAMRReader ()
virtual int CanReadFileVersion (int major, int minor)
virtual int CanReadFileWithDataType (const char *dsname)
virtual int ReadVTKFile (vtkXMLDataElement *eVTKFile)
virtual int ReadPrimaryElement (vtkXMLDataElement *ePrimary)
virtual const char * GetDataSetName ()
virtual void ReadComposite (vtkXMLDataElement *element, vtkCompositeDataSet *composite, const char *filePath, unsigned int &dataSetIndex)
virtual vtkDataSetReadDataset (vtkXMLDataElement *xmlElem, const char *filePath)
virtual int RequestDataObject (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual int RequestInformation (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)

Protected Attributes

vtkSmartPointer
< vtkOverlappingAMR
Metadata
unsigned int MaximumLevelsToReadByDefault

Detailed Description

Reader for amr datasets (vtkOverlappingAMR or vtkNonOverlappingAMR).

vtkXMLUniformGridAMRReader reads the VTK XML data files for all types of amr datasets including vtkOverlappingAMR, vtkNonOverlappingAMR and the legacy vtkHierarchicalBoxDataSet. The reader uses information in the file to determine what type of dataset is actually being read and creates the output-data object accordingly.

This reader can only read files with version 1.1 or greater. Older versions can be converted to the newer versions using vtkXMLHierarchicalBoxDataFileConverter.

Tests:
vtkXMLUniformGridAMRReader (Tests)

Definition at line 43 of file vtkXMLUniformGridAMRReader.h.


Member Typedef Documentation

Reimplemented from vtkXMLCompositeDataReader.

Reimplemented in vtkXMLHierarchicalBoxDataReader.

Definition at line 48 of file vtkXMLUniformGridAMRReader.h.


Constructor & Destructor Documentation


Member Function Documentation

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkAlgorithm.

Reimplemented in vtkXMLHierarchicalBoxDataReader.

static int vtkXMLUniformGridAMRReader::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkXMLCompositeDataReader.

Reimplemented in vtkXMLHierarchicalBoxDataReader.

virtual int vtkXMLUniformGridAMRReader::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkXMLCompositeDataReader.

Reimplemented in vtkXMLHierarchicalBoxDataReader.

Reimplemented from vtkXMLCompositeDataReader.

Reimplemented in vtkXMLHierarchicalBoxDataReader.

virtual vtkObjectBase* vtkXMLUniformGridAMRReader::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkXMLCompositeDataReader.

Reimplemented in vtkXMLHierarchicalBoxDataReader.

Reimplemented from vtkXMLCompositeDataReader.

Reimplemented in vtkXMLHierarchicalBoxDataReader.

void vtkXMLUniformGridAMRReader::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkXMLCompositeDataReader.

Reimplemented in vtkXMLHierarchicalBoxDataReader.

virtual void vtkXMLUniformGridAMRReader::SetMaximumLevelsToReadByDefault ( unsigned  int) [virtual]

This reader supports demand-driven heavy data reading i.e. downstream pipeline can request specific blocks from the AMR using vtkCompositeDataPipeline::UPDATE_COMPOSITE_INDICES() key in RequestUpdateExtent() pass. However, when down-stream doesn't provide any specific keys, the default behavior can be setup to read at-most N levels by default. The number of levels read can be set using this method. Set this to 0 to imply no limit. Default is 0.

This reader supports demand-driven heavy data reading i.e. downstream pipeline can request specific blocks from the AMR using vtkCompositeDataPipeline::UPDATE_COMPOSITE_INDICES() key in RequestUpdateExtent() pass. However, when down-stream doesn't provide any specific keys, the default behavior can be setup to read at-most N levels by default. The number of levels read can be set using this method. Set this to 0 to imply no limit. Default is 0.

virtual int vtkXMLUniformGridAMRReader::CanReadFileVersion ( int  major,
int  minor 
) [inline, protected, virtual]

Reimplemented from vtkXMLReader.

Definition at line 68 of file vtkXMLUniformGridAMRReader.h.

virtual int vtkXMLUniformGridAMRReader::CanReadFileWithDataType ( const char *  dsname) [protected, virtual]

This method is used by CanReadFile() to check if the reader can read an XML with the primary element with the given name. Default implementation compares the name with the text returned by this->GetDataSetName(). Overridden to support all AMR types.

Reimplemented from vtkXMLReader.

virtual int vtkXMLUniformGridAMRReader::ReadVTKFile ( vtkXMLDataElement eVTKFile) [protected, virtual]

Read the top-level element from the file. This is always the VTKFile element. Overridden to read the "type" information specified in the XML. The "type" attribute helps us identify the output data type.

Reimplemented from vtkXMLReader.

virtual int vtkXMLUniformGridAMRReader::ReadPrimaryElement ( vtkXMLDataElement ePrimary) [protected, virtual]

Read the meta-data from the AMR from the file. Note that since ReadPrimaryElement() is only called when the filename changes, we are technically not supporting time-varying AMR datasets in this format right now.

Reimplemented from vtkXMLCompositeDataReader.

virtual int vtkXMLUniformGridAMRReader::RequestDataObject ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
) [protected, virtual]

Overridden to create an output data object based on the type in the file. Since this reader can handle all subclasses of vtkUniformGrid, we need to check in the file to decide what type to create.

virtual int vtkXMLUniformGridAMRReader::RequestInformation ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
) [protected, virtual]

Overridden to put vtkOverlappingAMR in the pipeline if available/applicable.

Reimplemented from vtkXMLCompositeDataReader.

virtual const char* vtkXMLUniformGridAMRReader::GetDataSetName ( ) [protected, virtual]

Reimplemented from vtkXMLCompositeDataReader.

virtual void vtkXMLUniformGridAMRReader::ReadComposite ( vtkXMLDataElement element,
vtkCompositeDataSet composite,
const char *  filePath,
unsigned int dataSetIndex 
) [protected, virtual]
virtual vtkDataSet* vtkXMLUniformGridAMRReader::ReadDataset ( vtkXMLDataElement xmlElem,
const char *  filePath 
) [protected, virtual]

Reimplemented from vtkXMLCompositeDataReader.


Member Data Documentation

Definition at line 117 of file vtkXMLUniformGridAMRReader.h.

Definition at line 118 of file vtkXMLUniformGridAMRReader.h.


The documentation for this class was generated from the following file: