NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
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
visad
archives: