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

Home » Public Forums » archive » 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 #76887 is a reply to message #76838] Fri, 08 July 2011 10:35 Go to previous messageGo to previous message
M R is currently offline  M R
Messages: 19
Registered: July 2011
Junior Member
On Jul 8, 10:41 am, David Fanning <n...@dfanning.com> wrote:
> M R writes:
>> I hope I am making some kind of progress here. I have the following
>> code and I (fortunately) do not get any errors and of course the
>> output is in the form of a blank black pop out screen (I am being too
>> optimistic) and think atleast the program works! Below is the code
>
>> fil = file_search('filepath*.bmp',COUNT = count)
>> imag=read_bmp(fil[0])
>> s=size(imag)
>
>> arm = bytarr (s[1],s[2],count,/nozero)
>
>> for i=0, count-1 do begin
>>     image = read_bmp(fil[i])
>>     arm[*,*,i]=image[*,*]
>>     end
>
>>    TV,MAX (arm, dimension = 3)
>
>>  end
>
>> (i). imag, arm, image array sizes do not match. They are
>
>> IDL> help, arm
>> ARM             BYTE      = Array[3, 2216, 256]
>> IDL> help, imag
>> IMAG            BYTE      = Array[3, 2216, 1254]
>> IDL> help, image
>> IMAGE           BYTE      = Array[3, 2216, 1254]
>
>> Does anyone feel that this mismatch between the array sizes is
>> creating the blank black pop out screen instead of an image?
>
> Well, yes, among any number of other things. :-)
>
> I say this with all possible kindness, because I can
> see you are making an effort, and I want to help you,
> but if this code actually ran I would say it is because
> you have a special relationship with the programming gods. :-)
>
> How do you know it "ran"? Did you see *any* images
> in the window?
>
> Let's start at the beginning. Can you open and display
> just one of the images in your directory? Just without
> trying to do a loop or anything. At best, with the
> way you are using the TV command (a totally worthless
> command IMHO) you will see a tiny sliver of your image
> on the left-hand side of your display window. If you
> want to use the TV command (a bad idea, as I mentioned),
> you might want to try this:
>
>    imageFile = Dialog_Pickfile(FILTER='*.bmp')
>    image = Read_BMP(imageFile)
>    TV, image, TRUE=1

----------------------------------------------
X--------------------------------------------------------
I have tried the above. The screen does not contain a sliver of the
image but the upper left quadrant of the screen is white while the
reaming 3 quadrants are black. I see a partial axis in the white
quadrant.
-----------------------------------------------
X-------------------------------------------------------

> So, if you want to stuff this 24-bit image into a larger
> array (and I pointed out in a previous article why
> this is almost pointless, since your images don't contain
> any intensity information), then you will have to make
> your array a four-dimensional array:
>
>    dims = Size(image, /DIMENSIONS)
>    arms = Make_Array(dims[0], dims[1], dims[2], count, /BYTE)
>
> Then,
>
>    arms[*,*,*,j] = image
-----------------------------------------------
X-------------------------------------------------
The images contain intensity information. First because different
kinds of tissues are seen clearly. Secondly (My feeling), each image
of the size 24 bit in its color.
-----------------------------------------
X-----------------------------------------------------




> This, of course, assumes all your images are the same size.
>
> I suspect this program of yours ran, maybe, one time
> and with errors you aren't aware of. Do you have
> your IDL console window somewhere where you can see
> it easily?
>

-------------------------
X---------------------------------------------
Yes, I do have an IDL console window where I cross check each variable
--------------------------
X--------------------------------------------

> 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.")
----------------------------X------------------------------- ----
As you have suggested,I think I will try to display just one image
without the loop and see if it is being displayed entirely or not.
Thank you!
----------------------------X------------------------------- --
[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
Read Message
Read Message
Previous Topic: Re: Shell startup file not recognized in IDL 8.0 Workbench
Next Topic: Re: percentile with dimension keyword

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

Current Time: Sat Oct 11 11:42:32 PDT 2025

Total time taken to generate the page: 0.24165 seconds