Login  Register

Re: stalling macro

Posted by Wayne Rasband on Dec 14, 2006; 10:16pm
URL: http://imagej.273.s1.nabble.com/stalling-macro-tp3700813p3700815.html

On Dec 14, 2006, at 10:02 AM, Paul Batty wrote:

> g'day folks,
>
> I have modified the 'Batchmeasure' macro to suit my images. In place
> of the measure function I have replaced it with 'analyse particles',
> however when I run the macro all appears to work as required but after
> 10 images a page opens up saying "Plugin not found: ZVI_Reade" could
> anyone off some assistance as how to rectify this?

Upgrade to the latest version of ImageJ. Version 1.37t fixed a bug that
caused ImageJ to attempt to open the invisible "Thumbs.db" files that
Microsoft puts in image directories using the ZVI_Reader plugin. It
turns out that Zeiss ZVI files and Thumbs.db files have the same "magic
number" (<http://en.wikipedia.org/wiki/Magic_number_(programming)>).

>  A second problem is keeping the link going, I have tried several
> versions " for (i=0; i<list.length; i++) {"  from the macro code all
> of which comes back with an error in the same line of code. Any help
> on this would be appreciated as well.

What do you mean by "keeping the link going"? What is the error message?

-wayne

> Thanks in advance
> Paul.
>
> My macro code is:
>
> macro "Batch Measure" {
>     requires("1.33n");
>     dir = getDirectory("Choose a Directory ");
>     list = getFileList(dir);
>     start = getTime();
>     setBatchMode(true); // runs up to 6 times faster
>     for (i=0; i<list.length; i++) {
>         path = dir+list[i];
>         showProgress(i, list.length);
>         if (!endsWith(path,"/")) open(path);
>         if (nImages>=1) {
>             run("Set Scale...", "distance=16 known=1 pixel=1 unit=mm
> global");
>             run("8-bit");
>             run("Threshold");
>             run("Analyze Particles...", "size=0-Infinity
> circularity=0.00-1.00 show=Masks summarize");
>             close();
>         }
>     }
>   //print((getTime()-start)/1000);
> }
>