Re: color control

Bill,

Thanks, I got the color table and ColorControl to work
in my app.

I would like to control which values are then assigned
to each color.
For example, my min=0 and max=10
and I have 6 colors in my table c[3][6]

can I map

color - c0     c1     c2     c3     c4     c5
value -  0   .1-1   1.1-3   3.1-5  5.1-7   7.1+


Can I use the setFunction method in ColorControl to
for this?

-Jay

--- Bill Hibbard <billh@xxxxxxxxxxxxx> wrote:
> Hi Jay,
> 
>  After your:
> 
>   ScalarMap map = new  ScalarMap((RealType)
> precipitation,Display.RGB);
> 
> do:
> 
>   map.setRange(min, max); // min and max of
> precipitation values
>   float[][] table = new float[3][table_length];
>   // set color values you want in table
>   ColorControl control = (ColorControl)
> map.getControl();
>   control.setTable(table);
> 
> The 3 components of table are red, green and blue.
> You can
> set the color values you want for various
> precipitation
> values. You'll probably need to experiment a bit to
> get
> the look you want.
> 
> Good luck,
> Bill
> 
> On Tue, 13 Jan 2004, Jay Parsons wrote:
> 
> > VisADers,
> >
> > I am using VisAD to display water volume over a
> > terrain and I am trying to get more control over
> the
> > colors used to display water volume.
> >
> > Picture of my current state:
> >
>
http://www.swt.edu/~jp1120/waterflowvis/WATERFLOW2.JPG
> >
> > I am using a scalar map for water volume.
> >  new  ScalarMap((RealType)
> precipitation,Display.RGB);
> >
> > But I would really like to be able to map specific
> > values and ranges to specific colors.  0 to green,
> .01
> > to 1.0 mapped to light blue, 1.01 - 5.0 to dark
> blue,
> > etc...
> >
> >
> > Any suggestions on how I can accomplish this type
> of
> > color mapping?
> >
> > -Jay
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Hotjobs: Enter the "Signing Bonus"
> Sweepstakes
> > http://hotjobs.sweepstakes.yahoo.com/signingbonus
> >
> 



__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

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