VTK  9.7.1
vtkCellGridAlgorithm.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
19 #ifndef vtkCellGridAlgorithm_h
20 #define vtkCellGridAlgorithm_h
21 
22 #include "vtkAlgorithm.h"
23 #include "vtkCellGrid.h" // makes things a bit easier
24 #include "vtkCommonExecutionModelModule.h" // For export macro
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class vtkDataSet;
28 class vtkCellAttribute;
29 class vtkCellGrid;
30 
31 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkCellGridAlgorithm : public vtkAlgorithm
32 {
33 public:
34  static vtkCellGridAlgorithm* New();
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
39 
42  vtkCellGrid* GetOutput();
43  vtkCellGrid* GetOutput(int);
44  virtual void SetOutput(vtkDataObject* d);
46 
52 
53  // this method is not recommended for use, but lots of old style filters
54  // use it
55  vtkDataObject* GetInput();
56  vtkDataObject* GetInput(int port);
57  vtkCellGrid* GetPolyDataInput(int port);
58 
60 
65  void SetInputData(vtkDataObject*);
66  void SetInputData(int, vtkDataObject*);
68 
70 
75  void AddInputData(vtkDataObject*);
76  void AddInputData(int, vtkDataObject*);
78 
79  // clang-format off
81 
95  virtual void SetInputAttributeToProcess(int idx, int port, int connection, const char* name);
96 
106  vtkCellAttribute* GetInputCellAttributeToProcess(int idx, int connection, vtkInformationVector** inputVector);
107  vtkCellAttribute* GetInputCellAttributeToProcess(int idx, int connection, vtkInformationVector** inputVector, int& association);
108  vtkCellAttribute* GetInputCellAttributeToProcess(int idx, vtkCellGrid* input);
109  vtkCellAttribute* GetInputCellAttributeToProcess(int idx, vtkCellGrid* input, int& association);
111  // clang-format on
112 
113 protected:
115  ~vtkCellGridAlgorithm() override;
116 
117  // convenience method
118  virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
119  vtkInformationVector* outputVector);
120 
125  virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
126  vtkInformationVector* outputVector);
127 
132  virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
133 
134  virtual int RequestUpdateTime(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
135 
136  // see algorithm for more info
138  int FillInputPortInformation(int port, vtkInformation* info) override;
139 
140 private:
142  void operator=(const vtkCellGridAlgorithm&) = delete;
143 };
144 
145 VTK_ABI_NAMESPACE_END
146 #endif
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int vtkTypeBool
Definition: vtkABI.h:64
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
Visualization data composed of cells of arbitrary type.
Definition: vtkCellGrid.h:48
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:53
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
A function defined over the physical domain of a vtkCellGrid.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
general representation of visualization data
Definition: vtkDataObject.h:55