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

Home » Public Forums » archive » Re: MIP from BMP Images
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: MIP from BMP Images [message #76828 is a reply to message #76827] Wed, 06 July 2011 12:22 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
M R writes:

> Thank you for the feedback. I have tried the following. The errors are
> pasted below.
>
> arm=bytarr(2216,1254,255,/nozero)
> for i=0,254 do begin
> file=file_search('filepath.bmp')
> image=read_image(file[i])
> arm=image[i]
> end
> TV,MAX(arm,dimension=3)
> end
>
> Errors
> % Attempt to subscript FILE with I is out of range.
>
> Why does it say file[i] is out of range?Should I declare file as
> another array to store the images?

You might want to count how many files you actually
found with your File_Search statement. I'm going to
guess no more than 1, and probably zero. You can use
a COUNT keyword to return the file count to you.

You probably want something like this:

files = file_search('*.bmp', COUNT=count)
for j=0,count-1 do ....

When you put an image into your arm array, you will
want something like this:

arm[*,*,j] = image

But, believe me when I tell you, you are going to want
a MUCH smaller array! ;-)

Cheers,

david


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Aw: Re: Aw: Re: TOTAL gives totally different result on identical array
Next Topic: Variable is undefined: Actually a function

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

Current Time: Fri Oct 10 00:07:49 PDT 2025

Total time taken to generate the page: 0.56290 seconds