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 Namespace Reference

Classes

class  _Pipeline
 
class  GlowDMPassPipeline
 
class  ModelGlowDM
 
class  ModelGlowDMPipeline
 
class  ModelGlowDMSceneConnector
 
class  ModelGlowDMWidget
 

Variables

 _sceneConnector = ModelGlowDMSceneConnector()
 

Detailed Description

This example shows how to create a glow around a model node using the SlicerLayerDisplayableManager module.

It goes over the following concepts:
    - Creates a unique display pipeline to set attach a VTK glow pass to a renderer
    - Creates one glow display pipeline per 3D view for each created model nodes in the scene
    - Register the pipeline creation mechanism
    - Handles hover interaction: on mouse move, each pipeline reports whether the cursor is within its model's
        bounding box and its distance to the model center. The closest matching pipeline gains focus and sets an
        "IsSelected" attribute on its data node; losing focus (cursor moved to another model or left the window)
        resets the attribute. The observed attribute change updates the glow actor visibility, so only the
        hovered model glows.

Usage:
    This example is implemented as a scripted module and can be added as such to Slicer.
    Once added, loading new model nodes will set their glow pass automatically.

Variable Documentation

◆ _sceneConnector

ModelGlowDM._sceneConnector = ModelGlowDMSceneConnector()
protected

Definition at line 666 of file ModelGlowDM.py.