ParaView
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkPVDataRepresentation Class Reference

vtkPVDataRepresentation adds some ParaView specific API to data representations. More...

#include <vtkPVDataRepresentation.h>

Inheritance diagram for vtkPVDataRepresentation:
Inheritance graph
[legend]

Public Types

typedef vtkDataRepresentation Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual int ProcessViewRequest (vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
 vtkAlgorithm::ProcessRequest() equivalent for rendering passes. More...
 
virtual void MarkModified ()
 This is one of the most important functions. More...
 
virtual unsigned int Initialize (unsigned int minIdAvailable, unsigned int maxIdAvailable)
 Initialize the representation with an identifier range so each internal representation can own a unique ID. More...
 
unsigned int GetUniqueIdentifier ()
 Return 0 if the Initialize() method was not called otherwise a unique ID that will be shared across the processes for that same object. More...
 
virtual void SetVisibility (bool val)
 Get/Set the visibility for this representation. More...
 
virtual bool GetVisibility ()
 
virtual vtkDataObject * GetRenderedDataObject (int vtkNotUsed(port))
 Returns the data object that is rendered from the given input port. More...
 
virtual void SetForcedCacheKey (double val)
 Typically a representation decides whether to use cache based on the view's values for UseCache and CacheKey. More...
 
virtual void SetForceUseCache (bool val)
 
bool GetUsingCacheForUpdate ()
 Called by vtkPVDataRepresentationPipeline to see if using cache is valid and will be used for the update. More...
 
virtual bool GetNeedUpdate ()
 
virtual vtkAlgorithmOutput * GetInternalOutputPort ()
 Retrieves an output port for the input data object at the specified port and connection index. More...
 
virtual vtkAlgorithmOutput * GetInternalOutputPort (int port)
 
virtual vtkAlgorithmOutput * GetInternalOutputPort (int port, int conn)
 
vtkView * GetView () const
 Provides access to the view. More...
 
virtual void SetUpdateTime (double time)
 Set the update time. More...
 
virtual double GetUpdateTime ()
 Set the update time. More...
 
virtual bool GetUpdateTimeValid ()
 Set whether the UpdateTime is valid. More...
 
virtual void SetUseCache (bool)
 
virtual void SetCacheKey (double val)
 
virtual double GetCacheKey ()
 Returns whether caching is used and what key to use when caching is enabled. More...
 
virtual bool GetUseCache ()
 Returns whether caching is used and what key to use when caching is enabled. More...
 
virtual bool AddToView (vtkView *view)
 Making these methods public. More...
 
virtual bool RemoveFromView (vtkView *view)
 Making these methods public. More...
 

Static Public Member Functions

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

Protected Member Functions

 vtkPVDataRepresentation ()
 
 ~vtkPVDataRepresentation ()
 
virtual bool IsCached (double cache_key)
 Subclasses should override this method when they support caching to indicate if the particular key is cached. More...
 
virtual vtkExecutive * CreateDefaultExecutive ()
 Create a default executive. More...
 
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 Overridden to invoke vtkCommand::UpdateDataEvent. More...
 
virtual int RequestUpdateExtent (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
 
virtual int RequestUpdateTime (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 

Protected Attributes

double UpdateTime
 
bool UpdateTimeValid
 
unsigned int UniqueIdentifier
 

Detailed Description

vtkPVDataRepresentation adds some ParaView specific API to data representations.

See also
vtkPVDataRepresentationPipeline

Definition at line 32 of file vtkPVDataRepresentation.h.

Member Typedef Documentation

§ Superclass

typedef vtkDataRepresentation vtkPVDataRepresentation::Superclass

Definition at line 35 of file vtkPVDataRepresentation.h.

Constructor & Destructor Documentation

§ vtkPVDataRepresentation()

vtkPVDataRepresentation::vtkPVDataRepresentation ( )
protected

§ ~vtkPVDataRepresentation()

vtkPVDataRepresentation::~vtkPVDataRepresentation ( )
protected

Member Function Documentation

§ GetClassName()

virtual const char* vtkPVDataRepresentation::GetClassName ( )
virtual

§ IsTypeOf()

static int vtkPVDataRepresentation::IsTypeOf ( const char *  type)
static

§ IsA()

virtual int vtkPVDataRepresentation::IsA ( const char *  type)
virtual

§ SafeDownCast()

static vtkPVDataRepresentation* vtkPVDataRepresentation::SafeDownCast ( vtkObject *  o)
static

§ PrintSelf()

void vtkPVDataRepresentation::PrintSelf ( ostream &  os,
vtkIndent  indent 
)

§ ProcessViewRequest()

virtual int vtkPVDataRepresentation::ProcessViewRequest ( vtkInformationRequestKey *  request_type,
vtkInformation *  inInfo,
vtkInformation *  outInfo 
)
virtual

§ MarkModified()

virtual void vtkPVDataRepresentation::MarkModified ( )
virtual

This is one of the most important functions.

In VTK pipelines, it's very easy for the pipeline to decide when it needs to re-execute. vtkAlgorithm::Update() can go up the entire pipeline to see if any filters MTime changed (among other things) and if so, it can re-execute the pipeline. However in case of representations, the real input connection may only be present on the data-server nodes. In that case the vtkPVDataRepresentation::RequestData() will only get called on the data-server nodes. That means that representations won't be able to any data-delivery in RequestData(). We'd need some other mechanisms to synchronize data-delivery among processes. To avoid that conundrum, the vtkSMRepresentationProxy calls MarkModified() on all processes whenever any filter in the pipeline is modified. In this method, the vtkPVDataRepresentation subclasses should ensure that they mark all delivery related filters dirty in their RequestData to ensure they execute then next time they are updated. The vtkPVDataRepresentation also uses a special executive which avoids updating the representation unless MarkModified() was called since the last Update(), thus acting as a update-suppressor.

Reimplemented in vtkCompositeRepresentation, vtkImageSliceRepresentation, vtkUnstructuredGridVolumeRepresentation, vtkPVCompositeOrthographicSliceRepresentation, vtkChartRepresentation, vtkImageVolumeRepresentation, vtkGeometryRepresentation, vtkSelectionRepresentation, vtkRulerSourceRepresentation, vtkDataLabelRepresentation, vtkMoleculeRepresentation, vtkPVCompositeRepresentation, vtkChartSelectionRepresentation, vtkProgressBarSourceRepresentation, vtkTextSourceRepresentation, and vtkSpreadSheetRepresentation.

§ Initialize()

virtual unsigned int vtkPVDataRepresentation::Initialize ( unsigned int  minIdAvailable,
unsigned int  maxIdAvailable 
)
virtual

Initialize the representation with an identifier range so each internal representation can own a unique ID.

If a representation requires more IDs than the set of ids provided, the representation MUST complains by an error or abort explaining how many ids where expected so the number of reserved ids could be easily adjust. Unless noted otherwise, this method must be called before calling any other methods on this class. Internally you can pick an id that follow that condition minIdAvailable <= id <= maxIdAvailable Return the minIdAvailable after initialization so that new range could be used

Reimplemented in vtkSelectionRepresentation, vtkChartRepresentation, vtkPVCompositeRepresentation, and vtkPVCompositeOrthographicSliceRepresentation.

§ GetUniqueIdentifier()

unsigned int vtkPVDataRepresentation::GetUniqueIdentifier ( )
inline

Return 0 if the Initialize() method was not called otherwise a unique ID that will be shared across the processes for that same object.

Definition at line 89 of file vtkPVDataRepresentation.h.

§ SetVisibility()

virtual void vtkPVDataRepresentation::SetVisibility ( bool  val)
inlinevirtual

§ GetVisibility()

virtual bool vtkPVDataRepresentation::GetVisibility ( )
virtual

Reimplemented in vtkDataLabelRepresentation.

§ GetRenderedDataObject()

virtual vtkDataObject* vtkPVDataRepresentation::GetRenderedDataObject ( int   vtkNotUsedport)
inlinevirtual

Returns the data object that is rendered from the given input port.

Definition at line 101 of file vtkPVDataRepresentation.h.

§ SetUpdateTime()

virtual void vtkPVDataRepresentation::SetUpdateTime ( double  time)
virtual

§ GetUpdateTime()

virtual double vtkPVDataRepresentation::GetUpdateTime ( )
virtual

Set the update time.

§ GetUpdateTimeValid()

virtual bool vtkPVDataRepresentation::GetUpdateTimeValid ( )
virtual

Set whether the UpdateTime is valid.

§ SetUseCache()

virtual void vtkPVDataRepresentation::SetUseCache ( bool  )
virtual
Deprecated:
No longer needed.

Simply remove these methods from your subclass implementation.

§ SetCacheKey()

virtual void vtkPVDataRepresentation::SetCacheKey ( double  val)
virtual
Deprecated:
No longer needed.

Simply remove these methods from your subclass implementation.

§ SetForcedCacheKey()

virtual void vtkPVDataRepresentation::SetForcedCacheKey ( double  val)
inlinevirtual

Typically a representation decides whether to use cache based on the view's values for UseCache and CacheKey.

However in some cases we may want to force a representation to cache irrespective of the view (e.g. comparative views). In which case these ivars can up set. If ForcedCacheKey is true, it overrides UseCache and CacheKey. Instead, ForcedCacheKey is used.

Reimplemented in vtkCompositeRepresentation, vtkSelectionRepresentation, and vtkPVCompositeRepresentation.

Definition at line 138 of file vtkPVDataRepresentation.h.

§ SetForceUseCache()

virtual void vtkPVDataRepresentation::SetForceUseCache ( bool  val)
inlinevirtual

§ GetCacheKey()

virtual double vtkPVDataRepresentation::GetCacheKey ( )
virtual

Returns whether caching is used and what key to use when caching is enabled.

§ GetUseCache()

virtual bool vtkPVDataRepresentation::GetUseCache ( )
virtual

Returns whether caching is used and what key to use when caching is enabled.

§ GetUsingCacheForUpdate()

bool vtkPVDataRepresentation::GetUsingCacheForUpdate ( )

Called by vtkPVDataRepresentationPipeline to see if using cache is valid and will be used for the update.

If so, it bypasses all pipeline passes. Subclasses should override IsCached(double) to indicate if a particular entry is cached.

§ GetNeedUpdate()

virtual bool vtkPVDataRepresentation::GetNeedUpdate ( )
virtual

§ AddToView()

virtual bool vtkPVDataRepresentation::AddToView ( vtkView *  view)
virtual

§ RemoveFromView()

virtual bool vtkPVDataRepresentation::RemoveFromView ( vtkView *  view)
virtual

§ GetInternalOutputPort() [1/3]

virtual vtkAlgorithmOutput* vtkPVDataRepresentation::GetInternalOutputPort ( )
inlinevirtual

Retrieves an output port for the input data object at the specified port and connection index.

This may be connected to the representation's internal pipeline. Overridden to use vtkPVTrivialProducer instead of vtkTrivialProducer

Definition at line 175 of file vtkPVDataRepresentation.h.

§ GetInternalOutputPort() [2/3]

virtual vtkAlgorithmOutput* vtkPVDataRepresentation::GetInternalOutputPort ( int  port)
inlinevirtual

Definition at line 176 of file vtkPVDataRepresentation.h.

§ GetInternalOutputPort() [3/3]

virtual vtkAlgorithmOutput* vtkPVDataRepresentation::GetInternalOutputPort ( int  port,
int  conn 
)
virtual

§ GetView()

vtkView* vtkPVDataRepresentation::GetView ( ) const

Provides access to the view.

§ IsCached()

virtual bool vtkPVDataRepresentation::IsCached ( double  cache_key)
inlineprotectedvirtual

§ CreateDefaultExecutive()

virtual vtkExecutive* vtkPVDataRepresentation::CreateDefaultExecutive ( )
protectedvirtual

Create a default executive.

§ RequestData()

virtual int vtkPVDataRepresentation::RequestData ( vtkInformation *  ,
vtkInformationVector **  ,
vtkInformationVector *   
)
protectedvirtual

§ RequestUpdateExtent()

virtual int vtkPVDataRepresentation::RequestUpdateExtent ( vtkInformation *  request,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector 
)
protectedvirtual

§ RequestUpdateTime()

virtual int vtkPVDataRepresentation::RequestUpdateTime ( vtkInformation *  ,
vtkInformationVector **  ,
vtkInformationVector *   
)
protectedvirtual

Member Data Documentation

§ UpdateTime

double vtkPVDataRepresentation::UpdateTime
protected

Definition at line 216 of file vtkPVDataRepresentation.h.

§ UpdateTimeValid

bool vtkPVDataRepresentation::UpdateTimeValid
protected

Definition at line 217 of file vtkPVDataRepresentation.h.

§ UniqueIdentifier

unsigned int vtkPVDataRepresentation::UniqueIdentifier
protected

Definition at line 218 of file vtkPVDataRepresentation.h.


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