helper for color map editor handling More...
#include <vtkSMColorMapEditorHelper.h>
Static Public Member Functions | |
| static vtkSMProxy * | GetLUTProxy (vtkSMProxy *proxy, vtkSMProxy *view) |
| Returns the lut proxy of this representation in the given view. More... | |
| static bool | GetUsingScalarColoring (vtkSMProxy *proxy) |
| Returns true if scalar coloring is enabled. More... | |
| static void | SetupLookupTable (vtkSMProxy *proxy) |
Given the input registered representation proxy, sets up a lookup table associated with the representation if a scalar bar is being used for proxy. More... | |
| static bool | UpdateScalarBarRange (vtkSMProxy *proxy, vtkSMProxy *view, bool deleteRange) |
| Updates the ranges shown in the scalar bar. More... | |
| static bool | SetScalarColoring (vtkSMProxy *proxy, const char *arrayname, int attribute_type) |
| Enable/disable scalar coloring using the specified array. More... | |
| static bool | SetScalarColoring (vtkSMProxy *proxy, const char *arrayname, int attribute_type, int component) |
| Enable/disable scalar coloring using the specified array. More... | |
| static bool | RescaleTransferFunctionToDataRange (vtkSMProxy *proxy, bool extend=false, bool force=true) |
| Rescales the color transfer function and opacity transfer function using the current data range. More... | |
| static bool | RescaleTransferFunctionToDataRange (vtkSMProxy *proxy, const char *arrayname, int attribute_type, bool extend=false, bool force=true) |
| Rescales the color transfer function and opacity transfer function using the current data range for the chosen data-array. More... | |
| static bool | RescaleTransferFunctionToDataRangeOverTime (vtkSMProxy *proxy) |
| Rescales the color transfer function and opacity transfer function using the current data range over time. More... | |
| static bool | RescaleTransferFunctionToDataRangeOverTime (vtkSMProxy *proxy, const char *arrayname, int attribute_type) |
| Rescales the color transfer function and opacity transfer function using the current data range over time for the chosen data-array. More... | |
| static bool | SetScalarBarVisibility (vtkSMProxy *proxy, vtkSMProxy *view, bool visible) |
| Set the scalar bar visibility. More... | |
| static bool | HideScalarBarIfNotNeeded (vtkSMProxy *repr, vtkSMProxy *view) |
| While SetScalarBarVisibility can be used to hide a scalar bar, it will always simply hide the scalar bar even if its being used by some other representation. More... | |
| static bool | IsScalarBarVisible (vtkSMProxy *repr, vtkSMProxy *view) |
| Check scalar bar visibility. More... | |
| static vtkPVArrayInformation * | GetArrayInformationForColorArray (vtkSMProxy *proxy, bool checkRepresentedData=true) |
| Returns the array information for the data array used for scalar coloring, from input data. More... | |
| static std::string | GetDecoratedArrayName (vtkSMProxy *proxy, const std::string &arrayname) |
| In case of UseSeparateColorMap enabled, this function prefix the given arrayname with unique identifier, otherwise it acts as a passthrough. More... | |
| static vtkPVProminentValuesInformation * | GetProminentValuesInformationForColorArray (vtkSMProxy *proxy, double uncertaintyAllowed=1e-6, double fraction=1e-3, bool force=false) |
| Call vtkSMRepresentationProxy::GetProminentValuesInformation() for the array used for scalar color, if any. More... | |
| static int | GetEstimatedNumberOfAnnotationsOnScalarBar (vtkSMProxy *proxy, vtkSMProxy *view) |
| Get an estimated number of annotation shown on this representation scalar bar. More... | |
| static int | IsScalarBarStickyVisible (vtkSMProxy *proxy, vtkSMProxy *view) |
| Checks if the scalar bar of this representation in view is sticky visible, i.e. More... | |
| static bool | RescaleTransferFunctionToVisibleRange (vtkSMProxy *proxy, vtkSMProxy *view) |
| Rescales the color transfer function and the opacity transfer function using the current data range, limited to the currernt visible elements. More... | |
| static bool | RescaleTransferFunctionToVisibleRange (vtkSMProxy *proxy, vtkSMProxy *view, const char *arrayname, int attribute_type) |
| Rescales the color transfer function and the opacity transfer function using the current data range, limited to the currernt visible elements. More... | |
Static Protected Member Functions | |
| static bool | RescaleTransferFunctionToDataRange (vtkSMProxy *proxy, vtkPVArrayInformation *info, bool extend=false, bool force=true) |
| Rescales transfer function ranges using the array information provided. More... | |
| static bool | SetScalarColoringInternal (vtkSMProxy *proxy, const char *arrayname, int attribute_type, bool useComponent, int component) |
| Internal method to set scalar coloring, do not use directly. More... | |
| static vtkSMProxy * | GetLastLUTProxy (vtkSMProxy *proxy) |
| Used as a memory of what was the last LUT proxy linked to this representation. More... | |
| static void | SetLastLUTProxy (vtkSMProxy *proxy, vtkSMProxy *lutProxy) |
helper for color map editor handling
It provides helper functions for controlling transfer functions, scalar coloring, etc. Scalar bar controlling is still working for RenderView only for now, as it's controlling the widget.
Definition at line 22 of file vtkSMColorMapEditorHelper.h.
|
static |
Returns the lut proxy of this representation in the given view.
This method will return nullptr if no lut proxy exists in this view.
|
static |
Returns true if scalar coloring is enabled.
This checks whether a property named "ColorArrayName" exists and has a non-empty string. This does not check for the validity of the array.
|
static |
Given the input registered representation proxy, sets up a lookup table associated with the representation if a scalar bar is being used for proxy.
|
static |
Updates the ranges shown in the scalar bar.
If deleteRange is true, then the range stored for current representation proxy is deleted. This should be done when the scalar bar gets separated or becomes not visible. If deleteRange is false, then the range stored for current representation proxy is updated with the new range value.
|
static |
Enable/disable scalar coloring using the specified array.
This will set up a color and opacity transfer functions using vtkSMTransferFunctionProxy instance. If arrayname is nullptr, then scalar coloring is turned off. attribute_type must be one of vtkDataObject::AttributeTypes.
|
static |
Enable/disable scalar coloring using the specified array.
This will set up a color and opacity transfer functions using vtkSMTransferFunctionProxy instance. If arrayname is nullptr, then scalar coloring is turned off. attribute_type must be one of vtkDataObject::AttributeTypes. component enables choosing a component to color with, -1 will change to Magnitude, >=0 will change to corresponding component.
|
static |
Rescales the color transfer function and opacity transfer function using the current data range.
Returns true if rescale was successful. If extend is true (false by default), the transfer function range will only be extended as needed to fit the data range. If force is false (true by default), then the transfer function range is not changed if locked.
|
static |
Rescales the color transfer function and opacity transfer function using the current data range for the chosen data-array.
Returns true if rescale was successful. attribute_type must be one of vtkDataObject::AttributeTypes. If extend is true (false by default), the transfer function range will only be extended as needed to fit the data range. If force is false (true by default), then the transfer function range is not changed if locked.
|
static |
Rescales the color transfer function and opacity transfer function using the current data range over time.
Returns true if rescale was successful.
|
static |
Rescales the color transfer function and opacity transfer function using the current data range over time for the chosen data-array.
Returns true if rescale was successful. attribute_type must be one of vtkDataObject::AttributeTypes,
|
static |
Rescales the color transfer function and the opacity transfer function using the current data range, limited to the currernt visible elements.
|
static |
Rescales the color transfer function and the opacity transfer function using the current data range, limited to the currernt visible elements.
|
static |
Set the scalar bar visibility.
This will create a new scalar bar as needed. Scalar bar is only shown if scalar coloring is indeed being used.
|
static |
While SetScalarBarVisibility can be used to hide a scalar bar, it will always simply hide the scalar bar even if its being used by some other representation.
Use this method instead to only hide the scalar/color bar if no other visible representation in the view is mapping data using the scalar bar.
|
static |
Check scalar bar visibility.
Return true if the scalar bar for this representation and view is visible, return false otherwise.
|
static |
Returns the array information for the data array used for scalar coloring, from input data.
If checkRepresentedData is true, it will also check in the represented data. Default is true. If none is found, returns nullptr.
|
static |
In case of UseSeparateColorMap enabled, this function prefix the given arrayname with unique identifier, otherwise it acts as a passthrough.
|
static |
Call vtkSMRepresentationProxy::GetProminentValuesInformation() for the array used for scalar color, if any.
Otherwise returns nullptr.
|
static |
Get an estimated number of annotation shown on this representation scalar bar.
|
static |
Checks if the scalar bar of this representation in view is sticky visible, i.e.
should be visible whenever this representation is also visible. It returns 1 if the scalar bar is sticky visible, 0 other wise. If any problem is encountered, for example if view == nullptr, or if the scalar bar representation is not instanciated / found, it returns -1.
|
staticprotected |
Rescales transfer function ranges using the array information provided.
|
staticprotected |
Internal method to set scalar coloring, do not use directly.
|
staticprotected |
Used as a memory of what was the last LUT proxy linked to this representation.
This is used in UpdateScalarBarRange to update the scalar bar range when turning off the coloring for this representation.
|
staticprotected |
1.8.17 on Wed Mar 27 2024