Open Next is not opening the next image in a directory

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

Open Next is not opening the next image in a directory

BenitoRT
Hello.

This might be a beginner question but I need help.

 I have a directory full of images named with ascending numbers (e.g. 1, 2, 3, ... , n).
This numbers were assigned using a macro that I created which names the images this way after many procesing steps on the parent images. The problem is that when I use the "Open Next" command from image 1, the image 10 is opened instead of image 2.
Changing the names manually I found that naming the images 001, 002, 003, ... , 010, 011, and so on, the problem is solved, although I can't find a way in which the images are saved with this name format automatically.

Anyone have a solution to this? maybe another name format or a way to name the images this way?

Thank you very much in advance and sorry if my english is not clear.

Benito Recio
Reply | Threaded
Open this post in threaded view
|

Re: Open Next is not opening the next image in a directory

BenitoRT
I think I solved the problem.

I divided the names of the images by 100,000 so the new names are: 0.00001, 0.00002, ... , 0.0001, 0.00011, and so on. Saving the images this way solves the problem I had until the image 499,995+1 is reached (I guess).

Benito Recio
Reply | Threaded
Open this post in threaded view
|

Re: Open Next is not opening the next image in a directory

LIM Soon Yew John (IMB)
In reply to this post by BenitoRT
Hi Benito,

In ImageJ macro, you can used the command below to add leading zeros for your number (n):
IJ.pad(n, length)

Example Macro:
n = 1;
print(n);
m = IJ.pad(n, 3);
print(m);

Best Regards,
John
________________________________________
From: ImageJ Interest Group [[hidden email]] On Behalf Of BenitoRT [[hidden email]]
Sent: Thursday, May 22, 2014 1:54 PM
To: [hidden email]
Subject: Open Next is not opening the next image in a directory

Hello.

This might be a beginner question but I need help.

 I have a directory full of images named with ascending numbers (e.g. 1, 2,
3, ... , n).
This numbers were assigned using a macro that I created which names the
images this way after many procesing steps on the parent images. The problem
is that when I use the "Open Next" command from image 1, the image 10 is
opened instead of image 2.
Changing the names manually I found that naming the images 001, 002, 003,
... , 010, 011, and so on, the problem is solved, although I can't find a
way in which the images are saved with this name format automatically.

Anyone have a solution to this? maybe another name format or a way to name
the images this way?

Thank you very much in advance and sorry if my english is not clear.

Benito Recio



--
View this message in context: http://imagej.1557.x6.nabble.com/Open-Next-is-not-opening-the-next-image-in-a-directory-tp5007843.html
Sent from the ImageJ mailing list archive at Nabble.com.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Open Next is not opening the next image in a directory

BenitoRT
Greetings John.

Either way works fine but I think yours is more elegant and it is exactly what I was trying to do.
I was desperate and didn't took the time to check all the ImageJ built-In macro functions. Sorry for that.

Thank you very much.

Benito.