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

Home » Public Forums » archive » Re: Export values from plot window
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Export values from plot window [message #56188] Tue, 16 October 2007 09:50 Go to next message
Jean H. is currently offline  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 #56197 is a reply to message #56188] Tue, 16 October 2007 03:09 Go to previous messageGo to next message
Spon is currently offline  Spon
Messages: 178
Registered: September 2007
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).

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
Re: Export values from plot window [message #56198 is a reply to message #56197] Tue, 16 October 2007 01:40 Go to previous messageGo to next message
vijay is currently offline  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 Go to previous messageGo to next message
Conor is currently offline  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 Go to previous message
mankoff is currently offline  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 Go to previous message
mankoff is currently offline  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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: hist_2d, variable bin size
Next Topic: How to read file to fill an array "partially" ?

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

Current Time: Wed Oct 08 17:34:35 PDT 2025

Total time taken to generate the page: 0.00594 seconds