VTK: Common/DataModel/vtkCompositeDataSet.h Source File

| VTK 9.3.1

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
42 VTK_ABI_NAMESPACE_BEGIN
43 class vtkCompositeDataIterator;
44 class vtkCompositeDataSetInternals;
45 class vtkDataSet;
46 class vtkInformation;
47 class vtkInformationStringKey;
48 class vtkInformationIntegerKey;
49
50 class VTKCOMMONDATAMODEL_EXPORT vtkCompositeDataSet : public vtkDataObject
51 {
52 public:
53 vtkTypeMacro(vtkCompositeDataSet, vtkDataObject);
54 void PrintSelf(ostream& os, vtkIndent indent) override;
55
59 virtual VTK_NEWINSTANCE vtkCompositeDataIterator* NewIterator() = 0;
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
88 virtual vtkDataObject* GetDataSet(vtkCompositeDataIterator* iter) = 0;
89
98 virtual vtkDataObject* GetDataSet(unsigned int flatIndex);
99
104 unsigned long GetActualMemorySize() override;
105
107
110 static vtkCompositeDataSet* GetData(vtkInformation* info);
111 static vtkCompositeDataSet* GetData(vtkInformationVector* v, int i = 0);
113
117 void Initialize() override;
118
126 virtual void CompositeShallowCopy(vtkCompositeDataSet* src);
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
167 static vtkInformationStringKey* NAME();
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
191 protected:
192 vtkCompositeDataSet();
193 ~vtkCompositeDataSet() override;
194
195 private:
196 vtkCompositeDataSet(const vtkCompositeDataSet&) = delete;
197 void operator=(const vtkCompositeDataSet&) = delete;
198 };
199
200 VTK_ABI_NAMESPACE_END
201 #include "vtkCompositeDataSet.txx" // for template implementations
202
203 #endif
vtkCompositeDataIterator
superclass for composite data iterators
Definition: vtkCompositeDataIterator.h:28
vtkCompositeDataSet
abstract superclass for composite (multi-block or AMR) datasets
Definition: vtkCompositeDataSet.h:51
vtkCompositeDataSet::SetDataSet
virtual void SetDataSet(vtkCompositeDataIterator *iter, vtkDataObject *dataObj)=0
Sets the data set at the location pointed by the iterator.
vtkCompositeDataSet::CompositeShallowCopy
virtual void CompositeShallowCopy(vtkCompositeDataSet *src)
The goal of the method is to copy the data up to the dataset pointers only.
vtkCompositeDataSet::GetDataSet
virtual vtkDataObject * GetDataSet(unsigned int flatIndex)
Returns the dataset located at the position pointed by the flatIndex.
vtkCompositeDataSet::GetData
static vtkCompositeDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
vtkCompositeDataSet::GetData
static vtkCompositeDataSet * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
vtkCompositeDataSet::NewIterator
virtual vtkCompositeDataIterator * NewIterator()=0
Return a new iterator (the iterator has to be deleted by user).
vtkCompositeDataSet::CopyStructure
virtual void CopyStructure(vtkCompositeDataSet *input)
Copies the tree structure from the input.
vtkCompositeDataSet::GetDataSet
virtual vtkDataObject * GetDataSet(vtkCompositeDataIterator *iter)=0
Returns the dataset located at the position pointed by the iterator.
vtkCompositeDataSet::GetDataObjectType
int GetDataObjectType() override
Return class name of data type (see vtkType.h for definitions).
Definition: vtkCompositeDataSet.h:65
vtkCompositeDataSet::Initialize
void Initialize() override
Restore data object to initial state,.
vtkCompositeDataSet::GetActualMemorySize
unsigned long GetActualMemorySize() override
Return the actual size of the data in kibibytes (1024 bytes).
vtkCompositeDataSet::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:24
vtkInformationStringKey
Key for string values in vtkInformation.
Definition: vtkInformationStringKey.h:26
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
std
Definition: vtkSmartPointer.h:310
vtkBlockSortHelper::GetBounds
void GetBounds(T a, double bds[6])
Definition: vtkBlockSortHelper.h:26
vtkX3D::vector
@ vector
Definition: vtkX3D.h:237
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkX3D::type
@ type
Definition: vtkX3D.h:516
vtkDataObject.h
vtkDeprecation.h
VTK_DEPRECATED_IN_9_3_0
#define VTK_DEPRECATED_IN_9_3_0(reason)
Definition: vtkDeprecation.h:99
vtkIdType
int vtkIdType
Definition: vtkType.h:315
VTK_COMPOSITE_DATA_SET
#define VTK_COMPOSITE_DATA_SET
Definition: vtkType.h:76
VTK_NEWINSTANCE
#define VTK_NEWINSTANCE
Definition: vtkWrappingHints.h:32