pqColorOpacityEditorWidget provides an in-line editor widget for editing the color and opacity transfer functions. More...
#include <pqColorOpacityEditorWidget.h>
Public Slots | |
void | setXvmsPoints (const QList< QVariant > &) |
Sets the xvmsPoints that control the opacity transfer function. More... | |
void | setXrgbPoints (const QList< QVariant > &) |
Sets the xrgbPoints that control the color transfer function. More... | |
void | setUseLogScale (bool value) |
Set whether to use-log scale. More... | |
void | setUseLogScaleOpacity (bool value) |
Set whether to use-log scale. More... | |
void | setUseOpacityControlPointsFreehandDrawing (bool value) |
Set whether to use freehand drawing for positioning opacity control points. More... | |
void | setShowDataHistogram (bool value) |
Set whether to show data histogram. More... | |
void | setAutomaticDataHistogramComputation (bool value) |
Set whether to automatically compute data histogram. More... | |
void | setDataHistogramNumberOfBins (int value) |
Set the number of bins to use for the data histogram. More... | |
void | setScalarOpacityFunctionProxy (pqSMProxy sofProxy) |
Set the scalar opacity function (or PiecewiseFunction) proxy to use. More... | |
void | resetRangeToData () |
Reset the transfer function ranges to active data source. More... | |
void | resetRangeToCustom () |
Reset the transfer function ranges to custom values. More... | |
void | resetRangeToDataOverTime () |
Reset the transfer function ranges to temporal range for active data source. More... | |
void | resetRangeToVisibleData () |
Reset the transfer function ranges to visible range for active data source. More... | |
void | invertTransferFunctions () |
Inverts the transfer functions. More... | |
void | choosePreset (const char *presetName=NULL) |
pick a preset. More... | |
void | saveAsPreset () |
save current transfer function as preset. More... | |
void | onRangeHandlesRangeChanged (double rangeMin, double rangeMax) |
Public Slots inherited from pqPropertyWidget | |
virtual void | setView (pqView *) |
called to set the active view. More... | |
Signals | |
void | xrgbPointsChanged () |
Signal fired when the xrgbPoints change. More... | |
void | xvmsPointsChanged () |
Signal fired when the xvmsPoints change. More... | |
void | useLogScaleChanged () |
Signal fired when useLogScale changes. More... | |
void | useLogScaleOpacityChanged () |
Signal fired when useLogScaleOpacity changes. More... | |
void | useOpacityControlPointsFreehandDrawingChanged () |
Signal fired when useOpacityControlPointsFreehandDrawing changes. More... | |
void | showDataHistogramChanged () |
Signal fired when showDataHistogram changes. More... | |
void | automaticDataHistogramComputationChanged () |
Signal fired when automaticDataHistogramComputation changes. More... | |
void | dataHistogramNumberOfBinsEdited () |
Signal fired when dataHistogramNumberOfBins changes. More... | |
void | scalarOpacityFunctionProxyChanged () |
This signal is never really fired since this widget doesn't have any UI to allow users to changes the ScalarOpacityFunction proxy used. More... | |
Signals inherited from pqPropertyWidget | |
void | viewChanged (pqView *view) |
This signal is emitted when the current view changes. More... | |
void | changeAvailable () |
This signal is fired as soon as the user starts editing in the widget. More... | |
void | changeFinished () |
This signal is fired as soon as the user is done with making an atomic change. More... | |
void | restartRequired () |
Indicates that a restart of the program is required for the setting to take effect. More... | |
Public Member Functions | |
pqColorOpacityEditorWidget (vtkSMProxy *proxy, vtkSMPropertyGroup *smgroup, QWidget *parent=0) | |
~pqColorOpacityEditorWidget () override | |
QList< QVariant > | xrgbPoints () const |
Returns the current list of control points for the color transfer function. More... | |
QList< QVariant > | xvmsPoints () const |
Returns the current list of control points for the opacity function. More... | |
bool | useLogScale () const |
Returns the value for use-log-scale. More... | |
bool | useLogScaleOpacity () const |
Returns the value for use-log-scale. More... | |
bool | useOpacityControlPointsFreehandDrawing () const |
Returns the value for the use of freehand drawing when positioning opacity control points. More... | |
bool | showDataHistogram () const |
Returns the value for showDataHistogram. More... | |
bool | automaticDataHistogramComputation () const |
Returns the value for automaticDataHistogramComputation. More... | |
int | dataHistogramNumberOfBins () const |
Returns the value for dataHistogramNumberOfBins. More... | |
pqSMProxy | scalarOpacityFunctionProxy () const |
Returns the scalar opacity function (i.e. More... | |
Public Member Functions inherited from pqPropertyWidget | |
pqPropertyWidget (vtkSMProxy *proxy, QWidget *parent=0) | |
~pqPropertyWidget () override | |
virtual void | apply () |
virtual void | reset () |
virtual void | select () |
These methods are called by pqPropertiesPanel when the panel for proxy becomes active/deactive. More... | |
virtual void | deselect () |
bool | isSelected () const |
virtual void | updateWidget (bool showing_advanced_properties) |
pqView * | view () const |
vtkSMProxy * | proxy () const |
vtkSMProperty * | property () const |
virtual char * | panelVisibility () const |
Forward calls to vtkSMProperty. More... | |
virtual void | setPanelVisibility (const char *vis) |
virtual bool | isSingleRowItem () const |
Determines if the PropertyWidget must be constructed using a single row. More... | |
bool | showLabel () const |
const QList< QPointer< pqPropertyWidgetDecorator > > & | decorators () const |
Provides access to the decorators for this widget. More... | |
void | setProperty (vtkSMProperty *property) |
Protected Slots | |
void | opacityCurrentChanged (vtkIdType) |
slots called when the current point changes on the two internal pqTransferFunctionWidget widgets. More... | |
void | colorCurrentChanged (vtkIdType) |
void | updatePanel () |
updates the panel to show/hide advanced settings More... | |
void | updateCurrentData () |
updates the text shown in the "current data" input. More... | |
void | currentDataEdited () |
update the transfer function with the text in CurrentDataValue text field. More... | |
void | presetApplied () |
called when a preset is applied. More... | |
void | updateIndexedLookupState () |
Ensures that the color-swatches for indexedColors are shown only when this is set to true. More... | |
void | multiComponentsMappingChanged (vtkObject *, unsigned long, void *, void *) |
called when "MultiComponentsMappingChanged" checkbox is modified. More... | |
void | useLogScaleClicked (bool) |
called when the use-log-scale checkbox is clicked by the user. More... | |
void | useLogScaleOpacityClicked (bool) |
called when the use-log-scale checkbox is clicked by the user. More... | |
void | useOpacityControlPointsFreehandDrawingClicked (bool) |
Called when UseOpacityControlPointsFreehandDrawing checkbox is clicked by the user. More... | |
void | showDataHistogramClicked (bool show=true) |
Called when the showDataHistogram checkbox is clicked by the user. More... | |
void | automaticDataHistogramComputationClicked (bool val) |
Called when the automaticDataHistogramComputation checkbox is clicked by the user. More... | |
void | dataHistogramNumberOfBinsEdited (int val) |
Called when the dataHistogramNumberOfBins is changed by the user. More... | |
void | updateDataHistogramEnableState () |
Update the enable state of different data histogram related widgets. More... | |
void | representationOrViewChanged () |
called when the active representation or view changes. More... | |
void | setHistogramOutdated () |
Called when the histogram should be considered outdated, which includes : When the range of the transfer function is changed, either from a custom range or from an updated range When the vector mode or vector component is changed When the visibility of a consumer is changed When the number of bins is changed. More... | |
void | realShowDataHistogram () |
Slot called by a timer which is triggered in showDataHistogramClicked This method actually setup the histogram but should not be used directly. More... | |
Protected Member Functions | |
void | prepareRangeForLogScaling () |
Validate and adjust the current range before converting to a log range. More... | |
void | initializeOpacityEditor (vtkPiecewiseFunction *pwf) |
Initialize the opacity editor. More... | |
Protected Member Functions inherited from pqPropertyWidget | |
void | addPropertyLink (QObject *qobject, const char *qproperty, const char *qsignal, vtkSMProperty *smproperty, int smindex=-1) |
void | addPropertyLink (QObject *qobject, const char *qproperty, const char *qsignal, vtkSMProxy *smproxy, vtkSMProperty *smproperty, int smindex=-1) |
void | removePropertyLink (QObject *qobject, const char *qproperty, const char *qsignal, vtkSMProperty *smproperty, int smindex=-1) |
void | removePropertyLink (QObject *qobject, const char *qproperty, const char *qsignal, vtkSMProxy *smproxy, vtkSMProperty *smproperty, int smindex=-1) |
void | setShowLabel (bool show) |
void | setChangeAvailableAsChangeFinished (bool status) |
For most pqPropertyWidget subclasses a changeAvailable() signal, corresponds to a changeFinished() signal. More... | |
void | addDecorator (pqPropertyWidgetDecorator *) |
Register a decorator. More... | |
void | removeDecorator (pqPropertyWidgetDecorator *) |
Unregisters a decorator. More... | |
pqPropertyLinks & | links () |
Provides access to the pqPropertyLinks instance. More... | |
Properties | |
QList< QVariant > | xrgbPoints |
QList< QVariant > | xvmsPoints |
bool | showDataHistogram |
bool | automaticDataHistogramComputation |
int | dataHistogramNumberOfBins |
bool | useLogScale |
bool | useLogScaleOpacity |
bool | useOpacityControlPointsFreehandDrawing |
pqSMProxy | scalarOpacityFunctionProxy |
Additional Inherited Members | |
Static Public Member Functions inherited from pqPropertyWidget | |
template<class T > | |
static QString | getXMLName (T *object) |
Description: This static utility method returns the XML name for an object as a QString. More... | |
static QString | getTooltip (vtkSMProperty *property) |
Returns the tooltip to use for the property. More... | |
static int | hintsWidgetHeightNumberOfRows (vtkPVXMLElement *hints, int defaultValue=10) |
Helper method to return value from WidgetHeight XML hint, if any. More... | |
pqColorOpacityEditorWidget provides an in-line editor widget for editing the color and opacity transfer functions.
The property group is expected to have properties with the following functions. If any of the optional properties are missing, then the corresponding widgets are hidden.
Definition at line 72 of file pqColorOpacityEditorWidget.h.
pqColorOpacityEditorWidget::pqColorOpacityEditorWidget | ( | vtkSMProxy * | proxy, |
vtkSMPropertyGroup * | smgroup, | ||
QWidget * | parent = 0 |
||
) |
|
override |
QList<QVariant> pqColorOpacityEditorWidget::xrgbPoints | ( | ) | const |
Returns the current list of control points for the color transfer function.
This a list of 4-tuples.
QList<QVariant> pqColorOpacityEditorWidget::xvmsPoints | ( | ) | const |
Returns the current list of control points for the opacity function.
This a list of 4-tuples.
bool pqColorOpacityEditorWidget::useLogScale | ( | ) | const |
Returns the value for use-log-scale.
bool pqColorOpacityEditorWidget::useLogScaleOpacity | ( | ) | const |
Returns the value for use-log-scale.
bool pqColorOpacityEditorWidget::useOpacityControlPointsFreehandDrawing | ( | ) | const |
Returns the value for the use of freehand drawing when positioning opacity control points.
bool pqColorOpacityEditorWidget::showDataHistogram | ( | ) | const |
Returns the value for showDataHistogram.
bool pqColorOpacityEditorWidget::automaticDataHistogramComputation | ( | ) | const |
Returns the value for automaticDataHistogramComputation.
int pqColorOpacityEditorWidget::dataHistogramNumberOfBins | ( | ) | const |
Returns the value for dataHistogramNumberOfBins.
pqSMProxy pqColorOpacityEditorWidget::scalarOpacityFunctionProxy | ( | ) | const |
Returns the scalar opacity function (i.e.
PiecewiseFunction) proxy used, if any.
|
slot |
Sets the xvmsPoints that control the opacity transfer function.
|
slot |
Sets the xrgbPoints that control the color transfer function.
|
slot |
Set whether to use-log scale.
|
slot |
Set whether to use-log scale.
|
slot |
Set whether to use freehand drawing for positioning opacity control points.
|
slot |
Set whether to show data histogram.
|
slot |
Set whether to automatically compute data histogram.
|
slot |
Set the number of bins to use for the data histogram.
|
slot |
Set the scalar opacity function (or PiecewiseFunction) proxy to use.
|
slot |
Reset the transfer function ranges to active data source.
|
slot |
Reset the transfer function ranges to custom values.
|
slot |
Reset the transfer function ranges to temporal range for active data source.
|
slot |
Reset the transfer function ranges to visible range for active data source.
|
slot |
Inverts the transfer functions.
|
slot |
pick a preset.
|
slot |
save current transfer function as preset.
|
slot |
|
signal |
Signal fired when the xrgbPoints change.
|
signal |
Signal fired when the xvmsPoints change.
|
signal |
Signal fired when useLogScale changes.
|
signal |
Signal fired when useLogScaleOpacity changes.
|
signal |
Signal fired when useOpacityControlPointsFreehandDrawing changes.
|
signal |
Signal fired when showDataHistogram changes.
|
signal |
Signal fired when automaticDataHistogramComputation changes.
|
signal |
Signal fired when dataHistogramNumberOfBins changes.
|
signal |
This signal is never really fired since this widget doesn't have any UI to allow users to changes the ScalarOpacityFunction proxy used.
|
protectedslot |
slots called when the current point changes on the two internal pqTransferFunctionWidget widgets.
|
protectedslot |
|
protectedslot |
updates the panel to show/hide advanced settings
|
protectedslot |
updates the text shown in the "current data" input.
|
protectedslot |
update the transfer function with the text in CurrentDataValue text field.
|
protectedslot |
called when a preset is applied.
|
protectedslot |
Ensures that the color-swatches for indexedColors are shown only when this is set to true.
|
protectedslot |
called when "MultiComponentsMappingChanged" checkbox is modified.
|
protectedslot |
called when the use-log-scale checkbox is clicked by the user.
We then add extra logic to valid ranges convert the color map to log/linear space.
|
protectedslot |
called when the use-log-scale checkbox is clicked by the user.
We then add extra logic to valid ranges convert the color map to log/linear space.
|
protectedslot |
Called when UseOpacityControlPointsFreehandDrawing checkbox is clicked by the user.
We transfer the call to the pqTransferFunctionEditor.
|
protectedslot |
Called when the showDataHistogram checkbox is clicked by the user.
We then add extra logic to compute and update the histogram and enable to update histogram button. This uses the histogram table cache if it is up to date. This can be called manually to show/hide the histogram
|
protectedslot |
Called when the automaticDataHistogramComputation checkbox is clicked by the user.
We then add extra logic to show the histogram and update the UI.
|
protectedslot |
Called when the dataHistogramNumberOfBins is changed by the user.
We then add extra logic to set the histogram outdated
|
protectedslot |
Update the enable state of different data histogram related widgets.
|
protectedslot |
called when the active representation or view changes.
We then change the enabled/disabled state of the buttons. Some actions require a valid representation or view, so disable them if there isn't one. We also update the opacity editor.
|
protectedslot |
Called when the histogram should be considered outdated, which includes : When the range of the transfer function is changed, either from a custom range or from an updated range When the vector mode or vector component is changed When the visibility of a consumer is changed When the number of bins is changed.
|
protectedslot |
Slot called by a timer which is triggered in showDataHistogramClicked This method actually setup the histogram but should not be used directly.
|
protected |
Validate and adjust the current range before converting to a log range.
|
protected |
Initialize the opacity editor.
|
readwrite |
Definition at line 75 of file pqColorOpacityEditorWidget.h.
|
readwrite |
Definition at line 76 of file pqColorOpacityEditorWidget.h.
|
readwrite |
Definition at line 77 of file pqColorOpacityEditorWidget.h.
|
readwrite |
Definition at line 79 of file pqColorOpacityEditorWidget.h.
|
readwrite |
Definition at line 81 of file pqColorOpacityEditorWidget.h.
|
readwrite |
Definition at line 82 of file pqColorOpacityEditorWidget.h.
|
readwrite |
Definition at line 83 of file pqColorOpacityEditorWidget.h.
|
readwrite |
Definition at line 85 of file pqColorOpacityEditorWidget.h.
|
readwrite |
Definition at line 87 of file pqColorOpacityEditorWidget.h.