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

Home » Public Forums » archive » Re: thresholding/color question
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: thresholding/color question [message #18706] Wed, 02 February 2000 00:00
Ben Tupper is currently offline  Ben Tupper
Messages: 186
Registered: August 1999
Senior Member
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Patty Howell wrote:
<blockquote TYPE=CITE>I want to display all values of an image with
<br>amplitudes greater than a given threshold limit in
<br>red, while leaving the rest of the image in
<br>greyscale. I know there has to be a simple way to
<br>do this, but I sure can't find it.</blockquote>
Hello,
<p>There are two things I would do if I had an 8bit image and I was working
through the color table (DEVICE, Decomposed = 0).
<p>First, place a tweak the greyscale color table so that red appears where
you want it.
<br>&nbsp;
<br>&nbsp;&nbsp;&nbsp; YourIndex = 255 ; or maybe YourIndex = !D.Table_Size-1&nbsp;&nbsp;
this assumes you don't mind losing the top color
<br>&nbsp;&nbsp; TVLCT, 255,0,0, YourIndex
<p>Second, reassign all values above the threshold to your red color.
<p>&nbsp; ThesePixels = Where(Image GT Threshold, Count)
<br>&nbsp;&nbsp; If Count GT 0 Then Image[ThesePixels] = YourIndex
<p>It is a different story if you have a 24bit image.&nbsp; I would have
to chew on it a bit.
<pre>Ben</pre>

<pre></pre>

<pre>-&nbsp;
Ben Tupper

Bigelow Laboratory for Ocean Science
tupper@seadas.bigelow.org

pemaquidriver@tidewater.net</pre>
&nbsp;</html>
[Message index]
 
Read Message
Previous Topic: mapping data & grid (MAP_SET MAP_GRID)
Next Topic: How does IDL calculate the graph axis values?

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

Current Time: Fri Oct 10 14:54:09 PDT 2025

Total time taken to generate the page: 0.16192 seconds