Re: Screening of images in stack import - ignoring certain
Posted by burt46 on Jan 04, 2016; 11:29pm
URL: http://imagej.273.s1.nabble.com/Screening-of-images-in-stack-import-ignoring-certain-tp5015306p5015322.html
For anyone searching a similar solution, the following worked for me for an RGB Image
threshold = 25;
dir = getDirectory("Choose folder");
run("Image Sequence...", "open=&dir sort");
for (i=nSlices; i>=1; i--) {
setSlice(i);
getRawStatistics(nPixels, mean);
msg = "";
if (mean>threshold) {
run("Delete Slice");
msg = "(deleted)";
}
print(i, mean, msg);
}
resetThreshold;