VTK  9.3.20240422
vtkMultiPieceDataSet.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
24#ifndef vtkMultiPieceDataSet_h
25#define vtkMultiPieceDataSet_h
26
27#include "vtkCommonDataModelModule.h" // For export macro
29
30VTK_ABI_NAMESPACE_BEGIN
31class vtkDataSet;
32class VTKCOMMONDATAMODEL_EXPORT vtkMultiPieceDataSet : public vtkPartitionedDataSet
33{
34public:
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
43 int GetDataObjectType() override { return VTK_MULTIPIECE_DATA_SET; }
44
50 void SetNumberOfPieces(unsigned int numpieces) { this->SetNumberOfPartitions(numpieces); }
51
55 unsigned int GetNumberOfPieces() { return this->GetNumberOfPartitions(); }
56
58
61 vtkDataSet* GetPiece(unsigned int pieceno) { return this->GetPartition(pieceno); }
62 vtkDataObject* GetPieceAsDataObject(unsigned int pieceno)
63 {
64 return this->GetPartitionAsDataObject(pieceno);
65 }
67
72 void SetPiece(unsigned int pieceno, vtkDataObject* piece) { this->SetPartition(pieceno, piece); }
73
75
81
82protected:
85
86private:
88 void operator=(const vtkMultiPieceDataSet&) = delete;
89};
90
91VTK_ABI_NAMESPACE_END
92#endif
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
composite dataset to encapsulates pieces of dataset.
int GetDataObjectType() override
Return class name of data type (see vtkType.h for definitions).
static vtkMultiPieceDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
vtkDataSet * GetPiece(unsigned int pieceno)
Returns the piece at the given index.
static vtkMultiPieceDataSet * GetData(vtkInformationVector *v, int i=0)
Retrieve an instance of this class from an information object.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkMultiPieceDataSet * New()
void SetPiece(unsigned int pieceno, vtkDataObject *piece)
Sets the data object as the given piece.
unsigned int GetNumberOfPieces()
Returns the number of pieces.
~vtkMultiPieceDataSet() override
void SetNumberOfPieces(unsigned int numpieces)
Set the number of pieces.
vtkDataObject * GetPieceAsDataObject(unsigned int pieceno)
Returns the piece at the given index.
composite dataset to encapsulates a dataset consisting of partitions.
unsigned int GetNumberOfPartitions()
Returns the number of partitions.
vtkDataObject * GetPartitionAsDataObject(unsigned int idx)
Returns the partition at the given index.
vtkDataSet * GetPartition(unsigned int idx)
Returns the partition at the given index.
void SetNumberOfPartitions(unsigned int numPartitions)
Set the number of partitions.
void SetPartition(unsigned int idx, vtkDataObject *partition)
Sets the data object as the given partition.
#define VTK_MULTIPIECE_DATA_SET
Definition vtkType.h:90