Login  Register

Re: Saving XY files

Posted by Michael Schmid on Aug 04, 2015; 3:52pm
URL: http://imagej.273.s1.nabble.com/Saving-XY-files-tp5013884p5013889.html

Hi Flopi,

maybe your name and/or path contains a space? Then put it into square brackets.
  run("Save XY Coordinates...", "background=255 save=["+savepath+"]");

It won't work if your imageName contains a character that is forbidden in Windows file names:  " * : < > ? \ / |
Also, invisible characters ("gremlins"), e.g. ascii codes 0-31 dec are forbidden and you can't save a file with any of these in the name.


Michael
________________________________________________________________
On Aug 4, 2015, at 14:37, Flopi wrote:

> 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 !
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Saving-XY-files-tp5013884.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html