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 #76827 is a reply to message #76826] Wed, 06 July 2011 12:35 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.")

I am desperately wishing to deal with a smaller array but
unfortunately the images are from an MRI scanner in BMP format.
Without losing much detail, I tried Jpeg but was loosing a lot of
finer details in the images. But will definitely try this and see how
it works. 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: Fri Oct 10 06:23:52 PDT 2025

Total time taken to generate the page: 1.35650 seconds