<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body text="#000000" bgcolor="#ffffff">
    <br>
    <span style="font-size: 10pt; font-family: DotumChe;">The default
      vtkRenderWindowInteractor</span> from New() doesn't work with Qt.<br>
    You should either get the interactor from QVTKWidget or make a
    QVTKInteractor.<br>
    <br>
    Clint<br>
    <br>
    On 01/15/2011 12:38 AM, Xiaopeng Yang wrote:
    <blockquote cite="mid:00f601cbb487$2b494d80$81dbe880$@ac.kr"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 12 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Malgun Gothic";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:DotumChe;
        panose-1:2 11 6 9 0 1 1 1 1 1;}
@font-face
        {font-family:"\@DotumChe";
        panose-1:2 11 6 9 0 1 1 1 1 1;}
@font-face
        {font-family:"\@Malgun Gothic";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-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;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
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]-->
      <div class="WordSection1">
        <p class="MsoNormal">Dear Members,<o:p></o:p></p>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <p class="MsoNormal">I made a system by QT, VTK, and ITK. In the
          system, 10 convex hulls are generated and visualized by the
          same vtkRenderer in a qvtkWidget. After visualization, the
          interaction function does not work. I could not drag and
          rotate the convex hulls. But I can zoom in and out through the
          mouse wheel. Then after 2 or 3 seconds, the program crashed
          out. I tried many different ways to solve the problem since
          last weekend, however, still I did not succeed yet. I would
          appreciate a lot if anyone can give me some advice. I attach
          the code here for reference. Thank you very much!<o:p></o:p></p>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe; color: blue;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if</span><span
            style="font-size: 10pt; font-family: DotumChe;"> (seg_no ==
            0)<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:
              blue;">for</span> (i = 0; i &lt; spl_max; i++)<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            points1-&gt;InsertNextPoint(segment_point_list[i][0],
            segment_point_list[i][1], segment_point_list[i][2]);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            polydata1-&gt;SetPoints(points1);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            delaunay3D1-&gt;SetInput (polydata1);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            delaunay3D1-&gt;Update();<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            delaunayMapper1-&gt;SetInputConnection(delaunay3D1-&gt;GetOutputPort());<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            delaunayActor1-&gt;SetMapper(delaunayMapper1);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            delaunayActor1-&gt;GetProperty()-&gt;SetColor(1,0,0);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: blue;">else</span>
            <span style="color: blue;">if</span> (seg_no == 1)<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color:
              blue;">for</span> (i = 0; i &lt; spl_max; i++)<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            points2-&gt;InsertNextPoint(segment_point_list[i][0],
            segment_point_list[i][1], segment_point_list[i][2]);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            polydata2-&gt;SetPoints(points2);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            delaunay3D2-&gt;SetInput (polydata2);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            delaunayMapper2-&gt;SetInputConnection(delaunay3D2-&gt;GetOutputPort());<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            delaunayActor2-&gt;SetMapper(delaunayMapper2);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            delaunayActor2-&gt;GetProperty()-&gt;SetColor(1,1,0);<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 10pt; font-family:
            DotumChe;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 22pt; font-family:
            &quot;Times New Roman&quot;,&quot;serif&quot;;">&#8230;</span><span
            style="font-size: 22pt;"><o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">vtkSmartPointer&lt;vtkRenderWindow&gt;
            renderWindow&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
            vtkSmartPointer&lt;vtkRenderWindow&gt;::New();<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">renderWindow = <span style="color:
              blue;">this</span>-&gt;ui-&gt;qvtkWidget_4-&gt;GetRenderWindow();<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">renderWindow-&gt;AddRenderer(delaunayRenderer);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;
            renderWindowInteractor =
            vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;::New();<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">renderWindowInteractor-&gt;SetRenderWindow(renderWindow);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">delaunayRenderer-&gt;AddActor(delaunayActor1);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">delaunayRenderer-&gt;AddActor(delaunayActor2);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">delaunayRenderer-&gt;AddActor(delaunayActor3);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">delaunayRenderer-&gt;AddActor(delaunayActor4);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">delaunayRenderer-&gt;AddActor(delaunayActor5);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">delaunayRenderer-&gt;AddActor(delaunayActor6);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">delaunayRenderer-&gt;AddActor(delaunayActor7);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">delaunayRenderer-&gt;AddActor(delaunayActor8);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">delaunayRenderer-&gt;AddActor(delaunayActor9);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">delaunayRenderer-&gt;AddActor(delaunayActor10);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">delaunayRenderer-&gt;SetBackground(1,1,1);<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">renderWindow-&gt;Render();<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">renderWindowInteractor-&gt;Initialize();<o:p></o:p></span></p>
        <p class="MsoNormal" style=""><span style="font-size: 10pt;
            font-family: DotumChe;">renderWindowInteractor-&gt;Start();<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 10pt; font-family:
            DotumChe;">}</span><o:p></o:p></p>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>

Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the VTK FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>