I want to write a macro for Image J using Java I have an error in the first line when trying to use the images from the specific folder, I don´t know how to solve it.
Source code:
for (File file : new File("E:\\Ghent\\magnel\\Bjorn\\cap 1").listFiles()) {
if (file.isFile() && file.getName().toLowerCase().contains("cap")) {
//imageCalculator("Subtract create", "cap run_0001.fits","DCBB.fits");
imageCalculator("Subtract create",file.getName(),"DC.fits")
//run("Image Calculator...", "image1=[cap run_0001.fits] operation=Subtract image2=DCBB.fits create");
imageCalculator("Divide create", "Result of cap","DEN");
//run("Image Calculator...", "image1=[Result of cap] operation=Divide image2=[DEN] create");
saveAs(file.getName() . "_AD", "C:\\Users\\Nati\\Desktop\\prueba macro\\"_AD".tif");