VTK  9.0.1
vtkMultiPieceDataSet.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMultiPieceDataSet.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 =========================================================================*/
33 #ifndef vtkMultiPieceDataSet_h
34 #define vtkMultiPieceDataSet_h
35 
36 #include "vtkCommonDataModelModule.h" // For export macro
37 #include "vtkPartitionedDataSet.h"
38 
39 class vtkDataSet;
40 class VTKCOMMONDATAMODEL_EXPORT vtkMultiPieceDataSet : public vtkPartitionedDataSet
41 {
42 public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
51  int GetDataObjectType() override { return VTK_MULTIPIECE_DATA_SET; }
52 
58  void SetNumberOfPieces(unsigned int numpieces) { this->SetNumberOfPartitions(numpieces); }
59 
63  unsigned int GetNumberOfPieces() { return this->GetNumberOfPartitions(); }
64 
66 
69  vtkDataSet* GetPiece(unsigned int pieceno) { return this->GetPartition(pieceno); }
70  vtkDataObject* GetPieceAsDataObject(unsigned int pieceno)
71  {
72  return this->GetPartitionAsDataObject(pieceno);
73  }
75 
80  void SetPiece(unsigned int pieceno, vtkDataObject* piece) { this->SetPartition(pieceno, piece); }
81 
83 
89 
90 protected:
93 
94 private:
96  void operator=(const vtkMultiPieceDataSet&) = delete;
97 };
98 
99 #endif
general representation of visualization data
Definition: vtkDataObject.h:60
abstract class to specify dataset behavior
Definition: vtkDataSet.h:57
a simple class to control print indentation
Definition: vtkIndent.h:34
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 * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetPiece(unsigned int pieceno, vtkDataObject *piece)
Sets the data object as the given piece.
static vtkMultiPieceDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
unsigned int GetNumberOfPieces()
Returns the number of pieces.
static vtkMultiPieceDataSet * GetData(vtkInformationVector *v, int i=0)
~vtkMultiPieceDataSet() override
void SetNumberOfPieces(unsigned int numpieces)
Set the number of pieces.
vtkDataSet * GetPiece(unsigned int pieceno)
Returns the piece at the given index.
vtkDataObject * GetPieceAsDataObject(unsigned int pieceno)
composite dataset to encapsulates a dataset consisting of partitions.
unsigned int GetNumberOfPartitions()
Returns the number of partitions.
vtkDataSet * GetPartition(unsigned int idx)
Returns the partition at the given index.
vtkDataObject * GetPartitionAsDataObject(unsigned int idx)
void SetNumberOfPartitions(unsigned int numPartitions)
Set the number of partitionss.
void SetPartition(unsigned int idx, vtkDataObject *partition)
Sets the data object as the given partition.
@ info
Definition: vtkX3D.h:382
#define VTK_MULTIPIECE_DATA_SET
Definition: vtkType.h:110