VTK  9.0.1
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 =========================================================================*/
28 #ifndef vtkImageAlgorithm_h
29 #define vtkImageAlgorithm_h
30 
31 #include "vtkAlgorithm.h"
32 #include "vtkCommonExecutionModelModule.h" // For export macro
33 
34 class vtkDataSet;
35 class vtkImageData;
36 
37 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageAlgorithm : public vtkAlgorithm
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
49  virtual void SetOutput(vtkDataObject* d);
51 
59 
61 
69 
71 
77  vtkDataObject* GetInput() { return this->GetInput(0); }
80 
82 
87  virtual void AddInputData(vtkDataObject*);
88  virtual void AddInputData(int, vtkDataObject*);
90 
91 protected:
93  ~vtkImageAlgorithm() override;
94 
99  virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
100  vtkInformationVector* outputVector);
101 
108 
117  vtkInformationVector** inputVector, vtkInformationVector* outputVector);
118 
126  virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
127  vtkInformationVector* outputVector);
128 
133  virtual void ExecuteDataWithInformation(vtkDataObject* output, vtkInformation* outInfo);
134 
136 
140  virtual void ExecuteData(vtkDataObject* output);
141  virtual void Execute();
143 
145 
149  virtual void AllocateOutputData(vtkImageData* out, vtkInformation* outInfo, int* uExtent);
152 
157  virtual void CopyAttributeData(
158  vtkImageData* in, vtkImageData* out, vtkInformationVector** inputVector);
159 
161 
169 
170 private:
171  vtkImageAlgorithm(const vtkImageAlgorithm&) = delete;
172  void operator=(const vtkImageAlgorithm&) = delete;
173 };
174 
175 #endif
vtkImageAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
vtkImageAlgorithm::SetInputData
void SetInputData(int, vtkDataObject *)
vtkImageAlgorithm::AddInputData
virtual void AddInputData(int, vtkDataObject *)
vtkImageAlgorithm::ExecuteData
virtual void ExecuteData(vtkDataObject *output)
This method is the old style execute method, provided for the sake of backwards compatibility with ol...
vtkImageAlgorithm::GetOutput
vtkImageData * GetOutput(int)
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:54
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:36
vtkImageAlgorithm::ExecuteDataWithInformation
virtual void ExecuteDataWithInformation(vtkDataObject *output, vtkInformation *outInfo)
This is a convenience method that is implemented in many subclasses instead of RequestData.
vtkImageAlgorithm::AllocateOutputData
virtual vtkImageData * AllocateOutputData(vtkDataObject *out, vtkInformation *outInfo)
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:38
vtkImageAlgorithm::~vtkImageAlgorithm
~vtkImageAlgorithm() override
vtkImageAlgorithm::GetInput
vtkDataObject * GetInput()
Definition: vtkImageAlgorithm.h:77
vtkAlgorithm.h
vtkImageAlgorithm::SetInputData
void SetInputData(vtkDataObject *)
Assign a data object as input.
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkImageAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to translate the update extent requests from each output port ...
vtkImageAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkImageAlgorithm::AllocateOutputData
virtual void AllocateOutputData(vtkImageData *out, vtkInformation *outInfo, int *uExtent)
Allocate the output data.
vtkImageAlgorithm::GetOutput
vtkImageData * GetOutput()
Get the output data object for a port on this algorithm.
vtkImageAlgorithm::GetInput
vtkDataObject * GetInput(int port)
Get a data object for one of the input port connections.
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkImageAlgorithm::SetOutput
virtual void SetOutput(vtkDataObject *d)
vtkImageAlgorithm::CopyInputArrayAttributesToOutput
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...
vtkImageAlgorithm::vtkImageAlgorithm
vtkImageAlgorithm()
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:57
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:65
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkImageAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageAlgorithm::CopyAttributeData
virtual void CopyAttributeData(vtkImageData *in, vtkImageData *out, vtkInformationVector **inputVector)
Copy the other point and cell data.
vtkImageAlgorithm::FillOutputPortInformation
int FillOutputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
vtkImageAlgorithm::Execute
virtual void Execute()
vtkImageAlgorithm::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Process a request from the executive.
vtkImageAlgorithm::AddInputData
virtual void AddInputData(vtkDataObject *)
Assign a data object as input.
vtkImageAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkImageAlgorithm::GetImageDataInput
vtkImageData * GetImageDataInput(int port)
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:60
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69