VTK  9.7.1
vtkAggregateDataSetFilter.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
15 #ifndef vtkAggregateDataSetFilter_h
16 #define vtkAggregateDataSetFilter_h
17 
18 #include "vtkFiltersParallelModule.h" // For export macro
20 
21 VTK_ABI_NAMESPACE_BEGIN
22 class vtkDataSet;
24 
25 class VTKFILTERSPARALLEL_EXPORT vtkAggregateDataSetFilter : public vtkPassInputTypeAlgorithm
26 {
27 public:
30  void PrintSelf(ostream& os, vtkIndent indent) override;
31 
33 
43  void SetNumberOfTargetProcesses(int);
44  vtkGetMacro(NumberOfTargetProcesses, int);
46 
48  {
49  ROOT_PROCESS = 0,
50  PROCESS_WITH_MOST_POINTS = 1
51  };
53 
65  vtkSetClampMacro(TargetProcess, int, ROOT_PROCESS, PROCESS_WITH_MOST_POINTS);
66  vtkGetMacro(TargetProcess, int);
67  void SetTargetProcessToRootProcess() { this->SetTargetProcess(ROOT_PROCESS); }
69  {
70  this->SetTargetProcess(PROCESS_WITH_MOST_POINTS);
71  }
73 
75 
81  vtkSetMacro(MergePoints, bool);
82  vtkGetMacro(MergePoints, bool);
83  vtkBooleanMacro(MergePoints, bool);
85 
86 protected:
88  ~vtkAggregateDataSetFilter() override;
89 
90  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
91  vtkInformationVector* outputVector) override;
93 
95 
96  bool MergePoints = true;
97 
98 private:
100  void operator=(const vtkAggregateDataSetFilter&) = delete;
101 
102  int TargetProcess;
103 };
104 
105 VTK_ABI_NAMESPACE_END
106 #endif
Aggregates data sets to a reduced number of processes.
Superclass for algorithms that produce output of the same type as input.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
void SetTargetProcessToRootProcess()
Get/Set the target process for the aggregate operation.
a simple class to control print indentation
Definition: vtkIndent.h:28
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Store zero or more vtkInformation instances.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkPassInputTypeAlgorithm * New()
Multiprocessing communication superclass.
void SetTargetProcessToProcessWithMostPoints()
Get/Set the target process for the aggregate operation.