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 =========================================================================*/
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 
47  vtkImageData* GetOutput();
48  vtkImageData* GetOutput(int);
49  virtual void SetOutput(vtkDataObject* d);
51 
59 
61 
66  void SetInputData(vtkDataObject*);
67  void SetInputData(int, vtkDataObject*);
69 
71 
76  vtkDataObject* GetInput(int port);
77  vtkDataObject* GetInput() { return this->GetInput(0); }
78  vtkImageData* GetImageDataInput(int port);
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 
107  virtual int RequestUpdateExtent(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
108 
116  virtual void CopyInputArrayAttributesToOutput(vtkInformation* request,
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);
150  virtual vtkImageData* AllocateOutputData(vtkDataObject* out, vtkInformation* outInfo);
152 
157  virtual void CopyAttributeData(
158  vtkImageData* in, vtkImageData* out, vtkInformationVector** inputVector);
159 
161 
167  int FillInputPortInformation(int port, vtkInformation* info) override;
169 
170 private:
171  vtkImageAlgorithm(const vtkImageAlgorithm&) = delete;
172  void operator=(const vtkImageAlgorithm&) = delete;
173 };
174 
175 #endif
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:53
vtkAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:37
vtkImageAlgorithm::GetInput
vtkDataObject * GetInput()
Definition: vtkImageAlgorithm.h:77
vtkAlgorithm.h
vtkX3D::port
Definition: vtkX3D.h:453
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:64
vtkX3D::info
Definition: vtkX3D.h:382
vtkAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:58
vtkAlgorithm::ProcessRequest
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
vtkAlgorithm::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69