Saving XY files
Posted by Flopi on Aug 04, 2015; 12:37pm
URL: http://imagej.273.s1.nabble.com/Saving-XY-files-tp5013884.html
Hi,
There is most probably a very obvious answer to my question, but I can't definitely find it. Moreover, it worked at some point, and I don't remember changing anything about the part of the code. My goal is, after doing some work on images, to record the XY coordinates of the final image. The problem is, everything goes normally, the log is ok, but at the end, no file is saved. I have been on it for some hours now and I have no idea what is going wrong.
Below is the code :
function Matrixsave(settings,imageName)
{
savepath = path[0]+"\\"+path[1]+"\\XYfiles\\"+imageName+".txt";
pathtest = path[0]+"\\"+path[1]+"\\XYfiles\\";
if(File.exists(pathtest))
{
print("folder found at "+pathtest);
}
else
{
print("folder not found at "+pathtest);
}
run("Save XY Coordinates...", "background=255 save="+savepath);
print("XY file saved at "+savepath);
}
The different prints give me the correct answers i.e. the folder indeed exists and it writes that the file has been correctly saved at the correct position, but when I open the folder, not file is present...
Thanks a lot for your help !