[vtkusers] Problem with vtkContourWidget and QVTKWidget

Jothybasu Selvaraj jothybasu at gmail.com
Wed Nov 23 04:44:44 EST 2011


Here is some of my python code which works for me, where self.AxialView is
a QVTKWidget. Alos, have a look at

http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/ContourWidget

self.AxialView.SetInput(self.ImageSet)
        self.AxialView.SetSlice(0)

self.AxialView.SetupInteractor(self.frameA.GetRenderWindow().GetInteractor())
        self.itw = vtk.vtkImageTracerWidget()
        self.itw.SetCaptureRadius(100)
        self.itw.GetGlyphSource().SetColor(1, 1, 0)
        self.itw.GetLineProperty().SetColor(0.47058823529411764,
0.0039215686274509803, 0.49411764705882355);
        self.itw.GetGlyphSource().SetScale(1.5)
        self.itw.GetGlyphSource().SetRotationAngle(45.0)
        self.itw.GetGlyphSource().Modified()
        self.itw.ProjectToPlaneOn()
        self.itw.SetProjectionNormalToZAxes()
        self.itw.SetProjectionPosition(150)
        self.itw.SetViewProp(self.AxialView.GetImageActor())
        self.itw.SetInput(self.ImageSet)

self.itw.SetInteractor(self.frameA.GetRenderWindow().GetInteractor())
        self.itw.PlaceWidget(0,256,0,256,0,256)
        self.itw.SnapToImageOff()
        self.itw.AutoCloseOn()
        self.itw.InteractionOn()
        self.itw.On()
        self.AxialView.Render()
        self.frameA.show()
        self.AxialView.GetRenderer().ResetCameraClippingRange()


Jothy



On Wed, Nov 23, 2011 at 6:42 AM, Xavius <xavierelf at gmail.com> wrote:

> This is the same. Don't you think so? Nevertheless, I have specially
> checked
> it up and it doesn't work, as I also assumed... :(
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Problem-with-vtkContourWidget-and-QVTKWidget-tp5013481p5015686.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>



-- 
Jothy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111123/77b08300/attachment.htm>


More information about the vtkusers mailing list