Lookup Table Editing

From ParaQ Wiki
Jump to navigationJump to search

Architecture

One of the ParaView 2.4 functionality we have to duplicate and potentially improve on the Qt interface is the lookup table editing. Currently, ParaView 2.4 has a special way of handling lookup tables. There is one lookup table per array name. When a display is first colored by an array, ParaView checks if a lookup table for that array exists. Something like:

  vtkPVColorMap* colorMap = this->GetPVWindow()->GetPVColorMap(
    arrayname, arrayInfo->GetNumberOfComponents());
  this->ColorByArray(colorMap, field);

This means that all arrays sharing a name, share a lookup table. When resetting the range of a lookup table, the overall range of all associated arrays is used. There is no way of creating, loading or saving lookup tables. It is not possible to associate separate lookup tables to two arrays with the same name (for example, two exodus datasets that have the same array). Although somewhat limited, this significantly simplifies the handling of lookup tables. Users complained about a few things in the past: 1. not being able to load/save lookup tables, 2. having only linear lookup tables, 3. the fact that it is not possible to get array range over time (not lookup table's fault). So, here are a few choices:

  1. implement what is in paraview 2.4 exactly in 3.0
  2. 1 + implement capability to generate exponential and logarithmic lookup tables
  3. 2 + implement loading/saving of lookup tables
  4. give users access to the list of all lookup tables and allow them to add/delete lookup tables and associate them with arrays in any way they like

(4) can be implemented with a GUI similar to the pipeline browser (using a list view instead of graph). The user could add/delete/edit lookup tables from this list. They could also associate/edit lookup tables from the display menu.

Editor

The current lookup table editor looks like this:

Lookuptable.jpg

The main limitation of this editor that it only allows for editing the end points of the transfer function. All intermediate values are interpolated linearly. We use another transfer function editor to edit transfer functions for volume rendering. The transfer function editor looks like this:

Transferfunctioneditor.jpg

Note that it is possible to add and edit an arbitrary number of intermediate control points with this editor. There is still no easy way of creating log or exponential lookup tables.

It would make sense that in ParaView III, we design a widget/model that is capable of both. The same widget can then be used for editing lookup tables and transfer functions. The log/exponential interpolation could be handled by adding an interpolation field to the control point editor, similar to the keyframe editor in ParaView 2.4.