Posted by
Saalfeld, Stephan on
Jun 24, 2014; 3:59pm
URL: http://imagej.273.s1.nabble.com/FIJI-IJ2-script-editor-tp5008308p5008402.html
Thanks Curtis. And sorry again for being polemic in my last post.
I want to make sure that everybody understands that I am not questioning
the usability of the scripting system for what it's been designed for:
extensible, standardized execution of foreign language programs,
compatible with how ImageJ2's plugin system works (please correct me if
this is wrong).
However, the interpreters in Fiji serve a very different purpose:
stateful, UI interrupted, ad hoc communication with the running Fiji
instance. Exactly in the same way I would use the terminal in an
operating system. Example workflow:
# I want to assign a transformation of a TrakEM2 patch
# to other TrakEM2 patches in another project
# I click the patch that has the desired transformation
ct = Display.getFront().getActive().getCoordinateTransform();
# I select some desired patches in the other project by clicking them
for (p : Display.getFront().getSelection().getSelected())
p.setCoordinateTransform(ct);
That's my daily life. There is no straight way to do this with the
script editor, a script, or a plugin, because they do not preserve state
between executions or require me to express the UI interaction with the
instance between the two script lines in the script (or wait for it
somehow).
I do not understand what parts of ImageJ2's scripting system would be
beneficial for this mode of operation and therefore do not understand
why the interpreters would need to be ported.
Again, I am sorry if I came across rude in my initial post, but I simply
panicked hearing in a side note that the key tool for my daily use of
Fiji would get removed for reasons that are beyond my understanding.
Thanks and best,
Stephan
On Tue, 2014-06-24 at 09:52 -0500, Curtis Rueden wrote:
> Hi Albert & everyone,
>
> > Why gut the working scripting framework to create a new one? It is
> > orthogonal to image processing and any data structures.
>
> The reasons we rewrote the scripting system are:
>
> 1) Integration with the ImageJ/SciJava module framework. This allows
> scripts to declare typed inputs and outputs, which are usable from other
> contexts besides just ImageJ.
>
> Example scripts at:
> *
>
https://github.com/imagej/imagej-tutorials/blob/577286474be8399eb38d30d66cf0c35ee50bd929/widget-demo/scripts/Widgets_BeanShell.bsh> *
>
https://github.com/imagej/imagej-tutorials/blob/577286474be8399eb38d30d66cf0c35ee50bd929/widget-demo/scripts/Widgets_JavaScript.js>
> Example commands in Java:
> *
>
https://github.com/imagej/imagej-tutorials/tree/577286474be8399eb38d30d66cf0c35ee50bd929/simple-commands/src/main/java>
> Tutorial explaining modules:
> *
>
https://github.com/imagej/imagej-tutorials/blob/577286474be8399eb38d30d66cf0c35ee50bd929/working-with-modules/src/main/java/WorkingWithModules.java>
> Such modules are UI agnostic, and already usable from CellProfiler, KNIME,
> OMERO and Alida [1].
>
> 2) Extensibility. It is now feasible to add additional scripting languages
> to ImageJ, because scripting languages are just plugins. Johannes has
> already done Scala [2] and we are also half done with R [3]. No code
> changes to the core codebase are required. So anyone can add a new ImageJ
> update site that adds support for new scripting languages.
>
> Regards,
> Curtis
>
> [1] See also:
http://developer.imagej.net/2014/04/04/announcing-imagej-ops> [2]
https://github.com/scijava/scripting-scala> [3]
https://github.com/scijava/scripting-r>
>
> On Thu, Jun 19, 2014 at 6:49 PM, Albert Cardona <
[hidden email]> wrote:
>
> > > On Jun 19, 2014, at 6:47 PM, Johannes Schindelin <
> >
[hidden email]> wrote:
> > >
> > > Hi Albert,
> > >
> > >> On Thu, 19 Jun 2014, Albert Cardona wrote:
> > >>
> > >> As the creator of the interpreters, I would prefer if they were to
> > >> remain.
> > >
> > > But... how dedicated are you in that goal? Will you port them to the
> > > SciJava scripting framework, as I had indicated I would not be able
> > afford
> > > the time?
> > >
> > > Ciao,
> > > Johannes
> >
> >
> > Johannes,
> >
> > Once you told me "never ever change a working system".
> >
> > Why gut the working scripting framework to create a new one? It is
> > orthogonal to image processing and any data structures.
> >
> > Alert
> > --
> > ImageJ mailing list:
http://imagej.nih.gov/ij/list.html> >
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html