Re: ImageJ does not wait for ImageJ
Posted by
Michael Schmid on
Sep 17, 2013; 1:12pm
URL: http://imagej.273.s1.nabble.com/ImageJ-does-not-wait-for-ImageJ-tp5004817p5004825.html
On Sep 17, 2013, at 14:43, Gabriel Landini wrote:
> I think that you are not selecting the right images
>
>>> for(i=0; i<n; i++) {
>>> name=getTitle();
>
> I bet that this is not cycling through all open images.
oops, I agree, I missed this point.
You should add something like
selectImage(i+1);
as a first command in the loop. This assumes no other images are open.
Actually, it is surprising why the macro could work anyhow.
Michael
___________________________________________________________________
> //snip
> run("Set Measurements...", "area mean min integrated redirect=None decimal=2");
>
> n=nImages;
>
> for(i=0; i<n; i++) {
> name=getTitle();
> Stack.setPosition(2, 1, 1);
> run("Duplicate...", "title=work channels=1-3");
> selectWindow(name);
> close();
> *wait(500);*
> run("Subtract Background...", "rolling=25 sliding disable");
> *wait(500);*
> run("Measure");
>
> setResult("Description", i, name);
> updateResults();
>
> selectWindow("work");
> close();
> *wait(500);*
> }
> //snip
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html