Login  Register

Re: Why are images automatically renamed?

Posted by fmonson on Oct 07, 2010; 4:18pm
URL: http://imagej.273.s1.nabble.com/Why-are-images-automatically-renamed-tp3686678p3686692.html

I am using Win vista Business on Lenovo 'ThinkStation'

I performed the following experiment using ImageJ 1.44h

Two files

open img7_002; second open img7_002:>img7_002-1; third open img7_002:>img_002-2

open img7-002; second open ing7-002:>img7-002-1; third open img7-002:>img7-002-2

Norbert?  I may be just lucky to be working on a 'ThinkStation!'  We all know that the 'Vista' is a plug, so, at least you know that someone who doesn't require the numbering you would like can get that numbering anytime.  I cannot do this on an XP install until I get home, because our IT doesn't support more than one version at a time.

Cheers,

Fred Monson

Frederick C. Monson, PhD
Technical Director
Center for Microanalysis and Imaging, Research and Training (CMIRT)
http://cmirt.wcupa.edu
[hidden email]
________________________________________
From: ImageJ Interest Group [[hidden email]] On Behalf Of Gabriel Landini [[hidden email]]
Sent: Thursday, October 07, 2010 10:34 AM
To: [hidden email]
Subject: Re: Why are images automatically renamed?

On Thursday 07 October 2010  15:13:27  Norbert Vischer  wrote:
> when I open three times in succession the same file "Coli-02.tiff", I see
> that image in three windows:
>
> Coli-02.tiff
> Coli-1.tiff
> Coli-2.tiff

I think that here IJ confuses chopping part of the name off because there is a
"-"+number+"." in the title. So IJ thinks that this is the counter of the
replicated image.

It does add the -1, -2 to the original title if the last character is not a
number lilke: Colli-02a.tiff -> Coli-02a-1.tiff and so on.
I guess that this is to avoid adding -1 each time and increase the number
Otherwise it would be  Coli-1.tif, Coli-1-1.tiff and somehow there is a need
to keep increasing the counting.

> This is a confusing situation, and all three windows tell me in "Show Info"
> that the path ends with Coli-02.tiff -  which is only true for the first
> image.

Aa simple workaround, one can use "_" instead of "-" in the name.
I try to avoid spaces + - and [ ]  in the names because I always have the
feeling that passing names around in macros will cause problems.

Something related: when a plugin creates a new image whose name already
exists, there is a <1>, <2> etc added to the title. However, when one calls
other plugins that use a list of images, llike the Image Calculator these
appear without the <number> and it is guesswork which one is the right one.
The creation order seems to be preserved in the list, but as I said, it would
be useful if the list showed the appended <number> too.
I can't remember if the menu Window lists names with or without the <number>.
I hope this can be resolved too, if it does not.


Regards

Gabriel