Re: moving Java plugins from highly interactive to "batch friendly"
Posted by
Gabriel Landini on
Sep 09, 2019; 8:01pm
URL: http://imagej.273.s1.nabble.com/moving-Java-plugins-from-highly-interactive-to-batch-friendly-tp5022429p5022431.html
On Monday, 9 September 2019 19:57:25 BST
[hidden email] wrote:
> I'm looking for "best practices" on writing Java plugins which require
> multiple parameters - and which are written to accept these parameters
> either from their invocation, or as responses from user interacting with
> dialog boxes.
Hi Kenneth,
Long ago, Albert Cardona wrote some plugin design guidelines that I found very
useful for plain IJ plugins (not sure if those still apply for IJ2) showing
how to separate the dialog from the execution. That makes it easy to then call
the exec method of a plugin from another plugin if you know the expected
parameters. It also separates the various preliminary tests (e.g. image type)
from the exec method. Another interesting suggestion is to return but not show
the result image in the exec method.
https://imagej.net/PlugIn_Design_GuidelinesMaybe for most "proper" programmers (which I am not) all this is very obvious
(sorry if it is!), but it was most informative for me .
Regards
Gabriel
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html