VTK
vtkDataSetAlgorithm.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDataSetAlgorithm.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 =========================================================================*/
34 #ifndef vtkDataSetAlgorithm_h
35 #define vtkDataSetAlgorithm_h
36 
37 #include "vtkCommonExecutionModelModule.h" // For export macro
38 #include "vtkAlgorithm.h"
39 
40 class vtkDataSet;
41 class vtkImageData;
42 class vtkPolyData;
44 class vtkStructuredGrid;
46 class vtkRectilinearGrid;
47 
48 class VTKCOMMONEXECUTIONMODEL_EXPORT vtkDataSetAlgorithm : public vtkAlgorithm
49 {
50 public:
51  static vtkDataSetAlgorithm *New();
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
56 
59  vtkDataSet* GetOutput();
60  vtkDataSet* GetOutput(int);
62 
67  vtkDataObject* GetInput();
68 
72  vtkPolyData *GetPolyDataOutput();
73 
77  vtkStructuredPoints *GetStructuredPointsOutput();
78 
82  vtkImageData *GetImageDataOutput();
83 
87  vtkStructuredGrid *GetStructuredGridOutput();
88 
92  vtkUnstructuredGrid *GetUnstructuredGridOutput();
93 
97  vtkRectilinearGrid *GetRectilinearGridOutput();
98 
100 
105  void SetInputData(vtkDataObject*);
106  void SetInputData(int, vtkDataObject*);
107  void SetInputData(vtkDataSet*);
108  void SetInputData(int, vtkDataSet*);
110 
112 
117  void AddInputData(vtkDataObject *);
118  void AddInputData(vtkDataSet*);
119  void AddInputData(int, vtkDataSet*);
120  void AddInputData(int, vtkDataObject*);
122 
126  int ProcessRequest(vtkInformation* request,
127  vtkInformationVector** inputVector,
128  vtkInformationVector* outputVector) override;
129 
130 protected:
132  ~vtkDataSetAlgorithm() override {}
133 
143  vtkInformationVector*) {return 1;};
144 
146 
155  {
156  return 1;
157  };
159 
160 
170  virtual int RequestDataObject(vtkInformation* request,
171  vtkInformationVector** inputVector,
172  vtkInformationVector* outputVector);
173 
182  vtkInformationVector*) {return 1;};
183 
184 
185  // see algorithm for more info
187  int FillInputPortInformation(int port, vtkInformation* info) override;
188 
189  vtkDataObject *GetInput(int port);
190 
191 private:
192  vtkDataSetAlgorithm(const vtkDataSetAlgorithm&) = delete;
193  void operator=(const vtkDataSetAlgorithm&) = delete;
194 };
195 
196 #endif
197 
198 
a dataset that is topologically regular with variable spacing in the three coordinate directions ...
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...
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
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:45
dataset represents arbitrary combinations of all possible cell types
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when each filter in the pipeline decides what portion of its inp...
A subclass of ImageData.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks for Information.
topologically regular array of data
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
Superclass for algorithms that produce output of the same type as input.
general representation of visualization data
Definition: vtkDataObject.h:64