[vtkusers] vtkOrientationMarkerWidget does not rotate in QVTKWidget

Jothy jothybasu at gmail.com
Wed Jun 23 10:07:23 EDT 2010


And it also appears cropped, I mean only the centre portion is visible.

How to get the camera of the orientation widget renderer? So that I can
reset it.

Thanks,

Jothy

On Wed, Jun 23, 2010 at 2:23 PM, Jothy <jothybasu at gmail.com> wrote:

> No Eric,
>
> 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?
>
> Thanks,
>
> Jothy
>
>
> On Wed, Jun 23, 2010 at 2:18 PM, Eric E. Monson <emonson at cs.duke.edu>wrote:
>
>> Hey Jothy,
>>
>> 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.
>>
>> -Eric
>>
>> ------------------------------------------------------
>> Eric E Monson
>> Duke Visualization Technology Group
>>
>>
>> On Jun 23, 2010, at 7:29 AM, Jothy wrote:
>>
>> > Hi all,
>> >
>> > 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.
>> >
>> > I checkd the code with vtkRenderWindow, it works well. What is the
>> problem??
>> >
>> > Below is the code
>> >
>> >
>> >
>> > from vtk import*
>> > cube=vtkCubeSource()
>> > cube.SetXLength(200)
>> > cube.SetYLength(200)
>> > cube.SetZLength(200)
>> > cube.Update()
>> > cm=vtkPolyDataMapper()
>> > cm.SetInputConnection(cube.GetOutputPort())
>> > ca=vtkActor()
>> > ca.SetMapper(cm)
>> >
>> > renWin = vtkRenderWindow()
>> > ren=vtkRenderer()
>> > ren.AddActor(ca)
>> > renWin.AddRenderer(ren)
>> > iren = vtkRenderWindowInteractor()
>> > iren.SetRenderWindow(renWin)
>> > ren.SetBackground(0,0,0)
>> > renWin.Render()
>> >
>> > axesActor = vtkAnnotatedCubeActor();
>> > axesActor.SetXPlusFaceText('R')
>> > axesActor.SetXMinusFaceText('L')
>> > axesActor.SetYMinusFaceText('H')
>> > axesActor.SetYPlusFaceText('F')
>> > axesActor.SetZMinusFaceText('P')
>> > axesActor.SetZPlusFaceText('A')
>> > axesActor.GetTextEdgesProperty().SetColor(1,1,0)
>> > axesActor.GetTextEdgesProperty().SetLineWidth(2)
>> > axesActor.GetCubeProperty().SetColor(0,0,1)
>> > axes = vtkOrientationMarkerWidget();
>> > axes.SetOrientationMarker(axesActor);
>> > axes.SetInteractor(iren);
>> > axes.EnabledOn();
>> > axes.InteractiveOn();
>> >
>> >
>> > Thanks,
>> >
>> > Jothy
>> >
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>> >
>> > Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100623/29891f31/attachment.htm>


More information about the vtkusers mailing list