top bar

Writing plugins for Micro-Manager

Revision as of 17:31, 2 March 2010 by Arthuredelstein (Talk | contribs)

Micro-Manager has a plugin system similar to ImageJ's. To write a Micro-Manager plugin, simply implement the MMPlugin interface. Note the static String menuName lets you control the name of the plugin that appears in the Micro-Manager Plugins menu.

Micro-Manager's classpath is set up so that Micro-Manager plugins can import classes from:

  1. the Java 2 SE 5.0 Libraries
  2. Micro-Manager
  3. ImageJ
  4. Apache Commons Math

In addition, you have access to the GUI and core instances (objects) already created by Micro-Manager startup. Micro-Manager will call public void setApp(ScriptInterface app); you can get the GUI object and core objects thus: MMStudioMainFrame gui_ = (MMStudioMainFrame) app; CMMCore core_ = gui_.getMMCore();

Micro-Manager distribution includes swing-layout-*.*.jar so that you can use the free Netbeans GUI Builder for your plugin. Make sure you set the "Layout Generation Style" property as explained on the Netbeans website.

© Micro-Manager : Vale Lab, UCSF 2006-2011 | All Rights Reserved | Contact