Login  Register

Closing an Empty Results Table from within a Macro gives an error

Posted by Dan McDonald on Apr 20, 2011; 2:40pm
URL: http://imagej.273.s1.nabble.com/Closing-an-Empty-Results-Table-from-within-a-Macro-gives-an-error-tp3684888.html

I have encountered a problem trying to close an empty Results Table from
within a macro.

 

I have even used the macro recorder to record my manual steps.  When I play
back the recorded steps the program crashes with the error message:
"Unrecognized command: 0."  This is the same result I get when executing my
macro.

 

When I execute the steps manually using the ImageJ toolbar, the series of
commands work fine.  I have copied the recorded macro below.  The Results
Table is empty because a previously defined rectangular selection (not shown
below) did not include any particles.  The macro works fine when the Results
Table has content.  The code below doesn't make much sense as I have
stripped out all but the pertinent commands to demonstrate the problem.

 

The crash occurs upon execution of the run("Close") command.

 

run("Analyze Particles...", "size=0-Infinity circularity=0.00-1.00
show=Nothing display");

run("Clear Results");

run("Close");

run("Measure");

 

Any suggestions?

 

Dan

 

Daniel W. McDonald, President

Phenotype Screening Corporation

4028 Papermill Rd, Suite 10

Knoxville, TN 37909

(865) 385-8641

 

Our product, RootViz FS, was a 2007 R&D100 Award Winner. Rated as one of the
100 most technologically significant products introduced into the
marketplace in the prior year.