[ImageJ-devel] how to get current ImageJ context in ImageJ 2

Johannes Schindelin Johannes.Schindelin at gmx.de
Tue Apr 10 14:35:06 CDT 2012


Hi,

On Tue, 10 Apr 2012, Curtis Rueden wrote:

> Hi Albert,
> 
> > Does this mean that a scripting interpreter will have to declare,
> > internally, a variable that points to the ImageJ context?
> 
> Yeah, the idea is that when you run a script, the context will be injected
> somehow. The scripts themselves will not need to care, of course. Probably
> the scripting framework will provide a setContext(ImageJ) method for such a
> purpose, and its logic will fail (with an informative exception) if the
> current context is null.

FWIW I am thinking more like injecting a script-global variable called
'context'.

Ciao,
Dscho



More information about the ImageJ-devel mailing list