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 
Return to the default flat view Create a new topic Submit Reply
Re: window size [message #58428 is a reply to message #40795] Fri, 01 February 2008 09:10 Go to previous messageGo to previous 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??
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: EMACS or IDL Workbench
Next Topic: county and urban shapefiles

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

Current Time: Fri Oct 10 10:23:35 PDT 2025

Total time taken to generate the page: 0.47440 seconds