Resize window and image in a macro

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Resize window and image in a macro

lechristophe
dear all,

With macro language, I'm trying to get images to be displayed in a
window of specified size at a zoom that fills the window. Thanks to the
new setLocation(x,y,width,height) from 1.39a I can specify the location
and the size of the window, but it doesn't change the magnification of
the image displayed in the window. How can I specify the magnification
of the image ("zoom") in order to properly fill (with info line and
stack slider) the window ? In the macro language there is only a
getZoom() function but no setZoom(), and the macro recorder doesn't
record actions with the zoom tool.

A perfect new function would a setZoom("fill") with the "fill" option
that adjust the zoom to the size of the window... In the meantime, do
you know how to do it ?

Christophe Leterrier
Reply | Threaded
Open this post in threaded view
|

Re: Resize window and image in a macro

Gabriel Landini
On Wednesday 12 September 2007 14:59:53 Christophe Leterrier wrote:
In the macro language there is only a
> getZoom() function but no setZoom(), and the macro recorder doesn't
> record actions with the zoom tool.

There is a Image>Zoom>In command. Record that one, not the tool.
G.
Reply | Threaded
Open this post in threaded view
|

Re: Resize window and image in a macro

Wayne Rasband
In reply to this post by lechristophe
In ImageJ 1.39e, due next week, the setLocation(x,y,width,height) macro
function automatically sets the magnification so that the image fills
the window.

-wayne

On Sep 12, 2007, at 9:59 AM, Christophe Leterrier wrote:

> dear all,
>
> With macro language, I'm trying to get images to be displayed in a
> window of specified size at a zoom that fills the window. Thanks to
> the new setLocation(x,y,width,height) from 1.39a I can specify the
> location and the size of the window, but it doesn't change the
> magnification of the image displayed in the window. How can I specify
> the magnification of the image ("zoom") in order to properly fill
> (with info line and stack slider) the window ? In the macro language
> there is only a getZoom() function but no setZoom(), and the macro
> recorder doesn't record actions with the zoom tool.
>
> A perfect new function would a setZoom("fill") with the "fill" option
> that adjust the zoom to the size of the window... In the meantime, do
> you know how to do it ?
>
> Christophe Leterrier
>