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

vtkChartRepresentation is the base representation for charting representations. More...

#include <vtkChartRepresentation.h>

Inheritance diagram for vtkChartRepresentation:
Inheritance graph
[legend]
Collaboration diagram for vtkChartRepresentation:
Collaboration graph
[legend]

Public Types

typedef vtkPVDataRepresentation Superclass
 
- Public Types inherited from vtkPVDataRepresentation
typedef vtkDataRepresentation Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void SetSelectionRepresentation (vtkChartSelectionRepresentation *)
 These must only be set during initialization before adding the representation to any views or calling Update(). More...
 
virtual void SetVisibility (bool visible)
 Set visibility of the representation. More...
 
virtual void MarkModified ()
 This needs to be called on all instances of vtkGeometryRepresentation when the input is modified. More...
 
void SetCompositeDataSetIndex (unsigned int)
 
void AddCompositeDataSetIndex (unsigned int)
 
void ResetCompositeDataSetIndices ()
 
virtual unsigned int Initialize (unsigned int minIdAvailable, unsigned int maxIdAvailable)
 Override because of internal selection representations that need to be initialized as well. More...
 
virtual int ProcessViewRequest (vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
 vtkAlgorithm::ProcessRequest() equivalent for rendering passes. More...
 
virtual vtkStdString GetDefaultSeriesLabel (const vtkStdString &tableName, const vtkStdString &columnName)
 Method to provide the default name given the name of a table and a column in that table. More...
 
virtual bool MapSelectionToInput (vtkSelection *sel)
 This method is called on the client-side by the vtkPVContextView whenever a new selection is made on all the visible representations in that view. More...
 
virtual bool MapSelectionToView (vtkSelection *sel)
 This is the inverse of MapSelectionToInput(). More...
 
virtual bool Export (vtkCSVExporter *vtkNotUsed(exporter))
 Called by vtkPVContextView::Export() to export the representation's data to a CSV file. More...
 
void SetFieldAssociation (int)
 Set the field association for arrays to use. More...
 
virtual int GetFieldAssociation ()
 Set the field association for arrays to use. More...
 
virtual void SetFlattenTable (int)
 Flatten the table, i.e. More...
 
virtual int GetFlattenTable ()
 Flatten the table, i.e. More...
 
- Public Member Functions inherited from vtkPVDataRepresentation
void PrintSelf (ostream &os, vtkIndent indent)
 
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 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...
 

Static Public Member Functions

static vtkChartRepresentationNew ()
 
static int IsTypeOf (const char *type)
 
static vtkChartRepresentationSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkPVDataRepresentation
static int IsTypeOf (const char *type)
 
static vtkPVDataRepresentationSafeDownCast (vtkObject *o)
 

Protected Types

typedef std::map< std::string, vtkSmartPointer< vtkTable > > MapOfTables
 

Protected Member Functions

 vtkChartRepresentation ()
 
 ~vtkChartRepresentation ()
 
virtual int FillInputPortInformation (int port, vtkInformation *info)
 Fill input port information. More...
 
virtual void PrepareForRendering ()
 This method is called before actual render if this->MTime was modified since the last time this method was called. More...
 
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 Subclasses should override this to connect inputs to the internal pipeline as necessary. More...
 
virtual bool AddToView (vtkView *view)
 Adds the representation to the view. More...
 
virtual bool RemoveFromView (vtkView *view)
 Removes the representation to the view. More...
 
virtual bool IsCached (double cache_key)
 Overridden to check with the vtkPVCacheKeeper to see if the key is cached. More...
 
vtkTable * GetLocalOutput ()
 Convenience method to get the first vtkTable from LocalOutput, if any. More...
 
virtual vtkDataObject * TransformInputData (vtkInformationVector **inputVector, vtkDataObject *data)
 Method to be overrided to transform input data to a vtkTable. More...
 
bool GetLocalOutput (MapOfTables &tables)
 Convenience method to get all vtkTable instances with their associated names. More...
 
- Protected Member Functions inherited from vtkPVDataRepresentation
 vtkPVDataRepresentation ()
 
 ~vtkPVDataRepresentation ()
 
virtual vtkExecutive * CreateDefaultExecutive ()
 Create a default executive. More...
 
virtual int RequestUpdateExtent (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
 
virtual int RequestUpdateTime (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 

Protected Attributes

int FieldAssociation
 
vtkPVCacheKeeperCacheKeeper
 
vtkWeakPointer< vtkPVContextViewContextView
 
bool EnableServerSideRendering
 
int FlattenTable
 
vtkSmartPointer< vtkMultiBlockDataSet > LocalOutput
 
std::set< unsigned int > CompositeIndices
 
vtkWeakPointer< vtkChartSelectionRepresentationSelectionRepresentation
 
- Protected Attributes inherited from vtkPVDataRepresentation
double UpdateTime
 
bool UpdateTimeValid
 
unsigned int UniqueIdentifier
 

Detailed Description

vtkChartRepresentation is the base representation for charting representations.

Currently, ParaView's charting views are client-side only views that render only on the client side. That being the case, when running in client-server mode or in parallel, the data-delivery mode is fixed. Hence, unlike representations for 3D views, this representation delivers the data in RequestData() itself. This makes it possible for client code to call UpdatePipeline() on the representation proxy and then access the delivered vtkTable on the client.

Definition at line 47 of file vtkChartRepresentation.h.

Member Typedef Documentation

§ Superclass

Definition at line 51 of file vtkChartRepresentation.h.

§ MapOfTables

typedef std::map<std::string, vtkSmartPointer<vtkTable> > vtkChartRepresentation::MapOfTables
protected

Definition at line 223 of file vtkChartRepresentation.h.

Constructor & Destructor Documentation

§ vtkChartRepresentation()

vtkChartRepresentation::vtkChartRepresentation ( )
protected

§ ~vtkChartRepresentation()

vtkChartRepresentation::~vtkChartRepresentation ( )
protected

Member Function Documentation

§ New()

static vtkChartRepresentation* vtkChartRepresentation::New ( )
static

§ GetClassName()

virtual const char* vtkChartRepresentation::GetClassName ( )
virtual

§ IsTypeOf()

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

§ IsA()

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

§ SafeDownCast()

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

§ PrintSelf()

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

§ SetSelectionRepresentation()

void vtkChartRepresentation::SetSelectionRepresentation ( vtkChartSelectionRepresentation )

These must only be set during initialization before adding the representation to any views or calling Update().

§ SetVisibility()

virtual void vtkChartRepresentation::SetVisibility ( bool  visible)
virtual

§ MarkModified()

virtual void vtkChartRepresentation::MarkModified ( )
virtual

This needs to be called on all instances of vtkGeometryRepresentation when the input is modified.

This is essential since the geometry filter does not have any real-input on the client side which messes with the Update requests.

Reimplemented from vtkPVDataRepresentation.

§ SetFieldAssociation()

void vtkChartRepresentation::SetFieldAssociation ( int  )

Set the field association for arrays to use.

When changed, this will call MarkModified().

§ GetFieldAssociation()

virtual int vtkChartRepresentation::GetFieldAssociation ( )
virtual

Set the field association for arrays to use.

When changed, this will call MarkModified().

§ SetCompositeDataSetIndex()

void vtkChartRepresentation::SetCompositeDataSetIndex ( unsigned  int)

§ AddCompositeDataSetIndex()

void vtkChartRepresentation::AddCompositeDataSetIndex ( unsigned  int)

§ ResetCompositeDataSetIndices()

void vtkChartRepresentation::ResetCompositeDataSetIndices ( )

§ Initialize()

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

Override because of internal selection representations that need to be initialized as well.

Reimplemented from vtkPVDataRepresentation.

§ ProcessViewRequest()

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

vtkAlgorithm::ProcessRequest() equivalent for rendering passes.

This is typically called by the vtkView to request meta-data from the representations or ask them to perform certain tasks e.g. PrepareForRendering. Overridden to handle REQUEST_RENDER() to call PrepareForRendering.

Reimplemented from vtkPVDataRepresentation.

§ GetDefaultSeriesLabel()

virtual vtkStdString vtkChartRepresentation::GetDefaultSeriesLabel ( const vtkStdString &  tableName,
const vtkStdString &  columnName 
)
virtual

Method to provide the default name given the name of a table and a column in that table.

When overriding this method, ensure that the implementation does not depend on the instance being initialized or have valid data. This method is called on the client-side when filling up the domains for the properties.

Reimplemented in vtkQuartileChartRepresentation.

§ SetFlattenTable()

virtual void vtkChartRepresentation::SetFlattenTable ( int  )
virtual

Flatten the table, i.e.

split any multicomponent columns into separate components.

§ GetFlattenTable()

virtual int vtkChartRepresentation::GetFlattenTable ( )
virtual

Flatten the table, i.e.

split any multicomponent columns into separate components.

§ MapSelectionToInput()

virtual bool vtkChartRepresentation::MapSelectionToInput ( vtkSelection *  sel)
virtual

This method is called on the client-side by the vtkPVContextView whenever a new selection is made on all the visible representations in that view.

The goal of this method is allow the representations to transform the selection created in the view (which is an id-based selection based on the vtkTable that is fed into the vtkChart) to an appropriate selection based on the data going into the representation. Return false if the selection is not applicable to this representation or the conversion cannot be made. Default implementation simply ensures that the FieldType on the selection nodes is set to match up with the FieldAssociation on the representation.

Reimplemented in vtkPVHistogramChartRepresentation.

§ MapSelectionToView()

virtual bool vtkChartRepresentation::MapSelectionToView ( vtkSelection *  sel)
virtual

This is the inverse of MapSelectionToInput().

In this case, we are converting the selection defined on the input for the representation to a selection that corresponds to elements being rendered in the view. The default implementation checks removes vtkSelectionNode items in sel that don't have the FieldType that matches this->FieldAssociation. Similar to MapSelectionToInput(), this method is expected to transform the sel in place and return false is the selection is not applicable to this representation or the conversion cannot be made.

Reimplemented in vtkPVHistogramChartRepresentation.

§ Export()

virtual bool vtkChartRepresentation::Export ( vtkCSVExporter vtkNotUsedexporter)
inlinevirtual

Called by vtkPVContextView::Export() to export the representation's data to a CSV file.

Return false on failure which will call the exporting process to abort and raise an error. Default implementation simply returns false.

Definition at line 157 of file vtkChartRepresentation.h.

§ FillInputPortInformation()

virtual int vtkChartRepresentation::FillInputPortInformation ( int  port,
vtkInformation *  info 
)
protectedvirtual

Fill input port information.

§ PrepareForRendering()

virtual void vtkChartRepresentation::PrepareForRendering ( )
inlineprotectedvirtual

This method is called before actual render if this->MTime was modified since the last time this method was called.

Subclasses should override to update "appearance" related changes that don't affect data. When this method is called, you're assured that this->ContextView is valid. Note that this method will not be called if this->GetVisibility() returns false, this subclasses should also override SetVisibility() to hide "actors" and such.

Reimplemented in vtkPVBagChartRepresentation, vtkXYChartRepresentation, vtkPVHistogramChartRepresentation, vtkPVPlotMatrixRepresentation, vtkPVParallelCoordinatesRepresentation, and vtkPVBoxChartRepresentation.

Definition at line 178 of file vtkChartRepresentation.h.

§ RequestData()

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

Subclasses should override this to connect inputs to the internal pipeline as necessary.

Since most representations are "meta-filters" (i.e. filters containing other filters), you should create shallow copies of your input before connecting to the internal pipeline. The convenience method GetInternalOutputPort will create a cached shallow copy of a specified input for you. The related helper functions GetInternalAnnotationOutputPort, GetInternalSelectionOutputPort should be used to obtain a selection or annotation port whose selections are localized for a particular input data object.

Reimplemented from vtkPVDataRepresentation.

Reimplemented in vtkPVBagChartRepresentation, and vtkXYChartRepresentation.

§ AddToView()

virtual bool vtkChartRepresentation::AddToView ( vtkView *  view)
protectedvirtual

Adds the representation to the view.

This is called from vtkView::AddRepresentation(). Subclasses should override this method. Returns true if the addition succeeds.

Reimplemented from vtkPVDataRepresentation.

Reimplemented in vtkPVBagChartRepresentation, vtkPVPlotMatrixRepresentation, vtkPVParallelCoordinatesRepresentation, and vtkPVBoxChartRepresentation.

§ RemoveFromView()

virtual bool vtkChartRepresentation::RemoveFromView ( vtkView *  view)
protectedvirtual

Removes the representation to the view.

This is called from vtkView::RemoveRepresentation(). Subclasses should override this method. Returns true if the removal succeeds.

Reimplemented from vtkPVDataRepresentation.

Reimplemented in vtkPVBagChartRepresentation, vtkXYChartRepresentation, vtkPVPlotMatrixRepresentation, vtkPVParallelCoordinatesRepresentation, and vtkPVBoxChartRepresentation.

§ IsCached()

virtual bool vtkChartRepresentation::IsCached ( double  cache_key)
protectedvirtual

Overridden to check with the vtkPVCacheKeeper to see if the key is cached.

Reimplemented from vtkPVDataRepresentation.

§ GetLocalOutput() [1/2]

vtkTable* vtkChartRepresentation::GetLocalOutput ( )
protected

Convenience method to get the first vtkTable from LocalOutput, if any.

§ TransformInputData()

virtual vtkDataObject* vtkChartRepresentation::TransformInputData ( vtkInformationVector **  inputVector,
vtkDataObject *  data 
)
protectedvirtual

Method to be overrided to transform input data to a vtkTable.

The default implementation just returns the data object provided in parameter.

Reimplemented in vtkPVHistogramChartRepresentation.

§ GetLocalOutput() [2/2]

bool vtkChartRepresentation::GetLocalOutput ( MapOfTables tables)
protected

Convenience method to get all vtkTable instances with their associated names.

Member Data Documentation

§ FieldAssociation

int vtkChartRepresentation::FieldAssociation
protected

Definition at line 230 of file vtkChartRepresentation.h.

§ CacheKeeper

vtkPVCacheKeeper* vtkChartRepresentation::CacheKeeper
protected

Definition at line 231 of file vtkChartRepresentation.h.

§ ContextView

vtkWeakPointer<vtkPVContextView> vtkChartRepresentation::ContextView
protected

Definition at line 232 of file vtkChartRepresentation.h.

§ EnableServerSideRendering

bool vtkChartRepresentation::EnableServerSideRendering
protected

Definition at line 233 of file vtkChartRepresentation.h.

§ FlattenTable

int vtkChartRepresentation::FlattenTable
protected

Definition at line 234 of file vtkChartRepresentation.h.

§ LocalOutput

vtkSmartPointer<vtkMultiBlockDataSet> vtkChartRepresentation::LocalOutput
protected

Definition at line 236 of file vtkChartRepresentation.h.

§ CompositeIndices

std::set<unsigned int> vtkChartRepresentation::CompositeIndices
protected

Definition at line 237 of file vtkChartRepresentation.h.

§ SelectionRepresentation

vtkWeakPointer<vtkChartSelectionRepresentation> vtkChartRepresentation::SelectionRepresentation
protected

Definition at line 239 of file vtkChartRepresentation.h.


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