<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> m_planeWidget->SetInput(image);</tt><br>
<tt> m_planeWidget->RestrictPlaneToVolumeOn();</tt><br>
<tt> m_planeWidget->SetPlaneOrientationToZAxes(); </tt><br>
<tt> m_planeWidget->SetDisplayText(1);</tt><br>
<tt> m_planeWidget->SetInteractor(iren);</tt><br>
<tt> m_planeWidget->SetSliceIndex(0);</tt><br>
<tt> m_planeWidget->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 & slice) </tt><br>
<tt>{ </tt><br>
<tt> m_planeWidget->SetSliceIndex(slice);</tt><br>
<tt> m_planeWidget->Modified(); //-- this doesn't seem to help</tt><br>
<tt> m_planeWidget->UpdatePlacement(); //neither does this</tt>
<div style="font-size:75%"><tt><big>}<br>
</big><big><big><br>
// outside call:<br>
myClass C;<br>
C->setPlaneWidgetSlice(index);</big><br>
<big>C->render(); //calls
QVKTWidget->GetRenderWindow()->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>