VTK  9.3.1
vtkSelectionAlgorithm.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
25 #ifndef vtkSelectionAlgorithm_h
26 #define vtkSelectionAlgorithm_h
27 
28 #include "vtkAlgorithm.h"
29 #include "vtkCommonExecutionModelModule.h" // For export macro
30 #include "vtkSelection.h" // makes things a bit easier
31 
32 VTK_ABI_NAMESPACE_BEGIN
33 class vtkDataSet;
34 
35 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkSelectionAlgorithm : public vtkAlgorithm
36 {
37 public:
38  static vtkSelectionAlgorithm* New();
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
47 
51  vtkSelection* GetOutput() { return this->GetOutput(0); }
52  vtkSelection* GetOutput(int index);
53 
59  void SetInputData(vtkDataObject* obj) { this->SetInputData(0, obj); }
60  void SetInputData(int index, vtkDataObject* obj);
61 
62 protected:
64  ~vtkSelectionAlgorithm() override;
65 
66  // convenience method
67  virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
68  vtkInformationVector* outputVector);
69 
74  virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
75  vtkInformationVector* outputVector);
76 
81  virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
82 
83  // see algorithm for more info
86 
87 private:
89  void operator=(const vtkSelectionAlgorithm&) = delete;
90 };
91 
92 VTK_ABI_NAMESPACE_END
93 #endif
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
data object that represents a "selection" in VTK.
Definition: vtkSelection.h:49
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
vtkSelection * GetOutput()
Get the output data object for a port on this algorithm.
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
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
Superclass for algorithms that produce only Selection as output.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
general representation of visualization data
Definition: vtkDataObject.h:54
void SetInputData(vtkDataObject *obj)
Assign a data object as input.