IJ1 Macro recorder

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

IJ1 Macro recorder

Olivier Burri
Hello all,

Since today I would estimate, the macro recorder fails to record the arguments on several commands.

As an example
Opening an image is not recorded.
The parameters of a Z Projection are not recorded, only
        run("Z Project...");
Which then of course prompts a dialog box when running the macro
The parameters when duplicating an image are not recorded either.

I am on version 1.49j of ImageJ and Fiji all up to date as of today.

Thank you for any help regarding this issue.

Best

Oli

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: IJ1 Macro recorder

Gabriel Landini
On Wednesday 17 Sep 2014 12:45:33 you wrote:

> Since today I would estimate, the macro recorder fails to record the
> arguments on several commands.
>
> As an example
> Opening an image is not recorded.
> The parameters of a Z Projection are not recorded, only
> run("Z Project...");
> Which then of course prompts a dialog box when running the macro
> The parameters when duplicating an image are not recorded either.
>
> I am on version 1.49j of ImageJ and Fiji all up to date as of today.

I just recorded this:
run("MRI Stack (528K)");
run("Z Project...", "projection=[Standard Deviation]");
selectWindow("mri-stack.tif");
selectWindow("STD_mri-stack.tif");
run("Duplicate...", "title=ttt");

Are you sure you are in 1.49j? The latest build is 1.49h14 (the one I tried).

Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: IJ1 Macro recorder

Jan Eglinger
In reply to this post by Olivier Burri
Hi Olivier,

On 17.09.14 14:45, Burri Olivier wrote:
> Since today I would estimate, the macro recorder fails to record the arguments on several commands.

I can confirm that bug occurs whenever you use the default options for
some of the ImageJ commands that use "smart recording".

I reported this ImageJ bug a while ago on the Fiji bug tracker:
http://fiji.sc/bugzilla/show_bug.cgi?id=828

Cheers,
Jan


>
> As an example
> Opening an image is not recorded.
> The parameters of a Z Projection are not recorded, only
> run("Z Project...");
> Which then of course prompts a dialog box when running the macro
> The parameters when duplicating an image are not recorded either.
>
> I am on version 1.49j of ImageJ and Fiji all up to date as of today.
>
> Thank you for any help regarding this issue.
>
> Best
>
> Oli
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: IJ1 Macro recorder

Gabriel Landini
On Wednesday 17 Sep 2014 15:03:33 you wrote:

> Hi Olivier,
>
> On 17.09.14 14:45, Burri Olivier wrote:
> > Since today I would estimate, the macro recorder fails to record the
> > arguments on several commands.
> I can confirm that bug occurs whenever you use the default options for
> some of the ImageJ commands that use "smart recording".
>
> I reported this ImageJ bug a while ago on the Fiji bug tracker:
> http://fiji.sc/bugzilla/show_bug.cgi?id=828

Hi Jan, Oliver,
I still cannot reproduce in IJ1 as reported by Oliver.
It seems to be a Fiji issue. Jan's example records fine here in IJ1:

run("Bat Cochlea Volume (19K)");
run("Z Project...", "projection=[Standard Deviation]");

Did you try the daily build of IJ1?

Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: IJ1 Macro recorder

Olivier Burri
Hi Gabriel and Jan,

I had not tried the daily build yet. And it is true that it is a bug linked to the fact that if all default options are kept, then it does not record the arguments to the run() call.

Example in plain ImageJ calling duplicate without changing the suggested title

selectWindow("AuPbSn40.jpg");
run("Duplicate..."); //No arguments are passed.
If I run duplicate and change the name, then I get
run("Duplicate...", "title=srsrs");

Regarding the Z Project, this no longer happens with the daily build of imageJ and I get the same results as Gabriel.

Thanks for the bug tracker link, I will append to it if I find further bugs in that direction with the latest daily build of IJ and working on Fiji.

Best

Oli

ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: IJ1 Macro recorder

Jan Eglinger
Hi Olivier and Gabriel,

yes, the smart recording behaviour seems to be fixed specifically for "Z
Project..." with this recent commit in 1.49h1:

https://github.com/imagej/imagej1/commit/3185b441

For "Duplicate..." it remains true even in the daily build. Great catch.

Cheers,
Jan


On 17.09.14 15:34, Burri Olivier wrote:

> Hi Gabriel and Jan,
>
> I had not tried the daily build yet. And it is true that it is a bug linked to the fact that if all default options are kept, then it does not record the arguments to the run() call.
>
> Example in plain ImageJ calling duplicate without changing the suggested title
>
> selectWindow("AuPbSn40.jpg");
> run("Duplicate..."); //No arguments are passed.
> If I run duplicate and change the name, then I get
> run("Duplicate...", "title=srsrs");
>
> Regarding the Z Project, this no longer happens with the daily build of imageJ and I get the same results as Gabriel.
>
> Thanks for the bug tracker link, I will append to it if I find further bugs in that direction with the latest daily build of IJ and working on Fiji.
>
> Best
>
> Oli
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: IJ1 Macro recorder

Gabriel Landini
On Wednesday 17 Sep 2014 15:47:27 Jan Eglinger wrote:
> For "Duplicate..." it remains true even in the daily build. Great catch.

I see... yes the duplicate bug is there. I could not see it because I was
giving a new name to the duplicate (!).
Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: IJ1 Macro recorder

Michael Schmid
In reply to this post by Olivier Burri
Hi everyone,

not sure if I should consider it a bug, at least concerning the Duplicate command it seems to be a nice feature.

If I record a macro and don't enter a name for the Duplicate, I want the default name, e.g. "AuPbSn40-1.jpg".

Now, if I run the macro on 'blobs.gif', it would be strange to get the duplicate of the blobs  named "AuPbSn40-1.jpg"

Of course, if I record later on
  selectWindow("AuPbSn40-1.jpg");
it won't work any more, but the same will be true for selecting the original file
  selectWindow("AuPbSn40.jpg");
if I have actually run the macro on 'blobs.gif'


Michael
________________________________________________________________
On Sep 17, 2014, at 15:34, Burri Olivier wrote:

> Hi Gabriel and Jan,
>
> I had not tried the daily build yet. And it is true that it is a bug linked to the fact that if all default options are kept, then it does not record the arguments to the run() call.
>
> Example in plain ImageJ calling duplicate without changing the suggested title
>
> selectWindow("AuPbSn40.jpg");
> run("Duplicate..."); //No arguments are passed.
> If I run duplicate and change the name, then I get
> run("Duplicate...", "title=srsrs");
>
> Regarding the Z Project, this no longer happens with the daily build of imageJ and I get the same results as Gabriel.
>
> Thanks for the bug tracker link, I will append to it if I find further bugs in that direction with the latest daily build of IJ and working on Fiji.
>
> Best
>
> Oli
>
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: IJ1 Macro recorder

Gabriel Landini
On Wednesday 17 Sep 2014 17:15:34 you wrote:
> not sure if I should consider it a bug, at least concerning the Duplicate
> command it seems to be a nice feature.

The problem becomes that you record a macro, don't give a name. IJ renames it
as imagename-1. That is fine.
But when you run the recorded script, as there is no name specified, a dialog
pops up, instead of renaming the image as imagename-1. This stops the macro
running.

I must say that I do not remember well if this has changed recently or how was
it in older versions.

Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: IJ1 Macro recorder

Jan Eglinger
Hi all,

my suggestion in the bug report [1] was to record a space string (" ")
when all parameters were left at the default values. That way, all
missing parameters are filled by default values when being run as a macro.

run("Duplicate...", " ");

This will result in the desired behaviour, duplicating an image with the
default name generated from the current image title.

Cheers,
Jan

[1]:
http://fiji.sc/bugzilla/show_bug.cgi?id=828#c0


On 17.09.14 17:29, Gabriel Landini wrote:

> On Wednesday 17 Sep 2014 17:15:34 you wrote:
>> not sure if I should consider it a bug, at least concerning the Duplicate
>> command it seems to be a nice feature.
>
> The problem becomes that you record a macro, don't give a name. IJ renames it
> as imagename-1. That is fine.
> But when you run the recorded script, as there is no name specified, a dialog
> pops up, instead of renaming the image as imagename-1. This stops the macro
> running.
>
> I must say that I do not remember well if this has changed recently or how was
> it in older versions.
>
> Cheers
>
> Gabriel
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: IJ1 Macro recorder

Michael Schmid
In reply to this post by Gabriel Landini
Hi Gabriel,

ok, now I understand the problem. Hmm, I fear, then recording nothing should be considered a bug...

A good possibility would be recording
  run("Duplicate...", "Title=[]"); or
  run("Duplicate...", "Title=");

This would cause the macro to use the default text, e.g. 'blobs-1.gif'

[ Note that the same trick does not work with numbers, you can't have
  run("Median...", "radius="); //causes an error
But her it would not make sense to use the dafualt value in a macro, because it depend on the value that has been used before ]

Michael
________________________________________________________________
On Sep 17, 2014, at 17:29, Gabriel Landini wrote:

> On Wednesday 17 Sep 2014 17:15:34 you wrote:
>> not sure if I should consider it a bug, at least concerning the Duplicate
>> command it seems to be a nice feature.
>
> The problem becomes that you record a macro, don't give a name. IJ renames it
> as imagename-1. That is fine.
> But when you run the recorded script, as there is no name specified, a dialog
> pops up, instead of renaming the image as imagename-1. This stops the macro
> running.
>
> I must say that I do not remember well if this has changed recently or how was
> it in older versions.
>
> Cheers
>
> Gabriel
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: IJ1 Macro recorder

Jan Eglinger
Hi,

On 17.09.14 17:54, Michael Schmid wrote:
>    run("Duplicate...", "Title=[]"); or
>    run("Duplicate...", "Title=");
>
> [ Note that the same trick does not work with numbers, you can't have
>    run("Median...", "radius="); //causes an error

     run("Duplicate...", " ");
or
     run("Median...", " ");

would solve the problem in both cases.

Best,
Jan



> ________________________________________________________________
> On Sep 17, 2014, at 17:29, Gabriel Landini wrote:
>
>> On Wednesday 17 Sep 2014 17:15:34 you wrote:
>>> not sure if I should consider it a bug, at least concerning the Duplicate
>>> command it seems to be a nice feature.
>>
>> The problem becomes that you record a macro, don't give a name. IJ renames it
>> as imagename-1. That is fine.
>> But when you run the recorded script, as there is no name specified, a dialog
>> pops up, instead of renaming the image as imagename-1. This stops the macro
>> running.
>>
>> I must say that I do not remember well if this has changed recently or how was
>> it in older versions.
>>
>> Cheers
>>
>> Gabriel
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: IJ1 Macro recorder

Rasband, Wayne (NIH/NIMH) [E]
In reply to this post by Jan Eglinger
On Sep 17, 2014, at 9:47 AM, Jan Eglinger wrote:

> Hi Olivier and Gabriel,
>
> yes, the smart recording behaviour seems to be fixed specifically for "Z Project..." with this recent commit in 1.49h1:
>
> https://github.com/imagej/imagej1/commit/3185b441
>
> For "Duplicate..." it remains true even in the daily build. Great catch.

The "Duplicate..." recording regression is fixed in the latest ImageJ daily build (1.49h15), with this commit

    https://github.com/imagej/imagej1/commit/5d59f226adee5bd94a6c43064cd664e10e2d3aa8

The recorder now records

   run("Duplicate...", " ");

when the default title is used in the dialog.

-wayne


> On 17.09.14 15:34, Burri Olivier wrote:
>> Hi Gabriel and Jan,
>>
>> I had not tried the daily build yet. And it is true that it is a bug linked to the fact that if all default options are kept, then it does not record the arguments to the run() call.
>>
>> Example in plain ImageJ calling duplicate without changing the suggested title
>>
>> selectWindow("AuPbSn40.jpg");
>> run("Duplicate..."); //No arguments are passed.
>> If I run duplicate and change the name, then I get
>> run("Duplicate...", "title=srsrs");
>>
>> Regarding the Z Project, this no longer happens with the daily build of imageJ and I get the same results as Gabriel.
>>
>> Thanks for the bug tracker link, I will append to it if I find further bugs in that direction with the latest daily build of IJ and working on Fiji.
>>
>> Best
>>
>> Oli
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html