VTK  9.5.20250802
vtkCompositeDataSet.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
43#ifndef vtkCompositeDataSet_h
44#define vtkCompositeDataSet_h
45
46#include "vtkCommonDataModelModule.h" // For export macro
47#include "vtkDataObject.h"
48#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
49
50#include <vector> // For GetDataSets
51
52VTK_ABI_NAMESPACE_BEGIN
54class vtkCompositeDataSetInternals;
55class vtkDataSet;
56class vtkInformation;
59
60class VTKCOMMONDATAMODEL_EXPORT VTK_MARSHALAUTO vtkCompositeDataSet : public vtkDataObject
61{
62public:
64 void PrintSelf(ostream& os, vtkIndent indent) override;
65
70
75 int GetDataObjectType() VTK_FUTURE_CONST override { return VTK_COMPOSITE_DATA_SET; }
76
82 virtual void CopyStructure(vtkCompositeDataSet* input);
83
90 virtual void SetDataSet(vtkCompositeDataIterator* iter, vtkDataObject* dataObj) = 0;
91
99
108 virtual vtkDataObject* GetDataSet(unsigned int flatIndex);
109
114 unsigned long GetActualMemorySize() override;
115
117
123
127 void Initialize() override;
128
137
144
151
155 vtkIdType GetNumberOfElements(int type) override;
156
166 void GetBounds(double bounds[6]);
167
173
183
194 template <class DataSetT = vtkDataSet>
195 static std::vector<DataSetT*> GetDataSets(vtkDataObject* dobj, bool preserveNull = false);
196
200 bool SupportsGhostArray(int type) override;
201
202protected:
205
206private:
208 void operator=(const vtkCompositeDataSet&) = delete;
209};
210
211VTK_ABI_NAMESPACE_END
212#include "vtkCompositeDataSet.txx" // for template implementations
213
214#endif
superclass for composite data iterators
abstract superclass for composite (multi-block or AMR) datasets
~vtkCompositeDataSet() override
virtual vtkDataObject * GetDataSet(unsigned int flatIndex)
Returns the dataset located at the position pointed by the flatIndex.
virtual vtkIdType GetNumberOfCells()
Returns the total number of cells of all blocks.
virtual void SetDataSet(vtkCompositeDataIterator *iter, vtkDataObject *dataObj)=0
Sets the data set at the location pointed by the iterator.
void GetBounds(double bounds[6])
Return the geometric bounding box in the form (xmin,xmax, ymin,ymax, zmin,zmax).
virtual void CompositeShallowCopy(vtkCompositeDataSet *src)
The goal of the method is to copy the data up to the dataset pointers only.
static vtkCompositeDataSet * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
vtkIdType GetNumberOfElements(int type) override
Get the number of elements for a specific attribute type (POINT, CELL, etc.).
virtual vtkIdType GetNumberOfPoints()
Returns the total number of points of all blocks.
static vtkCompositeDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
bool SupportsGhostArray(int type) override
Returns true for POINT or CELL, false otherwise.
virtual void CopyStructure(vtkCompositeDataSet *input)
Copies the tree structure from the input.
int GetDataObjectType() VTK_FUTURE_CONST override
Return class name of data type (see vtkType.h for definitions).
virtual vtkDataObject * GetDataSet(vtkCompositeDataIterator *iter)=0
Returns the dataset located at the position pointed by the iterator.
void Initialize() override
Restore data object to initial state,.
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
static std::vector< DataSetT * > GetDataSets(vtkDataObject *dobj, bool preserveNull=false)
Extract datasets from the given data object.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual vtkCompositeDataIterator * NewIterator()=0
Return a new iterator (the iterator has to be deleted by user).
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
a simple class to control print indentation
Definition vtkIndent.h:108
Key for integer values in vtkInformation.
Key for string values in vtkInformation.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
static vtkInformationStringKey * NAME()
Key used to put node name in the meta-data associated with a node.
static vtkInformationIntegerKey * CURRENT_PROCESS_CAN_LOAD_BLOCK()
Key used to indicate that the current process can load the data in the node.
int vtkIdType
Definition vtkType.h:332
@ VTK_COMPOSITE_DATA_SET
Definition vtkType.h:87
#define VTK_MARSHALAUTO
#define VTK_NEWINSTANCE