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

Home » Public Forums » archive » the position of the pixel in 3 dimensional array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
the position of the pixel in 3 dimensional array [message #69221] Tue, 29 December 2009 10:00 Go to previous message
Hassan is currently offline  Hassan
Messages: 48
Registered: October 2009
Member
Hi,

I used the folloing command to get a one-dimensional array:
pos_g0=where(image gt 0)
now, I have a pixel that know the value in three positions of
[388,168,13],[388,168,33,[388,168,48]] ([column,row,band]) and want to
work out the location of pixel in the pos_g0 which is in 3 locations.
I used the following commands but the results isn't correct.

;make a vector which keeps the position of the desired pixel in pos_g0
array in 3 locations
pixel_pos=[0,0,0]

for i=0l,n_elements(pos_g0)-1 do begin&
ai=array_indices(ref1,pos_g0[i])&
if (ai[0] eq 388 and ai[1] eq 168 and ai[2] eq 13) then begin &
pixel_pos[0]=i&
endif&
else begin&
if (ai[0] eq 388 and ai[1] eq 168 and ai[2] eq 33) then &
pixel_pos[1]=i&
if (ai[0] eq 388 and ai[1] eq 168 and ai[2] eq 48) then &
pixel_pos[2]=i&
endelse&
endfor
[Message index]
 
Read Message
Read Message
Previous Topic: AGU IDL Users Group meeting
Next Topic: Reducing a set of curves to a mean curve

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

Current Time: Wed Oct 08 18:27:00 PDT 2025

Total time taken to generate the page: 0.00478 seconds