VTK  9.2.6
vtkPartitionedDataSetCollection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPartitionedDataSetCollection.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
30 #ifndef vtkPartitionedDataSetCollection_h
31 #define vtkPartitionedDataSetCollection_h
32 
33 #include "vtkCommonDataModelModule.h" // For export macro
34 #include "vtkDataObjectTree.h"
35 
37 class vtkDataAssembly;
38 class vtkDataSet;
39 
40 class VTKCOMMONDATAMODEL_EXPORT vtkPartitionedDataSetCollection : public vtkDataObjectTree
41 {
42 public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
52 
58  void SetNumberOfPartitionedDataSets(unsigned int numDataSets);
59 
63  unsigned int GetNumberOfPartitionedDataSets() const;
64 
69  vtkPartitionedDataSet* GetPartitionedDataSet(unsigned int idx) const;
70 
77  void SetPartitionedDataSet(unsigned int idx, vtkPartitionedDataSet* dataset);
78 
82  void RemovePartitionedDataSet(unsigned int idx);
83 
85 
88  void SetPartition(unsigned int idx, unsigned int partition, vtkDataObject* object);
89  vtkDataSet* GetPartition(unsigned int idx, unsigned int partition);
90  vtkDataObject* GetPartitionAsDataObject(unsigned int idx, unsigned int partition);
92 
96  unsigned int GetNumberOfPartitions(unsigned int idx) const;
97 
102  void SetNumberOfPartitions(unsigned int idx, unsigned int numPartitions);
103 
107  int HasMetaData(unsigned int idx) { return this->Superclass::HasChildMetaData(idx); }
108 
114  vtkInformation* GetMetaData(unsigned int idx) { return this->Superclass::GetChildMetaData(idx); }
115 
117 
122  vtkGetObjectMacro(DataAssembly, vtkDataAssembly);
125 
127 
132  unsigned int GetCompositeIndex(unsigned int idx) const;
133  unsigned int GetCompositeIndex(unsigned int idx, unsigned int partition) const;
135 
137 
143 
148  {
149  return this->Superclass::GetMetaData(iter);
150  }
151 
156  {
157  return this->Superclass::HasMetaData(iter);
158  }
159 
163  vtkMTimeType GetMTime() override;
164 
166 
169  void ShallowCopy(vtkDataObject* src) override;
170  void DeepCopy(vtkDataObject* src) override;
171  void CopyStructure(vtkCompositeDataSet* input) override;
172  void Initialize() override;
174 protected:
177 
184 
185 private:
187  void operator=(const vtkPartitionedDataSetCollection&) = delete;
188 
189  vtkDataAssembly* DataAssembly;
190 };
191 
192 #endif
superclass for composite data iterators
abstract superclass for composite (multi-block or AMR) datasets
hierarchical representation to use with vtkPartitionedDataSetCollection
provides implementation for most abstract methods in the superclass vtkCompositeDataSet
general representation of visualization data
Definition: vtkDataObject.h:75
abstract class to specify dataset behavior
Definition: vtkDataSet.h:72
a simple class to control print indentation
Definition: vtkIndent.h:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Composite dataset that groups datasets as a collection.
unsigned int GetNumberOfPartitionedDataSets() const
Returns the number of blocks.
void CopyStructure(vtkCompositeDataSet *input) override
Overridden to handle vtkDataAssembly.
unsigned int GetNumberOfPartitions(unsigned int idx) const
Returns the number of partitions in a partitioned dataset at the given index.
void RemovePartitionedDataSet(unsigned int idx)
Remove the given block from the dataset.
int HasMetaData(vtkCompositeDataIterator *iter) override
Unhiding superclass method.
vtkDataSet * GetPartition(unsigned int idx, unsigned int partition)
API to get/set partitions using a tuple index.
unsigned int GetCompositeIndex(unsigned int idx, unsigned int partition) const
Returns the composite index (sometimes referred to as the flat-index) for either a partitioned datase...
void SetNumberOfPartitionedDataSets(unsigned int numDataSets)
Set the number of blocks.
vtkDataObject * GetPartitionAsDataObject(unsigned int idx, unsigned int partition)
API to get/set partitions using a tuple index.
static vtkPartitionedDataSetCollection * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
static vtkPartitionedDataSetCollection * New()
static vtkPartitionedDataSetCollection * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
void ShallowCopy(vtkDataObject *src) override
Overridden to handle vtkDataAssembly.
void SetPartitionedDataSet(unsigned int idx, vtkPartitionedDataSet *dataset)
Sets the data object as the given block.
void DeepCopy(vtkDataObject *src) override
Overridden to handle vtkDataAssembly.
void SetPartition(unsigned int idx, unsigned int partition, vtkDataObject *object)
API to get/set partitions using a tuple index.
vtkDataObjectTree * CreateForCopyStructure(vtkDataObjectTree *other) override
Overridden to create a vtkPartitionedDataSet whenever a vtkMultiPieceDataSet is encountered.
vtkPartitionedDataSet * GetPartitionedDataSet(unsigned int idx) const
Returns the block at the given index.
void SetDataAssembly(vtkDataAssembly *assembly)
DataAssembly provides a way to define hierarchical organization of partitioned-datasets.
unsigned int GetCompositeIndex(unsigned int idx) const
Returns the composite index (sometimes referred to as the flat-index) for either a partitioned datase...
vtkInformation * GetMetaData(vtkCompositeDataIterator *iter) override
Unhiding superclass method.
void Initialize() override
Overridden to handle vtkDataAssembly.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int HasMetaData(unsigned int idx)
Returns true if meta-data is available for a given block.
void SetNumberOfPartitions(unsigned int idx, unsigned int numPartitions)
Set number of partitions at a given index.
vtkMTimeType GetMTime() override
Overridden to include DataAssembly MTime.
vtkInformation * GetMetaData(unsigned int idx)
Returns the meta-data for the block.
int GetDataObjectType() override
Return class name of data type (see vtkType.h for definitions).
composite dataset to encapsulates a dataset consisting of partitions.
@ info
Definition: vtkX3D.h:382
#define VTK_PARTITIONED_DATA_SET_COLLECTION
Definition: vtkType.h:115
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287