Login  Register

Can't call 3D viewer static methods in macro

Posted by Steve Huntley on Aug 25, 2010; 5:52am
URL: http://imagej.273.s1.nabble.com/Can-t-call-3D-viewer-static-methods-in-macro-tp3687185.html

I get an error message whenever I try to use a macro to call a static
method in the 3D viewer plugin.  For example, after starting the 3d
viewer, trying to execute the following:

call("ImageJ_3D_Viewer.resetView");

leads to the following message in a popup window:

"Could not find the method resetView with 0 parameter(s) in class
ImageJ_3D_Viewer in line 1."

I am a beginner with ImageJ, and this is my first attempt at writing a
macro.  I am using Ubuntu Jaunty.  I just downloaded the latest release
of ImageJ for Linux bundled with Java from the ImageJ site, and replaced
the included ImageJ 3D Viewer plugin jar with the latest release from
the 3D Viewer site.

The 3D viewer plugin works fine when operated manually.  I can load,
display and manipulate an image stack in the viewer window.  I can also
run the command:

run("3D Viewer");

and the plugin viewer will start up.  But any attempt to call any of the
plugin's static methods from a macro results in an error message similar
to above.

What am I doing wrong?  Do I have to manipulate CLASSPATH values before
starting ImageJ?  Any help or hints would be appreciated, since my
project is dead in the water until I can get past this obstacle.

Thanks,
Steve Huntley