VTK  9.4.20241121
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
38#ifndef vtkImageAlgorithm_h
39#define vtkImageAlgorithm_h
40
41#include "vtkAlgorithm.h"
42#include "vtkCommonExecutionModelModule.h" // For export macro
43#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
44
45VTK_ABI_NAMESPACE_BEGIN
46class vtkDataSet;
47class vtkImageData;
48
49class VTKCOMMONEXECUTIONMODEL_EXPORT VTK_MARSHALAUTO vtkImageAlgorithm : public vtkAlgorithm
50{
51public:
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
56
60 vtkImageData* GetOutput();
61 vtkImageData* GetOutput(int);
63 virtual void SetOutput(vtkDataObject* d);
65
71 vtkTypeBool ProcessRequest(
73
75
80 void SetInputData(vtkDataObject*);
81 void SetInputData(int, vtkDataObject*);
83
85
90 vtkDataObject* GetInput(int port);
91 vtkDataObject* GetInput() { return this->GetInput(0); }
94
96
102 virtual void AddInputData(int, vtkDataObject*);
104
105protected:
108
113 virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
114 vtkInformationVector* outputVector);
115
122
124
133 vtkInformationVector** inputVector, vtkInformationVector* outputVector);
134
142 virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
143 vtkInformationVector* outputVector);
144
150
152
156 virtual void ExecuteData(vtkDataObject* output);
157 virtual void Execute();
159
161
165 virtual void AllocateOutputData(vtkImageData* out, vtkInformation* outInfo, int* uExtent);
168
173 virtual void CopyAttributeData(
174 vtkImageData* in, vtkImageData* out, vtkInformationVector** inputVector);
175
177
182 int FillOutputPortInformation(int port, vtkInformation* info) override;
183 int FillInputPortInformation(int port, vtkInformation* info) override;
185
186private:
187 vtkImageAlgorithm(const vtkImageAlgorithm&) = delete;
188 void operator=(const vtkImageAlgorithm&) = delete;
189};
190
191VTK_ABI_NAMESPACE_END
192#endif
Superclass for all sources, filters, and sinks in VTK.
general representation of visualization data
abstract class to specify dataset behavior
Definition vtkDataSet.h:166
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.
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...
~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.
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.
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:108
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)