Login  Register

Re: getfilelist array sorting?

Posted by Wayne Rasband on Sep 12, 2009; 4:25am
URL: http://imagej.273.s1.nabble.com/getfilelist-array-sorting-tp3691192p3691193.html

> I have a slight problem.
>
> I use pixelink to take time lapse photos. When using a macro to open  
> up all
> the images in a directory, it opens the images using the left most  
> number
> first, regardless of it's actual number in the sequence. In other  
> words:
>
> image_199.jpg is opened after image_99.jpg
>
> so currently it'd open images in this order: 100, 101, 102, 200,  
> 201, 99
>
> This puts things out of order. Is there anyway to make it so that it  
> opens
> 99, 100, 101, 199, 200, 201?
>
> Please tell me yes :(
>
> I tried Array.sort but it doesn't seem to have any options so I don't
> actually know how it's sorting them.

Open the images using File>Import>Image Sequence (with "Sort Names  
Numerically" checked) or by dragging and dropping the folder onto the  
ImageJ window. Open them as a virtual stack if memory is tight.

-wayne