<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.im
        {mso-style-name:im;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi,
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">What is the change in vtk8 that means the composite function doesn’t exist ? what do I use instead?
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Traceback (most recent call last):<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">  File "./vtktomo.py", line 84, in <module><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">    compositeFunction = vtk.vtkVolumeRayCastCompositeFunction()<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">AttributeError: module 'vtk' has no attribute 'vtkVolumeRayCastCompositeFunction'<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> vtkusers [mailto:vtkusers-bounces@vtk.org]
<b>On Behalf Of </b>Robert.Atwood@diamond.ac.uk<br>
<b>Sent:</b> 27 April 2018 16:06<br>
<b>To:</b> 'Max Smolens'<br>
<b>Cc:</b> vtkusers@vtk.org<br>
<b>Subject:</b> Re: [vtkusers] Python/VTK offscreen / headless rendering<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks Max, that seems to install if I use a conda enviromnet to avoid messing up other users
</span><span style="font-size:11.0pt;font-family:Wingdings;color:#1F497D">J</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">conda create --prefix /path/to/my/local/env<o:p></o:p></p>
<p class="MsoNormal">source activate /path/to/my/local/env<o:p></o:p></p>
<p class="MsoNormal">conda config --add channels conda-forge<o:p></o:p></p>
<p class="MsoNormal">conda install mesalib vtk<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">It’s still installing â€“ but it looks like then I have to update to Python 3 and vtk 8 ????
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Max Smolens [mailto:max.smolens@kitware.com]
<br>
<b>Sent:</b> 27 April 2018 14:52<br>
<b>To:</b> Atwood, Robert (DLSLtd,RAL,SCI)<br>
<b>Cc:</b> Paul Korir; vtkusers@vtk.org<br>
<b>Subject:</b> Re: [vtkusers] Python/VTK offscreen / headless rendering<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi Robert,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The conda-forge channel includes a variant of the vtk package that supports offscreen rendering with OSMesa. This variant is chosen automatically if the mesalib package is installed when installing vtk:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<blockquote style="margin-left:30.0pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">conda config --add channels conda-forge<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">conda install mesalib vtk<o:p></o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">HTH,<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal">Max<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Fri, Apr 27, 2018 at 7:16 AM, <a href="mailto:Robert.Atwood@diamond.ac.uk">
Robert.Atwood@diamond.ac.uk</a> <<a href="mailto:Robert.Atwood@diamond.ac.uk" target="_blank">Robert.Atwood@diamond.ac.uk</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">Hi, Paul<br>
The difference is to get to the point where there is something rendered, without having to open a window on the terminal.
<br>
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.
<br>
<br>
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 .
<br>
<br>
If I try in python on a X-window connection even, I get the following <br>
ERROR: In /home/ilan/minonda/conda-bld/work/VTK-6.3.0/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx, line 394<br>
vtkXOpenGLRenderWindow (0x7f47c0fda000): Could not find a decent visual<br>
<br>
<br>
But maye the capability isn't compiled into the python package  from Anaconda?? <br>
Is there a python package  I can grab that has software rendering? <br>
<br>
<br>
<br>
<br>
I tried to buld the c++ from source of 7.1.1. But not successfully. ..<br>
<br>
./CylinderRenderingProperties <br>
ERROR: In /dls/science/users/kny48981/sources/vtk/VTK-7.1.1/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx, line 320<br>
vtkXOpenGLRenderWindow (0xfc18a0): Could not find a decent config<br>
<br>
<br>
<br>
<br>
<br>
<br>
<span class="im">> -----Original Message-----</span><br>
<span class="im">> From: Paul Korir [mailto:<a href="mailto:pkorir@ebi.ac.uk">pkorir@ebi.ac.uk</a>]</span><br>
<span class="im">> Sent: 27 April 2018 11:09</span><br>
<span class="im">> To: Atwood, Robert (DLSLtd,RAL,SCI); '<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>'</span><br>
<span class="im">> Subject: Re: [vtkusers] Python/VTK offscreen / headless rendering</span><br>
<span class="im">> </span><br>
<span class="im">> How different is what you need from writing the rendered output directly</span><br>
<span class="im">> to a file using one of the vtk*Writer classes?</span><br>
<span class="im">> </span><br>
<span class="im">> Correct me if I'm missing something.</span><br>
<span class="im">> </span><br>
<span class="im">> Paul K. Korir, PhD</span><br>
<span class="im">> Scientific Programmer</span><br>
<span class="im">> EMBL-EBI</span><br>
<span class="im">> 01223494422</span><br>
<span class="im">> </span><br>
<span class="im">> On 23/04/2018 11:52, <a href="mailto:Robert.Atwood@diamond.ac.uk">
Robert.Atwood@diamond.ac.uk</a> wrote:</span><br>
<span class="im">> > Hi,</span><br>
<span class="im">> > I would like to have a Python script to render several volume images</span><br>
<span class="im">> (tomography data)  on a headless machine. I could not find any advice more</span><br>
<span class="im">> recent than 2011 , is this something that just isn't configured in the Python as</span><br>
<span class="im">> installed from existing packages? How do I tell?</span><br>
<span class="im">> > If it's not in the python , what needs to be done, at the time of prior</span><br>
<span class="im">> questions it seemed to be a compile-time option of the VTK library, is that</span><br>
<span class="im">> still the case, Any exaples on line that are for the current release ?</span><br>
<span class="im">> > Thanks</span><br>
<span class="im">> > Robert</span><br>
<span class="im">> ></span><br>
<span class="im">> ></span><br>
<span class="im">> ></span><br>
<br>
<br>
<span class="im">-- </span><br>
<span class="im">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.</span><br>
<span class="im">Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
</span><br>
<span class="im">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.</span><br>
<span class="im">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</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" target="_blank">
http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://vtk.org/mailman/listinfo/vtkusers" target="_blank">https://vtk.org/mailman/listinfo/vtkusers</a><o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p> <o:p></o:p></p>
<p>-- <o:p></o:p></p>
<p>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.<br>
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
<br>
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.<br>
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<br>
 <o:p></o:p></p>
</div>
</div>
</body>
</html>