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 
Switch to threaded view of this topic Create a new topic Submit Reply
How to display an image (tvscl, shade_surf, etc.) with values cut-off [message #88756] Fri, 13 June 2014 14:52 Go to next message
bio_amateur is currently offline  bio_amateur
Messages: 7
Registered: August 2010
Junior Member
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.

Can we do so with the plotting functions, or I have to adjust the array first?


Thanks,
Tom.
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.
  Switch to threaded view of this topic Create a new topic Submit Reply
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 11:29:24 PDT 2025

Total time taken to generate the page: 0.00410 seconds