<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><div class="gmail_default">Hi Enzo,</div><div class="gmail_default"><br></div><div class="gmail_default">I have a statically built VTK (6.3.0 and a recent git version), and compiling that example produces an <a href="https://dl.dropboxusercontent.com/u/48665006/QtVTKRenderWindows.exe" target="_blank">executable</a> which loads an image and reslice views are shown. The example does not work totally correctly - 2D and 3D views are not synchronized, fiddling with options on the right can make reslice views disappear or crash the program, blue slice is not initialized in the correct position etc. Here is a screenshot:</div><div class="gmail_default"><img src="cid:ii_156708d2a71c21ef" alt="Inline image 1" width="562" height="407"><br></div><div class="gmail_default"><br></div><div class="gmail_default">Regards,</div><div class="gmail_default">Dženan</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 9, 2016 at 1:08 PM, Enzo Matsumiya <span dir="ltr"><<a href="mailto:enzo.matsumiya@gmail.com" target="_blank">enzo.matsumiya@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Dženan,</div><div><br></div><div>I’m pretty sure I was using the correct libraries (VTK 7.0 static with Qt 5.7).</div><div><br></div><div>My current test case is heavily based on this VTK example, so I believe it will reproduce this buggy behaviour:</div><a href="http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/GUI/Qt/FourPaneViewer/QtVTKRenderWindows.cxx" target="_blank">http://www.vtk.org/gitweb?p=<wbr>VTK.git;a=blob;f=Examples/GUI/<wbr>Qt/FourPaneViewer/<wbr>QtVTKRenderWindows.cxx</a><div><br></div><div>I’m sorry I can’t look deeper into this issue, but I’m up to testing new future fixes and also sending additional information if necessary.</div><div><br></div><div><br></div><div>Thanks!</div><div><div class="h5"><div><div><br>
</div>
<br><div><blockquote type="cite"><div>On Aug 9, 2016, at 13:34, Sophonet <<a href="mailto:vtk12af6bc42@kant.sophonet.de" target="_blank">vtk12af6bc42@kant.sophonet.de</a><wbr>> wrote:</div><br><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Hi all,</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">regarding this topic: In the meantime, I have found out that indeed, when using static VTK libraries, the image-related components (e.g. vtkImageResliceMapper) always retrieve invalid bounds / whole data extent from the input image data (0,-1,0,-1,0,-1) - and the corresponding content is black. When using dynamic VTK libraries, the information is correct, and the resliced image is shown as expected.</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">The only function which (indirectly) sets invalid image dimensions is PrepareForNewData(), which is called from vtkImageResliceMapper's Update().</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Ideally, I would like to continue debugging and find out why, in case of static VTK libraries, the information is not correctly overwritten later in my case, but would appreciate any help, since the processing / updating mechanism during a Render() call are not clear to me.</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Any hints or ideas?</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Thanks,</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">   sophonet</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Hi,<br>great that this is beine picked up. No, absolutely no changes besides<br>switching from dynamic to static. The revision was exactly the same,<br>the CMake flags as well.<br>Again, some content (vtkPolyData) was shown, but other content (in my<br>case results of vtkImageReslice) was not. If you guys have already a<br>clue about what might be the cause, please go ahead, otherwise, I will<br>try to set up a minimal example in the next days/weeks, and if I find<br>something, I will file a merge request.<br>Cheers,<br>    Sophonet<br><blockquote type="cite">Hi Sophonet and Enzo,<br>is it possible you made other changes besides switching VTK from DLLs<br>to static libraries? Perhaps your application was using a different<br>version of VTK DLLs than you thought etc.<br>If that is not the case, can you point to an example which exhibits<br>the problem?<br>Regards,<br>Dženan<br>On Wed, Aug 3, 2016 at 2:24 PM, Gib Bogle <<a href="mailto:g.bogle@auckland.ac.nz" target="_blank">g.bogle@auckland.ac.nz</a>><br>wrote:<br><blockquote type="cite">Statically linked VTK 5.10 works fine with Qt.<br>______________________________<wbr>__________<br>From: vtkusers [<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a>] on behalf of Enzo<br>Matsumiya [<a href="mailto:enzo.matsumiya@gmail.com" target="_blank">enzo.matsumiya@gmail.com</a>]<br>Sent: Thursday, 4 August 2016 6:21 a.m.<br>To: Constantinescu Mihai via vtkusers<br>Subject: [FORGED] Re: [vtkusers] Qt-based VTK app shows black image<br>content if VTK is   linked statically<br>I can confirm that some issues occur when using VTK static as well<br>(VTK stable 7.0.0).<br>I could not look further into the issue, but my application crashed<br>instead of just black window, and I just rolled back to dynamic<br>build.<br>Appreciate any details on this.<br>Thanks,<br>Enzo<br><blockquote type="cite">On Aug 3, 2016, at 15:05, Sophonet<br></blockquote><<a href="mailto:vtk12af6bc42@kant.sophonet.de" target="_blank">vtk12af6bc42@kant.sophonet.de</a><wbr>> wrote:<br><blockquote type="cite">Hi list,<br>recently, I have been working on a Qt application (using VTK<br></blockquote>functionality in the main .exe and a bunch of underlying DLLs).<br><blockquote type="cite">If VTK is built dynamically, the application behaves as expected.<br>However, if VTK is built statically (and - obviously - the<br></blockquote>application and underlying DLLs are then built using the static<br>libraries of VTK), some content (vtkImageSlice) is missing in the<br>render window, i.e. does not appear at all. Other parts (e.g.<br>vtkPolyData) are shown correctly.<br><blockquote type="cite">Anyone knows how to fix this? If possible, I would like to do<br></blockquote>static linking of VTK.<br><blockquote type="cite">Thanks,<br>   <span> </span>sophonet<br>______________________________<wbr>_________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> [1]<br>Visit other Kitware open-source projects at<br></blockquote><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a> [2]<br><blockquote type="cite">Please keep messages on-topic and check the VTK FAQ at:<br></blockquote><a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a> [3]<br><blockquote type="cite">Search the list archives at:<br></blockquote><a href="http://markmail.org/search/?q=vtkusers" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a> [4]<br><blockquote type="cite">Follow this link to subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a> [5]<br></blockquote>______________________________<wbr>_________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> [1]<br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a> [2]<br>Please keep messages on-topic and check the VTK FAQ at:<br><a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a> [3]<br>Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>[4]<br>Follow this link to subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a> [5]<br>______________________________<wbr>_________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> [1]<br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a> [2]<br>Please keep messages on-topic and check the VTK FAQ at:<br><a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a> [3]<br>Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>[4]<br>Follow this link to subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a> [5]<br></blockquote>Links:<br>------<br>[1] <a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a><br>[2] <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>[3] <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>[4] <a href="http://markmail.org/search/?q=vtkusers" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>[5] <a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>______________________________<wbr>_________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>Please keep messages on-topic and check the VTK FAQ at:<br><a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br></blockquote>______________________________<wbr>_________________<br>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>Please keep messages on-topic and check the VTK FAQ at:<br><a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br></blockquote><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">______________________________<wbr>_________________</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Powered by<span> </span></span><a href="http://www.kitware.com/" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">www.kitware.com</a><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Visit other Kitware open-source projects at<span> </span></span><a href="http://www.kitware.com/opensource/opensource.html" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Please keep messages on-topic and check the VTK FAQ at:<span> </span></span><a href="http://www.vtk.org/Wiki/VTK_FAQ" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">http://www.vtk.org/Wiki/<wbr>VTK_FAQ</a><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Search the list archives at:<span> </span></span><a href="http://markmail.org/search/?q=vtkusers" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">http://markmail.org/<wbr>search/?q=vtkusers</a><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Follow this link to subscribe/unsubscribe:</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="http://public.kitware.com/mailman/listinfo/vtkusers" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>