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

Home » Public Forums » archive » window size
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
window size [message #40795] Wed, 25 August 2004 14:22 Go to next message
heoa is currently offline  heoa
Messages: 9
Registered: May 2004
Junior Member
I wonder if it is feasible to increase the size of the XINTERANIMATE
window. I tried by using the keyword "SET" to a large value, but it
did not work.
Do any of you have suggestions? Is this possible at all?
Thank you,
Phillipe E. O.
Re: window size [message #58423 is a reply to message #40795] Fri, 01 February 2008 09:53 Go to previous messageGo to next message
Spon is currently offline  Spon
Messages: 178
Registered: September 2007
Senior Member
On Feb 1, 5:51 pm, David Fanning <n...@dfanning.com> wrote:
> rpert...@gmail.com writes:
>> I tried this. However, i cannot compile the Plot line. Commenting it
>> out, I do get a smaller image size. however, my cursor x,y return
>> fraction pixel locations??
>
> I have a feeling you are not running the code I sent you. :-)
>
> If you comment out the PLOT line, it's anyone's guess what
> kind of values you are getting. The PLOT line *is* the
> essential element here.
>
> Well, fractional pixels are good, aren't they? I probably
> should have used ROUND, rather than FIX in my code, but
> they should have been reported in integers, just so I
> didn't scare you. The point is, I didn't tell you
> *what* size window to create. This works wherever
> you want to display the image.
>
> 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.")

Should this:
... XRange=[0:s[1]], YRange=[0:s[2]] ...
perhaps be:
... XRange=[0,s[1]], YRange=[0,s[2]] ..?

As it stands I can't run your code either.

Chris
Re: window size [message #58424 is a reply to message #40795] Fri, 01 February 2008 09:51 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
rpertaub@gmail.com writes:

> I tried this. However, i cannot compile the Plot line. Commenting it
> out, I do get a smaller image size. however, my cursor x,y return
> fraction pixel locations??

I have a feeling you are not running the code I sent you. :-)

If you comment out the PLOT line, it's anyone's guess what
kind of values you are getting. The PLOT line *is* the
essential element here.

Well, fractional pixels are good, aren't they? I probably
should have used ROUND, rather than FIX in my code, but
they should have been reported in integers, just so I
didn't scare you. The point is, I didn't tell you
*what* size window to create. This works wherever
you want to display the image.

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.")
Re: window size [message #58428 is a reply to message #40795] Fri, 01 February 2008 09:10 Go to previous messageGo to next message
rpertaub@gmail.com is currently offline  rpertaub@gmail.com
Messages: 43
Registered: January 2007
Member
On Feb 1, 10:54 am, David Fanning <n...@dfanning.com> wrote:
> rpert...@gmail.com writes:
>> I am displaying an image made up of three channels:
>
>> final_image=lonarr(3,1050,1308)
>> final_Image[0,*,*] =bytscl(final_red)
>> final_Image[1,*,*] = bytscl(final_grn)
>> final_Image[2,*,*] = bytscl(final_blu)
>
>> window,6,title='Reconstructed RGB
>> image',xsize=final_image_size[1],ysize=final_image_size[2]
>
>> tv,final_image,true=1
>
>> cursor,x,y,/device
>
>> My problem is this: My image is quite big, and I do not see all of it
>> (the bottom goes below my screen). As you see, I want to have the
>> ability to use a cursor to pick a point on my image. However, since my
>> image is too big, I have a problem. I tried using rot and demagnify by
>> a factor of 0.5. However, that messes up my coordinates x,y cursor.
>
>> What is a better way to demagnify the image?
>
> How about something like this:
>
> s = Size(image, /Dimensions)
> pos = [0.1, 0.1, 0.9, 0.9]
> TVImage, image, Postition=pos, /Keep_Aspect
> Plot, [0,1], XRange=[0:s[1]], YRange=[0:s[2]], $
> NoData=1, NoErase=1, XStyle=5, YStyle=5, Position=pos
> Cursor, x, y, /Data, /Down & Print, Fix(x), Fix(y)
>
> You can find TVImage here:
>
> http://www.dfanning.com/programs/tvimage.pro
>
> 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.")

I tried this. However, i cannot compile the Plot line. Commenting it
out, I do get a smaller image size. however, my cursor x,y return
fraction pixel locations??
Re: window size [message #58432 is a reply to message #40795] Fri, 01 February 2008 07:54 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
rpertaub@gmail.com writes:

> I am displaying an image made up of three channels:
>
> final_image=lonarr(3,1050,1308)
> final_Image[0,*,*] =bytscl(final_red)
> final_Image[1,*,*] = bytscl(final_grn)
> final_Image[2,*,*] = bytscl(final_blu)
>
> window,6,title='Reconstructed RGB
> image',xsize=final_image_size[1],ysize=final_image_size[2]
>
> tv,final_image,true=1
>
> cursor,x,y,/device
>
> My problem is this: My image is quite big, and I do not see all of it
> (the bottom goes below my screen). As you see, I want to have the
> ability to use a cursor to pick a point on my image. However, since my
> image is too big, I have a problem. I tried using rot and demagnify by
> a factor of 0.5. However, that messes up my coordinates x,y cursor.
>
> What is a better way to demagnify the image?

How about something like this:

s = Size(image, /Dimensions)
pos = [0.1, 0.1, 0.9, 0.9]
TVImage, image, Postition=pos, /Keep_Aspect
Plot, [0,1], XRange=[0:s[1]], YRange=[0:s[2]], $
NoData=1, NoErase=1, XStyle=5, YStyle=5, Position=pos
Cursor, x, y, /Data, /Down & Print, Fix(x), Fix(y)

You can find TVImage here:

http://www.dfanning.com/programs/tvimage.pro

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.")
Re: window size [message #58565 is a reply to message #40795] Fri, 01 February 2008 10:42 Go to previous message
rpertaub@gmail.com is currently offline  rpertaub@gmail.com
Messages: 43
Registered: January 2007
Member
On Feb 1, 1:24 pm, David Fanning <n...@dfanning.com> wrote:
> Spon writes:
>> Should this:
>> ... XRange=[0:s[1]], YRange=[0:s[2]] ...
>> perhaps be:
>> ... XRange=[0,s[1]], YRange=[0,s[2]] ..?
>
>> As it stands I can't run your code either.
>
> Oh, right. I sometimes lose these error messages in
> the IDL Workbench. :-(
>
> No one you are having trouble. I just got new glasses
> and I'm having some troblem adjusting. :-(
>
> Here is code that works:
>
> image = Loaddata(16)
> s = Size(image, /Dimensions)
> pos = [0.1, 0.1, 0.9, 0.9]
> TVImage, image, Position=pos, /Keep_Aspect
> Plot, [0,1], XRange=[0,s[1]], YRange=[0,s[2]], $
> NoData=1, NoErase=1, XStyle=1, YStyle=1, Position=pos
> Cursor, x, y, /Data, /Down & Print, Round(x), Round(y)
>
> I've left the axis there, so you can see how it works
> a little better. :-)
>
> 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.")

It works great!!

Thank You so much!

Today is my last day here, so not sure how much I will be using IDL in
my next position. Just wanted to say thank you for all the help over
last year!
RP
Re: window size [message #58569 is a reply to message #58423] Fri, 01 February 2008 10:24 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Spon writes:

> Should this:
> ... XRange=[0:s[1]], YRange=[0:s[2]] ...
> perhaps be:
> ... XRange=[0,s[1]], YRange=[0,s[2]] ..?
>
> As it stands I can't run your code either.

Oh, right. I sometimes lose these error messages in
the IDL Workbench. :-(

No one you are having trouble. I just got new glasses
and I'm having some troblem adjusting. :-(

Here is code that works:

image = Loaddata(16)
s = Size(image, /Dimensions)
pos = [0.1, 0.1, 0.9, 0.9]
TVImage, image, Position=pos, /Keep_Aspect
Plot, [0,1], XRange=[0,s[1]], YRange=[0,s[2]], $
NoData=1, NoErase=1, XStyle=1, YStyle=1, Position=pos
Cursor, x, y, /Data, /Down & Print, Round(x), Round(y)

I've left the axis there, so you can see how it works
a little better. :-)

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.")
Re: window size [message #58571 is a reply to message #58423] Fri, 01 February 2008 10:07 Go to previous message
Vince Hradil is currently offline  Vince Hradil
Messages: 574
Registered: December 1999
Senior Member
On Feb 1, 11:53 am, Spon <christoph.b...@gmail.com> wrote:
> On Feb 1, 5:51 pm, David Fanning <n...@dfanning.com> wrote:
>
>> rpert...@gmail.com writes:
>>> I tried this. However, i cannot compile the Plot line. Commenting it
>>> out, I do get a smaller image size. however, my cursor x,y return
>>> fraction pixel locations??
>
>> I have a feeling you are not running the code I sent you. :-)
>
>> If you comment out the PLOT line, it's anyone's guess what
>> kind of values you are getting. The PLOT line *is* the
>> essential element here.
>
>> Well, fractional pixels are good, aren't they? I probably
>> should have used ROUND, rather than FIX in my code, but
>> they should have been reported in integers, just so I
>> didn't scare you. The point is, I didn't tell you
>> *what* size window to create. This works wherever
>> you want to display the image.
>
>> 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.")
>
> Should this:
> ... XRange=[0:s[1]], YRange=[0:s[2]] ...
> perhaps be:
> ... XRange=[0,s[1]], YRange=[0,s[2]] ..?
>
> As it stands I can't run your code either.
>
> Chris

Good catch, Chris.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: EMACS or IDL Workbench
Next Topic: county and urban shapefiles

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

Current Time: Wed Oct 08 19:51:27 PDT 2025

Total time taken to generate the page: 0.00490 seconds