Start ImageJ headless

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

Start ImageJ headless

Daniel Senff
Hello

I'm looking for a way to start ImageJ headless.
I use IJ as a library in one of my projects and I'd like to start an  
ImageJ-instance without having the Windowframe show up.
At the moment there is a show()-call for the frame in the regular  
constructor of the ImageJ-class.

Me and a few colleagues figured a hacked way by overwriting the show
()-method to start it headless. Another way was to create a new  
ImageJ-object and then after instantiation setVisable(false), which  
causes a short flicker, where the window is displayed.
However I would much rather see a clean way introduced into ImageJ.
For example a constructor with a boolean parameter to say whether or  
not the frame should be displayed instantly.

Could this be introduced in a future version? Thanks for your attention.

Daniel
Reply | Threaded
Open this post in threaded view
|

Re: Start ImageJ headless

dscho
Hi,

On Fri, 15 May 2009, Daniel Senff wrote:

> I'm looking for a way to start ImageJ headless.
> I use IJ as a library in one of my projects and I'd like to start an
> ImageJ-instance without having the Windowframe show up.
> At the moment there is a show()-call for the frame in the regular constructor
> of the ImageJ-class.

This is not what typically goes under the label "headless".  The common
use of that label is for machines which do not have any graphical user
interface running, such as cluster machines.  In the most common case,
clusters consist of Linux nodes, and there, your show() hack is not
enough, as already the _creation_ of some GUI elements (most notably, all
elements containing text) will fail without a graphical user interface.

Ciao,
Dscho