Slicer 5.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
ModelGlowDM.ModelGlowDMWidget Class Reference
Inheritance diagram for ModelGlowDM.ModelGlowDMWidget:
Collaboration diagram for ModelGlowDM.ModelGlowDMWidget:

Public Member Functions

None cleanup (self)
 
None setup (self)
 

Protected Member Functions

 _onCreateSphereClicked (cls, *_)
 

Protected Attributes

 _onCreateSphereClicked
 

Detailed Description

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.

Member Function Documentation

◆ _onCreateSphereClicked()

ModelGlowDM.ModelGlowDMWidget._onCreateSphereClicked ( cls,
* _ )
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.

◆ cleanup()

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.

◆ setup()

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.

Member Data Documentation

◆ _onCreateSphereClicked

ModelGlowDM.ModelGlowDMWidget._onCreateSphereClicked
protected

Definition at line 89 of file ModelGlowDM.py.


The documentation for this class was generated from the following file: