Dear Simone,
On 2013.06.07, at 13:47 , sdegan wrote:
> However, this allows me to choose a directory and save only one image at a time.
> Every time I am prompted to choose the directory and save the image:
Using getDirectory() without arguments is equivalent of using getDirectory("Choose a Directory"),
i.e., it will trigger a prompt for user-selected directory.
> Is there a way to have the resulted image from the batch to be saved automatically in a specified directory?
Sure. Have a look at
http://imagej.nih.gov/ij/developer/macro/functions.html#getDirectoryThus, in your macro you could use:
// to save the jpg copy next to loaded image
fullpath = getDirectory("image");
// to save the jpg on the User's home folder
fullpath = getDirectory("home");
// to save the jpg on the subdirectory "output" of the home folder
fullpath = getDirectory("home") + output + File.separator;
// to save the jpg on some fixed location
fullpath = "Path/To/Some/Fixed/Folder/;
HTH,
-tiago
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html