Re: Parent Child relationship in IDL [message #39949 is a reply to message #39814] |
Wed, 23 June 2004 19:54  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
IDLmastertobe writes:
> I took a look at your program and saw how you are able to zoom on a
> section of the original image and output it to a new window.
>
> The program that I am working on does just that, but I want to be able to
> zoom into consecutive images. In your program, what would you do so that
> you can recursively zoom in on the new window, such that the new window
> can do exactly what the original window does.
Well, in the UP section of the draw widget event handler,
don't make a window, just call ZImage with the zoomed image
as an argument. Be sure you use the GROUP_LEADER keyword
so that all the programs you are spawning die appropriately. :-)
'UP': BEGIN
...
; Subset the image, and apply the zoom factor to it.
imageSubset = info.image(x(0):x(1), y(0):y(1))
zoomedImage = Congrid(imageSubset, zoomXSize, zoomYSize, $
Interp=info.interp)
ZImage, zoomedImage, Group_Leader=event.top
...
END
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|