Re[2]: 2d color table in VisAD


billh@xxxxxxxxxxxxx schrieb am 07.03.2003 um 16:28 Uhr:

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

Ok. I just thought it's almost the same problem as you

> 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).

Well, okay. I've got a function with complex numbers z
x+i*y. To the z-axis I simply put |z| = sqrt(x^2+y^2).
The color, i.e. the RGB components, are calculated by a
method I already wrote. So I already know the color of
each z. My problem is just that I don't know how to put
this color into my visad program.

> 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.

Looks interesting ! Though I don't have any experience
with visad I'm going to try it...


> Good luck,
> Bill

> 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

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