spaces in file names hinder further processing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

spaces in file names hinder further processing

Jack van de Vossenberg
In a few occasions I noticed that functions do not work correctly due to
filenames that contain spaces. E.g. the result of an image calculation on
Image.tif is automatically renamed into "Result of Image.tif". Further
steps, e.g the Ecoli analysis plugin, gets stuck unless the filename is
renamed to e.g. Result_of_Image.tif.

I suggest that functions in ImageJ, and certainly the standard ones, like
Image Calculator, only produce filenames without spaces. I suggest that
spaces are replaced with underscores.
Reply | Threaded
Open this post in threaded view
|

Re: spaces in file names hinder further processing

Gabriel Landini
On Wednesday 19 August 2009, Jack van de Vossenberg wrote:

> In a few occasions I noticed that functions do not work correctly due to
> filenames that contain spaces. E.g. the result of an image calculation on
> Image.tif is automatically renamed into "Result of Image.tif". Further
> steps, e.g the Ecoli analysis plugin, gets stuck unless the filename is
> renamed to e.g. Result_of_Image.tif.
>
> I suggest that functions in ImageJ, and certainly the standard ones, like
> Image Calculator, only produce filenames without spaces. I suggest that
> spaces are replaced with underscores.
>

Although I agree that it would be handy, this would break all the other macros
already written that already deal with this issue.

A way round this is to add one single macro line: rename(name) after the
commands that introduced the space to rename the file to whatever can be used
by the other commands.

Lots of other commands and plugins produce image titles with spaces, so
resolving this in the image calculator alone I guess is not going to resolve
completely the problem.

Cheers,

G.