VTK
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 =========================================================================*/
31 #ifndef vtkImageAlgorithm_h
32 #define vtkImageAlgorithm_h
33 
34 #include "vtkCommonExecutionModelModule.h" // For export macro
35 #include "vtkAlgorithm.h"
36 
37 class vtkDataSet;
38 class vtkImageData;
39 
40 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageAlgorithm : public vtkAlgorithm
41 {
42 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
47 
52  virtual void SetOutput(vtkDataObject* d);
54 
62  vtkInformationVector*) override;
63 
65 
73 
75 
81  vtkDataObject *GetInput() { return this->GetInput(0); };
84 
86 
91  virtual void AddInputData(vtkDataObject *);
92  virtual void AddInputData(int, vtkDataObject*);
94 
95 protected:
97  ~vtkImageAlgorithm() override;
98 
103  virtual int RequestInformation(vtkInformation* request,
104  vtkInformationVector** inputVector,
105  vtkInformationVector* outputVector);
106 
107 
116 
125  vtkInformationVector** inputVector,
126  vtkInformationVector* outputVector);
127 
128 
136  virtual int RequestData(vtkInformation *request,
137  vtkInformationVector** inputVector,
138  vtkInformationVector* outputVector);
139 
145  vtkInformation* outInfo);
146 
148 
152  virtual void ExecuteData(vtkDataObject *output);
153  virtual void Execute();
155 
157 
161  virtual void AllocateOutputData(vtkImageData *out,
162  vtkInformation* outInfo,
163  int *uExtent);
165  vtkInformation *outInfo);
167 
173  vtkInformationVector** inputVector);
174 
176 
184 
185 private:
186  vtkImageAlgorithm(const vtkImageAlgorithm&) = delete;
187  void operator=(const vtkImageAlgorithm&) = delete;
188 };
189 
190 #endif
191 
192 
193 
194 
195 
196 
197 
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:60
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
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:41
vtkImageAlgorithm::~vtkImageAlgorithm
~vtkImageAlgorithm() override
vtkImageAlgorithm::GetInput
vtkDataObject * GetInput()
Definition: vtkImageAlgorithm.h:81
vtkAlgorithm.h
vtkImageAlgorithm::SetInputData
void SetInputData(vtkDataObject *)
Assign a data object as input.
vtkX3D::port
@ port
Definition: vtkX3D.h:447
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:46
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkImageAlgorithm::SetOutput
virtual void SetOutput(vtkDataObject *d)
vtkImageAlgorithm::ProcessRequest
int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Process a request from the executive.
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:63
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkX3D::info
@ info
Definition: vtkX3D.h:376
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::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:65