Re: Why are images automatically renamed?
Posted by Gabriel Landini on Oct 08, 2010; 9:06am
URL: http://imagej.273.s1.nabble.com/Why-are-images-automatically-renamed-tp3686678p3686685.html
Hi Norbert,
On Friday 08 October 2010 09:25:38 Norbert Vischer wrote:
> Today, you want to process pic_23.
> Unfortunately, you are not aware that pic_23 already resides in the dock
> since yesterday. You drag file "pic_23" onto the ImageJ main window, but
> it opens as pic_24.
Shouldn't that open as pic_23-1 ? I agree that when using "-02" type names IJ
gets confused (but perhaps this was fixed in the latest daily build? see
below).
> As mentioned earlier,
> "GetInfo" currently gives incorrect information about images that are
> silently duplicated or renamed.
Maybe this was fixed yesterday? I get this info in the renamed image (using
the latest build) I opened Coli-02.tiff twice:
Title: Coli-02-1.tiff
Width: 256 pixels
Height: 256 pixels
ID: -6
Coordinate origin: 0,0
Bits per pixel: 32 (RGB)
No Threshold
Uncalibrated
Path: /home/gabriel/ImageJ/Coli-02.tiff
The info seems to be correct now. The path name is where the image was
loaded from, the title is the current one too.
So perhaps you can solve this by retrieving the path, isolate the file name
from it, get the ID and the title. If the title changed you know which one is
the image you need to process and also how it should be called on disk. And
this allows opening more than one version of the image, if required since you
know which one is the one to process.
I think that the danger of missing an image because it was renamed due to a
duplicate name is no different than the danger of using an open image that
comes to the front but that was already processed.
In the second case, users will complain that they open the image (when they
did not), and reality is that an older image is processed instead without the
user realising it.
Best wishes,
Gabriel