comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » display gray image with NaN
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: display gray image with NaN [message #94243 is a reply to message #94240] Sat, 04 March 2017 02:02 Go to previous message
Nikola is currently offline  Nikola
Messages: 53
Registered: November 2009
Member
On Friday, March 3, 2017 at 1:55:26 PM UTC, dashtab...@gmail.com wrote:
> Hello everybody
>
> i have a gray scale image (one band with NaN value) and display it with image() and widget_window().
> i want to show specific values (maybe gt 1000 pixels ) over image with red color.
> like this. http://pasteboard.co/EYXxQWAAW.jpg
>
> Thank you for your help.
> Regards

It is not that trivial. What I normally do is to rescale all the non-NaN values in dataset to the range [0, 254] and assign 255 for the NaN's pixels. Then I make colorscale that has the grey tones between 0 and 254 and red in 255:
r = [FINDGEN(255), 255]
g = [FINDGEN(255), 0]
b = [FINDGEN(255), 0]

This should do the trick.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: logarithmic axis lables
Next Topic: regression with 95% confidence interval

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Dec 02 01:26:22 PST 2025

Total time taken to generate the page: 2.80901 seconds