On Feb 20, 2009, at 6:13 AM, Timo Hansen wrote:
> As a beginner, I have a problem with image stacks, which might also be
> a
> general problem with ImageJ dialogs:
>
> For example, if I create a new stack with a few frames, make a
> selection in
> one of the frames and want to run the "Fill" command, I get a dialog
> box:
>
> Process all 10 images? There is no Undo if you select "Yes".
> Yes/No/Cancel
>
> Independent of my answer, the Fill command is never executed. Am I
> doing
> something wrong? Can I somehow avoid this dialog box (I already used a
> setSlice command so it should be clear which slice should be
> modified...)?
>
> The following macro produces the same problem:
>
> macro "test" {
> newImage("test", "8-bit White", 400, 400, 10);
> for (f=1; f<=10; f++) {
> setSlice(f);
> for (i=1; i<=3; i++) {
> makeOval(i*50,i*100,10,10);
> // the next line the dialog box (Process all 10 images?) and is never
> // executed:
>
> run("Fill");
> }
> }
>
> }
The command recorder Plugins>Macros.Record) will generate the correct
macro calls:
run("Fill", "slice"); // fill the selection in the current slice
run("Fill", "stack"); // fill the selection in all slices
-wayne