comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Loading Sorted Images into a 3D array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Loading Sorted Images into a 3D array [message #77050 is a reply to message #77041] Thu, 21 July 2011 19:17 Go to previous messageGo to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On Jul 21, 12:57 pm, M R <manisha....@gmail.com> wrote:
> On Jul 21, 11:21 am, "Kenneth P. Bowman" <k-bow...@null.edu> wrote:
>
>
>
>
>
>
>
>
>
>> In article
>> < 4719e461-98c5-4792-851a-69e510229...@x10g2000vbl.googlegroup s.com >,
>>  M R <manisha....@gmail.com> wrote:
>
>>> I have a stack of 55 png images (256 X 256, 24-bit each). I am
>>> creating a 3D array and would like to load the images in an ascending
>>> order. But this is not happening since IDL is loading them
>>> 1,10,101,.....2,20,201....and so on. How so I use the SORT command for
>>> loading them in an order?
>
>>> file=file_search('filepath*.bmp',COUNT=count)
>
>>> arm=bytarr(256,256,count,/nozero)
>
>>> for i=0,count-1 do begin
>
>>>   image=read_image(file[i])
>
>>>   arm[*,*,i] = image
>
>>>   end
>>> end
>
>> I am sure this can be done in IDL, but it seems to me that
>> the simple solution is to rename your files ...001.png, ...002.png,
>> etc.  That will probably make things easier in other ways also.
>
>> Ken Bowman
>
> It worked! Thank you!

Or, sort the numbers in a numerical format (like integers) instead of
as strings.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: summation of bands
Next Topic: Confidence Bands

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:06:38 PDT 2025

Total time taken to generate the page: 0.00408 seconds