VTK  9.3.1
vtkTreeAlgorithm.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
23 #ifndef vtkTreeAlgorithm_h
24 #define vtkTreeAlgorithm_h
25 
26 #include "vtkAlgorithm.h"
27 #include "vtkCommonExecutionModelModule.h" // For export macro
28 #include "vtkTree.h" // makes things a bit easier
29 
30 VTK_ABI_NAMESPACE_BEGIN
31 class vtkDataSet;
32 
33 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkTreeAlgorithm : public vtkAlgorithm
34 {
35 public:
36  static vtkTreeAlgorithm* New();
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
45 
49  vtkTree* GetOutput() { return this->GetOutput(0); }
50  vtkTree* GetOutput(int index);
51 
57  void SetInputData(vtkDataObject* obj) { this->SetInputData(0, obj); }
58  void SetInputData(int index, vtkDataObject* obj);
59 
60 protected:
62  ~vtkTreeAlgorithm() override;
63 
64  // convenience method
65  virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
66  vtkInformationVector* outputVector);
67 
72  virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
73  vtkInformationVector* outputVector);
74 
79  virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
80 
81  // see algorithm for more info
84 
85 private:
86  vtkTreeAlgorithm(const vtkTreeAlgorithm&) = delete;
87  void operator=(const vtkTreeAlgorithm&) = delete;
88 };
89 
90 VTK_ABI_NAMESPACE_END
91 #endif
Superclass for algorithms that produce only Tree as output.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
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
void SetInputData(vtkDataObject *obj)
Assign a data object as input.
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()
A rooted tree data structure.
Definition: vtkTree.h:45
general representation of visualization data
Definition: vtkDataObject.h:54
vtkTree * GetOutput()
Get the output data object for a port on this algorithm.