Slicer3:GUI Experiments:TkTreeCtrl
From NAMIC Wiki
Home < Slicer3:GUI Experiments:TkTreeCtrl
Background
TkTreeCtrl is a pretty amazing set of interface functionality for displaying trees where each row can be a multi-column list and/or a set of interface widgets. The interface is highly configurable (as shown in the demos) and very efficient. It is a cross-platform tcl extension.
As of late June 2007, TkTreeCtrl is built as part of KWWidgets and is exposed for use in Slicer3. Note that it does not yet have a C++ API so any use of TkTreeCtrl must be implemented in tcl (this code can be invoked from C++ using the Script() method on a KWWidget).
Running the Demo in Slicer3
First, download and unpack the package from TkTreeCtrl. Version 2.2.3 or later should work.
In Slicer3:
- open the tcl console (Control-T or use the menu)
- cd to the directory where you unpacked TkTreeCtrl
- cd to the demos directory
- type the following commands
proc console {args} {} source demo.tcl wm deiconify .
- experiment and have fun!
- note that the File menu includes options for viewing the source of each demo (note how brief and elegant each demo is!)
- you can even watch the events as you interact with the tree demos
- you can edit the configuration parameters of the trees on the fly and see the visual result
Plans
- Test the widget
- Example MRML tree (Steve)
- Model Hierarchy display properties (Alex)
- EMSegment (Brad)
- QueryAtlas (Wendy)
- Propose useful C++ API (all) for implementation by Sebastien and Yumin