Picon
Gravatar

Re: [mv2] Just display image with its LUT

Angus McMorland wrote:
> Hi mv devs / vtk gurus,
> 
> I'm trying to add an image to an mv2 scene, including its colourmap. A 
> while back, Prabhu sent me this script to do that _and_ warp the image 
> on to some arbitrary bump map, but I can't work out which bits of this 
> are needed to just display a flat image, with its colours. Can someone 
> point me in the correct direction please.
> 
>     ws.scale_factor = 0.2

If you set that to 0 you'll get a flat image at the expense of one more 
filter in the pipeline.  However, what you want to do is really not 
clear to me.  If you have only one flat image to show then why do you 
need the second array at all??  Can't you just view the other_img.png??

> An alternative solution would be if I could do mlab.imshow on a 2D array 
> and then assign it an LUT in the module manager, but that doesn't seem 
> to be working. Is that expected?

Yes, that will not work.  The LUT just generates colors from scalars.

cheers,
prabhu

Gmane