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.")


|