Hi Robert, I would like to know how to generate colour map. Except rgb, the alpha is very important, so each colour I would like to use much alpha.
If there is 1 colour, I can do like this. osg::TransferFunction1D::ColorMap colorMap; for (int i=0; i<255; i++) colorMap[i] = osg::Vec4((float)r/255, (float)g/255, (float)b/255, (float)i/255); If the colour are more than 10, what the colour map looks like? Currently, I am using osgVolume without created colour map, but I believe there is somewhere defined the colour map. Do you know where I can find the code? Thanks again. Regards, Clement ________________________________________ From: osg-users-boun...@lists.openscenegraph.org [osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield [robert.osfi...@gmail.com] Sent: Monday, 14 May 2012 9:07 PM To: OpenSceneGraph Users Subject: Re: [osg-users] osgvolume brightness and sample density Hi Clement, On 8 May 2012 08:44, <clement....@csiro.au> wrote: > Thanks for your help. The colour map in the osgvolume.cpp example contains > specific colour. I would like to implement full range of colours as possible > supported by osg. Any idea what I can do to create a colour map of full > range colours. Thanks. I don't know what you actually mean by "a colour map of full range colours", so can't answer your question. What are you intending here, to map the intensity values from the 3d image data to a specific colour, which is what the TransferFunction1D is for, or from colour to colour which is rather more open ended. Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org