Re: File import, sort names numerically not working.

Posted by Rasband, Wayne (NIH/NIMH) [E] on
URL: http://imagej.273.s1.nabble.com/File-import-sort-names-numerically-not-working-tp3682440p3682441.html

On Nov 22, 2011, at 12:51 PM, Ved Sharma wrote:

> Dear ImageJ users,
>
> I'm trying import->Image sequence in a directory, which contains 44 files. File names are:
>
> 01_s1_t1.tif, ..., 01_s1_t11.tif
> 01_s2_t1.tif, ..., 01_s2_t11.tif
> 02_s1_t1.tif, ..., 02_s1_t11.tif
> 02_s2_t1.tif, ..., 02_s2_t11.tif
>
> To import all the files containing "s1", I enter "s1" in the field "File name contains:" and check "Sort names numerically". But I find that the files ending with "t10.tif" and "t11.tif" do not appear after "t9.tif", rather they appear at the end of the stack. Is this a bug? Is there a better way to import these files?

This bug is fixed in the ImageJ 1.46b daily build, thanks to a new sorting routine contributed by Norbert Vischer. Your sequence is now opened as:

   01_s1_t1.tif
   01_s1_t11.tif
   01_s2_t1.tif
   01_s2_t11.tif
   02_s1_t1.tif
   02_s1_t11.tif
   02_s2_t1.tif
   02_s2_t11.tif

Or as

   01_s1_t1.tif
   01_s1_t11.tif
   02_s1_t1.tif
   02_s1_t11.tif

if you enter "s1" in the "File name contains:" field.

-wayne