'Run Single Instance Listener' option disappeared?

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

'Run Single Instance Listener' option disappeared?

Mathew Guilfoyle
Hi,

Has the ‘Run Single Instance Listener’ option been deprecated?  

With ImageJ version 1.50i each time I open an image volume from the command line I get new instance of ImageJ and there is no ‘Run single instance listener’ option in the Edit>Options>Misc menu.  I’ve downgraded to 1.45s and the option is there and works correctly: each image is opened within the same ImageJ instance.  I’m running OS X 10.11.

If the option has simply been moved I would be grateful for a pointer to where to find it!

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

Re: 'Run Single Instance Listener' option disappeared?

Gabriel Landini
On Tuesday 19 Apr 2016 09:33:45 you wrote:

> Hi,
>
> Has the ‘Run Single Instance Listener’ option been deprecated?
>
> With ImageJ version 1.50i each time I open an image volume from the command
> line I get new instance of ImageJ and there is no ‘Run single instance
> listener’ option in the Edit>Options>Misc menu.  I’ve downgraded to 1.45s
> and the option is there and works correctly: each image is opened within
> the same ImageJ instance.  I’m running OS X 10.11.
>
> If the option has simply been moved I would be grateful for a pointer to
> where to find it!
>

In Options>Misc...

Cheers

Gabriel

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

Re: 'Run Single Instance Listener' option disappeared?

Michael Schmid
In reply to this post by Mathew Guilfoyle
Hi Mathew,

the Option "Run single instance listener" in Edit>Options>Misc is not
present on Mac OS X (unchanged since ages); it should be there on all
other systems. I don't see any recent change related to "Run single
instance listener" in the sources.

Is it on a Mac where you see multiple instances of ImageJ?
If so, when you see two instances of ImageJ, please check in the Dock
with 'Options>Show in Finder' whether you have two different programs
named ImageJ. If so, nothing will prevent you for having these different
programs active at the same time (e.g. if you open one, but the file
associations of 'Open with...' in the Info are set to open the other one)

Michael
________________________________________________________________
On 2016-04-19 10:33, Mathew Guilfoyle wrote:

> Hi,
>
> Has the ‘Run Single Instance Listener’ option been deprecated?
>
> With ImageJ version 1.50i each time I open an image volume from the command line I get new instance of ImageJ and there is no ‘Run single instance listener’ option in the Edit>Options>Misc menu.  I’ve downgraded to 1.45s and the option is there and works correctly: each image is opened within the same ImageJ instance.  I’m running OS X 10.11.
>
> If the option has simply been moved I would be grateful for a pointer to where to find it!
>
> Thanks
> --
> 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: 'Run Single Instance Listener' option disappeared?

ctrueden
Hi Michael, Mathew & everyone,

Michael wrote:
> I don't see any recent change related to "Run single instance
> listener" in the sources.

Note that for technical reasons, the feature was removed from ImageJ2 for a
while, but Johannes readded it last year [1].

However, recently we noticed some issues with it, which Mark Hiner tried to
fix [2].

Mathew wrote:
> each time I open an image volume from the command line I get new
> instance of ImageJ

What is the exact invocation you use on the CLI?

Regards,
Curtis

[1] http://imagej.net/2015-07-02_-_ImageJ_2.0.0-rc-31
[2]
https://github.com/imagej/imagej-legacy/compare/3e5ca223a313f639ee7078e71e7e1630c37e4807...e43e7e3d77091524379006d3fb26eed693035d90


--
Curtis Rueden
LOCI software architect - http://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - http://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Tue, Apr 19, 2016 at 4:34 AM, Michael Schmid <[hidden email]>
wrote:

> Hi Mathew,
>
> the Option "Run single instance listener" in Edit>Options>Misc is not
> present on Mac OS X (unchanged since ages); it should be there on all other
> systems. I don't see any recent change related to "Run single instance
> listener" in the sources.
>
> Is it on a Mac where you see multiple instances of ImageJ?
> If so, when you see two instances of ImageJ, please check in the Dock with
> 'Options>Show in Finder' whether you have two different programs named
> ImageJ. If so, nothing will prevent you for having these different programs
> active at the same time (e.g. if you open one, but the file associations of
> 'Open with...' in the Info are set to open the other one)
>
> Michael
> ________________________________________________________________
>
> On 2016-04-19 10:33, Mathew Guilfoyle wrote:
>
>> Hi,
>>
>> Has the ‘Run Single Instance Listener’ option been deprecated?
>>
>> With ImageJ version 1.50i each time I open an image volume from the
>> command line I get new instance of ImageJ and there is no ‘Run single
>> instance listener’ option in the Edit>Options>Misc menu.  I’ve downgraded
>> to 1.45s and the option is there and works correctly: each image is opened
>> within the same ImageJ instance.  I’m running OS X 10.11.
>>
>> If the option has simply been moved I would be grateful for a pointer to
>> where to find it!
>>
>> Thanks
>> --
>> 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: 'Run Single Instance Listener' option disappeared?

Mathew Guilfoyle
Hi, thanks for the responses

Michael: yes it is on Mac that I’m having the problem.  I'm using the SimpleITK library which calls ImageJ to display image volumes as stacks.

I’ve tried all versions 1.46 through 1.50 and all have the behaviour of starting a new instance when called from the command line.  All instances point to the same executable in my Applications folder (the only copy of ImageJ I have installed).  Version 1.45 is the most recent to have the option to ‘Run single instance listener’ in Edit>Options>Misc

The command line invocation that is being used by SimpleITK (on OS X) uses the 'open' command:

open -a ImageJ64 -n --args -eval 'open("path/to/image");'

The -n flag creates a new instance of the program on each call.  I've played around with this call directly in terminal and if I remove the -n but although the first image to be displayed works (i.e. when ImageJ is started for the first time), subsequent calls don't work i.e. no image is loaded.  Obviously ImageJ 1.45 is working with the above command unmodified indicating that the single instance listener is working.
 
For the moment I’ll continue to have to use 1.45.  This is a shame as 1.50 loads and displays the images noticeably faster but having to close multiple instances every 10 minutes is the more annoying issue!

Cheers

> On 19 Apr 2016, at 18:43, Curtis Rueden <[hidden email]> wrote:
>
> Hi Michael, Mathew & everyone,
>
> Michael wrote:
>> I don't see any recent change related to "Run single instance
>> listener" in the sources.
>
> Note that for technical reasons, the feature was removed from ImageJ2 for a
> while, but Johannes readded it last year [1].
>
> However, recently we noticed some issues with it, which Mark Hiner tried to
> fix [2].
>
> Mathew wrote:
>> each time I open an image volume from the command line I get new
>> instance of ImageJ
>
> What is the exact invocation you use on the CLI?
>
> Regards,
> Curtis
>
> [1] http://imagej.net/2015-07-02_-_ImageJ_2.0.0-rc-31
> [2]
> https://github.com/imagej/imagej-legacy/compare/3e5ca223a313f639ee7078e71e7e1630c37e4807...e43e7e3d77091524379006d3fb26eed693035d90
>
>
> --
> Curtis Rueden
> LOCI software architect - http://loci.wisc.edu/software
> ImageJ2 lead, Fiji maintainer - http://imagej.net/User:Rueden
> Did you know ImageJ has a forum? http://forum.imagej.net/
>
>
> On Tue, Apr 19, 2016 at 4:34 AM, Michael Schmid <[hidden email]>
> wrote:
>
>> Hi Mathew,
>>
>> the Option "Run single instance listener" in Edit>Options>Misc is not
>> present on Mac OS X (unchanged since ages); it should be there on all other
>> systems. I don't see any recent change related to "Run single instance
>> listener" in the sources.
>>
>> Is it on a Mac where you see multiple instances of ImageJ?
>> If so, when you see two instances of ImageJ, please check in the Dock with
>> 'Options>Show in Finder' whether you have two different programs named
>> ImageJ. If so, nothing will prevent you for having these different programs
>> active at the same time (e.g. if you open one, but the file associations of
>> 'Open with...' in the Info are set to open the other one)
>>
>> Michael
>> ________________________________________________________________
>>
>> On 2016-04-19 10:33, Mathew Guilfoyle wrote:
>>
>>> Hi,
>>>
>>> Has the ‘Run Single Instance Listener’ option been deprecated?
>>>
>>> With ImageJ version 1.50i each time I open an image volume from the
>>> command line I get new instance of ImageJ and there is no ‘Run single
>>> instance listener’ option in the Edit>Options>Misc menu.  I’ve downgraded
>>> to 1.45s and the option is there and works correctly: each image is opened
>>> within the same ImageJ instance.  I’m running OS X 10.11.
>>>
>>> If the option has simply been moved I would be grateful for a pointer to
>>> where to find it!
>>>
>>> Thanks
>>> --
>>> 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


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

Re: 'Run Single Instance Listener' option disappeared?

Rasband, Wayne (NIH/NIMH) [E]
In reply to this post by Mathew Guilfoyle
> On Apr 19, 2016, at 4:33 AM, Mathew Guilfoyle <[hidden email]> wrote:
>
> Hi,
>
> Has the ‘Run Single Instance Listener’ option been deprecated?  
>
> With ImageJ version 1.50i each time I open an image volume from the command line I get new instance of ImageJ and there is no ‘Run single instance listener’ option in the Edit>Options>Misc menu.  I’ve downgraded to 1.45s and the option is there and works correctly: each image is opened within the same ImageJ instance.  I’m running OS X 10.11.

The "Run single instance listener" option is not needed on OS X because the ImageJ launcher prevents multiple instances. For example, this command line

  open -a /Users/wayne/ImageJ/ImageJ.app /Users/wayne/ImageJ/blobs.tif

when run repeatedly, opens multiple images but only one ImageJ instance. I am using ImageJ 1.50i, Java 1.6.0_65 and OS X 10.10.5.

-wayne


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

Re: 'Run Single Instance Listener' option disappeared?

Mathew Guilfoyle
So the call that SimpleITK uses as default passes a short macro to open the image (and set other parameters for colour images) e.g.

open -a ImageJ64 --args -eval 'open("/path/to/file.png"); otherCommand();'

This doesn't work for me when repeatedly called at the command line - the image is only displayed on the first call.


I've now set the call to:  

open -a ImageJ64 'path/to/file'

and it works as you say - each image is opened within a single instance (v1.50i).  For my purposes this is fine but for others the loss of the macro commands might be an issue.

Thanks for the help.

> On 19 Apr 2016, at 21:22, Rasband, Wayne (NIH/NIMH) [E] <[hidden email]> wrote:
>
>> On Apr 19, 2016, at 4:33 AM, Mathew Guilfoyle <[hidden email]> wrote:
>>
>> Hi,
>>
>> Has the ‘Run Single Instance Listener’ option been deprecated?  
>>
>> With ImageJ version 1.50i each time I open an image volume from the command line I get new instance of ImageJ and there is no ‘Run single instance listener’ option in the Edit>Options>Misc menu.  I’ve downgraded to 1.45s and the option is there and works correctly: each image is opened within the same ImageJ instance.  I’m running OS X 10.11.
>
> The "Run single instance listener" option is not needed on OS X because the ImageJ launcher prevents multiple instances. For example, this command line
>
>  open -a /Users/wayne/ImageJ/ImageJ.app /Users/wayne/ImageJ/blobs.tif
>
> when run repeatedly, opens multiple images but only one ImageJ instance. I am using ImageJ 1.50i, Java 1.6.0_65 and OS X 10.10.5.
>
> -wayne
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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