Stack Label bug in macro

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Stack Label bug in macro

Glen MacDonald-2
Hello,
Instructing the Image>Stacks>Label… command to print frame number on a stack, starting with ‘1’, records as this:
  run("Label...","format=0 starting 1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-1000 use”);
The Label… preview displays correctly the first slice labeled as ‘1’.

However, running this line in a macro prints ‘0’ on the first frame.  
I can work around it, but is an inconsistency.

Regards,
Glen MacDonald
Digital Microscopy Center
Box 357923
University of Washington
Seattle, WA 98195-7923  USA
(206) 616-4156
[hidden email]

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

Re: Stack Label bug in macro

Swayne, Theresa C.

Hi Glen,

I think there was an “=“ somehow missing in “starting 1".

Try this (you might have to replace the automatic curly quotes with normal ones):

run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-1000 use”);

This line labels the first frame (using the Mitosis sample) with 1 as desired. But unfortunately, when I use the overlay option, I get the same label on every frame instead of an incremented label. This seems to be an overlay-specific issue that was discussed recently on this thread<https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match;Match;Matches&z=4&P=29225>:
https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match%3BMatch%3BMatches&z=4&P=29225

If you can use a burned-on label instead of the overlay, the label will increment properly. (Remove the “use” option.)

Hope this helps.
Theresa



On Jun 15, 2016, at 2:22 PM, Glen MacDonald <[hidden email]<mailto:[hidden email]>> wrote:

Hello,
Instructing the Image>Stacks>Label… command to print frame number on a stack, starting with ‘1’, records as this:
run("Label...","format=0 starting 1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-1000 use”);
The Label… preview displays correctly the first slice labeled as ‘1’.

However, running this line in a macro prints ‘0’ on the first frame.
I can work around it, but is an inconsistency.

Regards,
Glen MacDonald
Digital Microscopy Center
Box 357923
University of Washington
Seattle, WA 98195-7923  USA
(206) 616-4156
[hidden email]<mailto:[hidden email]>

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

------------------------------------
Theresa Swayne, Ph.D.
Manager
Confocal and Specialized Microscopy Shared Resource

Herbert Irving Comprehensive Cancer Center
Columbia University Medical Center
1130 St. Nicholas Ave., Room 222A
New York, NY 10032
Phone: 212-851-4613
[hidden email]<mailto:[hidden email]>


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

Re: Stack Label bug in macro

Glen MacDonald-2
Thanks Theresa,
My internal proof reader seems increasingly incompetent!  I had also left out “=“ on the following line for time, which was perfectly working to give ‘0’ seconds for the initial time.


Glen MacDonald
Digital Microscopy Center
Box 357923
University of Washington
Seattle, WA 98195-7923  USA
(206) 616-4156
[hidden email]








> On Jun 15, 2016, at 11:45 AM, Swayne, Theresa C. <[hidden email]> wrote:
>
>
> Hi Glen,
>
> I think there was an “=“ somehow missing in “starting 1".
>
> Try this (you might have to replace the automatic curly quotes with normal ones):
>
> run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-1000 use”);
>
> This line labels the first frame (using the Mitosis sample) with 1 as desired. But unfortunately, when I use the overlay option, I get the same label on every frame instead of an incremented label. This seems to be an overlay-specific issue that was discussed recently on this thread<https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match;Match;Matches&z=4&P=29225>:
> https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match%3BMatch%3BMatches&z=4&P=29225
>
> If you can use a burned-on label instead of the overlay, the label will increment properly. (Remove the “use” option.)
>
> Hope this helps.
> Theresa
>
>
>
> On Jun 15, 2016, at 2:22 PM, Glen MacDonald <[hidden email]<mailto:[hidden email]>> wrote:
>
> Hello,
> Instructing the Image>Stacks>Label… command to print frame number on a stack, starting with ‘1’, records as this:
> run("Label...","format=0 starting 1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-1000 use”);
> The Label… preview displays correctly the first slice labeled as ‘1’.
>
> However, running this line in a macro prints ‘0’ on the first frame.
> I can work around it, but is an inconsistency.
>
> Regards,
> Glen MacDonald
> Digital Microscopy Center
> Box 357923
> University of Washington
> Seattle, WA 98195-7923  USA
> (206) 616-4156
> [hidden email]<mailto:[hidden email]>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> ------------------------------------
> Theresa Swayne, Ph.D.
> Manager
> Confocal and Specialized Microscopy Shared Resource
>
> Herbert Irving Comprehensive Cancer Center
> Columbia University Medical Center
> 1130 St. Nicholas Ave., Room 222A
> New York, NY 10032
> Phone: 212-851-4613
> [hidden email]<mailto:[hidden email]>
>
>
> --
> 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: Stack Label bug in macro

Jan Eglinger
Hi Glen,

to avoid mistakes like the one you mentioned, you can rely on the macro
recorder [1].
This is what it recorded when I used the 'Image > Stacks > Label...'
command on a stack:

     run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24
text=[ Frames] range=1-114 use");

Hope that helps,
Jan

[1]: http://imagej.net/Macro_recorder


On 15.06.2016 21:00, Glen MacDonald wrote:

> Thanks Theresa,
> My internal proof reader seems increasingly incompetent!  I had also left out “=“ on the following line for time, which was perfectly working to give ‘0’ seconds for the initial time.
>
>
> Glen MacDonald
> Digital Microscopy Center
> Box 357923
> University of Washington
> Seattle, WA 98195-7923  USA
> (206) 616-4156
> [hidden email]
>
>
>
>
>
>
>
>
>> On Jun 15, 2016, at 11:45 AM, Swayne, Theresa C. <[hidden email]> wrote:
>>
>>
>> Hi Glen,
>>
>> I think there was an “=“ somehow missing in “starting 1".
>>
>> Try this (you might have to replace the automatic curly quotes with normal ones):
>>
>> run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-1000 use”);
>>
>> This line labels the first frame (using the Mitosis sample) with 1 as desired. But unfortunately, when I use the overlay option, I get the same label on every frame instead of an incremented label. This seems to be an overlay-specific issue that was discussed recently on this thread<https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match;Match;Matches&z=4&P=29225>:
>> https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match%3BMatch%3BMatches&z=4&P=29225
>>
>> If you can use a burned-on label instead of the overlay, the label will increment properly. (Remove the “use” option.)
>>
>> Hope this helps.
>> Theresa
>>
>>
>>
>> On Jun 15, 2016, at 2:22 PM, Glen MacDonald <[hidden email]<mailto:[hidden email]>> wrote:
>>
>> Hello,
>> Instructing the Image>Stacks>Label… command to print frame number on a stack, starting with ‘1’, records as this:
>> run("Label...","format=0 starting 1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-1000 use”);
>> The Label… preview displays correctly the first slice labeled as ‘1’.
>>
>> However, running this line in a macro prints ‘0’ on the first frame.
>> I can work around it, but is an inconsistency.
>>
>> Regards,
>> Glen MacDonald
>> Digital Microscopy Center
>> Box 357923
>> University of Washington
>> Seattle, WA 98195-7923  USA
>> (206) 616-4156
>> [hidden email]<mailto:[hidden email]>
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>> ------------------------------------
>> Theresa Swayne, Ph.D.
>> Manager
>> Confocal and Specialized Microscopy Shared Resource
>>
>> Herbert Irving Comprehensive Cancer Center
>> Columbia University Medical Center
>> 1130 St. Nicholas Ave., Room 222A
>> New York, NY 10032
>> Phone: 212-851-4613
>> [hidden email]<mailto:[hidden email]>
>>
>>
>> --
>> 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: Stack Label bug in macro

Glen MacDonald-2
Hi Jan,
I was using the macro recorder, one of the best inventions ever.  But, copy and paste from the macro recorder seems to have quit working again on the Mac.  I was in a hurry and didn’t want to keep creating new macros to copy single line command tests.  

regards,
Glen MacDonald
Digital Microscopy Center
Box 357923
University of Washington
Seattle, WA 98195-7923  USA
(206) 616-4156
[hidden email]








> On Jun 16, 2016, at 6:54 AM, Jan Eglinger <[hidden email]> wrote:
>
> Hi Glen,
>
> to avoid mistakes like the one you mentioned, you can rely on the macro recorder [1].
> This is what it recorded when I used the 'Image > Stacks > Label...' command on a stack:
>
>    run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-114 use");
>
> Hope that helps,
> Jan
>
> [1]: http://imagej.net/Macro_recorder
>
>
> On 15.06.2016 21:00, Glen MacDonald wrote:
>> Thanks Theresa,
>> My internal proof reader seems increasingly incompetent!  I had also left out “=“ on the following line for time, which was perfectly working to give ‘0’ seconds for the initial time.
>>
>>
>> Glen MacDonald
>> Digital Microscopy Center
>> Box 357923
>> University of Washington
>> Seattle, WA 98195-7923  USA
>> (206) 616-4156
>> [hidden email]
>>
>>
>>
>>
>>
>>
>>
>>
>>> On Jun 15, 2016, at 11:45 AM, Swayne, Theresa C. <[hidden email]> wrote:
>>>
>>>
>>> Hi Glen,
>>>
>>> I think there was an “=“ somehow missing in “starting 1".
>>>
>>> Try this (you might have to replace the automatic curly quotes with normal ones):
>>>
>>> run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-1000 use”);
>>>
>>> This line labels the first frame (using the Mitosis sample) with 1 as desired. But unfortunately, when I use the overlay option, I get the same label on every frame instead of an incremented label. This seems to be an overlay-specific issue that was discussed recently on this thread<https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match;Match;Matches&z=4&P=29225>:
>>> https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match%3BMatch%3BMatches&z=4&P=29225
>>>
>>> If you can use a burned-on label instead of the overlay, the label will increment properly. (Remove the “use” option.)
>>>
>>> Hope this helps.
>>> Theresa
>>>
>>>
>>>
>>> On Jun 15, 2016, at 2:22 PM, Glen MacDonald <[hidden email]<mailto:[hidden email]>> wrote:
>>>
>>> Hello,
>>> Instructing the Image>Stacks>Label… command to print frame number on a stack, starting with ‘1’, records as this:
>>> run("Label...","format=0 starting 1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-1000 use”);
>>> The Label… preview displays correctly the first slice labeled as ‘1’.
>>>
>>> However, running this line in a macro prints ‘0’ on the first frame.
>>> I can work around it, but is an inconsistency.
>>>
>>> Regards,
>>> Glen MacDonald
>>> Digital Microscopy Center
>>> Box 357923
>>> University of Washington
>>> Seattle, WA 98195-7923  USA
>>> (206) 616-4156
>>> [hidden email]<mailto:[hidden email]>
>>>
>>> --
>>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>>
>>> ------------------------------------
>>> Theresa Swayne, Ph.D.
>>> Manager
>>> Confocal and Specialized Microscopy Shared Resource
>>>
>>> Herbert Irving Comprehensive Cancer Center
>>> Columbia University Medical Center
>>> 1130 St. Nicholas Ave., Room 222A
>>> New York, NY 10032
>>> Phone: 212-851-4613
>>> [hidden email]<mailto:[hidden email]>
>>>
>>>
>>> --
>>> 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
|

Copy-paste bug on Mac OSX (was: Stack Label bug in macro)

Jan Eglinger
Hi Glen,

On 16.06.2016 17:12, Glen MacDonald wrote:
>But, copy and paste from the macro recorder seems to have quit working again on the Mac.

yes, this is an annoying bug in Java on Mac that I've encountered before
as well. (There even should be an old bug report tracked somewhere online).

What usually helps is activating any other app, e.g. the Finder, and
re-focussing on ImageJ before pasting the command:

   - Select code in the recorder
   - Cmd-C to copy
   - click on the Desktop background to activate Finder
   - click on the Script editor window
   - Cmd-V to paste

This worked for me in the past.

Cheers
Jan



>
>
>> On Jun 16, 2016, at 6:54 AM, Jan Eglinger <[hidden email]> wrote:
>>
>> Hi Glen,
>>
>> to avoid mistakes like the one you mentioned, you can rely on the macro recorder [1].
>> This is what it recorded when I used the 'Image > Stacks > Label...' command on a stack:
>>
>>    run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-114 use");
>>
>> Hope that helps,
>> Jan
>>
>> [1]: http://imagej.net/Macro_recorder
>>
>>
>> On 15.06.2016 21:00, Glen MacDonald wrote:
>>> Thanks Theresa,
>>> My internal proof reader seems increasingly incompetent!  I had also left out “=“ on the following line for time, which was perfectly working to give ‘0’ seconds for the initial time.
>>>
>>>
>>> Glen MacDonald
>>>
>>>
>>>> On Jun 15, 2016, at 11:45 AM, Swayne, Theresa C. <[hidden email]> wrote:
>>>>
>>>>
>>>> Hi Glen,
>>>>
>>>> I think there was an “=“ somehow missing in “starting 1".
>>>>
>>>> Try this (you might have to replace the automatic curly quotes with normal ones):
>>>>
>>>> run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-1000 use”);
>>>>
>>>> This line labels the first frame (using the Mitosis sample) with 1 as desired. But unfortunately, when I use the overlay option, I get the same label on every frame instead of an incremented label. This seems to be an overlay-specific issue that was discussed recently on this thread<https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match;Match;Matches&z=4&P=29225>:
>>>> https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match%3BMatch%3BMatches&z=4&P=29225
>>>>
>>>> If you can use a burned-on label instead of the overlay, the label will increment properly. (Remove the “use” option.)
>>>>
>>>> Hope this helps.
>>>> Theresa
>>>>
>>>>
>>>>
>>>> On Jun 15, 2016, at 2:22 PM, Glen MacDonald <[hidden email]<mailto:[hidden email]>> wrote:
>>>>
>>>> Hello,
>>>> Instructing the Image>Stacks>Label… command to print frame number on a stack, starting with ‘1’, records as this:
>>>> run("Label...","format=0 starting 1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-1000 use”);
>>>> The Label… preview displays correctly the first slice labeled as ‘1’.
>>>>
>>>> However, running this line in a macro prints ‘0’ on the first frame.
>>>> I can work around it, but is an inconsistency.
>>>>
>>>> Regards,
>>>> Glen MacDonald

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

Re: Copy-paste bug on Mac OSX (was: Stack Label bug in macro)

Glen MacDonald-2
Yes, there was a thread last year and bug was fixed in 1.50e-something.  
But, no, copy and paste from the keyboard does not work.   I recalll that it was once possible to copy from the edit menu then paste from the script window's edit menu or right click.


Glen MacDonald
Digital Microscopy Center
Box 357923
University of Washington
Seattle, WA 98195-7923  USA
(206) 616-4156
[hidden email]








> On Jun 16, 2016, at 8:37 AM, Jan Eglinger <[hidden email]> wrote:
>
> Hi Glen,
>
> On 16.06.2016 17:12, Glen MacDonald wrote:
>> But, copy and paste from the macro recorder seems to have quit working again on the Mac.
>
> yes, this is an annoying bug in Java on Mac that I've encountered before as well. (There even should be an old bug report tracked somewhere online).
>
> What usually helps is activating any other app, e.g. the Finder, and re-focussing on ImageJ before pasting the command:
>
>  - Select code in the recorder
>  - Cmd-C to copy
>  - click on the Desktop background to activate Finder
>  - click on the Script editor window
>  - Cmd-V to paste
>
> This worked for me in the past.
>
> Cheers
> Jan
>
>
>
>>
>>
>>> On Jun 16, 2016, at 6:54 AM, Jan Eglinger <[hidden email]> wrote:
>>>
>>> Hi Glen,
>>>
>>> to avoid mistakes like the one you mentioned, you can rely on the macro recorder [1].
>>> This is what it recorded when I used the 'Image > Stacks > Label...' command on a stack:
>>>
>>>   run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-114 use");
>>>
>>> Hope that helps,
>>> Jan
>>>
>>> [1]: http://imagej.net/Macro_recorder
>>>
>>>
>>> On 15.06.2016 21:00, Glen MacDonald wrote:
>>>> Thanks Theresa,
>>>> My internal proof reader seems increasingly incompetent!  I had also left out “=“ on the following line for time, which was perfectly working to give ‘0’ seconds for the initial time.
>>>>
>>>>
>>>> Glen MacDonald
>>>>
>>>>
>>>>> On Jun 15, 2016, at 11:45 AM, Swayne, Theresa C. <[hidden email]> wrote:
>>>>>
>>>>>
>>>>> Hi Glen,
>>>>>
>>>>> I think there was an “=“ somehow missing in “starting 1".
>>>>>
>>>>> Try this (you might have to replace the automatic curly quotes with normal ones):
>>>>>
>>>>> run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-1000 use”);
>>>>>
>>>>> This line labels the first frame (using the Mitosis sample) with 1 as desired. But unfortunately, when I use the overlay option, I get the same label on every frame instead of an incremented label. This seems to be an overlay-specific issue that was discussed recently on this thread<https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match;Match;Matches&z=4&P=29225>:
>>>>> https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match%3BMatch%3BMatches&z=4&P=29225
>>>>>
>>>>> If you can use a burned-on label instead of the overlay, the label will increment properly. (Remove the “use” option.)
>>>>>
>>>>> Hope this helps.
>>>>> Theresa
>>>>>
>>>>>
>>>>>
>>>>> On Jun 15, 2016, at 2:22 PM, Glen MacDonald <[hidden email]<mailto:[hidden email]>> wrote:
>>>>>
>>>>> Hello,
>>>>> Instructing the Image>Stacks>Label… command to print frame number on a stack, starting with ‘1’, records as this:
>>>>> run("Label...","format=0 starting 1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-1000 use”);
>>>>> The Label… preview displays correctly the first slice labeled as ‘1’.
>>>>>
>>>>> However, running this line in a macro prints ‘0’ on the first frame.
>>>>> I can work around it, but is an inconsistency.
>>>>>
>>>>> Regards,
>>>>> Glen MacDonald

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

Re: Copy-paste bug on Mac OSX

Jan Eglinger
Hi Glen,

that's interesting. Copy and paste from the keyboard *does* work as
expected for me on MacOSX 10.11.5 with an up-to-date Fiji installation
and Java 1.8.0_66

What system/version do you use?

Jan


On 16.06.2016 17:54, Glen MacDonald wrote:

> Yes, there was a thread last year and bug was fixed in 1.50e-something.
> But, no, copy and paste from the keyboard does not work.   I recalll that it was once possible to copy from the edit menu then paste from the script window's edit menu or right click.
>
>
> Glen MacDonald
> Digital Microscopy Center
> Box 357923
> University of Washington
> Seattle, WA 98195-7923  USA
> (206) 616-4156
> [hidden email]
>
>
>
>
>
>
>
>
>> On Jun 16, 2016, at 8:37 AM, Jan Eglinger <[hidden email]> wrote:
>>
>> Hi Glen,
>>
>> On 16.06.2016 17:12, Glen MacDonald wrote:
>>> But, copy and paste from the macro recorder seems to have quit working again on the Mac.
>>
>> yes, this is an annoying bug in Java on Mac that I've encountered before as well. (There even should be an old bug report tracked somewhere online).
>>
>> What usually helps is activating any other app, e.g. the Finder, and re-focussing on ImageJ before pasting the command:
>>
>>  - Select code in the recorder
>>  - Cmd-C to copy
>>  - click on the Desktop background to activate Finder
>>  - click on the Script editor window
>>  - Cmd-V to paste
>>
>> This worked for me in the past.
>>
>> Cheers
>> Jan
>>
>>
>>
>>>
>>>
>>>> On Jun 16, 2016, at 6:54 AM, Jan Eglinger <[hidden email]> wrote:
>>>>
>>>> Hi Glen,
>>>>
>>>> to avoid mistakes like the one you mentioned, you can rely on the macro recorder [1].
>>>> This is what it recorded when I used the 'Image > Stacks > Label...' command on a stack:
>>>>
>>>>   run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-114 use");
>>>>
>>>> Hope that helps,
>>>> Jan
>>>>
>>>> [1]: http://imagej.net/Macro_recorder
>>>>
>>>>
>>>> On 15.06.2016 21:00, Glen MacDonald wrote:
>>>>> Thanks Theresa,
>>>>> My internal proof reader seems increasingly incompetent!  I had also left out “=“ on the following line for time, which was perfectly working to give ‘0’ seconds for the initial time.
>>>>>
>>>>>
>>>>> Glen MacDonald
>>>>>
>>>>>
>>>>>> On Jun 15, 2016, at 11:45 AM, Swayne, Theresa C. <[hidden email]> wrote:
>>>>>>
>>>>>>
>>>>>> Hi Glen,
>>>>>>
>>>>>> I think there was an “=“ somehow missing in “starting 1".
>>>>>>
>>>>>> Try this (you might have to replace the automatic curly quotes with normal ones):
>>>>>>
>>>>>> run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-1000 use”);
>>>>>>
>>>>>> This line labels the first frame (using the Mitosis sample) with 1 as desired. But unfortunately, when I use the overlay option, I get the same label on every frame instead of an incremented label. This seems to be an overlay-specific issue that was discussed recently on this thread<https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match;Match;Matches&z=4&P=29225>:
>>>>>> https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match%3BMatch%3BMatches&z=4&P=29225
>>>>>>
>>>>>> If you can use a burned-on label instead of the overlay, the label will increment properly. (Remove the “use” option.)
>>>>>>
>>>>>> Hope this helps.
>>>>>> Theresa
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Jun 15, 2016, at 2:22 PM, Glen MacDonald <[hidden email]<mailto:[hidden email]>> wrote:
>>>>>>
>>>>>> Hello,
>>>>>> Instructing the Image>Stacks>Label… command to print frame number on a stack, starting with ‘1’, records as this:
>>>>>> run("Label...","format=0 starting 1 interval=1 x=5 y=24 font=24 text=[ Frames] range=1-1000 use”);
>>>>>> The Label… preview displays correctly the first slice labeled as ‘1’.
>>>>>>
>>>>>> However, running this line in a macro prints ‘0’ on the first frame.
>>>>>> I can work around it, but is an inconsistency.
>>>>>>
>>>>>> Regards,
>>>>>> Glen MacDonald
>

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

Re: Copy-paste bug on Mac OSX

Daan VAN DEN BRINK
Hello Jan,

on my system it doesn't work either:

OSX 10.9.5
ImageJ 1.51d
Java 1.8.0_65 (64bit)

by the way, I can copy TO the macro editor from any other application,
but I can't copy from the macro-recorder by key-board short-cut (there's
also no pop-up menu when right clicking on the recorder).

By the way #2, where on http://imagej.net/Fiji can I found out what is
the most recent imagej version? Just to make sure my fiji has updated
itself properly.

Daan

On 16/06/16 18:00, Jan Eglinger wrote:

> Hi Glen,
>
> that's interesting. Copy and paste from the keyboard *does* work as
> expected for me on MacOSX 10.11.5 with an up-to-date Fiji installation
> and Java 1.8.0_66
>
> What system/version do you use?
>
> Jan
>
>
> On 16.06.2016 17:54, Glen MacDonald wrote:
>> Yes, there was a thread last year and bug was fixed in 1.50e-something.
>> But, no, copy and paste from the keyboard does not work.   I recalll
>> that it was once possible to copy from the edit menu then paste from
>> the script window's edit menu or right click.
>>
>>
>> Glen MacDonald
>> Digital Microscopy Center
>> Box 357923
>> University of Washington
>> Seattle, WA 98195-7923  USA
>> (206) 616-4156
>> [hidden email]
>>
>>
>>
>>
>>
>>
>>
>>
>>> On Jun 16, 2016, at 8:37 AM, Jan Eglinger <[hidden email]>
>>> wrote:
>>>
>>> Hi Glen,
>>>
>>> On 16.06.2016 17:12, Glen MacDonald wrote:
>>>> But, copy and paste from the macro recorder seems to have quit
>>>> working again on the Mac.
>>>
>>> yes, this is an annoying bug in Java on Mac that I've encountered
>>> before as well. (There even should be an old bug report tracked
>>> somewhere online).
>>>
>>> What usually helps is activating any other app, e.g. the Finder, and
>>> re-focussing on ImageJ before pasting the command:
>>>
>>>  - Select code in the recorder
>>>  - Cmd-C to copy
>>>  - click on the Desktop background to activate Finder
>>>  - click on the Script editor window
>>>  - Cmd-V to paste
>>>
>>> This worked for me in the past.
>>>
>>> Cheers
>>> Jan
>>>
>>>
>>>
>>>>
>>>>
>>>>> On Jun 16, 2016, at 6:54 AM, Jan Eglinger <[hidden email]>
>>>>> wrote:
>>>>>
>>>>> Hi Glen,
>>>>>
>>>>> to avoid mistakes like the one you mentioned, you can rely on the
>>>>> macro recorder [1].
>>>>> This is what it recorded when I used the 'Image > Stacks >
>>>>> Label...' command on a stack:
>>>>>
>>>>>   run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24
>>>>> text=[ Frames] range=1-114 use");
>>>>>
>>>>> Hope that helps,
>>>>> Jan
>>>>>
>>>>> [1]: http://imagej.net/Macro_recorder
>>>>>
>>>>>
>>>>> On 15.06.2016 21:00, Glen MacDonald wrote:
>>>>>> Thanks Theresa,
>>>>>> My internal proof reader seems increasingly incompetent!  I had
>>>>>> also left out “=“ on the following line for time, which was
>>>>>> perfectly working to give ‘0’ seconds for the initial time.
>>>>>>
>>>>>>
>>>>>> Glen MacDonald
>>>>>>
>>>>>>
>>>>>>> On Jun 15, 2016, at 11:45 AM, Swayne, Theresa C.
>>>>>>> <[hidden email]> wrote:
>>>>>>>
>>>>>>>
>>>>>>> Hi Glen,
>>>>>>>
>>>>>>> I think there was an “=“ somehow missing in “starting 1".
>>>>>>>
>>>>>>> Try this (you might have to replace the automatic curly quotes
>>>>>>> with normal ones):
>>>>>>>
>>>>>>> run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24
>>>>>>> text=[ Frames] range=1-1000 use”);
>>>>>>>
>>>>>>> This line labels the first frame (using the Mitosis sample) with
>>>>>>> 1 as desired. But unfortunately, when I use the overlay option,
>>>>>>> I get the same label on every frame instead of an incremented
>>>>>>> label. This seems to be an overlay-specific issue that was
>>>>>>> discussed recently on this
>>>>>>> thread<https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match;Match;Matches&z=4&P=29225>:
>>>>>>> https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match%3BMatch%3BMatches&z=4&P=29225 
>>>>>>>
>>>>>>>
>>>>>>> If you can use a burned-on label instead of the overlay, the
>>>>>>> label will increment properly. (Remove the “use” option.)
>>>>>>>
>>>>>>> Hope this helps.
>>>>>>> Theresa
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Jun 15, 2016, at 2:22 PM, Glen MacDonald
>>>>>>> <[hidden email]<mailto:[hidden email]>> wrote:
>>>>>>>
>>>>>>> Hello,
>>>>>>> Instructing the Image>Stacks>Label… command to print frame
>>>>>>> number on a stack, starting with ‘1’, records as this:
>>>>>>> run("Label...","format=0 starting 1 interval=1 x=5 y=24 font=24
>>>>>>> text=[ Frames] range=1-1000 use”);
>>>>>>> The Label… preview displays correctly the first slice labeled as
>>>>>>> ‘1’.
>>>>>>>
>>>>>>> However, running this line in a macro prints ‘0’ on the first
>>>>>>> frame.
>>>>>>> I can work around it, but is an inconsistency.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Glen MacDonald
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--

*Daan M. VAN DEN BRINK*

Laboratoire de Biologie Moléculaire de la Cellule (LBMC) - UMR 5239

  Team Mollereau

*ENS de Lyon* — Site MONOD - LR2

   46 allée d'Italie — 69364 LYON CEDEX 07, FRANCE

   Tel.: +33 (0)4.72.72.89.29


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

Re: Copy-paste bug on Mac OSX

Brandon Hurr
Yes, it has been doing this for a while now.
Copying from the recorder with command + c copies nothing. When I paste, I
get the previous clipboard contents or nothing at all (clipboard empty I
assume).
I got around this issue by clicking "create macro" and then copy within the
editor (FIJI) from one script to the next. It's a small annoyance, but it
is annoying.

Interestingly, I updated FIJI this morning and copying/pasting from the
recorder window works.

OSX 10.11.5
FIJI 2.0.0-rc-43
ImageJ 1.51d
Java 1.8.0_77 64 bit

For updating ImageJ (especially for daily builds), Help... Update ImageJ...

Brandon



On Fri, Jun 17, 2016 at 1:42 AM, Daan VAN DEN BRINK <
[hidden email]> wrote:

> Hello Jan,
>
> on my system it doesn't work either:
>
> OSX 10.9.5
> ImageJ 1.51d
> Java 1.8.0_65 (64bit)
>
> by the way, I can copy TO the macro editor from any other application, but
> I can't copy from the macro-recorder by key-board short-cut (there's also
> no pop-up menu when right clicking on the recorder).
>
> By the way #2, where on http://imagej.net/Fiji can I found out what is
> the most recent imagej version? Just to make sure my fiji has updated
> itself properly.
>
> Daan
>
>
> On 16/06/16 18:00, Jan Eglinger wrote:
>
>> Hi Glen,
>>
>> that's interesting. Copy and paste from the keyboard *does* work as
>> expected for me on MacOSX 10.11.5 with an up-to-date Fiji installation and
>> Java 1.8.0_66
>>
>> What system/version do you use?
>>
>> Jan
>>
>>
>> On 16.06.2016 17:54, Glen MacDonald wrote:
>>
>>> Yes, there was a thread last year and bug was fixed in 1.50e-something.
>>> But, no, copy and paste from the keyboard does not work.   I recalll
>>> that it was once possible to copy from the edit menu then paste from the
>>> script window's edit menu or right click.
>>>
>>>
>>> Glen MacDonald
>>> Digital Microscopy Center
>>> Box 357923
>>> University of Washington
>>> Seattle, WA 98195-7923  USA
>>> (206) 616-4156
>>> [hidden email]
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Jun 16, 2016, at 8:37 AM, Jan Eglinger <[hidden email]>
>>>> wrote:
>>>>
>>>> Hi Glen,
>>>>
>>>> On 16.06.2016 17:12, Glen MacDonald wrote:
>>>>
>>>>> But, copy and paste from the macro recorder seems to have quit working
>>>>> again on the Mac.
>>>>>
>>>>
>>>> yes, this is an annoying bug in Java on Mac that I've encountered
>>>> before as well. (There even should be an old bug report tracked somewhere
>>>> online).
>>>>
>>>> What usually helps is activating any other app, e.g. the Finder, and
>>>> re-focussing on ImageJ before pasting the command:
>>>>
>>>>  - Select code in the recorder
>>>>  - Cmd-C to copy
>>>>  - click on the Desktop background to activate Finder
>>>>  - click on the Script editor window
>>>>  - Cmd-V to paste
>>>>
>>>> This worked for me in the past.
>>>>
>>>> Cheers
>>>> Jan
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>> On Jun 16, 2016, at 6:54 AM, Jan Eglinger <[hidden email]>
>>>>>> wrote:
>>>>>>
>>>>>> Hi Glen,
>>>>>>
>>>>>> to avoid mistakes like the one you mentioned, you can rely on the
>>>>>> macro recorder [1].
>>>>>> This is what it recorded when I used the 'Image > Stacks > Label...'
>>>>>> command on a stack:
>>>>>>
>>>>>>   run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24
>>>>>> text=[ Frames] range=1-114 use");
>>>>>>
>>>>>> Hope that helps,
>>>>>> Jan
>>>>>>
>>>>>> [1]: http://imagej.net/Macro_recorder
>>>>>>
>>>>>>
>>>>>> On 15.06.2016 21:00, Glen MacDonald wrote:
>>>>>>
>>>>>>> Thanks Theresa,
>>>>>>> My internal proof reader seems increasingly incompetent!  I had also
>>>>>>> left out “=“ on the following line for time, which was perfectly working to
>>>>>>> give ‘0’ seconds for the initial time.
>>>>>>>
>>>>>>>
>>>>>>> Glen MacDonald
>>>>>>>
>>>>>>>
>>>>>>> On Jun 15, 2016, at 11:45 AM, Swayne, Theresa C. <
>>>>>>>> [hidden email]> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> Hi Glen,
>>>>>>>>
>>>>>>>> I think there was an “=“ somehow missing in “starting 1".
>>>>>>>>
>>>>>>>> Try this (you might have to replace the automatic curly quotes with
>>>>>>>> normal ones):
>>>>>>>>
>>>>>>>> run("Label...", "format=0 starting=1 interval=1 x=5 y=24 font=24
>>>>>>>> text=[ Frames] range=1-1000 use”);
>>>>>>>>
>>>>>>>> This line labels the first frame (using the Mitosis sample) with 1
>>>>>>>> as desired. But unfortunately, when I use the overlay option, I get the
>>>>>>>> same label on every frame instead of an incremented label. This seems to be
>>>>>>>> an overlay-specific issue that was discussed recently on this thread<
>>>>>>>> https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match;Match;Matches&z=4&P=29225
>>>>>>>> >:
>>>>>>>>
>>>>>>>> https://list.nih.gov/cgi-bin/wa.exe?A2=ind1606&L=IMAGEJ&D=0&1=IMAGEJ&9=A&J=on&d=No+Match%3BMatch%3BMatches&z=4&P=29225
>>>>>>>>
>>>>>>>> If you can use a burned-on label instead of the overlay, the label
>>>>>>>> will increment properly. (Remove the “use” option.)
>>>>>>>>
>>>>>>>> Hope this helps.
>>>>>>>> Theresa
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Jun 15, 2016, at 2:22 PM, Glen MacDonald <
>>>>>>>> [hidden email]<mailto:[hidden email]>> wrote:
>>>>>>>>
>>>>>>>> Hello,
>>>>>>>> Instructing the Image>Stacks>Label… command to print frame number
>>>>>>>> on a stack, starting with ‘1’, records as this:
>>>>>>>> run("Label...","format=0 starting 1 interval=1 x=5 y=24 font=24
>>>>>>>> text=[ Frames] range=1-1000 use”);
>>>>>>>> The Label… preview displays correctly the first slice labeled as
>>>>>>>> ‘1’.
>>>>>>>>
>>>>>>>> However, running this line in a macro prints ‘0’ on the first frame.
>>>>>>>> I can work around it, but is an inconsistency.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Glen MacDonald
>>>>>>>>
>>>>>>>
>>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
> --
>
> *Daan M. VAN DEN BRINK*
>
> Laboratoire de Biologie Moléculaire de la Cellule (LBMC) - UMR 5239
>
>  Team Mollereau
>
> *ENS de Lyon* — Site MONOD - LR2
>
>   46 allée d'Italie — 69364 LYON CEDEX 07, FRANCE
>
>   Tel.: +33 (0)4.72.72.89.29
>
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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