From macros to Plug-Ins

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

From macros to Plug-Ins

R Heberto Ghezzo, Dr
Hello,
I have problems with this e-mail, Thanks Wayne for changing my address
Now. . .
I have a macro with the commands
. . . set up a net of test points
for(i=0, 1<5, i++)
  for(j =0 j<5, j++)
     x = 10 + 10*i;
     y = 10 * 10*j;
. . . . select the object and copy to a temp image
doWand(x,y);
run("Measure");
a = getResult("Area");
if( a > 0.5 ){
  getSelectionBounds(x1,y1,w1,h1);
  getSelectionCoordinates(x,y)
  getSelectionType()
-- then as in the example ---
  run("New...", "name=Outline type=8-bit fill=White width="+getWidth()+" height="+getHeight());
  moveTo(x[0], y[0]);
  for (i=1; i<x.length; i++)
    lineTo(x[i], y[i]);
  if (type==2 || type==3)
    lineTo(x[0], y[0]);
. . . . process the temp image
loop back

Now I want to put all these into a plug in from where I call another that does some work with the image selected and write the results to a file.
Which are the commands to use instead of the macro commands?
Thanks
Heberto Ghezzo Ph.D.
Meakins-Christie Labs
McGill University