Re: a beginner's question

Hi Zhaopeng,

> I'm doing volume rendering. Function is (x,y,z)->value.
> I use following code to map value without any colormap:
>
> valueAlphaMap = new ScalarMap(value, Display.Alpha);
> display.addMap( valueAlphaMap );
>
> The problem is that the 0-value poxel is also white. What I want is to make 
> poxel's color from white to gray according to its value, while let 0-value 
> poxel be completely transparent. How can I do it? Thanks a lot.

Try a ScalarMap to RGBA instead. Use the setTable() method of its
ColorAlphaControl to get more control over color and alpha values.

Good luck,
Bill


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