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

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

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

Dan McDonald
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.

 
Reply | Threaded
Open this post in threaded view
|

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

Michael Schmid
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.
>
>
Reply | Threaded
Open this post in threaded view
|

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

Gluender-4
Daniel ,

your Macro runs fine here with ImageJ 1.45e and same OS & Java as Michael's.

Best

Herbie

>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.
Reply | Threaded
Open this post in threaded view
|

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

Dan McDonald
In reply to this post by Michael Schmid
Hi Michael, Herbie,

Thanks for the quick response.

The problem occurs even in debug mode, while using one "step" at a time.  So
I don't believe it's a racing issue.

I am running ImageJ 1.45e under Ubuntu 10.10. (maverick); Kernel Linux
2.6.35-28-generic; GNOME 2.32.
Java 1.6.0_10 64bit
Intel i5 cpu and 6GB of ram.

Regards,

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.

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
Michael Schmid
Sent: Wednesday, April 20, 2011 11:10 AM
To: [hidden email]
Subject: Re: Closing an Empty Results Table from within a Macro gives an
error

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.
>
>