[vtk-developers] an abstract class to manage groups of widgets?
Nicole Aucoin
nicole at bwh.harvard.edu
Tue Jul 1 16:57:22 EDT 2014
Hello,
In 3D Slicer we're currently using a vtkSeedWidget to represent a list
of points, and I'd like to extend my module[1] to work with lists of
rulers, angles, bidimensional widgets etc. I want to eventually have
many types of lists that contain elements with >1 points and have VTK
widgets to interact with them. In the code that manages the mapping
between the widgets and the stored point values, having one
vtkSeedWidget per list of points is working well, but I'm finding that I
have many special cases when trying to use many vtkDistanceWidgets to
represent a list of pairs of points. I need a generalisation of a
vtkSeedWidget that will manage a set of general widgets rather than
being restricted to a set of handle widgets.
I noticed that in VTK 6 there's a new class called vtkWidgetSet, but the
documentation[2] states that it synchronises a set of widgets across
render windows, which is not quite what I need (I have separate widgets
in each render window, synchronised via the point(s) list).
I was going to start working on the abstract widget group (list?) class
and representation[3] that I need and at first integrate it into
Slicer's fork of VTK then contribute it back into VTK. Before I start, I
wanted to ask if there was any effort in this direction already, or if
there's a grouping method in VTK6 that might work out of the box.
thanks,
Nicole
[1]
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/Modules/Markups
[2] http://www.vtk.org/doc/nightly/html/classvtkWidgetSet.html#details
[3] Working from the example of the seed representation as the base and
extending to support Nth point set/get, which will probably require some
superclass additions to generalise the representations.
DistanceRepresentation uses [Get|Set]Point[1|2][World|Display]Position
which could be updated to call a new virtual method
[Get|Set]NthPoint[World|Display]Position(unsigned int n, ...). The
vtkContourRepresentation has some generalisation already in
[Get|Set]NthNode[World|Display]Position(int n, ...), while the
vtkSeedRepresentation uses [Get|Set]Seed[World|Display]Position(unsigned
int n, ...), so an effort to make it uniform could be worthwhile, but
would likely be phase 2 of my project.
The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
More information about the vtk-developers
mailing list