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 =========================================================================*/
45 #ifndef vtkCompositeDataSet_h
46 #define vtkCompositeDataSet_h
47 
48 #include "vtkCommonDataModelModule.h" // For export macro
49 #include "vtkDataObject.h"
50 
51 #include <vector> // For GetDataSets
52 
54 class vtkCompositeDataSetInternals;
55 class vtkDataSet;
56 class vtkInformation;
59 
60 class VTKCOMMONDATAMODEL_EXPORT vtkCompositeDataSet : public vtkDataObject
61 {
62 public:
64  void PrintSelf(ostream& os, vtkIndent indent) override;
65 
70 
75  int GetDataObjectType() 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 
130 
133  void ShallowCopy(vtkDataObject* src) override;
134  void DeepCopy(vtkDataObject* src) override;
136 
143  virtual void RecursiveShallowCopy(vtkDataObject* src) = 0;
144 
151 
158 
163 
173  void GetBounds(double bounds[6]);
174 
179 
188 
199  template <class DataSetT = vtkDataSet>
200  static std::vector<DataSetT*> GetDataSets(vtkDataObject* dobj, bool preserveNull = false);
201 
202 protected:
205 
206 private:
207  vtkCompositeDataSet(const vtkCompositeDataSet&) = delete;
208  void operator=(const vtkCompositeDataSet&) = delete;
209 };
210 
211 #include "vtkCompositeDataSet.txx" // for template implementations
212 
213 #endif
superclass for composite data iterators
abstract superclass for composite (multi-block or AMR) datasets
~vtkCompositeDataSet() override
static std::vector< DataSetT * > GetDataSets(vtkDataObject *dobj, bool preserveNull=false)
Extract datasets from the given data object.
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).
static vtkInformationStringKey * NAME()
Key used to put node name in the meta-data associated with a node.
virtual vtkDataObject * GetDataSet(unsigned int flatIndex)
Returns the dataset located at the position pointed by the flatIndex.
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.
static vtkCompositeDataSet * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
virtual vtkCompositeDataIterator * NewIterator()=0
Return a new iterator (the iterator has to be deleted by user).
virtual void CopyStructure(vtkCompositeDataSet *input)
Copies the tree structure from the input.
virtual vtkDataObject * GetDataSet(vtkCompositeDataIterator *iter)=0
Returns the dataset located at the position pointed by the iterator.
void DeepCopy(vtkDataObject *src) override
Shallow and Deep copy.
int GetDataObjectType() override
Return class name of data type (see vtkType.h for definitions).
static vtkInformationIntegerKey * CURRENT_PROCESS_CAN_LOAD_BLOCK()
Key used to indicate that the current process can load the data in the node.
virtual void RecursiveShallowCopy(vtkDataObject *src)=0
For historical reasons, vtkCompositeDataSet::ShallowCopy simply pass pointers to the leaf non-composi...
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 ShallowCopy(vtkDataObject *src) override
Shallow and Deep copy.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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
Key for integer values in vtkInformation.
Key for string values in vtkInformation.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
@ info
Definition: vtkX3D.h:382
@ type
Definition: vtkX3D.h:522
int vtkIdType
Definition: vtkType.h:332
#define VTK_COMPOSITE_DATA_SET
Definition: vtkType.h:88
#define VTK_NEWINSTANCE