[vtkusers] How to use vtkLineWidget2

Karthik Krishnan karthik.krishnan at kitware.com
Thu May 20 14:55:43 EDT 2010

Perhaps the viewer is occluding it. Try setting a transparency on the image
Alternatively, it could be that the line is positioned somewhere in space
and you haven't initialized the point1 and point2 positions in your snippet
below to reasonable values.

There are multiple tests in the repository testing the line widget. Please
take a look at those

On Thu, May 20, 2010 at 4:45 PM, Jothy <jothybasu at gmail.com> wrote:

> Hi all,
> Has anyone used vtkLineWidget2 with vtkImageViewer2 before?  I am having
> problem in interacting with it and It does not show line between two end
> points.
> here is my code
> LineA=vtk.vtkLineWidget2()
> LineA.CreateDefaultRepresentation()
> LineA.SetInteractor(self.frameA.GetRenderWindow().GetInteractor())
> LineA.On()
> And there is no example on the wiki.
> Probably if someone helps me to fix this, I will add one.
> 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/20100521/34c66da8/attachment.htm>

More information about the vtkusers mailing list