[vtk-developers] ARB - feature addition

Dean Inglis dean.inglis at camris.ca
Wed Dec 10 11:06:47 EST 2003


Hi John,

>I also have a fairly primitive transfer function widget, which consists
>of a modified spline widget (constrained to a plane and straight lines
>only - so really just a polyline - should really be a common base class

vtkSplineWidget currently can be set to straight line segments, and
one could add callbacks to insert/delete handles at specific locations,
but this could get hairy.  My plan was to add vtkImageTracerWidget to
VTK for developers et. al. to try out/modify: the API for setting
user-defined polydata handles could be hashed out from this class.
vtkImageTracerWidget currently has all the interactivity for straight
line segments: handle inserts on existing line segments, handle deletions,
handle dragging etc.
One of my other widgets: vtkImageSplineWidget is basically a modified
vtkSplineWidget with 2D handles, so perhaps rather than committing
this modified version to VTK, the focus should be on extending the API that
is there to allow setting handles other than spheres wherever it makes
sense.

>for this), in addition a vtkPolyDataBarChartGenerator which takes an
>imagedata as input (internally uses vtkimageAccumulator to generate a
>histogram). The spline control points can be moved around (over the bar
>chart) to vary the opacity/position and when right clicked the user can
>capture a callback (observer command etc) and pop up a colour dialog box
>which the user is expected to return an RGB value from. The Bar chart is
>coloured according to the user colour and its really not bad, though
>very simple and a trifle clunky.

I'm actually still in the planning stages of my transfer function widget,
but I do need to implement it very soon.  In terms of color control, one
could use mouse movements over the widget to set color (left to right) and
tint (up and down) as is done with:

http: //www . cs. utah . edu/~jmk/simian/

if you have the right NVIDIA card, this is an awesome widget to play with!

>I'm glad to say that my employer has given me the go ahead to commit
>some things to the repository, so perhaps we could combine our efforts
>on the transfer function widget.
>Unfortunately, mine can't be used without quite a lot of crufty glue
>logic in the app yet, so I can't commit a working demo until I've done a
>bit of tidying up.

If you wouldn't mine using your widget as a starting point, I would be
pleased to collaborate :)

Also, do you have any thoughts on the ongoing wglMakeCurrent errs I have
been reporting?

Dean





More information about the vtk-developers mailing list