Login  Register

Re: How to use Macro built in function in my plugin?

Posted by Wayne Rasband on Jan 31, 2008; 8:07pm
URL: http://imagej.273.s1.nabble.com/How-to-use-Macro-built-in-function-in-my-plugin-tp3697341p3697342.html

The built in macro functions are implemented in the
ij/macro/Functions.java source file, which is online at

     
http://rsbweb.nih.gov/ij/developer/source/ij/macro/Functions.java.html

You should probably convert the macro to a PlugIn rather than a
PlugInFilter.  IJ.run("Command") calls can cause "image locked" errors
in a PlugInFilter.

-wayne

On Jan 31, 2008, at 12:22 PM, jiajian shen wrote:

> Hi All,
>
> Sorry to bother again.  This list really helps me a lot in ImageJ
> coding.
>
> I have another question about the Marco and plugin.  I wrote a Marco
> code
> and it runs well.  Due to some reason, I want to change the Macro to a
> PluginFilter.  Now the problem is that a lot of the convenient built in
> functions in Macro can not be recognized by Plugin, "makeLine(xc, yc,
> xb,
> yb)".  My question is that where I can find the source codes of these
> built
> in functions?  If I find these built in function source codes, I can
> get the
> idea how these functions are built, and then I can rewrite these
> functions
> in my plugin?  Am I right? Or is there an better way to link the Macro
> functions to plugin?
>
> Thanks a lot,
> Jiajian
>