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

Home » Public Forums » archive » Re: Get values from one image according to pixel locations of maxima on another image
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: Get values from one image according to pixel locations of maxima on another image [message #82551] Sun, 23 December 2012 19:58 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On 12/21/12 9:05 AM, Dry in water wrote:
> Hello all
>
> I have two tiff images (named A and B). Both have 7 layers at the same dimension (4169,6289,7). First I'd like to find location of max value in A image and then I need to get the values (not max values, reall values) of B image in matrix dimension (4169, 6289) according to location of max value which found from A image in previous step. I just wrote next code to achieve this purpose. Then I wrote output tiff image. But when I display this tiff image, whole screen is black. Can you tell me what's wrong with this code?
> A_max_loc=MAX(A,INDEX,DIMENSION=3)
> B_val=B[INDEX]
> write_tiff,'D:\Output_IDL\B_val_2000.TIF',B_val
>
> Thank you so much
>

There's nothing obviously wrong in the code. Might there be NaNs in A? I
would suggest taking a small (3x4) corner of the image and examining the
values of A, B, and B_val to see if it appears to be doing what you expect.

-Jeremy.
[Message index]
 
Read Message
Read Message
Previous Topic: Re: histogram bin edges
Next Topic: Re: What are the rules for automatic removal of singleton dimensions, and can I have a way of disabling them, please?

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

Current Time: Wed Oct 08 19:09:36 PDT 2025

Total time taken to generate the page: 0.00800 seconds