VTK
vtkDataObjectAlgorithm.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDataObjectAlgorithm.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 =========================================================================*/
36 #ifndef __vtkDataObjectAlgorithm_h
37 #define __vtkDataObjectAlgorithm_h
38 
39 #include "vtkAlgorithm.h"
40 #include "vtkDataObject.h" // makes things a bit easier
41 
42 class vtkDataSet;
43 class vtkDataObject;
44 
46 {
47 public:
48  static vtkDataObjectAlgorithm *New();
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
53 
54  vtkDataObject* GetOutput();
55  vtkDataObject* GetOutput(int);
56  virtual void SetOutput(vtkDataObject* d);
58 
60 
61  virtual int ProcessRequest(vtkInformation*,
65 
66  // this method is not recommended for use, but lots of old style filters
67  // use it
68  vtkDataObject* GetInput();
69  vtkDataObject *GetInput(int port);
70 
72 
79  void SetInput(vtkDataObject *);
80  void SetInput(int, vtkDataObject*);
82 
84 
88  void AddInput(vtkDataObject *);
89  void AddInput(int, vtkDataObject*);
91 
92 protected:
95 
96  // convenience method
97  virtual int RequestInformation(vtkInformation* request,
98  vtkInformationVector** inputVector,
99  vtkInformationVector* outputVector);
100 
102 
107  {
108  return 1;
109  }
111 
112  virtual int RequestData(vtkInformation* request,
113  vtkInformationVector** inputVector,
114  vtkInformationVector* outputVector);
115 
117 
122  {
123  return 1;
124  };
126 
131  int UpdateExtentIsEmpty(vtkDataObject *output);
132 
134 
135  virtual void ExecuteData(vtkDataObject *output);
136  virtual void Execute();
138 
139  // see algorithm for more info
142 
143 private:
144  vtkDataObjectAlgorithm(const vtkDataObjectAlgorithm&); // Not implemented.
145  void operator=(const vtkDataObjectAlgorithm&); // Not implemented.
146 };
147 
148 #endif