[vtk-developers] ARB - feature addition

John Biddiscombe jbiddiscombe at skippingmouse.co.uk
Thu Dec 11 13:14:01 EST 2003


Dean

> 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

sorry, I wrote hastily and skipped some details...
I'ce made some tweaks to vtkSplineWidget to enable a bit more control of
handles, then I've subclassed it to create vtkTransferFunctionWidget, which
adds/removes handles, drasw bar charts and does the RGB management etc. What
I ought to do is consolidate my changes in vtkSplineWidget, possibly doa
straightline only version like vtkPolyLineWidget and subclass that to make
vtksplineWidget. then do some tidying up to get the TrFn-Widget.

> 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.

hmmm. sounds like we've got duplicated functionality

> 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.

ok. I don't know where to start. Lots of good changes that I want to use.
Certainly 2D handles would be great. indeed, we also need some generalized
2D widgets for moving text around and resizing etc (and 2D handles seems
sensible here). I had this all working in RPD but broke it one day and never
got it fixed again.

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

yes. I'll start putting together a test/demo and then commit stuff soon.
then you can at least try it out and we can go from there. The only catch is
that mine expects the user to pop up and RGB dialog to colour individual
points and that might be tricky as I'm not a tcl/tk whizz. (Sebastien? if
you're reading this, how can I do fancy gui's in tcl/tk - is there a gui
builder anywhere?)

> Also, do you have any thoughts on the ongoing wglMakeCurrent errs I have
> been reporting?
errr. no. I've had no trouble but I've not used CVS vtk for a month or more.
My constructors and destructors look very different from yours because I've
completely re-written my stuff since the version you based yours on - I
wanted a map/unmap set of calls so that BCB could destroy the window handle
and vtk would go down with it, then up again so that for example if you
wanted to enable stereo views and then disable them, the window would be
re-created - hence my code is a bit more streamlined and possibly if there's
a bug now I can find it when I rebuild. Certainly you've got some stuff like
clean/frame which shouldn't be there in the constructor (it was put there
originally to fix the garbage, but changes over the years have made it
obsolete and in fact dangerous) - however, I don't think this is related to
your trouble. I will tentatively do a cvs update here and rebuild tons of
stuff overnight and maybe get back to you tomorrow.

JB




More information about the vtk-developers mailing list