I'm pretty new to ImageJ, and coding in general. I'm trying to make a macro that will duplicate the current open image, threshold the duplicate to get the pixels with fluorescence, make the pixel intensity in the thresholded duplicate binary (0 for pixels with no fluorescence, 1 for pixels with fluorescence), multiply the original and the duplicate, and then get the raw integrated density (RawIntDen). Below is my code. I keep getting an image not found error in line 8 (imageCalculator). Any recommendations on how to fix this? (I'm using Fiji if that helps)
OrigImage = getTitle();
setOption("ScaleConversions", true);
run("8-bit");
run("Duplicate...", "title=TempDuplicate");
TempDuplicate = getTitle();
run("Auto Threshold", "method=Default");
run("Divide...", "value=255");
imageCalculator("Multiply create", "image = OrigImage","image=TempDuplicate.czi", "title=CalcImage");
selectwindow("CalcImage");
run("Set Measurements...", "area integrated area_fraction redirect=None decimal=3");
run("Measure");
selectImage("TempDuplicate");
close();