Re: Export values from plot window [message #56188] |
Tue, 16 October 2007 09:50  |
Jean H.
Messages: 472 Registered: July 2006
|
Senior Member |
|
|
> Hi, from plot window i want to choose random points by using the
> cursor and i want to export it and store it in a variable and also as
> a ascii file( i dont need the x and y coordinates values but i need
> the original values ie DN of the corresponding image).
You might want to study the example draw_widget_data.pro in the
examples/doc/widgets subdirectory of the IDL distribution.
It does what you want... basically you read the X;Y coordinates of the
cursor, transform that to row;colum coordinates, then read the data
underneath. You can easily add this data to an existing variable, and
when you are done, simply save your variable or print it in a file,
using the method in Conor's message.
Jean
|
|
|
|
Re: Export values from plot window [message #56198 is a reply to message #56197] |
Tue, 16 October 2007 01:40   |
vijay
Messages: 10 Registered: March 2007
|
Junior Member |
|
|
On Oct 16, 12:03 am, Conor <cmanc...@gmail.com> wrote:
> On Oct 15, 4:59 am, vijay <vijayans...@gmail.com> wrote:
>
>> Hi all, i had plotted an image for two bands (plot,red,green). From
>> the plot window can i able to
>> store the minimum and maximum values to a variable. I also want to
>> write those two values to an ASCII file, can i able to do that?
>
> Sure!! Just do this:
>
> print,max(green)
> print,min(green)
>
> then, open a text editor, type in the values you see on the screen,
> and save it to a file!
>
> Hmm... I suppose you'd rather do the whole thing in IDL... In that
> case, try this:
>
> minpt = min(green)
> maxpt = max(green)
>
> openw,lun,'filename',/get_lun
> printf,lun,minpt,maxpt
> close,lun
> free_lun,lun
Hi, from plot window i want to choose random points by using the
cursor and i want to export it and store it in a variable and also as
a ascii file( i dont need the x and y coordinates values but i need
the original values ie DN of the corresponding image).
|
|
|
Re: Export values from plot window [message #56204 is a reply to message #56198] |
Mon, 15 October 2007 12:03   |
Conor
Messages: 138 Registered: February 2007
|
Senior Member |
|
|
On Oct 15, 4:59 am, vijay <vijayans...@gmail.com> wrote:
> Hi all, i had plotted an image for two bands (plot,red,green). From
> the plot window can i able to
> store the minimum and maximum values to a variable. I also want to
> write those two values to an ASCII file, can i able to do that?
Sure!! Just do this:
print,max(green)
print,min(green)
then, open a text editor, type in the values you see on the screen,
and save it to a file!
Hmm... I suppose you'd rather do the whole thing in IDL... In that
case, try this:
minpt = min(green)
maxpt = max(green)
openw,lun,'filename',/get_lun
printf,lun,minpt,maxpt
close,lun
free_lun,lun
|
|
|
Re: Export values from plot window [message #56369 is a reply to message #56197] |
Wed, 17 October 2007 15:25  |
mankoff
Messages: 131 Registered: March 2004
|
Senior Member |
|
|
On Oct 16, 11:09 pm, Spon <christoph.b...@gmail.com> wrote:
>> Hi, from plot window i want to choose random points by using the
>> cursor and i want to export it and store it in a variable and also as
>> a ascii file( i dont need the x and y coordinates values but i need
>> the original values ie DN of the corresponding image).
>
> It sounds to me like you'd be better off using ImageJ than IDL for
> this sort of thing. It's freeware, just google it.
>
> Hope this helps
> Chris
Or g3data: http://www.frantz.fi/software/g3data.php
-k.
|
|
|
Re: Export values from plot window [message #56373 is a reply to message #56197] |
Wed, 17 October 2007 12:05  |
mankoff
Messages: 131 Registered: March 2004
|
Senior Member |
|
|
On Oct 16, 11:09 pm, Spon <christoph.b...@gmail.com> wrote:
>> Hi, from plot window i want to choose random points by using the
>> cursor and i want to export it and store it in a variable and also as
>> a ascii file( i dont need the x and y coordinates values but i need
>> the original values ie DN of the corresponding image).
>
> It sounds to me like you'd be better off using ImageJ than IDL for
> this sort of thing. It's freeware, just google it.
>
> Hope this helps
> Chris
Or g3data: http://www.frantz.fi/software/g3data.php
-k.
|
|
|