Get and Set Image Properties

Author: Joachim Wesner (joachim.wesner at leica-microsystems.com)
History: 2008/03/17: First version
Source: ImpProps.java
Installation: Download ImpProps.java to the plugins folder and compile it using Plugins/Compile and Run.
Description: This plugin demonstrates how to define Java methods that can be called from a macro using the call function. It defines two methods that allow macros to get and set the (string) properties of the active image (ImagePlus). Note that the macro call function can only call static methods with string arguments or no arguments.

call("ImpProps.setProperty", "<key>", "<value>")
Sets property <key> to <value>, returns <value> if successful, "" otherwise (e.g., no active image).

call("ImpProps.getProperty", "<key>")
Returns value of property if set, "" otherwise (not found or no active image).

See Also: Image5D_Extensions plugin (use MacroExtension interface to add functions to macro language)

|Plugins | Home |