8 Sep 17:09
Re: [mv2] Just display image with its LUT
2008/9/6 Prabhu Ramachandran <prabhu-F7jaCKusRBxE2icvEvkEJw@public.gmane.org>
Doh - yes, of course. I can see easily, now you point it out, that that should work.
Sorry for not being clear: I only have one image - it's just that I don't know how to view an image with its colour information (in RGB channels) in mv2. I don't just want to use any old image viewer, as I'm trying to generate a 'stack' of colour images, like in the attached example, which would look better in colour..
> 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?
Is not an image just a 2D array of scalars that I could use to assign colours? I understand that this way I would get different colours to the ones in the original image, but that would be okay, since you've got such a good range of LUTs available. I've just bought one of the VTK books, so I should gradually become more independent on these things, but in the meantime a further explanation would be helpful. In the end today, I hacked it by switching on filled contours, using 256 of them with the range from 0 to 255, and then picking the LUT, in the module manager, that I wanted. It seems this should be easier.
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
Doh - yes, of course. I can see easily, now you point it out, that that should work.
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??
Sorry for not being clear: I only have one image - it's just that I don't know how to view an image with its colour information (in RGB channels) in mv2. I don't just want to use any old image viewer, as I'm trying to generate a 'stack' of colour images, like in the attached example, which would look better in colour..
> 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.
Is not an image just a 2D array of scalars that I could use to assign colours? I understand that this way I would get different colours to the ones in the original image, but that would be okay, since you've got such a good range of LUTs available. I've just bought one of the VTK books, so I should gradually become more independent on these things, but in the meantime a further explanation would be helpful. In the end today, I hacked it by switching on filled contours, using 256 of them with the range from 0 to 255, and then picking the LUT, in the module manager, that I wanted. It seems this should be easier.
cheers,
prabhu
_______________________________________________
Enthought-dev mailing list
Enthought-dev-oRDGkvazHdacsI7C1d+pp9BPR1lH4CV8@public.gmane.org
https://mail.enthought.com/mailman/listinfo/enthought-dev
--
AJC McMorland
Post-doctoral research fellow
Neurobiology, University of Pittsburgh
_______________________________________________ Enthought-dev mailing list Enthought-dev@... https://mail.enthought.com/mailman/listinfo/enthought-dev
RSS Feed