Apology and a question

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

Apology and a question

Jon Harman
Hi,

In a previous post I complained about ImageJ zooming behavior. It turns
out that my issues with zooming had been fixed in August by adding the
"zoom indicator".

My question:
In playing with the new "Action Tool" functionality I tried adding a <
"previous image" and a > "next image macros.  However I can't get the
previous image macro to work.  This is not a problem with the action
tool, I can't seem to pass the argument "backward" to the Open Next
routine.  What am I doing wrong?

Jon


    macro "Prevous Image Action Tool - C037T4d14<" {
        run("Open Next","backward");
   }

    macro "Next Image Action Tool - C037T4d14>" {
        run("Open Next");
   }
Reply | Threaded
Open this post in threaded view
|

Re: Apology and a question

Wayne Rasband
You hold down the alt key and select File>Open Next to open the
previous image. In a macro, call setKeyDown("alt") to simulate holding
down the alt key.

    macro "Prevous Image Action Tool - C037T4d14<" {
        setKeyDown("alt");
        run("Open Next");
   }

Action tools require ImageJ v1.37t or later.

-wayne

On Oct 20, 2006, at 10:42 AM, Jon Harman wrote:

> Hi,
>
> In a previous post I complained about ImageJ zooming behavior. It
> turns out that my issues with zooming had been fixed in August by
> adding the "zoom indicator".
>
> My question:
> In playing with the new "Action Tool" functionality I tried adding a <
> "previous image" and a > "next image macros.  However I can't get the
> previous image macro to work.  This is not a problem with the action
> tool, I can't seem to pass the argument "backward" to the Open Next
> routine.  What am I doing wrong?
>
> Jon
>
>
>    macro "Prevous Image Action Tool - C037T4d14<" {
>        run("Open Next","backward");
>   }
>
>    macro "Next Image Action Tool - C037T4d14>" {
>        run("Open Next");
>   }
>
Reply | Threaded
Open this post in threaded view
|

Re: Apology and a question

Tony Collins-4
In reply to this post by Jon Harman
I was wondering about the zooming problem. Something I have had at the
back of my mind for some time and now may be a good time to mention it.
It would be nice if you held the shift key down and used the zoom tool
it would allow you to make a selection then "Zoom to selection".

I've not given this much of a test, but something like this hacked from
the "line tool" macro:

macro "Zoom-to-selection Tool " {
        requires("1.30l");
        getCursorLoc(x, y, z, flags);
        xstart = x; ystart = y;
        x2=x; y2=y;        
        while (true) {
            getCursorLoc(x, y, z, flags);
            if (flags&16==0) {
                 makeRectangle(xstart, ystart,x-xstart, y-ystart);
                run("To Selection");
                exit;
            }
            if (x!=x2 || y!=y2)
                makeRectangle(xstart, ystart, x-xstart, y-ystart);
            x2=x; y2=y;
            wait(10);
        };
    }

Tony

> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
Jon
> Harman
> Sent: Friday, October 20, 2006 10:42 AM
> To: [hidden email]
> Subject: Apology and a question
>
> Hi,
>
> In a previous post I complained about ImageJ zooming behavior. It
turns
> out that my issues with zooming had been fixed in August by adding the
> "zoom indicator".
Reply | Threaded
Open this post in threaded view
|

Re: Apology and a question

Wayne Rasband
This will be in ImageJ 1.38a, due by the end of the week.

-wayne

On Oct 20, 2006, at 4:38 PM, Tony Collins wrote:

> I was wondering about the zooming problem. Something I have had at the
> back of my mind for some time and now may be a good time to mention it.
> It would be nice if you held the shift key down and used the zoom tool
> it would allow you to make a selection then "Zoom to selection".
>
> I've not given this much of a test, but something like this hacked from
> the "line tool" macro:
>
> macro "Zoom-to-selection Tool " {
>         requires("1.30l");
>         getCursorLoc(x, y, z, flags);
>         xstart = x; ystart = y;
>         x2=x; y2=y;
>         while (true) {
>             getCursorLoc(x, y, z, flags);
>             if (flags&16==0) {
>                  makeRectangle(xstart, ystart,x-xstart, y-ystart);
>                 run("To Selection");
>                 exit;
>             }
>             if (x!=x2 || y!=y2)
>                 makeRectangle(xstart, ystart, x-xstart, y-ystart);
>             x2=x; y2=y;
>             wait(10);
>         };
>     }
>
> Tony
>
>> -----Original Message-----
>> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
> Jon
>> Harman
>> Sent: Friday, October 20, 2006 10:42 AM
>> To: [hidden email]
>> Subject: Apology and a question
>>
>> Hi,
>>
>> In a previous post I complained about ImageJ zooming behavior. It
> turns
>> out that my issues with zooming had been fixed in August by adding the
>> "zoom indicator".
>