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

Home » Public Forums » archive » Simple question,
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Simple question, [message #28864] Sat, 12 January 2002 07:53
dinhnq is currently offline  dinhnq
Messages: 14
Registered: December 2001
Junior Member
Dear lists,

I have an array (251,251,16). I would like to average value of pixel
where there is mask value of 255 by befor anf after values.

====This code works===

for k=1, 10 do begin
temp1(*,*,k)=((temp(*,*,k-1)+temp(*,*,k+1))/2) * (temp(*,*,k) eq
255) + (temp(*,*,k) * (temp(*,*,k) ne 255))

end

====

====But this code doesn�t work====

i=indgen(251)
j=indgen(251)
k=indgen(16)

for k = 2,13 do begin

temp1(*,*,k)=(temp(*,*,k) * (temp(*,*,k) ne 255) + $
((temp(*,*,k-2)*(temp(*,*,k-1) eq 255) + (temp(*,*,k-1)*(temp(*,*,k-1)
ne 255) + $
temp(*,*,k+1)*(temp(*,*,k+1) ne 255) + temp(*,*,k+2)*(temp(*,*,k+1) eq
255))/2 * (temp(*,*,k) eq 255)

endfor

Thank you for your helps,

Huong Dinh
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: DLM's and C code
Next Topic: Re: comp.lang.idl-pvwave, FINAL NOTICE of Newsgroup Removal

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

Current Time: Wed Oct 08 17:44:24 PDT 2025

Total time taken to generate the page: 0.00456 seconds