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.ModelGlowDMSceneConnector Class Reference
Inheritance diagram for ModelGlowDM.ModelGlowDMSceneConnector:
Collaboration diagram for ModelGlowDM.ModelGlowDMSceneConnector:

Public Member Functions

list getPipelines (self)
 
list getSceneObservers (self)
 
None onConnected (self)
 
 OnNodeAdded (self, _caller, _event, node)
 
 OnNodeRemoved (self, _caller, _event, node)
 

Public Attributes

 OnNodeAdded
 
 OnNodeRemoved
 

Detailed Description

Connects this module's pipelines to the scene.

For pipelines to be created in our views, the pipeline factory needs to know about our pipeline classes.
When a node is added to the scene, the LayerDM orchestration queries the vtkMRMLLayerDMPipelineFactory
singleton to check if a pipeline can be created for the view node / node pair. The
ScriptedPipelineSceneConnector base class registers a creator which delegates to our pipeline classes'
TryCreatePipeline methods, and keeps track of what was connected so that the connection can be undone
(module unload) or replaced (module reload).

We also attach two scene observers to add our glow data node to model nodes when they are added and
garbage collect them on removal, and we create the glow pass data node so the glow pass pipeline is
created.

Note: Scene lifecycle are managed by the LayerDM library. If the view is newly created, its pipeline
    manager will iterate over all the nodes in the scene to check if pipelines need to be created.
    Similarly, when loading a scene, clearing a scene, the pipelines will be handled accordingly.

Definition at line 616 of file ModelGlowDM.py.

Member Function Documentation

◆ getPipelines()

list ModelGlowDM.ModelGlowDMSceneConnector.getPipelines ( self)

Definition at line 636 of file ModelGlowDM.py.

◆ getSceneObservers()

list ModelGlowDM.ModelGlowDMSceneConnector.getSceneObservers ( self)

Definition at line 639 of file ModelGlowDM.py.

◆ onConnected()

None ModelGlowDM.ModelGlowDMSceneConnector.onConnected ( self)
Create our glow pass data node so that the glow pass pipeline is created.
Note: We use self.getScene() instead of the slicer.mrmlScene singleton so that the connector can be
used with an explicit scene (for instance in trame-slicer where the singleton is not available).

Definition at line 645 of file ModelGlowDM.py.

◆ OnNodeAdded()

ModelGlowDM.ModelGlowDMSceneConnector.OnNodeAdded ( self,
_caller,
_event,
node )
Attach a glow data node to model nodes when they are added to the scene.

Definition at line 654 of file ModelGlowDM.py.

◆ OnNodeRemoved()

ModelGlowDM.ModelGlowDMSceneConnector.OnNodeRemoved ( self,
_caller,
_event,
node )
Garbage collect the glow data node when its model node is removed from the scene.

Definition at line 660 of file ModelGlowDM.py.

Member Data Documentation

◆ OnNodeAdded

ModelGlowDM.ModelGlowDMSceneConnector.OnNodeAdded

Definition at line 641 of file ModelGlowDM.py.

◆ OnNodeRemoved

ModelGlowDM.ModelGlowDMSceneConnector.OnNodeRemoved

Definition at line 642 of file ModelGlowDM.py.


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