[ImageJ-devel] how to get current ImageJ context in ImageJ 2
ctrueden at wisc.edu
Tue Apr 10 14:31:53 CDT 2012
> 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.
On Tue, Apr 10, 2012 at 2:25 PM, Johannes Schindelin <
Johannes.Schindelin at gmx.de> wrote:
> On Tue, 10 Apr 2012, Albert Cardona wrote:
> > This below is nice: no more global variables.
> > Does this mean that a scripting interpreter will have to declare,
> > internally, a variable that points to the ImageJ context? Otherwise
> > the script cannot know where to reach for the currently active
> > Dataset, or get the list of existing, open Dataset instances.
> Dude. We're still struggling with other things... Scripting is slated for
> the second half of the beta2 phase. See our timeline.
> But yes, in general we will try to have such references, with a fallback
> to ImageJ.getContext() (the result of which may depend on the thread it
> was called from).
> ImageJ-devel mailing list
> ImageJ-devel at imagej.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ImageJ-devel