ImageJ base code to get access to all the classes and their methods to test new Plugins. https://imagejdocu.tudor.lu/howto/plugins/the_imagej_eclipse_howto
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

19 lines
484 B

// Converts a stack to binary using locally calculated thresholds
setBatchMode(true);
run("Select None");
run("8-bit");
id = getImageID;
for (i=1; i<=nSlices; i++) {
setSlice(i);
run("Duplicate...", "title=temp");
run("Convert to Mask");
invertingLUT = is("Inverting LUT");
run("Copy");
close;
selectImage(id);
run("Paste");
if (i==1 && invertingLUT != is("Inverting LUT"))
run("Invert LUT");
}
run("Select None");