Is this an application you are building outside of VTK? If so, can you share your CMakeLists.txt file?<br><br><div class="gmail_quote">On Mon, Oct 15, 2012 at 9:37 AM, Doug Hoppes <span dir="ltr"><<a href="mailto:dhoppes@mbfbioscience.com" target="_blank">dhoppes@mbfbioscience.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Hi all,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> Okay, got the latest nightly build and trying out the QT implementation (there’s a bug fix with destructor order in QT that I need). With the latest change (vtkTDxConfigure.h being copied), I can get the code to compile.
However, running into a new issue: The renderwindow isn’t built.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"> My code (I have a class called VTKView which is subclassed from QVTKWidget). In my QT window, I have placed a QWidget and promoted it to VTKView.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="text-indent:.5in;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:#010001">VTKView</span><span style="font-size:10.0pt;font-family:"Courier New"">::<span style="color:#010001">VTKView</span>(<span style="color:#010001">QWidget</span>
*<span style="color:#010001">pParent</span>)<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">:<span style="color:#010001">QVTKWidget</span>(<span style="color:#010001">pParent</span>),
<span style="color:#010001">m_pUIProcessor</span>(<span style="color:#010001">NULL</span>),
<span style="color:#010001">m_pSolidsImage</span>(<span style="color:#010001">NULL</span>)<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">{<u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">
<span style="color:#010001">m_pUIProcessor</span> = <span style="color:blue">new</span>
<span style="color:#010001">VTKSceneManager</span>(<span style="color:#010001">GetRenderWindow</span>());<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">}<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">In QVTKWidget, it calls the function:<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:.5in;text-autospace:none">
<span style="font-size:10.0pt;font-family:"Courier New";color:#010001">vtkRenderWindow</span><span style="font-size:10.0pt;font-family:"Courier New"">*
<span style="color:#010001">QVTKWidget</span>::<span style="color:#010001">GetRenderWindow</span>()<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:.5in;text-autospace:none">
<span style="font-size:10.0pt;font-family:"Courier New"">{ <u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1.0in;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">
<span style="color:blue">if</span> (!<span style="color:blue">this</span>-><span style="color:#010001">mRenWin</span>)<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1.0in;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New""> {<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1.5in;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">
<span style="color:green">// create a default vtk window<u></u><u></u></span></span></p>
<p class="MsoNormal" style="margin-left:1.5in;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">
<span style="color:#010001">vtkRenderWindow</span>* <span style="color:#010001">win</span> =
<span style="color:#010001">vtkRenderWindow</span>::<span style="color:#010001">New</span>();<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1.5in;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">
<span style="color:blue">this</span>-><span style="color:#010001">SetRenderWindow</span>(<span style="color:#010001">win</span>);<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1.5in;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">
<span style="color:#010001">win</span>-><span style="color:#010001">Delete</span>();<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:1.0in;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New""> }<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:.5in;text-autospace:none">
<span style="font-size:10.0pt;font-family:"Courier New""> <span style="color:blue">
return</span> <span style="color:blue">this</span>-><span style="color:#010001">mRenWin</span>;<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:.5in;text-indent:.5in;text-autospace:none">
<span style="font-size:10.0pt;font-family:"Courier New"">}<u></u><u></u></span></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"> However, the software crashes because the variable “win” is null, after calling the vtkRenderWindow::New().<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Also, as a side note, I had to comment out a lot of function calls (should I not be using these any more?):<u></u><u></u></p>
<p class="MsoNormal"> <span style="font-size:8.0pt;font-family:"Courier New"">
'SetScalarTypeToUnsignedChar' : is not a member of 'vtkImageData'<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:8.0pt;font-family:"Courier New"">'vtkImageData::SetNumberOfScalarComponents' : function does not take 1 arguments<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:8.0pt;font-family:"Courier New"">'vtkImageData::AllocateScalars' : no overloaded function takes 0 arguments<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:8.0pt;font-family:"Courier New"">'SetInput' : is not a member of 'vtkImageShiftScale'<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:8.0pt;font-family:"Courier New"">'SetInput' : is not a member of 'vtkImageActor'<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:8.0pt;font-family:"Courier New"">'SetInput' : is not a member of 'vtkOutlineFilter'<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:8.0pt;font-family:"Courier New"">'SetInput' : is not a member of 'vtkPolyDataMapper'<u></u><u></u></span></p>
<p class="MsoNormal" style="text-indent:.5in"><span style="font-size:8.0pt;font-family:"Courier New"">'SetInput' : is not a member of 'vtkSmartVolumeMapper'<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Doug<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">---------------------------------------------------<u></u><u></u></p>
<p class="MsoNormal">Doug Hoppes <a href="http://doug@mbfbioscience.com" target="_blank">doug@mbfbioscience.com</a><u></u><u></u></p>
<p class="MsoNormal">Senior Software Engineer<u></u><u></u></p>
<p class="MsoNormal">MBF Bioscience (Microbrightfield, Inc.)<u></u><u></u></p>
<p class="MsoNormal"><a href="tel:%2B1.802.288.9290%20ext%3A119" value="+18022889290" target="_blank">+1.802.288.9290 ext:119</a><u></u><u></u></p>
<p class="MsoNormal"><a href="http://www.mbfbioscience.com" target="_blank">www.mbfbioscience.com</a><u></u><u></u></p>
<p class="MsoNormal">---------------------------------------------------<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<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://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>