ImageJ multi-point tool counter in macro

Dear all,
I am trying to use the multi-point tool for manually counting cells in an image stack. The macro should assist the user in changing slices and counters in parallel.
On the first slice counter 0 should be used, then the user should click OK and the macro changes the stack to the next slice and counter 1 is used … and so on.
The code below illustrates this with a 3-slice stack.
When the macro runs for the first time is does what I intended.
However, when I run it a second time, the counters used are not
0 for slice 1,
1 for slice 2,
2 for slice 3,
2 for slice 1,
1 for slice 2,
2 for slice 3.

@Wayne Is this possibly related to the issue described here?

However, I tried with Fiji updated to ImageJ 1.53d and got the same results.

Thanks, Martin

newImage("HyperStack", "8-bit composite-mode label", 200, 200, 1, 3, 1);

// go through each slice and let the user manually add positive cells
for (i = 1; i < nSlices+1; i++) {
	counternumber = i-1;// I want to start with counter 0
	run("Point Tool...", "type=Hybrid color=Yellow size=Medium label counter=&counternumber");
	waitForUser("next slice", "Counter "+counternumber+"\nMark positive cells with a (left) mouse click.\nClick OK for the next slice");

//open the Counter summary
run("Properties... ");

This ImageJ 1.53c regression is fixed in the latest daily build (1.53e7).

1 Like

Great! Terrific over-night-fix as so often. Can´t imagine what one would have to pay for this if ImageJ would be a company …