Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

Re: filling in the blanks

Hi Stuart,

> I would like to fill "missing data" regions (where data points have
> missing value indicator) with points (or a surface) of black or some
> other uniform color not part of the usual RGB spectrum.
> 
> This to keep the user from seeing trough holes in 3D plots, and
> mistakenly seeing values from a surface behind the hole.
> 
> Is there a way to make a ScalarMap that sets missing values to a color?

There is a method of GraphicsModeControl for controlling this.  
It is used like this:

  DisplayImpl display = ...
  GraphicsModeControl mode = display.getGraphicsModeControl();
  mode.setMissingTransparent(false); // the default is true

However, it wasn't working right, so I have fixed it and put the
fix on the VisAD ftp server.

Note that this cannot work in all cases.  If there are missing
values for a RealType mapped to a spatial DisplayRealType (e.g.,
XAxis, YAXis, ZAXis) then the display logic cannot color the
point black because it does not have a valid location for it.
In that case, it is not rendered.

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html


  • 2000 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: