The scalar result can be configured to make a better visual appearance of your result data, for instance settings such as legend scheme, legend range and filtering.
Each scalar result has its own settings.
This tutorial shows how to change scalar settings for visualized result.
The demo model file (100x100x100.vtf) contains a simple geometry and a scalar result.
This tutorial will show the scalar as fringes on the model, and set some scalar settings for demonstration.
Load the file and setup the model specification to show the result. For a more thorough explanation on creating a data source from a file interface and setup the model specification, see the Load VFT tutorial: UnstructGrid: Load model from file and set up model specification
Create the model and a VTF file interface data source. Open the file and set the created data source in the model.
The model specification in this tutorial is set up with the first state and the model's only scalar result set as fringes.
Use the information retrieved from the data source directory to set up the model specification.
Toggle on fringes visibility for all parts. For easy access to the settings for all available parts in a model, use the cee::ug::PartSettingsIterator.
Available scalar settings:
In this tutorial we will set number of levels, color scheme and filtering.
Get scalar settings for a specific scalar result by calling cee::ug::UnstructGridModel::scalarSettings() with the requested scalar result id.
Set number of legend levels to 5.
Set the color scheme to normal inverted.
Use filter to only show values elements where the result value is in the interval from 20 to 99. (The scalar result in this data source has a minimum value of 0 and a maximum value of 99.)
Toggle on filtering.
The model is ready to use and can be added to the view. Exactly where the view exists depends on the platform and solution. These examples uses Qt and the view is set up in a cee::qt::ViewerWidget.