<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi,<br>
    I have trouble with vtkImagePlaneWidget. It is connected to a GUI
    slider and the plane widget's SetSliceIndex(slice) method is called
    to move it through slices of a 3D volume. <br>
    Some slices however get clipped, see attached screenshots. <br>
    If I click on the QVTKWidget and rotate the scene by a slightest
    bit, the whole widget is rendered properly again. <br>
    I suspect I need to call some Update() method by I am failing to
    figure it out. I tried to call Modified() and UpdatePlacement() of
    the widget but no luck.<br>
    Here are the relevant snippets:<br>
    <br>
    <tt>//set up plane widget:</tt><br>
    <tt>void myClass::myClass() </tt><br>
    <tt>{</tt><br>
    <tt>&nbsp; m_planeWidget-&gt;SetInput(image);</tt><br>
    <tt>&nbsp; m_planeWidget-&gt;RestrictPlaneToVolumeOn();</tt><br>
    <tt>&nbsp; m_planeWidget-&gt;SetPlaneOrientationToZAxes(); </tt><br>
    <tt>&nbsp; m_planeWidget-&gt;SetDisplayText(1);</tt><br>
    <tt>&nbsp; m_planeWidget-&gt;SetInteractor(iren);</tt><br>
    <tt>&nbsp; m_planeWidget-&gt;SetSliceIndex(0);</tt><br>
    <tt>&nbsp; m_planeWidget-&gt;SetEnabled(1);</tt><br>
    <tt>}</tt><br>
    <tt>...</tt><br>
    <tt>//move slices (a Qt slot that is called on slider change)</tt><br>
    <tt>void myClass::setPlaneWidgetSlice(const int &amp; slice) </tt><br>
    <tt>{&nbsp;&nbsp; </tt><br>
    <tt>&nbsp; m_planeWidget-&gt;SetSliceIndex(slice);</tt><br>
    <tt>&nbsp; m_planeWidget-&gt;Modified();&nbsp;&nbsp; //-- this doesn't seem to help</tt><br>
    <tt>&nbsp; m_planeWidget-&gt;UpdatePlacement();&nbsp; //neither does this</tt>
    <div style="font-size:75%"><tt><big>}<br>
        </big><big><big><br>
            // outside call:<br>
            myClass C;<br>
            C-&gt;setPlaneWidgetSlice(index);</big><br>
          <big>C-&gt;render();&nbsp; //calls&nbsp;
            QVKTWidget-&gt;GetRenderWindow()-&gt;Render()</big></big></tt>
      <pre><big><big><big>

</big></big></big></pre>
      <big>Thank you for help!!</big><small><small><br>
        </small></small><big>Miro </big><br>
    </div>
    <div class="moz-signature">
    </div>
  </body>
</html>