Re: Convert pixel values [message #42400] |
Tue, 08 February 2005 00:50 |
Timm Weitkamp
Messages: 66 Registered: August 2002
|
Member |
|
|
On 07.02.05 at 23:41 -0600, Michael Wallace wrote:
>> I thought this was a simple problem: I need to convert all pixels with
>> a value of -32767 to a value of 0 in an image with 175 bands. Becoming
>> nightmare! Is there a simple way to do it?
>
> ; arr is your array
> arr[where(arr eq -32767)] = 0
Yes, or:
arr = arr * (arr ne -32767)
--
Timm Weitkamp <http://people.web.psi.ch/weitkamp>
|
|
|
Re: Convert pixel values [message #42401 is a reply to message #42400] |
Mon, 07 February 2005 21:41  |
Michael Wallace
Messages: 409 Registered: December 2003
|
Senior Member |
|
|
> I thought this was a simple problem: I need to convert all pixels with
> a value of -32767 to a value of 0 in an image with 175 bands. Becoming
> nightmare! Is there a simple way to do it?
; arr is your array
arr[where(arr eq -32767)] = 0
-Mike
|
|
|