Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Add scripting language for ImageJ macros #7
By bundling ImageJ1 with the ImageJ2 distribution, we can support the IJ1 macro language as is with full backward compatibility. This is great, but users will want more: they want to "mix and match" IJ2 API calls within existing macros. This feature will be an excellent way for people to begin migrating existing workflows into IJ2 without needing to switch all at once.
One way to provide such capabilities would be to port the IJ1 macro language functions on top of BeanShell. This approach would be very powerful because it would allow IJ2 macros to harness the full IJ1 and IJ2 Java APIs, in addition to all the existing macro functions. It would also provide object oriented capabilities, required anyway by IJ2.
The macro language is largely syntactically compatible with BeanShell, with four notable exceptions:
We have already solved 1), and are confident that 2) and 3) will be very easy. 4) is more difficult but enabling it in IJ1 issues a warning about IJ2 compatibility so that users are aware of the consequences.
Alternately, we can simply delegate to ImageJ1's macro evaluator, though this approach would largely lose the ability to mix and match macro code with ImageJ2 API calls.
Either way, this feature will take the form of a new