VTK  9.1.20220518
vtkImageAlgorithm.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageAlgorithm.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
50 #ifndef vtkImageAlgorithm_h
51 #define vtkImageAlgorithm_h
52 
53 #include "vtkAlgorithm.h"
54 #include "vtkCommonExecutionModelModule.h" // For export macro
55 
56 class vtkDataSet;
57 class vtkImageData;
58 
59 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageAlgorithm : public vtkAlgorithm
60 {
61 public:
63  void PrintSelf(ostream& os, vtkIndent indent) override;
64 
66 
71  virtual void SetOutput(vtkDataObject* d);
73 
81 
83 
91 
93 
99  vtkDataObject* GetInput() { return this->GetInput(0); }
102 
104 
109  virtual void AddInputData(vtkDataObject*);
110  virtual void AddInputData(int, vtkDataObject*);
112 
113 protected:
115  ~vtkImageAlgorithm() override;
116 
121  virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
122  vtkInformationVector* outputVector);
123 
130 
139  vtkInformationVector** inputVector, vtkInformationVector* outputVector);
140 
148  virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
149  vtkInformationVector* outputVector);
150 
155  virtual void ExecuteDataWithInformation(vtkDataObject* output, vtkInformation* outInfo);
156 
158 
162  virtual void ExecuteData(vtkDataObject* output);
163  virtual void Execute();
165 
167 
171  virtual void AllocateOutputData(vtkImageData* out, vtkInformation* outInfo, int* uExtent);
174 
179  virtual void CopyAttributeData(
180  vtkImageData* in, vtkImageData* out, vtkInformationVector** inputVector);
181 
183 
191 
192 private:
193  vtkImageAlgorithm(const vtkImageAlgorithm&) = delete;
194  void operator=(const vtkImageAlgorithm&) = delete;
195 };
196 
197 #endif
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:122
general representation of visualization data
abstract class to specify dataset behavior
Definition: vtkDataSet.h:172
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:163
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453
int vtkTypeBool
Definition: vtkABI.h:69