Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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 =========================================================================*/
00047 #ifndef __vtkSource_h
00048 #define __vtkSource_h
00049 
00050 #include "vtkProcessObject.h"
00051 
00052 class vtkDataObject;
00053 class vtkDataObjectToSourceFriendship;
00054 
00055 class VTK_FILTERING_EXPORT vtkSource : public vtkProcessObject
00056 {
00057 public:
00058   vtkTypeRevisionMacro(vtkSource,vtkProcessObject);
00059   void PrintSelf(ostream& os, vtkIndent indent);
00060 
00064   virtual void Update();
00065 
00068   virtual void UpdateWholeExtent();
00069 
00072   virtual void UpdateInformation();
00073 
00074   virtual void PropagateUpdateExtent(vtkDataObject *output);
00075 
00076   virtual void TriggerAsynchronousUpdate();
00077 
00078   virtual void UpdateData(vtkDataObject *output);
00079 
00083   virtual void ComputeInputUpdateExtents( vtkDataObject *output );
00084 
00086 
00088   virtual void SetReleaseDataFlag(int);
00089   virtual int GetReleaseDataFlag();
00090   vtkBooleanMacro(ReleaseDataFlag,int);
00092 
00094 
00096   vtkDataObject **GetOutputs();
00097   vtkGetMacro(NumberOfOutputs,int);
00099 
00103   void UnRegisterAllOutputs(void);
00104 
00107   int GetOutputIndex(vtkDataObject *out);
00108 
00112   virtual void SetExecutive(vtkExecutive* executive);
00113 
00115 
00119   virtual int ProcessRequest(vtkInformation*,
00120                              vtkInformationVector**,
00121                              vtkInformationVector*);
00123 
00124 protected:
00125   vtkSource();
00126   ~vtkSource();
00127 
00131   virtual void ExecuteData(vtkDataObject *output);
00132 
00134   virtual void Execute();
00135 
00136   // By default, UpdateInformation calls this method to copy information
00137   // unmodified from the input to the output.
00138   virtual void ExecuteInformation();
00139 
00140   // Called after ExecuteData to call DataHasBeenGenerated on the
00141   // outputs.  It can be overridden by subclasses to call
00142   // DataHasBeenGenerated on only a subset of the outputs.  The
00143   // argument is the pointer to the output data object that was passed
00144   // to ExecuteData.
00145   virtual void MarkGeneratedOutputs(vtkDataObject*);
00146 
00147   // Called to allocate the input array.  Copies old inputs.
00148   void SetNumberOfOutputs(int num);
00149 
00150   // method used internally for getting an output.
00151   vtkDataObject *GetOutput(int idx);
00152 
00153   // protected methods for setting inputs.
00154   virtual void SetNthOutput(int num, vtkDataObject *output);
00155   virtual void AddOutput(vtkDataObject *output);
00156   virtual void RemoveOutput(vtkDataObject *output);
00157   
00158   vtkDataObject **Outputs;     // An Array of the outputs to the filter
00159   int NumberOfOutputs;
00160   int Updating;
00161   // Time when ExecuteInformation was last called.
00162   vtkTimeStamp InformationTime;
00163 
00164   virtual void ReportReferences(vtkGarbageCollector*);
00165 
00166   // Output port information must match the current outputs.
00167   int FillOutputPortInformation(int, vtkInformation*);
00168 
00169   // Reimplemented from vtkAlgorithm to maintain backward
00170   // compatibility for vtkProcessObject.
00171   virtual void SetNumberOfOutputPorts(int n);
00172 
00173   //BTX
00174   friend class vtkDataObjectToSourceFriendship;
00175   //ETX
00176 
00177 private:
00178   vtkSource(const vtkSource&);  // Not implemented.
00179   void operator=(const vtkSource&);  // Not implemented.
00180 };
00181 
00182 #endif
00183 
00184 
00185 

Generated on Mon Jan 21 23:07:21 2008 for VTK by  doxygen 1.4.3-20050530