Re: LUT question

New Message Reply Date view Thread view Subject view Author view

Dave Akers (dla)
Wed, 16 Feb 2000 09:02:16 -0800


Hi Mark,

  Most likely you are using a post-interpolation texture lookup table,
assuming that you're running on hardware that supports it.. When you call
load(), a single call is made to glColorTableSGI with
target=GL_TEXTURE_COLOR_TABLE_SGI. This would only affect the results of
texture lookups, not glDrawPixels. In order to affect glDrawPixels, you'd
need to specify a GL_COLOR_TABLE_SGI instead. So instead of calling
load(), call

   glColorTableSGI (GL_COLOR_TABLE_SGI, internalFormat, width,
externalFormat, dataType, data) (where internalFormat and externalFormat
are the internal and external formats of your lookup table. All these are
parameters you've already passed in to the constructor to
voLookupTable...)

  Then, in place of enable(), you'll need to call glEnable
(GL_COLOR_TABLE_SGI) instead of glEnable (GL_TEXTURE_COLOR_TABLE_SGI)...

  Let me know if you still have problems..

Dave

On Mon, 14 Feb 2000, Mark Davey wrote:

> Hi...
> I have been having trouble using the voLookupTable class. I am trying to
> display a 2D image using glDrawPixels and I want to modify the image
> using a lookup table. I am trying to use the same lookup table that I am
> successfully using to display a volume.
>
> I have tried the obvious
>
> aLookupTable->load();
> aLookupTable->enable();
>
> before the glDrawPixels command but with no success. Can anyone help??
>
> Regards
> mark
>
>
>
>
>
>
> --
> From: Mark Davey
> Dept. of Medical Physics, UCL.
>
> TEL: +44 (0)171 915 1673.
> FAX: +44 (0)171 837 9279.
>
> Institute of Laryngology and Otology,
> 330 Gray's Inn Road,
> London.
> WC1X 8GE.
>
>
>


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Wed Feb 16 2000 - 10:03:24 PST