[vtkusers] Python/VTK offscreen / headless rendering

Robert.Atwood at diamond.ac.uk Robert.Atwood at diamond.ac.uk
Fri Apr 27 07:16:00 EDT 2018


Hi, Paul
The difference is to get to the point where there is something rendered, without having to open a window on the terminal. 
In the case where I already know (or can calculate from the image data) the colour function and the transparency function, I know what camera angle I want and so on, I just want to run a background job on a remote workstation/cluster node to render that same view for a number of similar images (of the same object in different time steps) Instead of sitting on my computer watching it. 

But, the problem is that with the way I know how to do it, the creation of the render window trys to get a GL context, but it can't do that . 

If I try in python on a X-window connection even, I get the following 
ERROR: In /home/ilan/minonda/conda-bld/work/VTK-6.3.0/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx, line 394
vtkXOpenGLRenderWindow (0x7f47c0fda000): Could not find a decent visual


But maye the capability isn't compiled into the python package  from Anaconda?? 
Is there a python package  I can grab that has software rendering? 




I tried to buld the c++ from source of 7.1.1. But not successfully. ..

./CylinderRenderingProperties 
ERROR: In /dls/science/users/kny48981/sources/vtk/VTK-7.1.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx, line 320
vtkXOpenGLRenderWindow (0xfc18a0): Could not find a decent config






> -----Original Message-----
> From: Paul Korir [mailto:pkorir at ebi.ac.uk]
> Sent: 27 April 2018 11:09
> To: Atwood, Robert (DLSLtd,RAL,SCI); 'vtkusers at vtk.org'
> Subject: Re: [vtkusers] Python/VTK offscreen / headless rendering
> 
> How different is what you need from writing the rendered output directly
> to a file using one of the vtk*Writer classes?
> 
> Correct me if I'm missing something.
> 
> Paul K. Korir, PhD
> Scientific Programmer
> EMBL-EBI
> 01223494422
> 
> On 23/04/2018 11:52, Robert.Atwood at diamond.ac.uk wrote:
> > Hi,
> > I would like to have a Python script to render several volume images
> (tomography data)  on a headless machine. I could not find any advice more
> recent than 2011 , is this something that just isn't configured in the Python as
> installed from existing packages? How do I tell?
> > If it's not in the python , what needs to be done, at the time of prior
> questions it seemed to be a compile-time option of the VTK library, is that
> still the case, Any exaples on line that are for the current release ?
> > Thanks
> > Robert
> >
> >
> >


-- 
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom


More information about the vtkusers mailing list