[SciPy-User] ROI, the sequel

Christopher Barker Chris.Barker at noaa.gov
Tue Aug 3 22:26:03 EDT 2010


Zachary Pincus wrote:
> The task you want to accomplish is called "polygon rasterization", and  
> I have long looked for a simple python (or better, portable C that I  
> could use from anywhere) module that does this well. (Ideally with  
> optional antialiasing.) I really haven't found much... any graphics  
> toolkit (e.g. for throwing up a GUI) can be convinced to rasterize to  
> a memory buffer, which can be converted to a numpy array, but it's not  
> simple or particularly portable.

I've used PIL for that -- much less overhead than a GUI toolkit, if you 
don't need a GUI.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov



More information about the SciPy-User mailing list