17 Sep 08:29
Re: [mv2] Just display image with its LUT
Angus McMorland wrote: > 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 And sorry for being slow in my response. I got sucked into the scripting feature I just added and it consumed most of my time. > 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.. If the scalar data type of your scalar array is unsigned char then it is treated as a color. If you want it to be treated as a scalar you can do, for example with the surface module: surface.actor.mapper.color_mode = 'map_scalars' Then it will use the lut you pick to map the 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 True but with the exception above. > 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. That will work but will cost you the contouring etc. The above should also work fine. Use what works best for you. cheers, prabhu
RSS Feed