MantisBT - ParaView
View Issue Details
0006657ParaViewBugpublic2008-03-25 21:062015-02-18 19:09
Alan Scott 
Cory Quammen 
normalfeaturealways
closedfixed 
 
4.44.3 
Sandia
6657_add_outside_range_colors
incorrect functionality
0006657: Feature: Add color for variables out of bounds
A user has requested that a feature be added to ParaView that would allow a special color for out of bounds variable data. For instance, if I have an object that should have temperatures of 0 to 100 centigrade, and we are using the new blue-white-red color scheme, you could have black for all cells less than 0 degrees, and yellow for all cells more than 100 degrees.

Obviously, settable through the Edit Color Map.

If this is easy, it would be nice to add to 3.4. Otherwise, 3.6 would do.
ColorMap
related to 0014837closed Utkarsh Ayachit Color legend log ranges - advanced 
Issue History
2008-03-25 21:06Alan ScottNew Issue
2008-04-10 17:39Ken MorelandStatusbacklog => tabled
2008-04-10 17:39Ken MorelandAssigned To => Berk Geveci
2008-04-10 17:40Ken MorelandNote Added: 0011265
2008-05-15 13:43Utkarsh AyachitCategory3.4 => 3.6
2009-02-17 14:03Ken MorelandAssigned ToBerk Geveci => Utkarsh Ayachit
2009-05-13 13:46Utkarsh AyachitTarget Version => 3.6
2009-08-25 18:37Utkarsh AyachitCategory => Bug
2009-08-25 18:37Utkarsh AyachitTarget Version3.6 => 3.8
2010-09-01 11:33Utkarsh AyachitTarget Version3.8 => 3.10.shortlist
2013-07-26 12:34Utkarsh AyachitStatusexpired => backlog
2013-07-26 12:34Utkarsh AyachitResolutionopen => reopened
2013-07-26 12:34Utkarsh AyachitTag Attached: ColorMap
2014-01-23 12:25Utkarsh AyachitProject => TBD
2014-01-23 12:25Utkarsh AyachitType => incorrect functionality
2014-01-23 12:25Utkarsh AyachitTarget Version => 4.2
2014-01-23 12:28Utkarsh AyachitNote Added: 0032209
2014-01-23 12:30Utkarsh AyachitProjectTBD => Sandia
2014-06-11 21:40Alan ScottNote Added: 0032848
2014-06-11 21:40Alan ScottAssigned ToUtkarsh Ayachit =>
2014-06-11 21:40Alan ScottStatusbacklog => todo
2014-06-17 08:45Utkarsh AyachitAssigned To => johan andruejol
2014-06-17 09:01Utkarsh AyachitNote Added: 0032878
2014-06-27 17:19johan andruejolStatustodo => active development
2014-07-08 12:53Utkarsh AyachitAssigned Tojohan andruejol => Cory Quammen
2014-07-08 12:56Alan ScottRelationship addedrelated to 0014837
2014-07-08 12:58Alan ScottNote Added: 0032984
2014-11-14 22:52Utkarsh AyachitTarget Version4.2 => 4.4
2014-12-17 13:48Cory QuammenTopic Name => 6657_add_outside_range_colors
2014-12-17 13:48Cory QuammenNote Added: 0033981
2014-12-17 13:48Cory QuammenStatusactive development => gatekeeper review
2014-12-17 13:48Cory QuammenFixed in Version => 4.3
2014-12-17 13:48Cory QuammenResolutionreopened => fixed
2014-12-23 07:47Utkarsh AyachitFixed in Version4.3 => git-master
2014-12-23 07:47Utkarsh AyachitStatusgatekeeper review => customer review
2014-12-23 07:47Utkarsh AyachitNote Added: 0033998
2015-01-02 10:43Utkarsh AyachitFixed in Versiongit-master => 4.3
2015-02-18 19:09Alan ScottNote Added: 0034256
2015-02-18 19:09Alan ScottStatuscustomer review => closed

Notes
(0011265)
Ken Moreland   
2008-04-10 17:40   
By the way, this is one of those features that was lost in transitioning from ParaView 2 to 3. Of course, the new transfer function editor does provide a workaround.
(0032209)
Utkarsh Ayachit   
2014-01-23 12:28   
Note that this feature also affects the color-legend/scalar bar. Similar to how NaN color is shown in the color legend as a separate swatch. Ideally, the out-of-bounds colors should be shown as separate swatches too.
(0032848)
Alan Scott   
2014-06-11 21:40   
I have a user that is asking for this.
(0032878)
Utkarsh Ayachit   
2014-06-17 09:01   
Developer notes:

For this task, one could follow the code for how "NaNColor" is handled and basically add corresponding code for out-of-range colors.

ParaView uses vtkDiscretizableColorTransferFunction as the color transfer function class. This class depends on vtkColorTranferFunction, vtkLookupTable, and vtkPiecewiseFunction.

This task can be split up as follows:

Stage 1:

+ Add API to vtkColorTransferFunction/vtkLookupTable to set colors for out-of-range values. We'll need separate colors for below range and above range values. (I wonder if this API should be in vtkScalarsToColors itself. I wonder because the same is not done for NanColor, not sure why).
+ Add API to enable/disable use of these above/below range colors. By default, they must be disabled to keep VTK behavior unchanged.
+ Make vtkDiscretizableColorTransferFunction ensure that passes along these values to the internal vtkLookupTable.


Stage 2:

+ Update vtkScalarBarActor to add swatches for out-of-range colors (similar to NanAnnotation). Unlike NanAnnotation, we don't need a separate flag to enable rendering of these swatches. These swatches should be shown if the color-transfer-function has those above/below-range colors enabled.

Stage 3:

+ Update ParaView Color Map Editor panel to add ability to set and use these out-of-range colors.

Stage 4:

+ Update vtkPiecewiseFunction to add support for above/below range opacity.
(0032984)
Alan Scott   
2014-07-08 12:58   
Added a relationship with 14837, since log scaling positive and negative numbers will potentially have up to 4 ranges that are out of bounds. You may want to superficially peruse 14837 before implementing this one.
(0033981)
Cory Quammen   
2014-12-17 13:48   
commit 282a926d3c3b7e4ac4dce3ffed1a79c9d370c762
Author: Cory Quammen <cory.quammen@kitware.com>
Date: Wed Dec 17 11:45:55 2014 -0500

    Added test for out-of-range colors
    
    Change-Id: Ic0261a1adb1704e95bfd8d1c93210f7ed03884e9
(0033998)
Utkarsh Ayachit   
2014-12-23 07:47   
SUMMARY
---------------------------------------------
Topics merged into master (v4.2.0-339-g3d6f539):
(VTK) 14539-can-crash
        15073_fix_ResetCamera
        6657_add_outside_range_colors
(VTK) KW00001499_ColorByFieldData
        add_cgns_plugin_test
        camera-9503
        cfapi-null-logic
(VTK) exodus-15127
        fix-dashboard-warning
        h5part-15215
        mangle-pvbatch-test-names
(VTK) opengl2_updates
        pvweb-support-multiple-data-directories
        revert-cfapi-deprecation-fixes
        support_custom_link_path_setting
        update-catalyst-20141215
        webvisualizer-add-tooltips
(0034256)
Alan Scott   
2015-02-18 19:09   
Yes! Thanks for implementing this.

Tested local server, Linux, master.