Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkSource.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSource.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00058 #ifndef __vtkSource_h
00059 #define __vtkSource_h
00060 
00061 #include "vtkProcessObject.h"
00062 
00063 class vtkDataObject;
00064 class vtkDistributedExecutive;
00065 
00066 class VTK_FILTERING_EXPORT vtkSource : public vtkProcessObject
00067 {
00068 public:
00069   vtkTypeRevisionMacro(vtkSource,vtkProcessObject);
00070   void PrintSelf(ostream& os, vtkIndent indent);
00071 
00075   virtual void Update();
00076 
00079   virtual void UpdateWholeExtent();
00080 
00083   virtual void UpdateInformation();
00084 
00085   virtual void PropagateUpdateExtent(vtkDataObject *output);
00086 
00087   virtual void TriggerAsynchronousUpdate();
00088 
00089   virtual void UpdateData(vtkDataObject *output);
00090 
00094   virtual void ComputeInputUpdateExtents( vtkDataObject *output );
00095 
00097 
00099   virtual void SetReleaseDataFlag(int);
00100   virtual int GetReleaseDataFlag();
00101   vtkBooleanMacro(ReleaseDataFlag,int);
00103 
00105 
00107   vtkDataObject **GetOutputs();
00108   vtkGetMacro(NumberOfOutputs,int);
00110 
00114   void UnRegisterAllOutputs(void);
00115 
00118   int GetOutputIndex(vtkDataObject *out);
00119 
00123   virtual void SetExecutive(vtkExecutive* executive);
00124 
00126 
00130   virtual int ProcessRequest(vtkInformation*,
00131                                        vtkInformationVector*,
00132                                        vtkInformationVector*);
00134 
00135 protected:
00136   vtkSource();
00137   ~vtkSource();
00138 
00142   virtual void ExecuteData(vtkDataObject *output);
00143 
00148   int UpdateExtentIsEmpty(vtkDataObject *output);
00149 
00151   virtual void Execute();
00152 
00153   // By default, UpdateInformation calls this method to copy information
00154   // unmodified from the input to the output.
00155   virtual void ExecuteInformation();
00156 
00157   // Called after ExecuteData to call DataHasBeenGenerated on the
00158   // outputs.  It can be overridden by subclasses to call
00159   // DataHasBeenGenerated on only a subset of the outputs.  The
00160   // argument is the pointer to the output data object that was passed
00161   // to ExecuteData.
00162   virtual void MarkGeneratedOutputs(vtkDataObject*);
00163 
00164   // Called to allocate the input array.  Copies old inputs.
00165   void SetNumberOfOutputs(int num);
00166 
00167   // method used internally for getting an output.
00168   vtkDataObject *GetOutput(int idx);
00169 
00170   // protected methods for setting inputs.
00171   virtual void SetNthOutput(int num, vtkDataObject *output);
00172   virtual void AddOutput(vtkDataObject *output);
00173   virtual void RemoveOutput(vtkDataObject *output);
00174   
00175   vtkDataObject **Outputs;     // An Array of the outputs to the filter
00176   int NumberOfOutputs;
00177   int Updating;
00178   // Time when ExecuteInformation was last called.
00179   vtkTimeStamp InformationTime;
00180 
00181   virtual void ReportReferences(vtkGarbageCollector*);
00182   virtual void RemoveReferences();
00183 
00184   // Output port information must match the current outputs.
00185   int FillOutputPortInformation(int, vtkInformation*);
00186 
00187   // Reimplemented from vtkAlgorithm to maintain backward
00188   // compatibility for vtkProcessObject.
00189   virtual void SetNumberOfOutputPorts(int n);
00190 
00191   //BTX
00192   friend class vtkDistributedExecutive;
00193   //ETX
00194 
00195 private:
00196   vtkSource(const vtkSource&);  // Not implemented.
00197   void operator=(const vtkSource&);  // Not implemented.
00198 };
00199 
00200 #endif
00201 
00202 
00203