[Tioga-users] monochrome image
Sergey Astanin
astanin at calvino.polito.it
Tue Dec 12 10:02:03 EST 2006
Hello!
> But I'm actually only interested if the value is above or below 0 and want
> to plot everything above 0 grey and keep everything else white. I think I
> need the create_monochrome_image_data for that but can't figure it out.
I think they may be done with custom colormap, something like this:
bicolor_colormap = t.create_colormap(
'length' => 4,
'points' => [ 0.0, 0.5-1e-99, 0.5+1e-99, 1.0 ],
'Rs' => [ 0.3, 0.3, 1.0, 1.0 ],
'Gs' => [ 0.3, 0.3, 1.0, 1.0 ],
'Bs' => [ 0.3, 0.3, 1.0, 1.0 ]
)
and use it in t.show_image. This way you could make one half of the image
range appear in gray (rgb:0.3,0.3,0.3), and the other half in white
(rgb:1.0,1.0,1.0), with very narrow transition region. Choosing
'min_value' and 'max_value' symmetrically would place this transition
region in data's zero.
However, I have not tried plotting bicolor images. Let us know if it
works. My use case seems to be close to yours.
Best regards,
Sergey Astanin.
More information about the Tioga-users
mailing list