|
Hi there!
I'm here again to seek for help and advices. I'm trying to run a batch analysis in Fiji. SO I prepared my macro and it works fine: filtering the images, thresholding, moving them to another folder etc. It's super BUT when I ask the software, last step of the macro, to run the Particles analysis on those images no results table appears. So far I think it's because of the script:
macro "Batch Particle Size" {
dir = getDirectory("Choose a Directory ");
list = getFileList(dir);
setBatchMode(true);
for (i=0; i<list.length; i++) {
path = dir+list[i];
showProgress(i, list.length);
if (!endsWith(path,"/")) open(path);
if (nImages>=1) {
run("8-bit");
run("Find Edges");
setAutoThreshold("Default");
//run("Threshold...");
//setThreshold(0, 40);
setOption("BlackBackground", false);
run("Convert to Mask");
run("Remove Outliers...", "radius=2 threshold=0 which=Bright");
//run("Threshold...");
//setThreshold(10, 255);
setOption("BlackBackground", false);
run("Convert to Mask");
run("Remove Outliers...", "radius=2 threshold=0 which=Dark");
setAutoThreshold("Default");
run("Close");
run("Analyze Particles...", "size=1200-Infinity circularity=0.50-1.00 display exclude include add");
roiManager("Measure");
close();
}
}
}
Briefly what I'm trying to do is:
1-Filter/transform a series of images in a certain folder
2-Analyze those images (analyze particles)
3-Sanving the results.
here is.
Any advices is more than welcome
Thanks in advance.
BG
|