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 #76825 is a reply to message #76820] Wed, 06 July 2011 13:40 Go to previous messageGo to previous message
M R is currently offline  M R
Messages: 19
Registered: July 2011
Junior Member
On Jul 6, 2:22 pm, David Fanning <n...@dfanning.com> wrote:
> 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.")

For the following, I get

file=file_search('filepath....\*.bmp',COUNT=count)

arm=bytarr(2216,1254,count,/nozero)

for i=0,count-1 do begin

image=read_image(file[i])

arm[*,*,i] = image

end

TV,MAX(arm,dimension=3)

end

% Array subscript for ARM must have same size as source expression.
Is it not picking up the images in an order? Should I try with smaller
size images and a fewer number of images?Thank you!
[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: Wed Oct 08 20:10:54 PDT 2025

Total time taken to generate the page: 0.00370 seconds