VTK  9.7.1
vtkPolyDataAlgorithm.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 vtkPolyDataAlgorithm_h
23 #define vtkPolyDataAlgorithm_h
24 
25 #include "vtkAlgorithm.h"
26 #include "vtkCommonExecutionModelModule.h" // For export macro
27 #include "vtkPolyData.h" // makes things a bit easier
28 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
29 
30 VTK_ABI_NAMESPACE_BEGIN
31 class vtkDataSet;
32 class vtkPolyData;
33 
34 class VTKCOMMONEXECUTIONMODEL_EXPORT VTK_MARSHALAUTO vtkPolyDataAlgorithm : public vtkAlgorithm
35 {
36 public:
37  static vtkPolyDataAlgorithm* New();
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
42 
46  vtkPolyData* GetOutput();
47  vtkPolyData* GetOutput(int);
49  virtual void SetOutput(vtkDataObject* d);
51 
55  vtkTypeBool ProcessRequest(
56  vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
57 
58  // this method is not recommended for use, but lots of old style filters
59  // use it
61  vtkDataObject* GetInput();
62  vtkDataObject* GetInput(int port);
63  vtkPolyData* GetPolyDataInput(int port);
64 
66 
72  void SetInputData(vtkDataObject*);
73  void SetInputData(int, vtkDataObject*);
75 
77 
82  void AddInputData(vtkDataObject*);
83  void AddInputData(int, vtkDataObject*);
85 
86 protected:
88  ~vtkPolyDataAlgorithm() override;
89 
90  // convenience method
91  virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
92  vtkInformationVector* outputVector);
93 
98  virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
99  vtkInformationVector* outputVector);
100 
105  virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
106 
111  virtual int RequestUpdateTime(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
112 
113  // see algorithm for more info
114  int FillOutputPortInformation(int port, vtkInformation* info) override;
115  int FillInputPortInformation(int port, vtkInformation* info) override;
116 
117 private:
118  vtkPolyDataAlgorithm(const vtkPolyDataAlgorithm&) = delete;
119  void operator=(const vtkPolyDataAlgorithm&) = delete;
120 };
121 
122 VTK_ABI_NAMESPACE_END
123 #endif
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
#define VTK_MARSHAL_EXCLUDE_REASON_IS_REDUNDANT
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:71
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
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:53
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
#define VTK_MARSHALEXCLUDE(reason)
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
#define VTK_MARSHALAUTO
general representation of visualization data
Definition: vtkDataObject.h:55