[vtkusers] Problem mapping scalars to colors using a vtkLookupTable

Geoframer geoframer at gmail.com
Wed Jun 13 05:39:23 EDT 2007


Hey Peter,

I understand where you want to go with this. I had a somewhat similar
problem in which i wanted to add the colors at a later step in the pipeline.
I ended up failing in every sense because i could not create a lookuptable
in the intuitive way one would expect using the GetIndex() like you
described in your first post.
After banging my head against it for a while i got the advise to add the
color information at the data level instead of trying to add it later. That
worked for me and I solved my problem. Even though I still feel a bit
uncomfortable with it because adding color information to the data seems a
bit like contaminating the information to me.

Okay so my point being, and please remember i'm not a real expert on the
vtkImagePlaneWidget or vtk in general (in fact far from it...) is it perhaps
an option to add the color information to the data? As far as I understood
the vtkImagePlaneWidget is a way to probe a dataset. Now as I read your
question it seems to me that you want to add color at the probing step. At
which point you are restricted to only use a lookuptable. Isn't it perhaps
easier to add color information at the data level?

This is just an uneducated suggestion, so please feel free to respond as to
why this would not be possible etc.

Kind Regards - Geofram

On 6/11/07, Peter Kok <peter.kok at gmail.com> wrote:
>
> Hello Geofram,
>
> Thanks for your reply. That is close to what I'm trying to do, but the
> problem is that my scalar values are scattered about a 32-bit range and it
> is not possible to create a lookup table that covers all values. I guess a
> vtkColorTransferFunction would work, but a vtkImagePlaneWidget only accepts
> vtkLookupTables...
>
> -Peter
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070613/07a76c8e/attachment.htm>


More information about the vtkusers mailing list