VTK  9.3.1
vtkImageAlgorithm.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 vtkImageAlgorithm_h
20 #define vtkImageAlgorithm_h
21 
22 #include "vtkAlgorithm.h"
23 #include "vtkCommonExecutionModelModule.h" // For export macro
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class vtkDataSet;
27 class vtkImageData;
28 
29 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageAlgorithm : public vtkAlgorithm
30 {
31 public:
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
36 
39  vtkImageData* GetOutput();
40  vtkImageData* GetOutput(int);
41  virtual void SetOutput(vtkDataObject* d);
43 
51 
53 
58  void SetInputData(vtkDataObject*);
59  void SetInputData(int, vtkDataObject*);
61 
63 
68  vtkDataObject* GetInput(int port);
69  vtkDataObject* GetInput() { return this->GetInput(0); }
70  vtkImageData* GetImageDataInput(int port);
72 
74 
79  virtual void AddInputData(vtkDataObject*);
80  virtual void AddInputData(int, vtkDataObject*);
82 
83 protected:
85  ~vtkImageAlgorithm() override;
86 
91  virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
92  vtkInformationVector* outputVector);
93 
99  virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
100 
108  virtual void CopyInputArrayAttributesToOutput(vtkInformation* request,
109  vtkInformationVector** inputVector, vtkInformationVector* outputVector);
110 
118  virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
119  vtkInformationVector* outputVector);
120 
125  virtual void ExecuteDataWithInformation(vtkDataObject* output, vtkInformation* outInfo);
126 
128 
132  virtual void ExecuteData(vtkDataObject* output);
133  virtual void Execute();
135 
137 
141  virtual void AllocateOutputData(vtkImageData* out, vtkInformation* outInfo, int* uExtent);
142  virtual vtkImageData* AllocateOutputData(vtkDataObject* out, vtkInformation* outInfo);
144 
149  virtual void CopyAttributeData(
150  vtkImageData* in, vtkImageData* out, vtkInformationVector** inputVector);
151 
153 
159  int FillInputPortInformation(int port, vtkInformation* info) override;
161 
162 private:
163  vtkImageAlgorithm(const vtkImageAlgorithm&) = delete;
164  void operator=(const vtkImageAlgorithm&) = delete;
165 };
166 
167 VTK_ABI_NAMESPACE_END
168 #endif
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
vtkDataObject * GetInput()
Get a data object for one of the input port connections.
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
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:54