VTK  9.7.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
18
19#ifndef vtkImageAlgorithm_h
20#define vtkImageAlgorithm_h
21
22#include "vtkAlgorithm.h"
23#include "vtkCommonExecutionModelModule.h" // For export macro
24#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
25
26VTK_ABI_NAMESPACE_BEGIN
27class vtkDataSet;
28class vtkImageData;
29
30class VTKCOMMONEXECUTIONMODEL_EXPORT VTK_MARSHALAUTO vtkImageAlgorithm : public vtkAlgorithm
31{
32public:
34 void PrintSelf(ostream& os, vtkIndent indent) override;
35
37
45 virtual void SetOutput(vtkDataObject* d);
47
55
57
65
67
73 vtkDataObject* GetInput() { return this->GetInput(0); }
76
78
84 virtual void AddInputData(int, vtkDataObject*);
86
87protected:
90
95 virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
96 vtkInformationVector* outputVector);
97
104
106
115 vtkInformationVector** inputVector, vtkInformationVector* outputVector);
116
124 virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
125 vtkInformationVector* outputVector);
126
132
134
138 virtual void ExecuteData(vtkDataObject* output);
139 virtual void Execute();
141
143
147 virtual void AllocateOutputData(
148 vtkImageData* out, vtkInformation* outInfo, VTK_FUTURE_CONST int uExtent[6]);
151
156 virtual void CopyAttributeData(
157 vtkImageData* in, vtkImageData* out, vtkInformationVector** inputVector);
158
160
165 int FillOutputPortInformation(int port, vtkInformation* info) override;
166 int FillInputPortInformation(int port, vtkInformation* info) override;
168
169private:
170 vtkImageAlgorithm(const vtkImageAlgorithm&) = delete;
171 void operator=(const vtkImageAlgorithm&) = delete;
172};
173
174VTK_ABI_NAMESPACE_END
175#endif
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:57
virtual void ExecuteDataWithInformation(vtkDataObject *output, vtkInformation *outInfo)
This is a convenience method that is implemented in many subclasses instead of RequestData.
void SetInputData(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 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.
vtkDataObject * GetInput(int port)
Get a data object for one of the input port connections.
~vtkImageAlgorithm() override
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to translate the update extent requests from each output port ...
virtual int RequestUpdateTime(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
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...
virtual vtkImageData * AllocateOutputData(vtkDataObject *out, vtkInformation *outInfo)
Allocate the output data.
vtkDataObject * GetInput()
Get a data object for one of the input port connections.
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Process a request from the executive.
virtual void AllocateOutputData(vtkImageData *out, vtkInformation *outInfo, VTK_FUTURE_CONST int uExtent[6])
Allocate the output data.
virtual void AddInputData(int, vtkDataObject *)
Assign a data object as input.
virtual void AddInputData(vtkDataObject *)
Assign a data object as input.
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...
vtkImageData * GetImageDataInput(int port)
Get a data object for one of the input port connections.
int FillOutputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
vtkImageData * GetOutput()
Get the output data object for a port on this algorithm.
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.
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL
#define VTK_MARSHALAUTO
#define VTK_MARSHALEXCLUDE(reason)
#define vtkAlgorithm