Re: thresholding/color question [message #18706] |
Wed, 02 February 2000 00:00 |
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>
<br> YourIndex = 255 ; or maybe YourIndex = !D.Table_Size-1
this assumes you don't mind losing the top color
<br> TVLCT, 255,0,0, YourIndex
<p>Second, reassign all values above the threshold to your red color.
<p> ThesePixels = Where(Image GT Threshold, Count)
<br> If Count GT 0 Then Image[ThesePixels] = YourIndex
<p>It is a different story if you have a 24bit image. I would have
to chew on it a bit.
<pre>Ben</pre>
<pre></pre>
<pre>-
Ben Tupper
Bigelow Laboratory for Ocean Science
tupper@seadas.bigelow.org
pemaquidriver@tidewater.net</pre>
</html>
|
|
|