From: Thomas H. <tho...@sc...> - 2020-05-06 13:25:51
|
Hi Antonio, This is currently not possible for ray tracing or for capturing the displayed image. It's possible for deferred on-screen rendering with a callback. def mycallback(image): print("got image of dimension", image.shape) cmd.raw_image_callback = mycallback cmd.draw() Cheers, Thomas > On May 4, 2020, at 7:24 PM, Antonio Serrano <ase...@uc...> wrote: > > So far, I've been able to capture the pixels from the scene in two steps using the png method along with imread: > p1.cmd.png(image_path) > img = plt.imread(image_path) > > Since I have to do this quite often in my program, I'd to capture the pixels in a numpy ndarray avoiding writting the image to disk every time. Is that possible? Thx. > > > > "Este mensaje es privado y confidencial y se dirige exclusivamente a su destinatario. Si usted recibe este mensaje por error, no debe revelar, distribuir o copiar este e-mail. Por favor, comuníquelo al remitente y borre el mensaje y los archivos adjuntos de su sistema. No hay renuncia a la confidencialidad ni a ningún privilegio a causa de una transmisión errónea o por mal funcionamiento". > > "This message is private and confidential and it is intended exclusively for the addressee. If your receive this message by mistake, you should not disseminate, distribute or copy this e-mail. Please inform the sender and delete the message and attachments from your system. No confidentiality or any privilege regarding the information is waived or lost by any mistransmission or malfunction". > > No me imprimas si no es necesario. > Don't print me unless it's necessary. > > _______________________________________________ > PyMOL-users mailing list > Archives: http://www.mail-archive.com/pym...@li... > Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe -- Thomas Holder PyMOL Principal Developer Schrödinger, Inc. |