VTK  9.3.0
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
33#ifndef vtkCompositeDataSet_h
34#define vtkCompositeDataSet_h
35
36#include "vtkCommonDataModelModule.h" // For export macro
37#include "vtkDataObject.h"
38#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_3_0
39
40#include <vector> // For GetDataSets
41
42VTK_ABI_NAMESPACE_BEGIN
44class vtkCompositeDataSetInternals;
45class vtkDataSet;
46class vtkInformation;
49
50class VTKCOMMONDATAMODEL_EXPORT vtkCompositeDataSet : public vtkDataObject
51{
52public:
54 void PrintSelf(ostream& os, vtkIndent indent) override;
55
60
65 int GetDataObjectType() override { return VTK_COMPOSITE_DATA_SET; }
66
72 virtual void CopyStructure(vtkCompositeDataSet* input);
73
80 virtual void SetDataSet(vtkCompositeDataIterator* iter, vtkDataObject* dataObj) = 0;
81
89
98 virtual vtkDataObject* GetDataSet(unsigned int flatIndex);
99
104 unsigned long GetActualMemorySize() override;
105
107
113
117 void Initialize() override;
118
127
131 VTK_DEPRECATED_IN_9_3_0("Use ShallowCopy instead.")
132 virtual void RecursiveShallowCopy(vtkDataObject* src);
133
139 virtual vtkIdType GetNumberOfPoints();
140
146 virtual vtkIdType GetNumberOfCells();
147
151 vtkIdType GetNumberOfElements(int type) override;
152
162 void GetBounds(double bounds[6]);
163
168
176 static vtkInformationIntegerKey* CURRENT_PROCESS_CAN_LOAD_BLOCK();
177
188 template <class DataSetT = vtkDataSet>
189 static std::vector<DataSetT*> GetDataSets(vtkDataObject* dobj, bool preserveNull = false);
190
191protected:
194
195private:
197 void operator=(const vtkCompositeDataSet&) = delete;
198};
199
200VTK_ABI_NAMESPACE_END
201#include "vtkCompositeDataSet.txx" // for template implementations
202
203#endif
superclass for composite data iterators
abstract superclass for composite (multi-block or AMR) datasets
virtual vtkDataObject * GetDataSet(unsigned int flatIndex)
Returns the dataset located at the position pointed by the flatIndex.
virtual void SetDataSet(vtkCompositeDataIterator *iter, vtkDataObject *dataObj)=0
Sets the data set at the location pointed by the iterator.
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.
static vtkCompositeDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
virtual void CopyStructure(vtkCompositeDataSet *input)
Copies the tree structure from the input.
int GetDataObjectType() 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).
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:62
a simple class to control print indentation
Definition vtkIndent.h:38
Key for integer values in vtkInformation.
Key for string values in vtkInformation.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
#define VTK_DEPRECATED_IN_9_3_0(reason)
int vtkIdType
Definition vtkType.h:315
#define VTK_COMPOSITE_DATA_SET
Definition vtkType.h:76
#define VTK_NEWINSTANCE