Commit 680f07b8 authored by SHARMA VAIBHAV's avatar SHARMA VAIBHAV
Browse files

Upload New File

parent b7347d75
function action(input, output, filename) {
open(input + filename);
run("Duplicate...", "duplicate");
setMinAndMax(1, 2);
run("Apply LUT", "stack");
setThreshold(2, 255);
setOption("BlackBackground", true);
run("Convert to Mask", "method=Default background=Dark black");
saveAs("AVI", output + filename);
for (i = 0; i < nSlices; i++) {
run("Create Selection");
run("Fit Ellipse");
setForegroundColor(0, 0, 0);
setForegroundColor(0, 0, 0);
run("Fill", "slice");
run("Next Slice [>]");}
saveAs("Results", path + name + "result.csv");
run("Clear Results");
input = getDirectory("input Directory");
output = getDirectory("output directory");
list = getFileList(input);
for (i = 0; i < list.length; i++)
action(input, output, list[i]);
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment