Re: Remote controlling ImageJ via a socket?
Posted by
dscho on
Oct 22, 2009; 11:12pm
URL: http://imagej.273.s1.nabble.com/Remote-controlling-ImageJ-via-a-socket-tp3690668p3690669.html
Hi Joachim,
On Fri, 23 Oct 2009, Joachim Wesner wrote:
> I´m still considering the different possibilities to use ImageJ as an
> external "processor" for another App.
>
> One idea clearly is to use the macro and batch options. However, this
> has some disadvantages, one being that when repeatedly doing this,
> ImageJ will be restarted all over again any time, which will make
> processing slow.
>
> So I was wondering, another option would be to have ImageJ already
> running from the start and send "commands" to ImageJ via a network
> socket. What exactly a command is, would need to be defined, however I
> think that re-using Albert Cardonas CLI interface that relies on macro
> language would be a very valid option.
>
> So, has anybody already done something similar? Any suggestions?
ImageJ optionally runs with a socket listener (in Fiji, it is on by
default, but it is not the regular socket listener, but an RMI-based one,
so it is safe enough).
With such a socket listener, starting ImageJ again with command line
options (such as -eval <commands>) will send the commands to the existing
instance.
Hth,
Dscho