[vtkusers] Is there a widget like vtkDistanceWidget for a single position?
Yumin Yuan
yumin.yuan at kitware.com
Mon Jan 14 10:56:13 EST 2013
I am afraid there is no such widget in VTK currently. You may already
notice that vtkPointWidget is still derived from vtk3DWidget, which
means it is using old style widget design. The new widget style is
using vtkAbstractWidget/WidgetRepresentation. Ideally, there should be
a vtkPointWidget2 deriving from vtkAbstractWidget, and a new
vtkPointRepresentation(2D/3D), which could have the features you
desire.
Having said that, the vtkHandleWidget behaves very similarly, and you
may create you own vtkPointHandleRepresentation to do what you want.
vtkPointHandleRepresentation2D will be a good starting-point.
HTH,
Yumin
On Mon, Jan 14, 2013 at 10:05 AM, Martin Raabe <Martin.Raabe at basystem.de> wrote:
> Hello Yumin,
> I'm afraid I didn't express good enough what I desire.
>
> I retry:
>
> When I use the vtkDistanceWidget, I can position the mouse and click
> with the left button, to mark on end of the distance measuring line. By
> a second click I can position the other endpoint.
> Then I have a label and position information of the end points can be
> retrieved for world and display coordinate systems. Also a crosshairs is
> rendered.
>
> Similar functionality can be found in the vtkAngleWidget.
>
> Now I look for a widget wich just lets me position a single point on the
> screen and have a label and crosshairs rendered.
>
> vtkPointWidget is not such a widget.
>
> Do you have any idea?
>
> Take care
>
> Martin
More information about the vtkusers
mailing list