The Coloring Process
This article explains how the coloring-processes are organized and implemented, providing an overview of this extremely important process.
General Concepts
The coloring-process is a "Scientific Visualization Process" that draws each element using a constant color, or more interesting, using a color-scale.
The process receives the data as input and generates a vtkProp object. That means that the coloring-process is specific to the target visualization tool, in our case, VTK.
Some important details
The output
The coloring-process must always return the same vtkProp object, just changing configurations each time OnProcess is called.
Request variables
The coloring must request the appropriate data structures to the source process by overriding the OnHandleRequest virtual method and setting the appropriate request parameters. In our specific case, we must define:
grid_functions: A dict mapping the grid-function name to a list of part-ids
time_step_index: The index of the time-step
process_no_input
The process must handle the process_no_input request in OnHandleRequest
The MeshAssemblyColoringProcess
The coloring process for a mesh-assembly is the most complex coloring process. This is due the complex data-structure and the consequent coloring features implemented in the process.
The mesh-assembly is a collection of grid-parts in a well-defined relationship. There is a main-grid and other grid-parts that can act as LGR and DPDK.
The coloring process follows these steps:
- Receive the input: a mesh-assembly;
- Split the main grid-part into several small parts (boundary, north-boundary, soth-boundary, etc);
- For each part, create a sub-process grid-part-coloring-process which generate a
vtkProp;
- Join all the generated
vtkPropsinto one;
The color options for the process are stored in coloring-theme objects and replicated for each sub-process.




Leave a comment