VTK  9.2.6
vtkCompositeDataSet.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCompositeDataSet.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 =========================================================================*/
36 #ifndef vtkCompositeDataSet_h
37 #define vtkCompositeDataSet_h
38 
39 #include "vtkCommonDataModelModule.h" // For export macro
40 #include "vtkDataObject.h"
41 
42 #include <vector> // For GetDataSets
43 
45 class vtkCompositeDataSetInternals;
46 class vtkDataSet;
47 class vtkInformation;
50 
51 class VTKCOMMONDATAMODEL_EXPORT vtkCompositeDataSet : public vtkDataObject
52 {
53 public:
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
60  virtual VTK_NEWINSTANCE vtkCompositeDataIterator* NewIterator() = 0;
61 
66  int GetDataObjectType() override { return VTK_COMPOSITE_DATA_SET; }
67 
73  virtual void CopyStructure(vtkCompositeDataSet* input);
74 
81  virtual void SetDataSet(vtkCompositeDataIterator* iter, vtkDataObject* dataObj) = 0;
82 
89  virtual vtkDataObject* GetDataSet(vtkCompositeDataIterator* iter) = 0;
90 
99  virtual vtkDataObject* GetDataSet(unsigned int flatIndex);
100 
105  unsigned long GetActualMemorySize() override;
106 
108 
112  static vtkCompositeDataSet* GetData(vtkInformationVector* v, int i = 0);
114 
118  void Initialize() override;
119 
121 
124  void ShallowCopy(vtkDataObject* src) override;
125  void DeepCopy(vtkDataObject* src) override;
127 
134  virtual void RecursiveShallowCopy(vtkDataObject* src) = 0;
135 
141  virtual vtkIdType GetNumberOfPoints();
142 
148  virtual vtkIdType GetNumberOfCells();
149 
153  vtkIdType GetNumberOfElements(int type) override;
154 
164  void GetBounds(double bounds[6]);
165 
169  static vtkInformationStringKey* NAME();
170 
178  static vtkInformationIntegerKey* CURRENT_PROCESS_CAN_LOAD_BLOCK();
179 
190  template <class DataSetT = vtkDataSet>
191  static std::vector<DataSetT*> GetDataSets(vtkDataObject* dobj, bool preserveNull = false);
192 
193 protected:
195  ~vtkCompositeDataSet() override;
196 
197 private:
198  vtkCompositeDataSet(const vtkCompositeDataSet&) = delete;
199  void operator=(const vtkCompositeDataSet&) = delete;
200 };
201 
202 #include "vtkCompositeDataSet.txx" // for template implementations
203 
204 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkDataObject * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
void GetBounds(T a, double bds[6])
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
#define VTK_COMPOSITE_DATA_SET
Definition: vtkType.h:88
virtual void Initialize()
Restore data object to initial state,.
int vtkIdType
Definition: vtkType.h:332
Key for string values in vtkInformation.
superclass for composite data iterators
abstract superclass for composite (multi-block or AMR) datasets
a simple class to control print indentation
Definition: vtkIndent.h:39
Key for integer values in vtkInformation.
virtual unsigned long GetActualMemorySize()
Return the actual size of the data in kibibytes (1024 bytes).
#define VTK_NEWINSTANCE
virtual vtkIdType GetNumberOfElements(int type)
Get the number of elements for a specific attribute type (POINT, CELL, etc.).
int GetDataObjectType() override
Return class name of data type (see vtkType.h for definitions).
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:65
virtual void DeepCopy(vtkDataObject *src)
Shallow and Deep copy.
virtual void ShallowCopy(vtkDataObject *src)
Shallow and Deep copy.