Login  Register

Re: Can't call 3D viewer static methods in macro

Posted by Benjamin Schmid-2 on Aug 25, 2010; 7:34am
URL: http://imagej.273.s1.nabble.com/Can-t-call-3D-viewer-static-methods-in-macro-tp3687185p3687186.html

Hi Stephen,

> 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."
>
[...]

The syntax for the macro support has changed slightly some time ago. The
above command would now read

call("ij3d.ImageJ3DViewer.resetView");

In general, all 'ImageJ_3D_Viewer' need to be replaced by
'ij3d.ImageJ3DViewer'.

By the way, you can check this also by starting the macro recorder and
manually perform a 'reset view'; it's recorded correctly.

Best wishes,
Bene