Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Re: window size
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 8 Topic 5384 of 6247
Post > Topic >>

Re: window size

by David Fanning <news@[EMAIL PROTECTED] > Feb 1, 2008 at 08:54 AM

rpertaub@[EMAIL PROTECTED]
 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/
Se****e ma de ni thui. ("Perhaps thou speakest truth.")
 




 8 Posts in Topic:
window size
"rpertaub@[EMAIL PRO  2008-02-01 07:42:02 
Re: window size
David Fanning <news@[E  2008-02-01 08:54:47 
Re: window size
"rpertaub@[EMAIL PRO  2008-02-01 09:10:36 
Re: window size
David Fanning <news@[E  2008-02-01 10:51:02 
Re: window size
Spon <christoph.blau@[  2008-02-01 09:53:49 
Re: window size
David Fanning <news@[E  2008-02-01 11:24:48 
Re: window size
Vince Hradil <hradilv@  2008-02-01 10:07:35 
Re: window size
"rpertaub@[EMAIL PRO  2008-02-01 10:42:39 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 13:33:06 CDT 2008.