PDA

View Full Version : texture color look up. Please help!



abhijit
03-23-2005, 12:38 PM
Hello everyone,
I am working on a 3D volume rendering application. My input volume data is a one byte MRI. I use 3D textures to display the volume. Now I want to color the voxels, along with alpha value, based on the input intensity value. So I tried using color look up table(glColorTable). Since the size of texture memory on my computer is low and data is huge I want to keep my data in the original 8 byte GL_LUMINANCE format however before actually displaying it on the frame buffer I want to color it with the look up table color.
I am using VC++ 6.0. I use a library called GLIW to pull up the glColorTable extension which is a part of ARB_imaging extension. However the color table is not doing anything :-(. I create the color table as follows
glColorTable(GL_COLOR_TABLE, GL_RGBA, 256,GL_RGBA, GL_UNSIGNED_BYTE, lut);
where lut is defined as GLubyte lut[256][4];

Could someone please help me?.

Thanks.

Abhijit

shinpaughp
03-23-2005, 08:35 PM
Did you enable it with glEnable( GL_COLOR_TABLE )?

abhijit
03-24-2005, 07:27 AM
Yes I did enable the color table using glEnable.

Tomy
03-27-2005, 11:53 PM
I am working in a much similiar project here.. But I am not using any libraries. I think the most appropriate solution for this is to attach a 1D ARB texture with the 3D texture, and use a shader to color your volume. I used it and is working fine. But I am having a problem with blending, maybe you wouldn't have it. I can send you a sample application if you want.

abhijit
03-29-2005, 07:37 PM
Thanks Tommy. I would definately like to take a look at your code.

Abhijit

Tomy
03-29-2005, 11:31 PM
HI,

I tried to send you the sample application but your mail server refused the attachment.. It gave me the following error

<alothe@gmail.com>:
64.233.171.114 failed after I sent the message.
Remote host said: 552 5.7.0 Illegal Attachment

abhijit
04-01-2005, 08:33 AM
Hi Tomy,
Did your application had any executable file? since google rejects incoming and outgoing messages with executables ( at least i am sure about outgoing).
please try my other email address: ablothe@hotmail.com

Thanks
abhijit