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

Home » Public Forums » archive » Re: inverting a binary image(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
Re: inverting a binary image(array)? [message #78286 is a reply to message #78285] Sat, 05 November 2011 21:29 Go to previous messageGo to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On 11/4/11 6:54 PM, desertdryad wrote:
> Hi folks -
>
> I have the need, in an IDL 7.0 / ENVI 4.5 script, to take a rather
> large raster (Landsat tile sized) of 1's and 0's, and invert it, in
> preferably an efficient manner. What's the most streamlined way to do
> this?
>
> thanks,
> Cyndy
>

If by "invert" you mean turn the 1s to 0s and the 0s to 1s, I would
hazard a guess that you're not going to get much more efficient than

data = 1 - data

-Jeremy.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL 8.1, X11 and Crashes
Next Topic: Re: Overlaying multiple plots on top of map

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

Current Time: Fri Oct 10 04:09:04 PDT 2025

Total time taken to generate the page: 0.00622 seconds