<div dir="ltr">Why my orientationWidget is show like the one shown in the attached picture?<br><br>Its a vtkAxesActor+vtkOrientationWidget with a cube rendered in QVTKWidget.<br><br><br>Thanks,<br><br>Jothy<br><br><br><div class="gmail_quote">
On Wed, Jun 23, 2010 at 3:07 PM, Jothy <span dir="ltr"><<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr">And it also appears cropped, I mean only the centre portion is visible.<br><br>How to get the camera of the orientation widget renderer? So that I can reset it.<br><br>Thanks,<br><font color="#888888"><br>Jothy</font><div>
<div></div><div class="h5"><br><br><div class="gmail_quote">
On Wed, Jun 23, 2010 at 2:23 PM, Jothy <span dir="ltr"><<a href="mailto:jothybasu@gmail.com" target="_blank">jothybasu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr">No Eric,<br><br>The problem is not with this code, with this script I can rotate without calling start().But, when I embed it into a QVTKWidget, it doesn't work as expected. Did you tried with QVTKWidget?<br>
<br>Thanks,<br><font color="#888888"><br>Jothy</font><div><div></div><div><br><br><div class="gmail_quote">On Wed, Jun 23, 2010 at 2:18 PM, Eric E. Monson <span dir="ltr"><<a href="mailto:emonson@cs.duke.edu" target="_blank">emonson@cs.duke.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hey Jothy,<br>
<br>
If I add iren.Start() at the end of this code it works for me. The blue cube in the corner spins with the big white cube.<br>
<br>
-Eric<br>
<br>
------------------------------------------------------<br>
<font color="#888888">Eric E Monson<br>
Duke Visualization Technology Group<br>
</font><div><div></div><div><br>
<br>
On Jun 23, 2010, at 7:29 AM, Jothy wrote:<br>
<br>
> Hi all,<br>
><br>
> I am trying to add a vtkOrientationMarkerWidget to a QVTKWidget. The annotatedCube is displayed in the corner but it doesn't rotate along with the other actors.<br>
><br>
> I checkd the code with vtkRenderWindow, it works well. What is the problem??<br>
><br>
> Below is the code<br>
><br>
><br>
><br>
> from vtk import*<br>
> cube=vtkCubeSource()<br>
> cube.SetXLength(200)<br>
> cube.SetYLength(200)<br>
> cube.SetZLength(200)<br>
> cube.Update()<br>
> cm=vtkPolyDataMapper()<br>
> cm.SetInputConnection(cube.GetOutputPort())<br>
> ca=vtkActor()<br>
> ca.SetMapper(cm)<br>
><br>
> renWin = vtkRenderWindow()<br>
> ren=vtkRenderer()<br>
> ren.AddActor(ca)<br>
> renWin.AddRenderer(ren)<br>
> iren = vtkRenderWindowInteractor()<br>
> iren.SetRenderWindow(renWin)<br>
> ren.SetBackground(0,0,0)<br>
> renWin.Render()<br>
><br>
> axesActor = vtkAnnotatedCubeActor();<br>
> axesActor.SetXPlusFaceText('R')<br>
> axesActor.SetXMinusFaceText('L')<br>
> axesActor.SetYMinusFaceText('H')<br>
> axesActor.SetYPlusFaceText('F')<br>
> axesActor.SetZMinusFaceText('P')<br>
> axesActor.SetZPlusFaceText('A')<br>
> axesActor.GetTextEdgesProperty().SetColor(1,1,0)<br>
> axesActor.GetTextEdgesProperty().SetLineWidth(2)<br>
> axesActor.GetCubeProperty().SetColor(0,0,1)<br>
> axes = vtkOrientationMarkerWidget();<br>
> axes.SetOrientationMarker(axesActor);<br>
> axes.SetInteractor(iren);<br>
> axes.EnabledOn();<br>
> axes.InteractiveOn();<br>
><br>
><br>
> Thanks,<br>
><br>
> Jothy<br>
><br>
><br>
><br>
><br>
><br>
</div></div><div><div></div><div>> _______________________________________________<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>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>