VTK
vtkSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSource.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 =========================================================================*/
47 #ifndef __vtkSource_h
48 #define __vtkSource_h
49 
50 #include "vtkProcessObject.h"
51 
52 class vtkDataObject;
53 class vtkDataObjectToSourceFriendship;
54 
56 {
57 public:
58  vtkTypeMacro(vtkSource,vtkProcessObject);
59  void PrintSelf(ostream& os, vtkIndent indent);
60 
64  virtual void Update();
65 
68  virtual void UpdateWholeExtent();
69 
72  virtual void UpdateInformation();
73 
78  virtual void PropagateUpdateExtent(vtkDataObject *output);
79 
85  virtual void TriggerAsynchronousUpdate();
86 
93  virtual void UpdateData(vtkDataObject *output);
94 
98  virtual void ComputeInputUpdateExtents( vtkDataObject *output );
99 
101 
103  virtual void SetReleaseDataFlag(int);
104  virtual int GetReleaseDataFlag();
105  vtkBooleanMacro(ReleaseDataFlag,int);
107 
109 
111  vtkDataObject **GetOutputs();
112  vtkGetMacro(NumberOfOutputs,int);
114 
118  void UnRegisterAllOutputs(void);
119 
122  int GetOutputIndex(vtkDataObject *out);
123 
127  virtual void SetExecutive(vtkExecutive* executive);
128 
130 
134  virtual int ProcessRequest(vtkInformation*,
138 
139 protected:
140  vtkSource();
141  ~vtkSource();
142 
146  virtual void ExecuteData(vtkDataObject *output);
147 
149  virtual void Execute();
150 
151  // By default, UpdateInformation calls this method to copy information
152  // unmodified from the input to the output.
153  virtual void ExecuteInformation();
154 
155  // Called after ExecuteData to call DataHasBeenGenerated on the
156  // outputs. It can be overridden by subclasses to call
157  // DataHasBeenGenerated on only a subset of the outputs. The
158  // argument is the pointer to the output data object that was passed
159  // to ExecuteData.
160  virtual void MarkGeneratedOutputs(vtkDataObject*);
161 
162  // Called to allocate the input array. Copies old inputs.
163  void SetNumberOfOutputs(int num);
164 
165  // method used internally for getting an output.
166  vtkDataObject *GetOutput(int idx);
167 
168  // protected methods for setting inputs.
169  virtual void SetNthOutput(int num, vtkDataObject *output);
170  virtual void AddOutput(vtkDataObject *output);
171  virtual void RemoveOutput(vtkDataObject *output);
172 
173  vtkDataObject **Outputs; // An Array of the outputs to the filter
175  int Updating;
176  // Time when ExecuteInformation was last called.
178 
179  virtual void ReportReferences(vtkGarbageCollector*);
180 
181  // Output port information must match the current outputs.
183 
184  // Reimplemented from vtkAlgorithm to maintain backward
185  // compatibility for vtkProcessObject.
186  virtual void SetNumberOfOutputPorts(int n);
187 
188  //BTX
189  friend class vtkDataObjectToSourceFriendship;
190  //ETX
191 
192 private:
193  vtkSource(const vtkSource&); // Not implemented.
194  void operator=(const vtkSource&); // Not implemented.
195 };
196 
197 #endif
198 
199 
200 
Store vtkAlgorithm input/output information.
#define VTK_FILTERING_EXPORT
record modification and/or execution time
Definition: vtkTimeStamp.h:33
virtual void ReportReferences(vtkGarbageCollector *)
Superclass for all pipeline executives in VTK.
Definition: vtkExecutive.h:47
Detect and break reference loops.
vtkDataObject ** Outputs
Definition: vtkSource.h:173
vtkTimeStamp InformationTime
Definition: vtkSource.h:177
int NumberOfOutputs
Definition: vtkSource.h:174
a simple class to control print indentation
Definition: vtkIndent.h:37
void PrintSelf(ostream &os, vtkIndent indent)
abstract class specifies interface for visualization filters
virtual int FillOutputPortInformation(int, vtkInformation *)
Store zero or more vtkInformation instances.
int Updating
Definition: vtkSource.h:175
abstract class specifies interface for visualization network source
Definition: vtkSource.h:55
general representation of visualization data
Definition: vtkDataObject.h:70