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

vtkPythonView is a view for displaying data via a Python script that uses matplotlib to generate a plot. More...

#include <vtkPythonView.h>

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

Public Types

typedef vtkPVView Superclass
 
- Public Types inherited from vtkPVView
enum  { ViewTimeChangedEvent = 9000 }
 
typedef vtkView Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void Update ()
 Overrides the base class method to request an addition pass that moves data from the server to the client. More...
 
virtual vtkRenderer * GetRenderer ()
 Gets the renderer for this view. More...
 
virtual void SetRenderer (vtkRenderer *ren)
 
virtual vtkRenderWindow * GetRenderWindow ()
 Get a handle to the render window. More...
 
virtual void SetRenderWindow (vtkRenderWindow *win)
 Set the render window for this view. More...
 
int GetNumberOfVisibleDataObjects ()
 Gets the number of visible data objects in the view. More...
 
vtkPythonRepresentationGetVisibleRepresentation (int visibleObjectIndex)
 Get the representation for the visible data object at the given index. More...
 
vtkDataObject * GetVisibleDataObjectForSetup (int visibleObjectIndex)
 Get a local copy of the visible data object at an index. More...
 
vtkDataObject * GetVisibleDataObjectForRendering (int visibleObjectIndex)
 Get the client's copy of the visible data object at an index. More...
 
int GetNumberOfAttributeArrays (int visibleObjectIndex, int attributeType)
 Get number of arrays in an attribute (e.g., vtkDataObject::POINT, vtkDataObject::CELL, vtkDataObject::ROW, vtkDataObject::FIELD_DATA) for the visible object at the given index. More...
 
const char * GetAttributeArrayName (int visibleObjectIndex, int attributeType, int arrayIndex)
 From the visible object at the given index, get the name of attribute array at index for the given attribute type. More...
 
void SetAttributeArrayStatus (int visibleObjectIndex, int attributeType, const char *name, int status)
 Set the array status for the visible object at the given index. More...
 
int GetAttributeArrayStatus (int visibleObjectIndex, int attributeType, const char *name)
 Get the status indicating whether the array with the given name and attribute type in the visible object will be copied to the client. More...
 
void EnableAllAttributeArrays ()
 Enable all attribute arrays. More...
 
void DisableAllAttributeArrays ()
 Disable all attribute arrays. More...
 
virtual void StillRender ()
 Triggers a high-resolution render. More...
 
virtual void InteractiveRender ()
 Triggers a interactive render. More...
 
virtual void SetScript (const char *)
 Get/Set the Python script. More...
 
virtual char * GetScript ()
 Get/Set the Python script. More...
 
virtual void SetMagnification (int)
 Magnification is needed to inform Python of the requested size of the plot. More...
 
virtual int GetMagnification ()
 Magnification is needed to inform Python of the requested size of the plot. More...
 
virtual void SetImageData (vtkImageData *)
 Set the vtkImageData that will be displayed. More...
 
- Public Member Functions inherited from vtkPVView
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void Initialize (unsigned int id)
 Initialize the view with an identifier. More...
 
bool InTileDisplayMode ()
 Returns true if the application is currently in tile display mode. More...
 
bool InCaveDisplayMode ()
 Returns true if the application is currently in cave/immersive display mode. More...
 
bool GetLocalProcessSupportsInteraction ()
 Returns true if the local process can support interaction. More...
 
virtual unsigned int GetIdentifier ()
 
virtual void SetPosition (int, int)
 Set the position on this view in the multiview configuration. More...
 
virtual int * GetPosition ()
 Set the position on this view in the multiview configuration. More...
 
virtual void GetPosition (int &, int &)
 Set the position on this view in the multiview configuration. More...
 
virtual void GetPosition (int [2])
 Set the position on this view in the multiview configuration. More...
 
virtual void SetSize (int, int)
 Set the size of this view in the multiview configuration. More...
 
virtual int * GetSize ()
 Set the size of this view in the multiview configuration. More...
 
virtual void GetSize (int &, int &)
 Set the size of this view in the multiview configuration. More...
 
virtual void GetSize (int [2])
 Set the size of this view in the multiview configuration. More...
 
bool SynchronizeBounds (double bounds[6])
 This encapsulates a whole lot of logic for communication between processes. More...
 
bool SynchronizeSize (double &size)
 This encapsulates a whole lot of logic for communication between processes. More...
 
bool SynchronizeSize (unsigned int &size)
 This encapsulates a whole lot of logic for communication between processes. More...
 
virtual void SetViewTime (double value)
 Get/Set the time this view is showing. More...
 
virtual double GetViewTime ()
 Get/Set the time this view is showing. More...
 
virtual void SetCacheKey (double)
 Get/Set the cache key. More...
 
virtual double GetCacheKey ()
 Get/Set the cache key. More...
 
virtual void SetUseCache (bool)
 Get/Set whether caching is enabled. More...
 
virtual bool GetUseCache ()
 Get/Set whether caching is enabled. More...
 
virtual void PrepareForScreenshot ()
 These methods are used to setup the view for capturing screen shots. More...
 
virtual void CleanupAfterScreenshot ()
 These methods are used to setup the view for capturing screen shots. More...
 

Static Public Member Functions

static vtkPythonViewNew ()
 
static int IsTypeOf (const char *type)
 
static vtkPythonViewSafeDownCast (vtkObject *o)
 
static vtkInformationRequestKey * REQUEST_DELIVER_DATA_TO_CLIENT ()
 This is a pass for delivering data from the server nodes to the client. More...
 
- Static Public Member Functions inherited from vtkPVView
static int IsTypeOf (const char *type)
 
static vtkPVViewSafeDownCast (vtkObject *o)
 
static void SetEnableStreaming (bool)
 
static bool GetEnableStreaming ()
 
static vtkInformationObjectBaseKey * VIEW ()
 Key used to pass the vtkPVView pointer to the representation during any of the view passes such as REQUEST_UPDATE(), REQUEST_UPDATE_LOD(), REQUEST_RENDER(), etc. More...
 
static vtkInformationRequestKey * REQUEST_UPDATE ()
 This is a Update-Data pass. More...
 
static vtkInformationRequestKey * REQUEST_UPDATE_LOD ()
 This is a Update-LOD-Data pass. More...
 
static vtkInformationRequestKey * REQUEST_RENDER ()
 This is a render pass. More...
 

Protected Member Functions

 vtkPythonView ()
 
virtual ~vtkPythonView ()
 
bool IsLocalDataAvailable ()
 Is local data available? More...
 
- Protected Member Functions inherited from vtkPVView
 vtkPVView ()
 
 ~vtkPVView ()
 
virtual void AddRepresentationInternal (vtkDataRepresentation *rep)
 Overridden to check that the representation has View setup properly. More...
 
void CallProcessViewRequest (vtkInformationRequestKey *passType, vtkInformation *request, vtkInformationVector *reply)
 Subclasses can use this method to trigger a pass on all representations. More...
 

Protected Attributes

vtkSmartPointer< vtkTexture > RenderTexture
 
vtkSmartPointer< vtkRenderer > Renderer
 
vtkSmartPointer< vtkRenderWindow > RenderWindow
 
int Magnification
 
- Protected Attributes inherited from vtkPVView
vtkPVSynchronizedRenderWindowsSynchronizedWindows
 
unsigned int Identifier
 Every view gets a unique identifier that it uses to register itself with the SynchronizedWindows. More...
 
double CacheKey
 
bool UseCache
 
int Size [2]
 
int Position [2]
 
vtkInformation * RequestInformation
 These are passed as arguments to vtkDataRepresentation::ProcessViewRequest(). More...
 
vtkInformationVector * ReplyInformationVector
 These are passed as arguments to vtkDataRepresentation::ProcessViewRequest(). More...
 
double ViewTime
 Subclasses can use this method to trigger a pass on all representations. More...
 

Detailed Description

vtkPythonView is a view for displaying data via a Python script that uses matplotlib to generate a plot.

Definition at line 41 of file vtkPythonView.h.

Member Typedef Documentation

◆ Superclass

Definition at line 45 of file vtkPythonView.h.

Constructor & Destructor Documentation

◆ vtkPythonView()

vtkPythonView::vtkPythonView ( )
protected

◆ ~vtkPythonView()

virtual vtkPythonView::~vtkPythonView ( )
protectedvirtual

Member Function Documentation

◆ New()

static vtkPythonView* vtkPythonView::New ( )
static

◆ GetClassName()

virtual const char* vtkPythonView::GetClassName ( )
virtual

Reimplemented from vtkPVView.

◆ IsTypeOf()

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

◆ IsA()

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

Reimplemented from vtkPVView.

◆ SafeDownCast()

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

◆ PrintSelf()

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

◆ REQUEST_DELIVER_DATA_TO_CLIENT()

static vtkInformationRequestKey* vtkPythonView::REQUEST_DELIVER_DATA_TO_CLIENT ( )
static

This is a pass for delivering data from the server nodes to the client.

◆ Update()

virtual void vtkPythonView::Update ( )
virtual

Overrides the base class method to request an addition pass that moves data from the server to the client.

Reimplemented from vtkPVView.

◆ GetRenderer()

virtual vtkRenderer* vtkPythonView::GetRenderer ( )
virtual

Gets the renderer for this view.

◆ SetRenderer()

virtual void vtkPythonView::SetRenderer ( vtkRenderer *  ren)
virtual

◆ GetRenderWindow()

virtual vtkRenderWindow* vtkPythonView::GetRenderWindow ( )
virtual

Get a handle to the render window.

◆ SetRenderWindow()

virtual void vtkPythonView::SetRenderWindow ( vtkRenderWindow *  win)
virtual

Set the render window for this view.

Note that this requires special handling in order to do correctly - see the notes in the detailed description of vtkRenderViewBase.

◆ SetScript()

virtual void vtkPythonView::SetScript ( const char *  )
virtual

Get/Set the Python script.

◆ GetScript()

virtual char* vtkPythonView::GetScript ( )
virtual

Get/Set the Python script.

◆ SetMagnification()

virtual void vtkPythonView::SetMagnification ( int  )
virtual

Magnification is needed to inform Python of the requested size of the plot.

◆ GetMagnification()

virtual int vtkPythonView::GetMagnification ( )
virtual

Magnification is needed to inform Python of the requested size of the plot.

◆ GetNumberOfVisibleDataObjects()

int vtkPythonView::GetNumberOfVisibleDataObjects ( )

Gets the number of visible data objects in the view.

◆ GetVisibleRepresentation()

vtkPythonRepresentation* vtkPythonView::GetVisibleRepresentation ( int  visibleObjectIndex)

Get the representation for the visible data object at the given index.

◆ GetVisibleDataObjectForSetup()

vtkDataObject* vtkPythonView::GetVisibleDataObjectForSetup ( int  visibleObjectIndex)

Get a local copy of the visible data object at an index.

The index must be between 0 and this->GetNumberOfVisibleDataObjects(). If outside this range, returns NULL. This will return a shallow copy of the data object input to the representation.

WARNING: this method is intended to be called only from within the setup_data() function in the Python Script set for this instance.

◆ GetVisibleDataObjectForRendering()

vtkDataObject* vtkPythonView::GetVisibleDataObjectForRendering ( int  visibleObjectIndex)

Get the client's copy of the visible data object at an index.

The index must be between 0 and this->GetNumberOfVisibleDataObjects(). If outside this range, returns NULL.

WARNING: this method should be called only from within the render() function in the Python Script set for this instance.

◆ GetNumberOfAttributeArrays()

int vtkPythonView::GetNumberOfAttributeArrays ( int  visibleObjectIndex,
int  attributeType 
)

Get number of arrays in an attribute (e.g., vtkDataObject::POINT, vtkDataObject::CELL, vtkDataObject::ROW, vtkDataObject::FIELD_DATA) for the visible object at the given index.

◆ GetAttributeArrayName()

const char* vtkPythonView::GetAttributeArrayName ( int  visibleObjectIndex,
int  attributeType,
int  arrayIndex 
)

From the visible object at the given index, get the name of attribute array at index for the given attribute type.

◆ SetAttributeArrayStatus()

void vtkPythonView::SetAttributeArrayStatus ( int  visibleObjectIndex,
int  attributeType,
const char *  name,
int  status 
)

Set the array status for the visible object at the given index.

A status of 1 means that the array with the given name for the given attribute will be copied to the client. A status of 0 means the array will not be copied to the client. The status is 0 by default.

◆ GetAttributeArrayStatus()

int vtkPythonView::GetAttributeArrayStatus ( int  visibleObjectIndex,
int  attributeType,
const char *  name 
)

Get the status indicating whether the array with the given name and attribute type in the visible object will be copied to the client.

Status is 0 by default.

◆ EnableAllAttributeArrays()

void vtkPythonView::EnableAllAttributeArrays ( )

Enable all attribute arrays.

◆ DisableAllAttributeArrays()

void vtkPythonView::DisableAllAttributeArrays ( )

Disable all attribute arrays.

◆ StillRender()

virtual void vtkPythonView::StillRender ( )
virtual

Triggers a high-resolution render.

Implements vtkPVView.

◆ InteractiveRender()

virtual void vtkPythonView::InteractiveRender ( )
virtual

Triggers a interactive render.

Based on the settings on the view, this may result in a low-resolution rendering or a simplified geometry rendering.

Implements vtkPVView.

◆ SetImageData()

virtual void vtkPythonView::SetImageData ( vtkImageData *  )
virtual

Set the vtkImageData that will be displayed.

This is an internal method meant only to be called from the python side, but must be exposed to be wrapped.

◆ IsLocalDataAvailable()

bool vtkPythonView::IsLocalDataAvailable ( )
protected

Is local data available?

Member Data Documentation

◆ RenderTexture

vtkSmartPointer<vtkTexture> vtkPythonView::RenderTexture
protected

Definition at line 184 of file vtkPythonView.h.

◆ Renderer

vtkSmartPointer<vtkRenderer> vtkPythonView::Renderer
protected

Definition at line 185 of file vtkPythonView.h.

◆ RenderWindow

vtkSmartPointer<vtkRenderWindow> vtkPythonView::RenderWindow
protected

Definition at line 186 of file vtkPythonView.h.

◆ Magnification

int vtkPythonView::Magnification
protected

Definition at line 189 of file vtkPythonView.h.


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