<div dir="ltr">Thanks a lot :)<div><br></div><div>I will try both solutions, Vincent's first as it is easier :D.</div><div><br></div><div>Then, I'll recompile OSMesa because I'm using ubuntu's and debian's stable ones, and look like they are still in 6.5.3.</div><div><br></div><div>Thank you so much.</div><div><br></div><div>Oscar</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div><div><b>______________________________________</b></div><div><b>Oscar Esteban</b></div><div>PhD Student / Researcher</div><div><span style="color:rgb(153,153,153)"><br></span></div><div><span style="color:rgb(153,153,153)"><span style="color:rgb(192,192,192)">Biomedical Image Technologies (BIT), UPM<br>ETSI Telecomunicación Lab. C203, Av. Complutense s/n - E-28040 Madrid (Spain)<br>+34 915 495 700 ext.4234</span></span></div><div><span style="color:rgb(153,153,153)"><br></span></div><font color="#c0c0c0">Signal Processing Laboratory (LTS5), EPFL-STI-IEL-LTS5<br>ELD 224 (Bâtiment ELD), Station 11, CH-1015 Lausanne, Switzerland<br></font></div><div></div><div></div></div></div>
<br><div class="gmail_quote">On 20 November 2014 14:59, Vincent SALEH <span dir="ltr"><<a href="mailto:vincent.saleh@magellium.fr" target="_blank">vincent.saleh@magellium.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="FR" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Oscar,<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I am no expert but I would advise you to use </span><span lang="EN-US" style="font-size:9.5pt;font-family:Consolas">renderWindow->OffScreenRenderingOn();</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> instead of </span><span lang="EN-US">renderWindow-></span><span lang="EN-US">SetOffScreenRendering</span><span lang="EN-US">(1); </span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">with vtk-6.1.0.<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">That worked fine for me.<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Good luck!<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Vincent<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">De :</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> vtkusers [mailto:<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a>] <b>De la part de</b> Sebastien Jourdain<br><b>Envoyé :</b> jeudi 20 novembre 2014 14:33<br><b>À :</b> Oscar Esteban<br><b>Cc :</b> vtkusers<br><b>Objet :</b> Re: [vtkusers] Off screen rendering<u></u><u></u></span></p><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Which version of OSMesa did you point to?<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">That's not exactly the same project described here but it should be almost the same CMake properties.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><a href="http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/index.html#!/guide/os_mesa" target="_blank">http://www.paraview.org/ParaView3/Doc/Nightly/www/js-doc/index.html#!/guide/os_mesa</a><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Seb<u></u><u></u></p></div></div><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">On Thu, Nov 20, 2014 at 6:12 AM, Oscar Esteban <<a href="mailto:oesteban@die.upm.es" target="_blank">oesteban@die.upm.es</a>> wrote:<u></u><u></u></p><div><p class="MsoNormal">Dear experts,<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I'm trying to write png files slicing a 3D volume through its coordinates planes, with the contours corresponding to the intersection of the plane and a number of surfaces (triangularized meshes). I need to run the code in a headless debian server. The code I'm trying is here: <a href="https://gist.github.com/oesteban/f22e155146ce6738b431" target="_blank">https://gist.github.com/oesteban/f22e155146ce6738b431</a><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I have tried with no success with vtk-5.10.1 and vtk-6.1.0. I've tested on 5.10.1 with this example: <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/OffScreenRendering" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/OffScreenRendering</a>, and 6.1.0 with <a href="https://gist.github.com/certik/5687727" target="_blank">https://gist.github.com/certik/5687727</a>.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Successful compilation of both versions included:<u></u><u></u></p></div><p class="MsoNormal">VTK_OPENGL_HAS_OSMESA=ON<br>VTK_USE_X=OFF<u></u><u></u></p><div><p class="MsoNormal">VTK_USE_TK=OFF<br>VTK_USE_OFFSCREEN=ON<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><div><p class="MsoNormal">Program received signal SIGSEGV, Segmentation fault.<u></u><u></u></p></div><div><p class="MsoNormal">__rawmemchr_sse2 () at ../sysdeps/x86_64/multiarch/../rawmemchr.S:31<u></u><u></u></p></div><div><p class="MsoNormal">31 ../sysdeps/x86_64/multiarch/../rawmemchr.S: No such file or directory.<u></u><u></u></p></div><div><p class="MsoNormal">(gdb) bt<u></u><u></u></p></div><div><p class="MsoNormal">#0 __rawmemchr_sse2 () at ../sysdeps/x86_64/multiarch/../rawmemchr.S:31<u></u><u></u></p></div><div><p class="MsoNormal">#1 0x00007ffff45fe150 in _IO_str_init_static_internal (sf=0x7fffffffc380, ptr=0x0, size=0, pstart=0x0) at strops.c:45<u></u><u></u></p></div><div><p class="MsoNormal">#2 0x00007ffff45f2875 in _IO_vsscanf (string=0x0, format=0x142d1c3 "%d.%d", args=0x7fffffffc4a0) at iovsscanf.c:44<u></u><u></u></p></div><div><p class="MsoNormal">#3 0x00007ffff45dea38 in __sscanf (s=0x0, format=0xffffffff <Address 0xffffffff out of bounds>) at sscanf.c:34<u></u><u></u></p></div><div><p class="MsoNormal">#4 0x0000000000c5b549 in vtkOpenGLExtensionManager::ReadOpenGLExtensions() ()<u></u><u></u></p></div><div><p class="MsoNormal">#5 0x0000000000c5ac80 in vtkOpenGLExtensionManager::Update() ()<u></u><u></u></p></div><div><p class="MsoNormal">#6 0x0000000000c5a957 in vtkOpenGLExtensionManager::ExtensionSupported(char const*) ()<u></u><u></u></p></div><div><p class="MsoNormal">#7 0x0000000000bf131a in vtkOpenGLRenderWindow::OpenGLInitContext() ()<u></u><u></u></p></div><div><p class="MsoNormal">#8 0x0000000000bef19d in vtkOpenGLRenderWindow::OpenGLInit() ()<u></u><u></u></p></div><div><p class="MsoNormal">#9 0x0000000000bb566d in vtkOSOpenGLRenderWindow::Start() ()<u></u><u></u></p></div><div><p class="MsoNormal">#10 0x0000000000b2e900 in vtkRenderWindow::DoStereoRender() ()<u></u><u></u></p></div><div><p class="MsoNormal">#11 0x0000000000b2fc7d in vtkRenderWindow::DoFDRender() ()<u></u><u></u></p></div><div><p class="MsoNormal">#12 0x0000000000b30515 in vtkRenderWindow::DoAARender() ()<u></u><u></u></p></div><div><p class="MsoNormal">#13 0x0000000000b2eceb in vtkRenderWindow::Render() ()<u></u><u></u></p></div><div><p class="MsoNormal">#14 0x0000000000b399c5 in vtkWindowToImageFilter::RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) ()<u></u><u></u></p></div><div><p class="MsoNormal">#15 0x0000000000b39cc1 in vtkWindowToImageFilter::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) ()<u></u><u></u></p></div><div><p class="MsoNormal">#16 0x0000000000920204 in vtkExecutive::CallAlgorithm(vtkInformation*, int, vtkInformationVector**, vtkInformationVector*) ()<u></u><u></u></p></div><div><p class="MsoNormal">#17 0x000000000091cd1c in vtkDemandDrivenPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) ()<u></u><u></u></p></div><div><p class="MsoNormal">#18 0x000000000091bbe1 in vtkCompositeDataPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) ()<u></u><u></u></p></div><div><p class="MsoNormal">#19 0x000000000091f4a1 in vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) ()<u></u><u></u></p></div><div><p class="MsoNormal">#20 0x0000000000927c61 in vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) ()<u></u><u></u></p></div><div><p class="MsoNormal">#21 0x000000000091dc87 in vtkDemandDrivenPipeline::UpdateData(int) ()<u></u><u></u></p></div><div><p class="MsoNormal">#22 0x0000000000929401 in vtkStreamingDemandDrivenPipeline::Update(int) ()<u></u><u></u></p></div><div><p class="MsoNormal">#23 0x000000000070752d in main ()<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">The same segfault is reported here: <a href="http://public.kitware.com/pipermail/vtkusers/2013-April/079007.html" target="_blank">http://public.kitware.com/pipermail/vtkusers/2013-April/079007.html</a>, however the solution they linked is not available anymore. Threads in the list around the pointed dates are: <a href="http://vtk.1045678.n5.nabble.com/VTK-offscreen-rendering-td4548419.html#a4856413" target="_blank">http://vtk.1045678.n5.nabble.com/VTK-offscreen-rendering-td4548419.html#a4856413</a> and <a href="http://www.vtk.org/pipermail/vtkusers/2011-July/068951.html" target="_blank">http://www.vtk.org/pipermail/vtkusers/2011-July/068951.html</a>.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I did not try the patch in the last link, I would prefer not to modify VTK source.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Thanks a lot. Best wishes,<u></u><u></u></p></div><div><p class="MsoNormal">Oscar<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><div><div><div><div><p class="MsoNormal"><b>______________________________________</b><u></u><u></u></p></div><div><p class="MsoNormal"><b>Oscar Esteban</b><u></u><u></u></p></div><div><p class="MsoNormal">PhD Student / Researcher<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><span style="color:silver">Biomedical Image Technologies (BIT), UPM<br>ETSI Telecomunicación Lab. C203, Av. Complutense s/n - E-28040 Madrid (Spain)<br><a href="tel:%2B34%20915%20495%20700%20ext.4234" target="_blank">+34 915 495 700 ext.4234</a></span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><p class="MsoNormal"><span style="color:silver">Signal Processing Laboratory (LTS5), EPFL-STI-IEL-LTS5<br>ELD 224 (Bâtiment ELD), Station 11, CH-1015 Lausanne, Switzerland</span><u></u><u></u></p></div></div></div></div></div></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>_______________________________________________<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>Follow this link to subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></div></blockquote></div><br></div>