I have a numpy array of pixel data that I want to draw at interactive speeds in pygtk. Is there some simple, fast way to get my data onto the screen?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m not aware of anything GTK specific, but have a look at glumpy and pygarrayimage for fast, OpenGL based visualization (and animation) of numpy arrays.
Pygarrayimage is focused more on just getting numpy arrays as an OpenGL texture. I don’t know a ton about it, but it is somewhat widely used, as far as I can tell.
Glumpy, in particular, has some really neat demos that show its usage rather well. Unfortunately, the links to the screenshots on the homepage seem to be dead, but it’s worth installing glumpy just to play around with the demos. It’s a great option for making quick interactive animations.