[ImageJ-devel] ImageJ2 library set up and referencing?

Johannes Schindelin Johannes.Schindelin at gmx.de
Wed Aug 6 04:51:41 CDT 2014


Hi Vera,

On Wed, 6 Aug 2014, Johannes Schindelin wrote:

> Due to limitations in ImageJ 1.x' design, the legacy service --
> responsible for executing any function in ImageJ 1.x -- can be
> instantiated only once per class loader. That means that you have to
> *dispose* of a SciJava context offering a legacy service *before* you can
> instantiate a new context.

I completely forgot to mention that the best practice is to instantiate
the ImageJ object *once* and then reuse that instance, rather than
instantiating a new ImageJ object everytime you want to call ImageJ
functionality.

Ciao,
Johannes



More information about the ImageJ-devel mailing list