[vtkusers] mapping indpenent scalars to opacity and color
    Vladan Bato 
    vbato at ieee.org
       
    Thu Dec  4 12:38:13 EST 2003
    
    
  
bryan cole wrote:
> I want to visualise a dataset with two scalar components by mapping one
> component to color and the other to opacity. Can anyone suggest how to
> do this? I can find no way of mapping opacity and color separately.
I would like to do this too, but as far as I know it is not possible.
The vtkScalarsToColors class can only map a single array.
One possible way to do it, would be to combine the two scalar components 
into a vector and then derive a custom version of vtkScalarsToColors 
that maps the two components separately, instead of mapping the vector 
magnitude or just one of it's components.
Another way would be to write a custom filter that does the mapping 
directly, by substituting the scalars with RGBA data. The mapper can 
then pass this data as is, without using a lookup table.
I was planning to implement the former solution, but it is not very high 
priority for me.
-- 
Vladan Bato
vbato at ieee.org
    
    
More information about the vtkusers
mailing list