[vtk-developers] vtkImagePlaneWidget ENH
Dean Inglis
dean.inglis at on.aibn.com
Mon Jul 29 15:03:27 EDT 2002
Hi,
it's been awhile...very busy with our new MRI machine. I've checked in some
major enhancements to vtkImagePlaneWidget. The enhancements are available
by widget->DisplayTextOn()/Off() which enables querying via mouse position
the
underlying image data position and associated pixel value (currently 1st
component
only). In addition, window/level values are displayed. Image position
with
data can be retrieved in a float vector with widget->GetCursorData(float
xyzv[4])
and, similarly, W/L with widget->GetWindowLevel(float wl[2]).
The text annotation is accomplished with a vtkTextActor (currently
ScaledText off) and the text
properties are controlled by access to the actor's vtkTextProperty.
Something
is up with the color of the text though: is there some confusion with the
vtkTextActor's vtkProperty2D and vtkTextProperty in terms of precedence for
color,
since both have a color ivar?
A cross-hair cursor resides on top of the slice plane: just 4 points to
generate a vertical line and a horizontal line. Access to cross-hair
properties through
vtkProperty. There was and still is a problem with zooming in on a
vtkImagePlaneWidget:
too close and the cross-hairs disappear even though text annotation shows
that picking
is still successful. This behaviour appears to be a bug(?) in VTK, but can
be fixed in an
application with, for e.g. in tcl:
[ren1 GetCullers] RemoveAllItems
Hope this doesn't break anything...
Dean
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dean Inglis, Ph.D.
Clinical Research Unit
25 Charlton Avenue East, Unit 610
Hamilton, ONT, L8N 1Y2
tel: (905) 527-0028
fax: (905) 521-1297
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the vtk-developers
mailing list