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 
50  vtkImageData* GetOutput();
51  vtkImageData* GetOutput(int);
52  virtual void SetOutput(vtkDataObject* d);
54 
62  vtkInformationVector*) override;
63 
65 
70  void SetInputData(vtkDataObject *);
71  void SetInputData(int, vtkDataObject*);
73 
75 
80  vtkDataObject *GetInput(int port);
81  vtkDataObject *GetInput() { return this->GetInput(0); };
82  vtkImageData *GetImageDataInput(int port);
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 
113  virtual int RequestUpdateExtent(vtkInformation*,
116 
124  virtual void CopyInputArrayAttributesToOutput(vtkInformation* request,
125  vtkInformationVector** inputVector,
126  vtkInformationVector* outputVector);
127 
128 
136  virtual int RequestData(vtkInformation *request,
137  vtkInformationVector** inputVector,
138  vtkInformationVector* outputVector);
139 
144  virtual void ExecuteDataWithInformation(vtkDataObject *output,
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);
164  virtual vtkImageData *AllocateOutputData(vtkDataObject *out,
165  vtkInformation *outInfo);
167 
172  virtual void CopyAttributeData(vtkImageData *in, vtkImageData *out,
173  vtkInformationVector** inputVector);
174 
176 
181  int FillOutputPortInformation(int port, vtkInformation* info) override;
182  int FillInputPortInformation(int port, vtkInformation* info) override;
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 
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
vtkDataObject * GetInput()
Get a data object for one of the input port connections.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:59
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:47
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:64