Re: Closing an Empty Results Table from within a Macro gives an error
Posted by
Michael Schmid on
Apr 20, 2011; 3:10pm
URL: http://imagej.273.s1.nabble.com/Closing-an-Empty-Results-Table-from-within-a-Macro-gives-an-error-tp3684888p3684889.html
Hi Daniel,
no problem here (ImageJ 1.45f3, Mac OS X 10.4.11, Java 1.5.0_19).
I tried with both 8-bit and float images.
You could try to insert a 'wait(200)' command (200 millisec delay) to
see whether it is a race condition.
Michael
________________________________________________________________
On 20 Apr 2011, at 16:40, Daniel W McDonald wrote:
> 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.
>
>