MantisBT - ParaView
View Issue Details
0008445ParaView(No Category)public2009-01-29 20:462011-01-13 17:00
Alan Scott 
Utkarsh Ayachit 
highmajoralways
closedfixed 
 
3.6 
0008445: (Venus - High) Bad data when using logs with large numbers
*ParaView, local server, XP (probably doesn't matter), 3.4.0. I will replicate with the trunk tonight.

*Run disk_out_ref.exo. Turn all variables on. Apply.
*Clip, apply.
*Calculator.
**Result Array Name = BadData
**Formula = (Temp-293.14)*1e11
**Apply. You should now be coloring with BadData.
*Edit Color Map.
**Check Use logarithmic Scale. Close.
*Surface With Edges.
*+X
*Select Points On, and then rubber band select the lower half of the lower right edge. In other words, select the bottom 2 rows, and about 4 columns of cells.
*View/ Selection Inspector.
**Point Label/ Label Mode BadData
*Now, zoom in on the lower right section, and rotate so you can see the labels.

Bug - Notice that we have created color bands. Furthermore, if you look at the bottom of the row, there are numerous blue points that should be whiteish - they are in the range of 1.2e11 to 1.6e11. This should be white.

See attached screenshot. The banding is not an artifact - it shows up on my screen.

I am marking this one important, since data is being misrepresented.



No tags attached.
jpg badLogDataScreenshot.jpg (357,153) 2009-01-29 20:46
https://www.vtk.org/Bug/file/7023/badLogDataScreenshot.jpg
Issue History
2009-01-29 20:46Alan ScottNew Issue
2009-01-29 20:46Alan ScottFile Added: badLogDataScreenshot.jpg
2009-01-29 21:13Alan ScottNote Added: 0014730
2009-02-02 21:08Alan ScottNote Added: 0014761
2009-02-17 16:44Utkarsh AyachitStatusbacklog => tabled
2009-02-17 16:44Utkarsh AyachitAssigned To => Burlen
2009-02-26 17:36Alan ScottSummaryBad data when using logs with large numbers => (Venus - High) Bad data when using logs with large numbers
2009-03-11 21:30Alan ScottNote Added: 0015664
2009-03-11 21:57Alan ScottNote Added: 0015665
2009-03-16 13:47Utkarsh AyachitAssigned ToBurlen => Utkarsh Ayachit
2009-03-16 14:09Utkarsh AyachitNote Added: 0015699
2009-03-16 14:09Utkarsh AyachitStatustabled => @80@
2009-03-16 14:09Utkarsh AyachitResolutionopen => fixed
2009-03-17 19:20Alan ScottNote Added: 0015720
2009-03-17 19:20Alan ScottStatus@80@ => closed
2009-05-13 13:46Utkarsh AyachitTarget Version => 3.6
2011-01-13 17:00Source_changeset_attached => VTK master a2bd8391
2011-01-13 17:00Source_changeset_attached => VTK master 020ef709
2011-06-16 13:10Zack GalbreathCategory => (No Category)

Notes
(0014730)
Alan Scott   
2009-01-29 21:13   
Yep, bad in the trunk.
(0014761)
Alan Scott   
2009-02-02 21:08   
After looking at this, I suspect that the problem is with the color legend. We are adjusting the lookup table with scales and shifts in vtkLookupTableMapData (file vtkLookupTable.cxx), but not taking that into account when we are drawing the color legend.
(0015664)
Alan Scott   
2009-03-11 21:30   
Obviously, my bad. Also open the color legend for the comparison.
(0015665)
Alan Scott   
2009-03-11 21:57   
E-mail from me, reply by Ken.

> * Notice that the blue band is basically filling up half of the range
> from blue to red. I.e., it jumps from blue to begue, to light orange,
> etc. Is this the way log colors should work?

No. This is wrong.

>
> * Shouldn't we make the scale bar also be log? i.e., shouldn't the
> white area be towards the bottom?

The scale bar (in the view) looks right to me. Its the colors on the can that are wrong.
(0015699)
Utkarsh Ayachit   
2009-03-16 14:09   
Fixed BUG 0008445. When using log scaled lookup tables, scalar mapping wasn't
correct when InterpolateScalarsBeforeMapping was ON. This was due to the fact
that vtkScalarsToColorsPainter did not consider the log mapping at all when
generating the texture coordinates. Fixed that.

This patch also exposes some static API from vtkLookupTable to make it easy to
compute log values from vtkScalarsToColorsPainter without code duplication
between vtkScalarsToColorsPainter and vtkLookupTable.


/cvsroot/ParaView3/ParaView3/VTK/Common/vtkLookupTable.cxx,v <-- VTK/Common/vtkLookupTable.cxx
new revision: 1.108; previous revision: 1.107
/cvsroot/ParaView3/ParaView3/VTK/Common/vtkLookupTable.h,v <-- VTK/Common/vtkLookupTable.h
new revision: 1.83; previous revision: 1.82
/cvsroot/ParaView3/ParaView3/VTK/Rendering/vtkScalarsToColorsPainter.cxx,v <-- VTK/Rendering/vtkScalarsToColorsPainter.cxx
new revision: 1.18; previous revision: 1.17
(0015720)
Alan Scott   
2009-03-17 19:20   
Excellent!

Tested client/ remote server.