[vtkusers] How to get two different 1D-arrays used as hue and the other as value in lut?
David Gobbi
david.gobbi at gmail.com
Mon Dec 21 17:46:54 EST 2009
On Mon, Dec 21, 2009 at 3:22 PM, <lynx.abraxas at freenet.de> wrote:
>
> OK. So now the more advanced stuff:
> I have two different 1D-arrays (single scalar-arrays).
> One of them I want to choose the hue of the lut and the other one should
> choose the value of a HSV-lookuptable. Is that related to the before mentioned
> "color by any array not just scalars"? Is that possible already or would I
> have to do that in blender?
>
> Thanks for any help, hints or examples;-)
> Lynx
I'm not 100% sure what you mean. Do you just want to use one array
for H, another array for V, and keep S constant?
No you can't, unfortunately, because you have to choose just 1 array
to color the data.
In order to do this, you would have to play some crazy tricks:
Make one data set for H, and use a lookup table where H varies but
V=1.0 and S=1.0.
Make another data set for V, and use a lookup table where V=0,H=0,S=0,
and Alpha ranges from 0.0 to 1.0. Set the opacity of the actor for
this data to 0.99 so that VTK will render it as a translucent dataset.
Render these data on top of each other, i.e. one actor for each. The
first dataset is full-brightness, but the second dataset with
alpha-blend black values in order to get your V mapping.
So it should be possible, but not easy. It would actually be easier
to write your own "for" loop that will take your H array and V array
and create your own RGB color array.
David
More information about the vtkusers
mailing list