VTK  9.3.0
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 
41  virtual void SetOutput(vtkDataObject* d);
43 
51 
53 
61 
63 
69  vtkDataObject* GetInput() { return this->GetInput(0); }
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 
100 
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);
144 
149  virtual void CopyAttributeData(
150  vtkImageData* in, vtkImageData* out, vtkInformationVector** inputVector);
151 
153 
161 
162 private:
163  vtkImageAlgorithm(const vtkImageAlgorithm&) = delete;
164  void operator=(const vtkImageAlgorithm&) = delete;
165 };
166 
167 VTK_ABI_NAMESPACE_END
168 #endif
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:52
general representation of visualization data
Definition: vtkDataObject.h:55
abstract class to specify dataset behavior
Definition: vtkDataSet.h:53
Generic algorithm superclass for image algs.
virtual void ExecuteDataWithInformation(vtkDataObject *output, vtkInformation *outInfo)
This is a convenience method that is implemented in many subclasses instead of RequestData.
vtkDataObject * GetInput()
Get a data object for one of the input port connections.
void SetInputData(vtkDataObject *)
Assign a data object as input.
void SetInputData(int, vtkDataObject *)
Assign a data object as input.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void AllocateOutputData(vtkImageData *out, vtkInformation *outInfo, int *uExtent)
Allocate the output data.
virtual void Execute()
This method is the old style execute method, provided for the sake of backwards compatibility with ol...
virtual void SetOutput(vtkDataObject *d)
Get the output data object for a port on this algorithm.
~vtkImageAlgorithm() override
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to translate the update extent requests from each output port ...
virtual void CopyInputArrayAttributesToOutput(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Convenience method to copy the scalar type and number of components from the input data to the output...
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Process a request from the executive.
virtual void AddInputData(int, vtkDataObject *)
Assign a data object as input.
virtual void AddInputData(vtkDataObject *)
Assign a data object as input.
virtual vtkImageData * AllocateOutputData(vtkDataObject *out, vtkInformation *outInfo)
Allocate the output data.
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
int FillInputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
int FillOutputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
vtkImageData * GetImageDataInput(int port)
Get a data object for one of the input port connections.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
virtual void ExecuteData(vtkDataObject *output)
This method is the old style execute method, provided for the sake of backwards compatibility with ol...
virtual void CopyAttributeData(vtkImageData *in, vtkImageData *out, vtkInformationVector **inputVector)
Copy the other point and cell data.
vtkDataObject * GetInput(int port)
Get a data object for one of the input port connections.
vtkImageData * GetOutput()
Get the output data object for a port on this algorithm.
vtkImageData * GetOutput(int)
Get the output data object for a port on this algorithm.
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
a simple class to control print indentation
Definition: vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
int vtkTypeBool
Definition: vtkABI.h:64