|
Slicer 5.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|


Public Member Functions | |
| None | cleanup (self) |
| None | setup (self) |
Protected Member Functions | |
| _onCreateSphereClicked (cls, *_) | |
Protected Attributes | |
| _onCreateSphereClicked | |
In this example, the module's widget will allow us to create random sphere model nodes in the scene.
Definition at line 70 of file ModelGlowDM.py.
|
protected |
Here we create the sphere models at random.
Note: Attaching the glow data to the model could be done in this type of methods if we wanted more control
on the creation logic.
Definition at line 112 of file ModelGlowDM.py.
| None ModelGlowDM.ModelGlowDMWidget.cleanup | ( | self | ) |
Called when the module is about to be unloaded and by slicer.util.reloadScriptedModule before the widget is rebuilt (module Reload button). Here, we disconnect the pipelines from the scene (unregister the pipeline creator from the factory singleton and remove the scene observers). Without this, the previously registered creator and observers would keep running the pre-reload code.
Definition at line 99 of file ModelGlowDM.py.
| None ModelGlowDM.ModelGlowDMWidget.setup | ( | self | ) |
In the setup method, we create a widget with only two buttons:
- A "create sphere" button to create a random sphere in the scene
- A "Reset 3D views" button to reset the 3D view on the created spheres
Definition at line 73 of file ModelGlowDM.py.
|
protected |
Definition at line 89 of file ModelGlowDM.py.