ParaView
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
pqPipelineRepresentation Class Reference

This is PQ representation for a single display. More...

#include <pqPipelineRepresentation.h>

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

List of all members.

Public Slots

void resetLookupTableScalarRange ()
void resetLookupTableScalarRangeOverTime ()
void updateLookupTableScalarRange ()
 If color lookuptable is set up and coloring is enabled, the this ensure that the lookuptable scalar range is greater than than the color array's scalar range.

Signals

void colorChanged ()
 This is fire when any property that affects the color mode for the display changes.

Public Member Functions

 pqPipelineRepresentation (const QString &group, const QString &name, vtkSMProxy *repr, pqServer *server, QObject *parent=NULL)
virtual ~pqPipelineRepresentation ()
vtkSMRepresentationProxygetRepresentationProxy () const
virtual void setDefaultPropertyValues ()
 Sets default values for the underlying proxy.
void colorByArray (const char *arrayname, int fieldtype)
QList< QString > getColorFields ()
 Get the names of the arrays that a part may be colored by.
QPair< double, doublegetColorFieldRange (const QString &array, int component)
 get the data range for a particular component.
QPair< double, doublegetColorFieldRange ()
 Returns the range for the currently selected color field i.e.
bool isPartial (const QString &array, int fieldType) const
 Returns if the array (non-qualified array name) is a partial array in the indicated fieldType.
void setColorField (const QString &field)
 set the array to color the part by
QString getColorField (bool raw=false)
 get the array the part is colored by if raw is true, it will not add (point) or (cell) but simply return the array name
int getColorFieldNumberOfComponents (const QString &field)
 Returns the number of components for the given field.
QString getColorFieldComponentName (const QString &array, const int &component)
 Returns the name of a component for the given field.
virtual vtkSMProxygetScalarOpacityFunctionProxy ()
 Returns the proxy for the piecewise function used to map scalars to opacity.
virtual pqScalarOpacityFunctiongetScalarOpacityFunction ()
 Returns the pqScalarOpacityFunction object for the piecewise function used to map scalars to opacity.
void setRepresentation (const QString &repr)
 Set representation on the proxy.
QString getRepresentationType () const
 Returns the type of representation currently used.
double getOpacity () const
 Returns the opacity.
void setColor (double R, double G, double B)

Static Public Member Functions

static const char * solidColor ()
 The field name used to indicate solid color.
static void setUnstructuredGridOutlineThreshold (double millioncells)
 Get/Set the application wide setting for unstructured grid outline threshold.
static double getUnstructuredGridOutlineThreshold ()

Protected Slots

void onRepresentationChanged ()
 Called when the "Representation" property changes.
void updateScalarBarVisibility (bool visible)
 called when this representations visibility changes.
void onDataUpdated ()
 Called when the data is updated.
void onInputAccepted ()
 This slot gets called when the input to the representation is "accepted".
virtual int getNumberOfComponents (const char *arrayname, int fieldType)
virtual QString getComponentName (const char *arrayname, int fieldtype, int component)

Protected Member Functions

void createHelperProxies ()
 Creates helper proxies such as as the proxy for volume opacity function.
virtual void onInputChanged ()
 Overridden to capture the input's modified signal.
vtkSMProxycreateOpacityFunctionProxy (vtkSMRepresentationProxy *repr)
 Creates a default proxy for volume opacity function.

Protected Attributes

bool UpdateLUTRangesOnDataUpdate

Detailed Description

This is PQ representation for a single display.

A pqRepresentation represents a single vtkSMRepresentationProxy. The display can be added to only one render module or more (ofcouse on the same server, this class doesn't worry about that.

Definition at line 56 of file pqPipelineRepresentation.h.


Constructor & Destructor Documentation

pqPipelineRepresentation::pqPipelineRepresentation ( const QString &  group,
const QString &  name,
vtkSMProxy repr,
pqServer server,
QObject *  parent = NULL 
)
virtual pqPipelineRepresentation::~pqPipelineRepresentation ( ) [virtual]

Member Function Documentation

static const char* pqPipelineRepresentation::solidColor ( ) [inline, static]

The field name used to indicate solid color.

Definition at line 75 of file pqPipelineRepresentation.h.

vtkSMRepresentationProxy* pqPipelineRepresentation::getRepresentationProxy ( ) const
virtual void pqPipelineRepresentation::setDefaultPropertyValues ( ) [virtual]

Sets default values for the underlying proxy.

This is during the initialization stage of the pqProxy for proxies created by the GUI itself i.e. for proxies loaded through state or created by python client this method won't be called. The default implementation iterates over all properties of the proxy and sets them to default values.

Reimplemented from pqDataRepresentation.

void pqPipelineRepresentation::colorByArray ( const char *  arrayname,
int  fieldtype 
)
QList<QString> pqPipelineRepresentation::getColorFields ( )

Get the names of the arrays that a part may be colored by.

This information may change based on the current reprentation of the display, eg. when showing Outline, only "Solid Color" is available; when rendering as Volume, can be colored only by point data.

QPair<double, double> pqPipelineRepresentation::getColorFieldRange ( const QString &  array,
int  component 
)

get the data range for a particular component.

if component == -1, range for the vector magnitude is returned.

QPair<double, double> pqPipelineRepresentation::getColorFieldRange ( )

Returns the range for the currently selected color field i.e.

the range for the array component (or magnitude) of the array by which this display is being colored, if at all.

bool pqPipelineRepresentation::isPartial ( const QString &  array,
int  fieldType 
) const

Returns if the array (non-qualified array name) is a partial array in the indicated fieldType.

fieldType=vtkSMDataRepresentationProxy::POINT_DATA|CELL_DATA etc.

void pqPipelineRepresentation::setColorField ( const QString &  field)

set the array to color the part by

QString pqPipelineRepresentation::getColorField ( bool  raw = false)

get the array the part is colored by if raw is true, it will not add (point) or (cell) but simply return the array name

int pqPipelineRepresentation::getColorFieldNumberOfComponents ( const QString &  field)

Returns the number of components for the given field.

field is a string of format "<arrayname> (cell|point)".

QString pqPipelineRepresentation::getColorFieldComponentName ( const QString &  array,
const int component 
)

Returns the name of a component for the given field.

field is a string of format "<arrayname> (cell|point)".

virtual vtkSMProxy* pqPipelineRepresentation::getScalarOpacityFunctionProxy ( ) [virtual]

Returns the proxy for the piecewise function used to map scalars to opacity.

Reimplemented from pqDataRepresentation.

virtual pqScalarOpacityFunction* pqPipelineRepresentation::getScalarOpacityFunction ( ) [virtual]

Returns the pqScalarOpacityFunction object for the piecewise function used to map scalars to opacity.

Reimplemented from pqDataRepresentation.

void pqPipelineRepresentation::setRepresentation ( const QString &  repr)

Set representation on the proxy.

If representation is changed to volume, this method ensures that the scalar array is initialized.

QString pqPipelineRepresentation::getRepresentationType ( ) const

Returns the type of representation currently used.

Representation type is a string as defined by the string-list for the domain for the property 'Representation' e.g. Surface, Volume etc.

double pqPipelineRepresentation::getOpacity ( ) const

Returns the opacity.

void pqPipelineRepresentation::setColor ( double  R,
double  G,
double  B 
)
static void pqPipelineRepresentation::setUnstructuredGridOutlineThreshold ( double  millioncells) [static]

Get/Set the application wide setting for unstructured grid outline threshold.

If the unstructured grid number of cells exceeds this limit, it will be rendered as outline by default. The value is in million cells.

static double pqPipelineRepresentation::getUnstructuredGridOutlineThreshold ( ) [static]
void pqPipelineRepresentation::colorChanged ( ) [signal]

This is fire when any property that affects the color mode for the display changes.

void pqPipelineRepresentation::resetLookupTableScalarRange ( ) [slot]
void pqPipelineRepresentation::resetLookupTableScalarRangeOverTime ( ) [slot]
void pqPipelineRepresentation::updateLookupTableScalarRange ( ) [slot]

If color lookuptable is set up and coloring is enabled, the this ensure that the lookuptable scalar range is greater than than the color array's scalar range.

It also updates the scalar range on the scalar-opacity function, if any. Both the ColorLUT and the ScalarOpacityFunction may choose to ignore the set scalar range based on value ScalePointsWithRange.

void pqPipelineRepresentation::onRepresentationChanged ( ) [protected, slot]

Called when the "Representation" property changes.

If representation changes to "Volume", we have to ensure that the color field is initialized to something other than "Solid Color" otherwise the volume mapper segfaults.

void pqPipelineRepresentation::updateScalarBarVisibility ( bool  visible) [protected, slot]

called when this representations visibility changes.

We check if the LUT used to color this repr is being used by any other repr. If not, we turn off the scalar bar.

void pqPipelineRepresentation::onDataUpdated ( ) [protected, slot]

Called when the data is updated.

We call updateLookupTableScalarRange() to ensure that the lookuptable has correct ranges.

void pqPipelineRepresentation::onInputAccepted ( ) [protected, slot]

This slot gets called when the input to the representation is "accepted".

We mark this representation's LUT ranges dirty so that when the pipeline finally updates, we can reset the LUT ranges.

virtual int pqPipelineRepresentation::getNumberOfComponents ( const char *  arrayname,
int  fieldType 
) [protected, virtual, slot]

Reimplemented from pqDataRepresentation.

virtual QString pqPipelineRepresentation::getComponentName ( const char *  arrayname,
int  fieldtype,
int  component 
) [protected, virtual, slot]

Reimplemented from pqDataRepresentation.

void pqPipelineRepresentation::createHelperProxies ( ) [protected]

Creates helper proxies such as as the proxy for volume opacity function.

virtual void pqPipelineRepresentation::onInputChanged ( ) [protected, virtual]

Overridden to capture the input's modified signal.

Reimplemented from pqDataRepresentation.

vtkSMProxy* pqPipelineRepresentation::createOpacityFunctionProxy ( vtkSMRepresentationProxy repr) [protected]

Creates a default proxy for volume opacity function.


Member Data Documentation

Definition at line 221 of file pqPipelineRepresentation.h.


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