Re: Obtain Pixel values in ENVI and report those to IDL [message #64130 is a reply to message #64129] |
Thu, 04 December 2008 07:20   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jean H. writes:
> First, I doubt you are doing the right program "combination"... I
> believe you should either do everything within IDL (open an image,
> select the pixel, grow your region), or within Envi, by calling an IDL
> function... but transferring data back and forth is likely going to be
> a pain.
>
> For the first option, well, the degree of complexity depends on what is
> your data and your goal...
>
> ;Open your image
> openr, unit,image, /get_lun
> readu, unit, img
> close, unit & free_lun, unit
>
> ;display it
> tvimage, img
>
> ;select a pixel
> cursor,x,y
>
> ;grow your region and else!
I doubt very much this is going to work, except in a very
narrow set of circumstances. To grow the region, you are
going to have to know the value of the image at a particular
location. In general, you can't obtain that kind of information
from an image display (which, by necessity, is scaled into
the range of 0 to 255 and usually rebinned to fit into a
display window).
You could, for example, get the value of your image at a particular
location in the image by using a program such as IMGWIN:
http://www.dfanning.com/catalyst/imgwin.html
To do this absolutely accurately, you would have to display
the image full size:
IDL> ImgWin, image, /FULL_RESOLUTION
I really have no idea how to do this kind of thing in ENVI, but
the idea for IMGWIN was stolen from ENVI, so I presume a similar
thing is possible. :-)
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.")
|
|
|