<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
As a user and avid amateur developer in ImageJ1, I would vote that
some version of the current macro language be
preserved/supported/developed in ImageJ2. There is a learning curve
to adopting new scripting language syntax and rules that I would
like to avoid when possible. Not sure if that's really the question
here. Curtis has told me that IJ1 support for macros will be
retained in IJ2, but it would be great if the beanshell port
actually kept the macro language alive and growing in IJ2. Am I
hoping for more than can happen, or is that what Dscho and Grant are
discussing here?<br>
<br>
Thanks,<br>
Bill<br>
<br>
On 9/7/11 4:18 PM, Grant B. Harris wrote:
<blockquote cite="mid:4E67D1A2.5030507@mbl.edu" type="cite">
<pre wrap="">All --
Following-up on Lee's message this morning and some of the chatter on
the chat, I'm adding my two (perhaps even three) cent's worth...
-- Scripting Languages
Our plan is to use the scripting engine in Java 6 (JSR-223 Scripting for
the Java Platform). This enables us to be
polyglotic/language-agnostic... Jython, Closure, JavaScript, etc.
As mentioned in the chat, BeanShell is interesting for the fact that it
is syntactically very similar to the ImageJ Macro language - The Macro
Language is a DSL (domain specific language) for image processing and
manipulating the ImageJ environment. "Porting" it to Beanshell (as
suggested by Dscho) sounds like a good idea. And it seems that that
process could produce a layer (i.e. API) that could be accessed by any
scripting language that works with JSR-223.
(Note that MicroManager also uses BeanShell -
<a class="moz-txt-link-freetext" href="http://valelab.ucsf.edu/~MM/MMwiki/index.php/Example_Beanshell_scripts">http://valelab.ucsf.edu/~MM/MMwiki/index.php/Example_Beanshell_scripts</a>)
-- Macro Recording
Our EventBus-based architecture enables straight-forward macro recording
events. A simple experiment/example is the
imagej.ui.swing.plugins.SwingScriptRecorder. It records plugin/module
invocations and their parameter values, and then generates a chunk of
Java-like code.
It remains to be decided how to handle
(this applies to undo/redo as well)
-- Code/Script Generation
The plan is to have a Code Generation API which will enable the
generation of code/script in a variety of languages.
In imagej.ext.script there is a very simple CodeGenerator with a
JavaCodeGenerator implementation.
-- Script Execution
A simple example of programmatic invocation of a plugins is in
imagej.core.plugins.debug.InvokePluginTest which passes the parameters
using varargs.
Using the JSR-223 Scripting engine, scripts can easily access Java
classes. The 'layer' I mentioned earlier would ease the script-writers
effort by providing wrappers to commonly used classes/objects and services.
I'm interested to here other thoughts on these issues.
(See my links and references on scripting here:
<a class="moz-txt-link-freetext" href="http://dev.imagejdev.org/gbh/arch/Scripting.html">http://dev.imagejdev.org/gbh/arch/Scripting.html</a>)
Grant B. Harris
---------------------------------------------------------
Scientific Informatics Analyst, Cellular Dynamics Program
Marine Biological Laboratory, Woods Hole, Mass. 02543
<a class="moz-txt-link-abbreviated" href="mailto:gharris@mbl.edu">gharris@mbl.edu</a>
On 9/7/2011 8:55 AM, Lee Kamentsky wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi all,
What are the plans and timeline for bringing macros and scripting into
ImageJ 2.0? I'm looking for a way to programatically run a script from
CellProfiler. I'm guessing that, as a first pass, I create a legacy
plugin for some ImageJ 1.0 plugin that takes the script as its
argument - I could really use pointers on how to do this. Also, I'm
not sure where scripting is on the roadmap and what the planned
architecture is. I'd opt for a macro / scripting service. As a start,
that sort of thing could talk to the legacy code, but would end up
using the same interfaces to talk to the IJ2 code. I'm also guessing
that the IJ1 scripting engine might only need minor modifications to
reference displays instead of ImagePlus.
--Lee
_______________________________________________
ImageJ-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ImageJ-devel@imagejdev.org">ImageJ-devel@imagejdev.org</a>
<a class="moz-txt-link-freetext" href="http://imagejdev.org/mailman/listinfo/imagej-devel">http://imagejdev.org/mailman/listinfo/imagej-devel</a>
</pre>
</blockquote>
<pre wrap="">
_______________________________________________
ImageJ-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ImageJ-devel@imagejdev.org">ImageJ-devel@imagejdev.org</a>
<a class="moz-txt-link-freetext" href="http://imagejdev.org/mailman/listinfo/imagej-devel">http://imagejdev.org/mailman/listinfo/imagej-devel</a>
.
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<meta name="Title" content="">
<meta name="Keywords" content="">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="ProgId" content="Word.Document">
<meta name="Generator" content="Microsoft Word 2008">
<meta name="Originator" content="Microsoft Word 2008">
<link rel="File-List" href="Signature_files/filelist.xml">
<!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Author>Bill Mohler</o:Author>
<o:Template>Normal.dotm</o:Template>
<o:LastAuthor>Bill Mohler</o:LastAuthor>
<o:Revision>5</o:Revision>
<o:TotalTime>4</o:TotalTime>
<o:Created>2010-07-23T20:48:00Z</o:Created>
<o:LastSaved>2010-07-23T20:57:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Words>94</o:Words>
<o:Characters>536</o:Characters>
<o:Company>UConn Health Center</o:Company>
<o:Lines>4</o:Lines>
<o:Paragraphs>1</o:Paragraphs>
<o:CharactersWithSpaces>658</o:CharactersWithSpaces>
<o:Version>12.256</o:Version>
</o:DocumentProperties>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:Zoom>200</w:Zoom>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:TrackMoves>false</w:TrackMoves>
<w:TrackFormatting/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:SplitPgBreakAndParaMark/>
<w:UseFELayout/>
</w:Compatibility>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="276">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Times;
        panose-1:2 0 5 0 0 0 0 0 0 0;
        mso-font-charset:0;
        mso-generic-font-family:auto;
        mso-font-pitch:variable;
        mso-font-signature:3 0 0 0 1 0;}
@font-face
        {font-family:Webdings;
        panose-1:5 3 1 2 1 5 9 6 7 3;
        mso-font-charset:2;
        mso-generic-font-family:auto;
        mso-font-pitch:variable;
        mso-font-signature:0 0 65536 0 -2147483648 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";
        mso-ascii-font-family:Times;
        mso-fareast-font-family:"Times New Roman";
        mso-fareast-theme-font:minor-fareast;
        mso-hansi-font-family:Times;
        mso-bidi-font-family:"Times New Roman";
        mso-bidi-theme-font:minor-bidi;
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
tt
        {font-family:Courier;
        mso-ascii-font-family:Courier;
        mso-fareast-font-family:"Times New Roman";
        mso-fareast-theme-font:minor-fareast;
        mso-hansi-font-family:Courier;
        mso-bidi-font-family:Courier;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
span.GramE
        {mso-style-name:"";
        mso-gram-e:yes;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0in 5.4pt 0in 5.4pt;
        mso-para-margin:0in;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-ascii-font-family:Cambria;
        mso-ascii-theme-font:minor-latin;
        mso-hansi-font-family:Cambria;
        mso-hansi-theme-font:minor-latin;}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1027"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1"/>
</o:shapelayout></xml><![endif]-->
<div class="Section1">
<p class="MsoNormal"><tt>William A. Mohler </tt></p>
<div>
<p class="MsoNormal"><tt>Associate Professor </tt><span
style="font-family:Courier;
mso-bidi-font-family:Courier"><br>
<tt>Dept. of Genetics and Developmental Biology </tt><br>
<tt>University of Connecticut Health Center </tt><br
style="mso-special-character:
line-break">
<!--[if !supportLineBreakNewLine]--><br
style="mso-special-character:line-break">
<!--[endif]--><tt><o:p></o:p></tt></span></p>
<p class="MsoNormal"><b
style="mso-bidi-font-weight:normal;mso-bidi-font-weight:
normal"><span><span
style="font-family:Courier;color:windowtext">Physical
Address:</span></span></b><b
style="mso-bidi-font-weight:normal"><span
style="color:windowtext"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span><span
style="font-family:Courier;color:windowtext">Room
R1159<o:p></o:p></span></span></p>
<p class="MsoNormal"><span><span
style="font-family:Courier;color:windowtext">Cell
and Genome Sciences Building<o:p></o:p></span></span></p>
<p class="MsoNormal"><span><span
style="font-family:Courier;color:windowtext">400
Farmington Ave.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span><span
style="font-family:Courier;color:windowtext">Farmington,
CT<o:p></o:p></span></span></p>
<p class="MsoNormal"><span><span
style="font-family:Courier;color:windowtext"><o:p> </o:p></span></span></p>
<p class="MsoNormal"><b
style="mso-bidi-font-weight:normal;mso-bidi-font-weight:
normal"><span><span
style="font-family:Courier;color:windowtext">Mail
Address:<o:p></o:p></span></span></b></p>
<p class="MsoNormal"><span><span
style="font-family:Courier;color:windowtext">MC-6403<o:p></o:p></span></span></p>
<p class="MsoNormal"><span><span
style="font-family:Courier;color:windowtext">263
Farmington Ave.<o:p></o:p></span></span></p>
<p class="MsoNormal"><span><span
style="font-family:Courier;color:windowtext">Farmington,
CT<span style="mso-spacerun: yes"> </span>06030-6403</span></span><tt>
</tt><span
style="font-family:Courier;mso-bidi-font-family:Courier"><br>
<br>
<tt><a href="mailto:wmohler@neuron.uchc.edu">wmohler@neuron.uchc.edu</a>
</tt><br>
<tt><b
style="mso-bidi-font-weight:normal;mso-bidi-font-weight:normal">Mobile:
(860)
985-2719</b> <o:p></o:p></tt></span></p>
<p class="MsoNormal"><span class="SpellE"><span class="GramE"><tt>skype</tt></span></span><tt>:
<span class="SpellE">wmohler</span> </tt><span
style="font-family:Courier;
mso-bidi-font-family:Courier"><br>
<tt>Office: (860) 679-1833, room R1159<span
style="mso-tab-count:1"> </span>
</tt><br>
<tt>Lab: (860) 679-1834, room R1265 </tt><br>
<tt>Fax: (314) 689-1833 <o:p></o:p></tt></span></p>
<p class="MsoNormal"><tt><a
href="http://genetics.uchc.edu/Faculty/assoc_professors/mohler.html">http://genetics.uchc.edu/Faculty/assoc_professors/mohler.html</a></tt><br>
<span style="font-family:Webdings;color:#009900">P</span><span
style="color:#009900"> </span><tt><span
style="color:#009900">Think before you
print</span></tt> </p>
</div>
</div>
</div>
</body>
</html>