DynamicStylePalette¶
-
MLModule
¶ genre Visualization
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLBase
definition MLBase.def see also SoDiagram2D
,SoView2DMarkerEditor
,StylePalette
keywords Curve
,color
,line
,marker
,markerlist
,type
,user
,defined
,index
Purpose¶
The module DynamicStylePalette
provides a StylePalette with an adjustable number of style entries.
All style entries can be edited. The edited styles are saved when the network containing the module is saved.
Usage¶
The dynamic style palette can be populated through three methods:
- Attach an existing
StylePalette
orDynamicStylePalette
to copy the styles. - Use the module’s GUI to add new styles and to adjust their parameters.
- Use the field
stylesString
to set a generated string for all styles.
Details¶
The field stylesString
is the field interface to the internal style palette.
It reflects the styles and their parameters if they have been copied from an attached StylePalette
or added via the GUI. Additionally, modifying the string itself (either interactively or through scripting) updates the output style palette and the list of styles in the module’s GUI.
The format of the styles string is as follows:
- Each style is a list of parameters described below and each style is separated from the next by a comma.
- The list of parameters for one style is:
- colorR colorG colorB lineStyle lineWidth markerType markerSize antiAlias name
- colorR, colorG, colorB: float values in [0, 1]
- lineStyle: int in [0, 3] (as None, Solid, Dashed, and Dotted)
- lineWidth: int
- markerType: int in [0, 7] (as None, Dot, Asterisk, Circle, Square, Triangle, Plus, and Cross)
- markerSize: int
- antiAlias: int, with 0 = false, other = true
- name: string, can contain commas and spaces, but must not contain quotes or escape characters
- colorR colorG colorB lineStyle lineWidth markerType markerSize antiAlias name
Parameter Fields¶
Field Index¶
Auto apply parameters : Bool |
stylesString : String |
Auto read input StylePalette : Bool |
Update From Parameters : Trigger |
Enable Editing : Bool |
|
listViewString : String |
|
Num. Reserved Entries : Integer |
|
Num. Styles : Integer |
|
Read In Style Palette : Trigger |
|
StylePalette is valid : Bool |
Visible Fields¶
Update From Parameters¶
-
name:
updateFromParameters
, type:
Trigger
¶ When pressed, the list on the GUI and the output style palette are recomputed based on the
stylesString
.
Auto read input StylePalette¶
-
name:
autoReadInStylePalette
, type:
Bool
, default:
TRUE
¶ If checked, the
stylesString
and the output style palette are updated if the input StylePalette changes.
Auto apply parameters¶
-
name:
autoApply
, type:
Bool
, default:
TRUE
¶ If checked, the module updates the
stylesString
, the GUI, and the output StylePalette on changing theNum. Styles
.
Read In Style Palette¶
-
name:
readInStylePalette
, type:
Trigger
¶ When pressed, the attached StylePalette is reloaded, updating the
stylesString
, the GUI, and the output StylePalette.
StylePalette is valid¶
-
name:
stylePaletteValid
, type:
Bool
, persistent:
no
¶ Shows whether the output StylePalette is valid.