Posted by
Luis Boero on
Jul 06, 2016; 7:42pm
URL: http://imagej.273.s1.nabble.com/Macro-to-make-Z-projections-from-lif-stacks-tp5016822.html
Hi! I´ve been trying to develop a macro to get z projections from the stacks I take in the microscope.
run("Bio-Formats Macro Extensions");
inputFolder=getDirectory("");
images=getFileList(inputFolder);
NewDir=inputFolder+"Procesadas";
//File.makeDirectory(NewDir); // creo la carpeta
for (i=0; i<images.length; i++) {
path=inputFolder+images[i];
filename=images[i];
Ext.setId(path);
Ext.getSeriesCount(seriesCount);
for (j=1; j<=seriesCount; j++) {
run("Bio-Formats", "open=path autoscale color_mode=Default view=Hyperstack split_channels stack_order=XYCZT,j);
list = getList("image.titles");
if (list.length==0)
print("No image windows are open");
else {
//print("Image windows:");
for (k=0; k<=list.length; k++) {
print(" "+list[k]);
selectWindow();
run("Z Project...", "projection=[Max Intensity]");
close(title);
}
}
}
When I run the macro, I only get the Max Projection from the channel that corresponds to k=1, but the other one remains as a substack. What can I do?
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html