Re: 2d color table in VisAD

Hi Marcel,

I'm CC'ing the list because your question is of general
interest, and because technical questions should come to

The solution to Jay's problem was to use true color (with
three RealTypes mapped to Red, Green and Blue in the
display). A 2-D color table is really a pseudo color
technique. You could actually implement a true 2-D color
table for pseudo color, by defining two DisplayRealTypes
for the table indices, and a custom DataRenderer that
knows how to render them (including looking up colors in
a 2-D analog of ColorControl).

However, a much easier approach would be to define a
CellImpl whose doAction() method transforms a Data
object with MathType:

  (domain -> (index1, index2))

into a data object with MathType:

  (domain -> (r, g, b))

where domain may have any dimension, and there are
ScalarMaps of r, g and b to Red, Green and Blue. Of course,
values of index1 and index2 would be used as indices into
the 2-D color table. The CellImpl could include methods
for setting the table. The CellImpl would pass its output
data to the setData() method of a DataReference, which
would be linked to your DisplayImpl. The input data would
come from a second DataReference, linked to the CellImpl
via its adReference() method.

Good luck,

On Fri, 7 Mar 2003, Marcel Schmittfull wrote:

> Hi,
> I'd like to implement a 2d color table (see f.e.
> in my visad program. I guess, there's an analogy to your
> topic "Color Gridded3DSets" in visad's mailinglist.
> Could you send me your solution code of your problem,
> please ? This would probably really help
> Viele Gre
> Marcel
> --
> mailto:marcel-sl@xxxxxx