VTK
vtkXMLCompositeDataReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkXMLCompositeDataReader.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 =========================================================================*/
29 #ifndef vtkXMLCompositeDataReader_h
30 #define vtkXMLCompositeDataReader_h
31 
32 #include "vtkIOXMLModule.h" // For export macro
33 #include "vtkXMLReader.h"
34 
38 
39 struct vtkXMLCompositeDataReaderInternals;
40 
41 class VTKIOXML_EXPORT vtkXMLCompositeDataReader : public vtkXMLReader
42 {
43 public:
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48 
54 
55 protected:
58 
59  // Get the name of the data set being read.
60  virtual const char* GetDataSetName();
61 
62  // Returns the primary element pass to ReadPrimaryElement().
64 
65  virtual void ReadXMLData();
66  virtual int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
67 
68  // Setup the output with no data available. Used in error cases.
69  virtual void SetupEmptyOutput();
70 
72 
73  // Create a default executive.
75 
77 
81 
82 
83 
84  // Adds a child data object to the composite parent. childXML is the XML for
85  // the child data object need to obtain certain meta-data about the child.
87  vtkDataObject* child, vtkXMLDataElement* childXML);
88 
89  // Read the XML element for the subtree of a the composite dataset.
90  // dataSetIndex is used to rank the leaf nodes in an inorder traversal.
91  virtual void ReadComposite(vtkXMLDataElement* element,
92  vtkCompositeDataSet* composite, const char* filePath,
93  unsigned int &dataSetIndex)=0;
94 
95  // Read the vtkDataSet (a leaf) in the composite dataset.
96  virtual vtkDataSet* ReadDataset(vtkXMLDataElement* xmlElem, const char* filePath);
97 
98  // Counts "DataSet" elements in the subtree.
99  unsigned int CountLeaves(vtkXMLDataElement* elem);
100 
105  int ShouldReadDataSet(unsigned int datasetIndex);
106 
107 private:
108  vtkXMLCompositeDataReader(const vtkXMLCompositeDataReader&) VTK_DELETE_FUNCTION;
109  void operator=(const vtkXMLCompositeDataReader&) VTK_DELETE_FUNCTION;
110 
111  vtkXMLCompositeDataReaderInternals* Internal;
112 };
113 
114 #endif
vtkXMLCompositeDataReader::GetPrimaryElement
vtkXMLDataElement * GetPrimaryElement()
vtkXMLCompositeDataReader::~vtkXMLCompositeDataReader
~vtkXMLCompositeDataReader()
vtkXMLCompositeDataReader::ShouldReadDataSet
int ShouldReadDataSet(unsigned int datasetIndex)
Given the inorder index for a leaf node, this method tells if the current process should read the dat...
vtkXMLCompositeDataReader::SetupEmptyOutput
virtual void SetupEmptyOutput()
vtkXMLReader.h
vtkX3D::type
@ type
Definition: vtkX3D.h:516
vtkXMLCompositeDataReader::ReadDataset
virtual vtkDataSet * ReadDataset(vtkXMLDataElement *xmlElem, const char *filePath)
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkXMLCompositeDataReader::GetOutput
vtkCompositeDataSet * GetOutput()
Get the output data object for a port on this algorithm.
vtkXMLCompositeDataReader::GetDataSetName
virtual const char * GetDataSetName()
vtkXMLCompositeDataReader::FillOutputPortInformation
virtual int FillOutputPortInformation(int, vtkInformation *info)
Fill the output port information objects for this algorithm.
vtkXMLCompositeDataReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkCompositeDataSet
abstract superclass for composite (multi-block or AMR) datasets
Definition: vtkCompositeDataSet.h:52
vtkXMLCompositeDataReader::vtkXMLCompositeDataReader
vtkXMLCompositeDataReader()
vtkExecutive
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:50
vtkXMLCompositeDataReader
Reader for multi-group datasets.
Definition: vtkXMLCompositeDataReader.h:42
vtkXMLCompositeDataReader::ReadComposite
virtual void ReadComposite(vtkXMLDataElement *element, vtkCompositeDataSet *composite, const char *filePath, unsigned int &dataSetIndex)=0
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:35
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkXMLDataElement
Represents an XML element and those nested inside.
Definition: vtkXMLDataElement.h:37
vtkXMLCompositeDataReader::ReadPrimaryElement
virtual int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
vtkXMLCompositeDataReader::GetOutput
vtkCompositeDataSet * GetOutput(int)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkXMLCompositeDataReader::CreateDefaultExecutive
virtual vtkExecutive * CreateDefaultExecutive()
Create a default executive.
vtkXMLCompositeDataReader::GetReaderOfType
vtkXMLReader * GetReaderOfType(const char *type)
vtkXMLCompositeDataReader::RequestInformation
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkXMLCompositeDataReader::AddChild
void AddChild(vtkCompositeDataSet *parent, vtkDataObject *child, vtkXMLDataElement *childXML)
vtkXMLCompositeDataReader::CountLeaves
unsigned int CountLeaves(vtkXMLDataElement *elem)
vtkInformationIntegerVectorKey
Key for integer vector values.
Definition: vtkInformationIntegerVectorKey.h:35
vtkXMLCompositeDataReader::ReadXMLData
virtual void ReadXMLData()
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkXMLReader
Superclass for VTK's XML format readers.
Definition: vtkXMLReader.h:44