Slicer3:GUI Experiments
From Slicer Wiki
Home < Slicer3:GUI Experiments
The Slicer3 interface is highly configurable and even scriptable at runtime.
There are several options for GUI building:
- Use the C++ API to KWWidgets
- this is the way most of Slicer3/Base/GUI is programmed for core functionality and built-in Modules
- this approach is the most consistent with the way the MRML and the Base/Logic classes are implemented
- C++ debuggers can be very helpful
- Use the Tcl API to KWWidgets
- See the Modules/Editor code for an example of this
- the Modules/ScriptedModule code helps form a bridge between the Slicer3 Base and a GUI written in Tcl
- Arbitrary tcl code can be loaded any time and can build an interface that is compatible with the slicer theme (i.e. it has a look and feel consistent with the rest of slicer3). See the code in Base/GUI/Tcl/Loader.tcl for an example; this code implements the Add Data... dialog box in slicer3.
- This approach can be used to access sophisticated tcl/tk widgets, like the TkTreeCtrl widget directly.
- Tk and KWWidgets interfaces can also be invoked through the Slicer3 Python hooks (note: not as thoroughly tested).