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

Home » Public Forums » archive » How to display an image (tvscl, shade_surf, etc.) with values cut-off
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: How to display an image (tvscl, shade_surf, etc.) with values cut-off [message #88758 is a reply to message #88756] Sun, 15 June 2014 09:45 Go to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
On Friday, June 13, 2014 4:52:42 PM UTC-5, bio_guy wrote:
> I have an array (2D image) with value say in the range 0..255.
>
> I want to display the array as an image with a color range, say A..B (based on a given loaded color table.
>
>
>
> My goal: any value below 10 is considered as 10, and any value above 100 is considered as 100. So, I want to display such image.
>

In your favorite plotting function, use the min/ma operators. For example,

cgImage, 10 > img < 100

This does not do any scaling - it simply clamps the min/max value to 10 and 100, respectively.

But, this is the explicit way. You may also want to check all the various keywords available. For example, the function IMAGE() has, specifically, min and max value keywords. But, I think (maybe) that will also the scale the data.
[Message index]
 
Read Message
Read Message
Previous Topic: Possible to create 'keyword_used' type function?
Next Topic: Udpate plot() range when drawing a polygon()

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

Current Time: Wed Oct 08 18:24:28 PDT 2025

Total time taken to generate the page: 0.00217 seconds