Can't call ROIManager from Macro/java/javascript/beanshell
Posted by
ImgInterp123 on
Oct 30, 2017; 1:54pm
URL: http://imagej.273.s1.nabble.com/Can-t-call-ROIManager-from-Macro-java-javascript-beanshell-tp5019637.html
Hello,
I am working in ImageJ 2.0.0-rfc-59/1.51n with Java 1.80_66 (64Bit) and am
try to call the RoiManager as a variable via a macro to acces its list. This
is neccesary for the automation of some functions I am currently working.
*It seems to me that the class is not being recognized/found by imageJ. *
the following is code generated from ImageJ's recording function:
rm = RoiManager.getInstance();
if (rm==null) rm = new RoiManager();
imp = IJ.openImage(FOLDERNAME);
rm.addRoi(imp.getRoi());
This throws the following error: "Sourced file: null : Attempt to resolve
method: getInstance() on undefined variable or class name: RoiManager : at
Line: 1 : in file: <unknown file> : RoiManager .getInstance ( ) " in
beanshell.
*Similar complaints are thrown in different programming languages but i can
use the application without any difficulties. * I have tried different
version of ImageJ to no avail (with Java 8) but so far hasn't manage to
solve this issue. Does anyone have a suggestion?
--
Sent from:
http://imagej.1557.x6.nabble.com/--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html