[SciPy-User] ROI, the sequel

Zachary Pincus zachary.pincus@yale....
Tue Aug 3 21:48:33 CDT 2010


Hmm, I didn't realize PIL has a rasterizer. That's useful...

(PIL and I parted ways a while ago, but I should dig back into the  
code to see if I can pull out the rasterizer and use it standalone.)

Emil: PIL ought to be an easy way to get what you need, it seems.


On Aug 3, 2010, at 10:26 PM, Christopher Barker wrote:

> 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@noaa.gov
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user



More information about the SciPy-User mailing list