VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkSource Class Reference

abstract class specifies interface for visualization network source More...

#include <vtkSource.h>

Inheritance diagram for vtkSource:
[legend]
Collaboration diagram for vtkSource:
[legend]

Public Types

typedef vtkProcessObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void Update ()
 
virtual void UpdateWholeExtent ()
 
virtual void UpdateInformation ()
 
virtual void PropagateUpdateExtent (vtkDataObject *output)
 
virtual void TriggerAsynchronousUpdate ()
 
virtual void UpdateData (vtkDataObject *output)
 
virtual void ComputeInputUpdateExtents (vtkDataObject *output)
 
void UnRegisterAllOutputs (void)
 
int GetOutputIndex (vtkDataObject *out)
 
virtual void SetExecutive (vtkExecutive *executive)
 
virtual void SetReleaseDataFlag (int)
 
virtual int GetReleaseDataFlag ()
 
virtual void ReleaseDataFlagOn ()
 
virtual void ReleaseDataFlagOff ()
 
vtkDataObject ** GetOutputs ()
 
virtual int GetNumberOfOutputs ()
 
virtual int ProcessRequest (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkSourceSafeDownCast (vtkObject *o)
 

Protected Member Functions

 vtkSource ()
 
 ~vtkSource ()
 
virtual void ExecuteData (vtkDataObject *output)
 
virtual void Execute ()
 
virtual void ExecuteInformation ()
 
virtual void MarkGeneratedOutputs (vtkDataObject *)
 
void SetNumberOfOutputs (int num)
 
vtkDataObjectGetOutput (int idx)
 
virtual void SetNthOutput (int num, vtkDataObject *output)
 
virtual void AddOutput (vtkDataObject *output)
 
virtual void RemoveOutput (vtkDataObject *output)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
int FillOutputPortInformation (int, vtkInformation *)
 
virtual void SetNumberOfOutputPorts (int n)
 

Protected Attributes

vtkDataObject ** Outputs
 
int NumberOfOutputs
 
int Updating
 
vtkTimeStamp InformationTime
 

Friends

class vtkDataObjectToSourceFriendship
 

Detailed Description

abstract class specifies interface for visualization network source

vtkSource is an abstract object that specifies behavior and interface of source objects. Source objects are objects that begin visualization pipeline. Sources include readers (read data from file or communications port) and procedural sources (generate data programmatically). vtkSource objects are also objects that generate output data. In this sense vtkSource is used as a superclass to vtkFilter.

Concrete subclasses of vtkSource must define Update() and Execute() methods. The public method Update() invokes network execution and will bring the network up-to-date. The protected Execute() method actually does the work of data creation/generation. The difference between the two methods is that Update() implements input consistency checks and modified time comparisons and then invokes the Execute() which is an implementation of a particular algorithm.

An important feature of subclasses of vtkSource is that it is possible to control the memory-management model (i.e., retain output versus delete output data). If enabled the ReleaseDataFlag enables the deletion of the output data once the downstream process object finishes processing the data (please see text).

See also
vtkProcessObject vtkDataSetReader vtkFilter vtkPolyDataSource vtkStructuredGridSource vtkStructuredPointsSource vtkUnstructuredGridSource
Events:
vtkCommand::ExecuteInformationEvent vtkCommand::SetOutputEvent

Definition at line 55 of file vtkSource.h.

Member Typedef Documentation

typedef vtkProcessObject vtkSource::Superclass

Definition at line 58 of file vtkSource.h.

Constructor & Destructor Documentation

vtkSource::vtkSource ( )
protected
vtkSource::~vtkSource ( )
protected

Member Function Documentation

virtual const char* vtkSource::GetClassName ( )
virtual
static int vtkSource::IsTypeOf ( const char *  type)
static
virtual int vtkSource::IsA ( const char *  type)
virtual
static vtkSource* vtkSource::SafeDownCast ( vtkObject o)
static
void vtkSource::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual void vtkSource::Update ( )
virtual

Bring object up-to-date before execution. Update() checks modified time against last execution time, and re-executes object if necessary.

virtual void vtkSource::UpdateWholeExtent ( )
virtual

Like update, but make sure the update extent is the whole extent in the output.

virtual void vtkSource::UpdateInformation ( )
virtual

Updates any global information about the data (like spacing for images)

virtual void vtkSource::PropagateUpdateExtent ( vtkDataObject output)
virtual

WARNING: INTERNAL METHOD - NOT FOR GENERAL USE. THIS METHOD IS PART OF THE PIPELINE UPDATE FUNCTIONALITY. The update extent for this object is propagated up the pipeline. This propagation may early terminate based on the PipelineMTime.

virtual void vtkSource::TriggerAsynchronousUpdate ( )
virtual

WARNING: INTERNAL METHOD - NOT FOR GENERAL USE. THIS METHOD IS PART OF THE PIPELINE UPDATE FUNCTIONALITY. Propagate back up the pipeline for ports and trigger the update on the other side of the port to allow for asynchronous parallel processing in the pipeline. This propagation may early terminate based on the PipelineMTime.

virtual void vtkSource::UpdateData ( vtkDataObject output)
virtual

WARNING: INTERNAL METHOD - NOT FOR GENERAL USE. THIS METHOD IS PART OF THE PIPELINE UPDATE FUNCTIONALITY. Propagate the update back up the pipeline, and perform the actual work of updating on the way down. When the propagate arrives at a port, block and wait for the asynchronous update to finish on the other side. This propagation may early terminate based on the PipelineMTime.

virtual void vtkSource::ComputeInputUpdateExtents ( vtkDataObject output)
virtual

What is the input update extent that is required to produce the desired output? By default, the whole input is always required but this is overridden in many subclasses.

Reimplemented in vtkPolyDataSource, vtkStructuredPointsToStructuredPointsFilter, vtkDataSetToStructuredPointsFilter, vtkDataSetToPolyDataFilter, and vtkUnstructuredGridToPolyDataFilter.

virtual void vtkSource::SetReleaseDataFlag ( int  )
virtual

Turn on/off flag to control whether this object's data is released after being used by a source.

virtual int vtkSource::GetReleaseDataFlag ( )
virtual

Turn on/off flag to control whether this object's data is released after being used by a source.

virtual void vtkSource::ReleaseDataFlagOn ( )
virtual

Turn on/off flag to control whether this object's data is released after being used by a source.

virtual void vtkSource::ReleaseDataFlagOff ( )
virtual

Turn on/off flag to control whether this object's data is released after being used by a source.

vtkDataObject** vtkSource::GetOutputs ( )

Return an array with all the inputs of this process object. This is useful for tracing back in the pipeline to construct graphs etc.

virtual int vtkSource::GetNumberOfOutputs ( )
virtual

Return an array with all the inputs of this process object. This is useful for tracing back in the pipeline to construct graphs etc.

void vtkSource::UnRegisterAllOutputs ( void  )

Release/disconnect all outputs of this source. This is intended to be called prior to Delete() if the user is concerned about outputs holding on to the filter/source.

int vtkSource::GetOutputIndex ( vtkDataObject out)

Return what index output the passed in output is, return -1 if it does not match any of the outputs

virtual void vtkSource::SetExecutive ( vtkExecutive executive)
virtual

Set this algorithm's executive. This algorithm is removed from any executive to which it has previously been assigned and then assigned to the given executive.

virtual int vtkSource::ProcessRequest ( vtkInformation ,
vtkInformationVector **  ,
vtkInformationVector  
)
virtual

Transform pipeline requests from executives into old-style pipeline calls. This works with the vtkStreamingDemandDrivenPipeline executive to maintain backward compatibility for filters written as subclasses of vtkSource.

virtual void vtkSource::ExecuteData ( vtkDataObject output)
protectedvirtual

This method is the one that should be used by subclasses, right now the default implementation is to call the backwards compatibility method

virtual void vtkSource::Execute ( )
protectedvirtual

This method is the old style execute method

virtual void vtkSource::ExecuteInformation ( )
protectedvirtual
virtual void vtkSource::MarkGeneratedOutputs ( vtkDataObject )
protectedvirtual
void vtkSource::SetNumberOfOutputs ( int  num)
protected
vtkDataObject* vtkSource::GetOutput ( int  idx)
protected
virtual void vtkSource::SetNthOutput ( int  num,
vtkDataObject output 
)
protectedvirtual
virtual void vtkSource::AddOutput ( vtkDataObject output)
protectedvirtual
virtual void vtkSource::RemoveOutput ( vtkDataObject output)
protectedvirtual
virtual void vtkSource::ReportReferences ( vtkGarbageCollector )
protectedvirtual
int vtkSource::FillOutputPortInformation ( int  ,
vtkInformation  
)
protected
virtual void vtkSource::SetNumberOfOutputPorts ( int  n)
protectedvirtual

Friends And Related Function Documentation

friend class vtkDataObjectToSourceFriendship
friend

Definition at line 189 of file vtkSource.h.

Member Data Documentation

vtkDataObject** vtkSource::Outputs
protected

Definition at line 173 of file vtkSource.h.

int vtkSource::NumberOfOutputs
protected

Definition at line 174 of file vtkSource.h.

int vtkSource::Updating
protected

Definition at line 175 of file vtkSource.h.

vtkTimeStamp vtkSource::InformationTime
protected

Definition at line 177 of file vtkSource.h.


The documentation for this class was generated from the following file: