VTK
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 =========================================================================*/
36 #ifndef vtkMultiPieceDataSet_h
37 #define vtkMultiPieceDataSet_h
38 
39 #include "vtkCommonDataModelModule.h" // For export macro
40 #include "vtkPartitionedDataSet.h"
41 
42 class vtkDataSet;
43 class VTKCOMMONDATAMODEL_EXPORT vtkMultiPieceDataSet : public vtkPartitionedDataSet
44 {
45 public:
46  static vtkMultiPieceDataSet* New();
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
54  int GetDataObjectType() override {return VTK_MULTIPIECE_DATA_SET;}
55 
61  void SetNumberOfPieces(unsigned int numpieces)
62  {
63  this->SetNumberOfPartitions(numpieces);
64  }
65 
69  unsigned int GetNumberOfPieces()
70  {
71  return this->GetNumberOfPartitions();
72  }
73 
75 
78  vtkDataSet* GetPiece(unsigned int pieceno)
79  {
80  return this->GetPartition(pieceno);
81  }
82  vtkDataObject* GetPieceAsDataObject(unsigned int pieceno)
83  {
84  return this->GetPartitionAsDataObject(pieceno);
85  }
87 
92  void SetPiece(unsigned int pieceno, vtkDataObject* piece)
93  {
94  this->SetPartition(pieceno, piece);
95  }
96 
98 
104 
105 protected:
107  ~vtkMultiPieceDataSet() override;
108 
109 private:
111  void operator=(const vtkMultiPieceDataSet&) = delete;
112 
113 };
114 
115 #endif
116 
117 
composite dataset to encapsulates a dataset consisting of partitions.
unsigned int GetNumberOfPieces()
Returns the number of pieces.
vtkDataObject * GetPieceAsDataObject(unsigned int pieceno)
Returns the piece at the given index.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
unsigned int GetNumberOfPartitions()
Returns the number of partitions.
static vtkPartitionedDataSet * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
void SetNumberOfPieces(unsigned int numpieces)
Set the number of pieces.
#define VTK_MULTIPIECE_DATA_SET
Definition: vtkType.h:116
void SetPiece(unsigned int pieceno, vtkDataObject *piece)
Sets the data object as the given piece.
static vtkPartitionedDataSet * New()
a simple class to control print indentation
Definition: vtkIndent.h:39
composite dataset to encapsulates pieces of dataset.
vtkDataSet * GetPartition(unsigned int idx)
Returns the partition at the given index.
int GetDataObjectType() override
Return class name of data type (see vtkType.h for definitions).
vtkDataSet * GetPiece(unsigned int pieceno)
Returns the piece at the given index.
void SetNumberOfPartitions(unsigned int numPartitions)
Set the number of partitionss.
vtkDataObject * GetPartitionAsDataObject(unsigned int idx)
Returns the partition at the given index.
Store zero or more vtkInformation instances.
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:64
void SetPartition(unsigned int idx, vtkDataObject *partition)
Sets the data object as the given partition.