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

Home » Public Forums » archive » Re: rejecting a few pixel values from an array of pixel values
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: rejecting a few pixel values from an array of pixel values [message #70078 is a reply to message #70077] Sat, 13 March 2010 07:40 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
sid writes:

> I am having an image array with 1024*1024 pixel values with pixel
> values ranging from 1.39 to 0.03. Now I need only pixel values ranging
> from 1.1 to 0.8, so please do suggest me what method to follow to get
> only the pixel values of my interest, also suggest if any looping can
> be done for this kind of job.

I take it you are new to IDL. :-)

Here is a suggestion. Don't write loops in IDL. You
can find the image values you want like this:

indices = Where(image GE 0.8 AND image LE 1.1, count)
IF count GT 0 THEN valuesOfInterest = image[indices]

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Previous Topic: Re: re-create a widget
Next Topic: Re: how to display on the unix system

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

Current Time: Tue Dec 02 03:08:03 PST 2025

Total time taken to generate the page: 1.68190 seconds