VTK  9.3.1
vtkDataSetAlgorithm.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
22 #ifndef vtkDataSetAlgorithm_h
23 #define vtkDataSetAlgorithm_h
24 
25 #include "vtkAlgorithm.h"
26 #include "vtkCommonExecutionModelModule.h" // For export macro
27 
28 VTK_ABI_NAMESPACE_BEGIN
29 class vtkDataSet;
30 class vtkImageData;
31 class vtkPolyData;
33 class vtkStructuredGrid;
35 class vtkRectilinearGrid;
36 
37 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkDataSetAlgorithm : public vtkAlgorithm
38 {
39 public:
40  static vtkDataSetAlgorithm* New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
48  vtkDataSet* GetOutput();
49  vtkDataSet* GetOutput(int);
51 
56  vtkDataObject* GetInput();
57 
61  vtkPolyData* GetPolyDataOutput();
62 
66  vtkStructuredPoints* GetStructuredPointsOutput();
67 
71  vtkImageData* GetImageDataOutput();
72 
76  vtkStructuredGrid* GetStructuredGridOutput();
77 
81  vtkUnstructuredGrid* GetUnstructuredGridOutput();
82 
86  vtkRectilinearGrid* GetRectilinearGridOutput();
87 
89 
94  void SetInputData(vtkDataObject*);
95  void SetInputData(int, vtkDataObject*);
96  void SetInputData(vtkDataSet*);
97  void SetInputData(int, vtkDataSet*);
99 
101 
106  void AddInputData(vtkDataObject*);
107  void AddInputData(vtkDataSet*);
108  void AddInputData(int, vtkDataSet*);
109  void AddInputData(int, vtkDataObject*);
111 
116  vtkInformationVector* outputVector) override;
117 
118 protected:
120  ~vtkDataSetAlgorithm() override = default;
121 
131  virtual int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
132  vtkInformationVector* outputVector);
133 
142  {
143  return 1;
144  }
145 
153  {
154  return 1;
155  }
156 
164  {
165  return 1;
166  }
167 
168  // see algorithm for more info
170  int FillInputPortInformation(int port, vtkInformation* info) override;
171 
172  vtkDataObject* GetInput(int port);
173 
174 private:
175  vtkDataSetAlgorithm(const vtkDataSetAlgorithm&) = delete;
176  void operator=(const vtkDataSetAlgorithm&) = delete;
177 };
178 
179 VTK_ABI_NAMESPACE_END
180 #endif
a dataset that is topologically regular with variable spacing in the three coordinate directions ...
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
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...
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:51
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
dataset represents arbitrary combinations of all possible cell types
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
A subclass of ImageData.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks for Information.
topologically regular array of data
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
Superclass for algorithms that produce output of the same type as input.
general representation of visualization data
Definition: vtkDataObject.h:54