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 =========================================================================*/
27 #ifndef __vtkImageAlgorithm_h
28 #define __vtkImageAlgorithm_h
29 
30 #include "vtkAlgorithm.h"
31 
32 class vtkDataSet;
33 class vtkImageData;
34 
36 {
37 public:
39  void PrintSelf(ostream& os, vtkIndent indent);
40 
42 
43  vtkImageData* GetOutput();
44  vtkImageData* GetOutput(int);
45  virtual void SetOutput(vtkDataObject* d);
47 
49 
50  virtual int ProcessRequest(vtkInformation*,
54 
56 
63  void SetInput(vtkDataObject *);
64  void SetInput(int, vtkDataObject*);
66 
67  // this method is not recommended for use, but lots of old style filters
68  // use it
69  vtkDataObject *GetInput(int port);
70  vtkDataObject *GetInput() { return this->GetInput(0); };
71  vtkImageData *GetImageDataInput(int port);
72 
74 
78  virtual void AddInput(vtkDataObject *);
79  virtual void AddInput(int, vtkDataObject*);
81 
82 protected:
85 
86  // convenience method
87  virtual int RequestInformation(vtkInformation* request,
88  vtkInformationVector** inputVector,
89  vtkInformationVector* outputVector);
90  virtual int RequestUpdateExtent(vtkInformation*,
93 
94  // convenience method to copy the selected scalars type and num components
95  // to the output info. Call this from inside your RequestInformation
96  virtual void CopyInputArrayAttributesToOutput(vtkInformation* request,
97  vtkInformationVector** inputVector,
98  vtkInformationVector* outputVector);
99 
100 
102 
104  virtual int RequestData(vtkInformation *request,
105  vtkInformationVector** inputVector,
106  vtkInformationVector* outputVector);
108 
110 
111  virtual void ExecuteData(vtkDataObject *output);
112  virtual void Execute();
114 
115  // just allocate the output data
116  virtual void AllocateOutputData(vtkImageData *out,
117  int *uExtent);
118  virtual vtkImageData *AllocateOutputData(vtkDataObject *out);
119 
120  // copy the other point and cell data
121  virtual void CopyAttributeData(vtkImageData *in, vtkImageData *out,
122  vtkInformationVector** inputVector);
123 
124  // see algorithm for more info
125  virtual int FillOutputPortInformation(int port, vtkInformation* info);
126  virtual int FillInputPortInformation(int port, vtkInformation* info);
127 
128 private:
129  vtkImageAlgorithm(const vtkImageAlgorithm&); // Not implemented.
130  void operator=(const vtkImageAlgorithm&); // Not implemented.
131 };
132 
133 #endif
134 
135 
136 
137 
138 
139 
140 
Store vtkAlgorithm input/output information.
#define VTK_FILTERING_EXPORT
abstract class to specify dataset behavior
Definition: vtkDataSet.h:58
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkDataObject * GetInput()
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:59
virtual int FillOutputPortInformation(int port, vtkInformation *info)
a simple class to control print indentation
Definition: vtkIndent.h:37
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
virtual int FillInputPortInformation(int port, vtkInformation *info)
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
helper class to get VTK data object types as string and instantiate them
void PrintSelf(ostream &os, vtkIndent indent)