i=0;
run("Image Sequence...", "starting=1 increment=1 scale=100 file=");
for(i=5; i<360; i=i+5){
selectWindow("work");

run("TJ Rotate", "z-angle=0.0 y-angle=0.0 x-angle="+i+" scheme=4 filling=0");

while ( isOpen("work rotated") == false){
wait(1);
}

wait(1);

selectWindow("work rotated");
run("Z Code Stack");
selectWindow("Depth Coded Stack");
run("Grouped ZProjector", "projection=[Max Intensity]");
saveAs("Tiff", "C:\\Dokumente und Einstellungen\\bquast\\Eigene Dateien\\Projections\\Proj" +i +".tif");
selectWindow("Depth Coded Stack");
close();
selectWindow("work rotated");
close();
selectWindow("Proj" +i +".tif");
close();
}

