Login  Register

Re: Why are images automatically renamed?

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

Below:
________________________________________
From: ImageJ Interest Group [[hidden email]] On Behalf Of Norbert Vischer [[hidden email]]
Sent: Thursday, October 07, 2010 3:28 PM
To: [hidden email]
Subject: Re: Why are images automatically renamed?

Thanks Gabriel, Frederick, David for your points of view.

In fact, with "already open" and "renaming" I have touched
two subjects, and my favorite scenarios would be:

if I "Open" an image file, then:

a) if it is already open, it should be brought
   to the front rather than a copy being opened

>>>>They were opened in cascade on top of original, but if you want no copies then, we have open source and macros for special cases, though I am not a programmer, and I can't speak to internal priorities, etc.

b) if it is not open yet, but some other window happens
   to have the same title, it should still open with its
   original file name rather than being renamed-
   even if now two images have the same name.

>>>>Ah!  Now you cross my Rubicon to confusion.  I believe that ImageJ is perfectly clear that replicates of images
will be named as derivatives of the original name, and not as if the images were stored in a database with names that are NOT indices (the true 'database' names.  In my microanalysis program, if I acquire 10 spectra from 10 different locations, I am able to name them all "1", and still, each one references its own values, because the real name is:  record index(generally an integer) + table name + database name.  In an external table below a reference image, the image will show 10 locations with number "1" and the table will show ten records with number "1".  Thus, only the database will be un-confused.

It would be clear and reproducible behaviour, be  conform to most other applications,
wouldn't create unwanted duplicates, wouldn't produce new (unpredictable) names,
wouldn't create any number suffixes at all.
Still the user can explicitely duplicate in IJ or the Finder/Explorer.

>>>>That is a valid criterion, and if you want that, then the true name of the image would be:  "path+filename".  No problem, I suspect for the scriptorian.  I would probably understand the issue bettger if what I wanted to do could be easier done in another program.  Admittedly, it appears that you will have to include changes to file handling - if ImageJ will permit - so that the procedures you wish to execute can be performed as you require.

My main concern is that my plugin relies on path names when handling images.
I want to be sure that the path name of an image remains valid
after being opened.  
Currently, the path name may be spoilt due to automatic renaming.

>>>>Again as no programmer, it would seem reasonable to expect that when the user selects a PATH (i.e., a subdirectory) that the PATH is accessible for assignment.  Similarly, if one were to write a macro to extract, to another PATH, every 25th image in a stack of 1000 starting with image #0, then image 25, etc.  One would have the relationship of the extracted images dislocated from the parent stack even if they were named:  parent PATH + parent file name + 01...40.  In such a case, even if the extractions were done to the parent PATH, the extracted images could not be confused with their copies in the stack file as long as each name consisted of:  parent PATH = parent filename + 01....40.  Can a procedure work while attempting to have more than one focus at a time?  [This may have been 'terrible name dropping' and I apologize for attempting it.  For me it is a question of file management.]

> If the hidden window was brought to the front when you try to open, then it
> would not be an Open command, but a SelectWindow one. That would also be
> confusing when the original was processed and hidden.

>>>>The key is to have no 'hidden' windows on which you cannot work that take up buffer space and confuse the CPU.  Each window with a single name reference, and it seems to me that you could name a copy anything - in secret - while all had the apparent identical names.  BUT, how would you sort them after finishing your work?

Gabriel, I made experiments with other applications (Word, GraphicConverter,
BBEdit, PowerPoint); they all behave logical as described in a) and b).
ImageJ is an exception.

Norbert