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


Public Member Functions | |
| IsPipelineNode (cls, node) | |
| vtkMRMLLayerDMScriptedPipeline|None | TryCreatePipeline (cls, vtkMRMLAbstractViewNode viewNode, vtkMRMLNode node) |
Protected Member Functions | |
| vtkMRMLScriptedModuleNode | _CreatePipelineNode (cls) |
| str | _GetClassName (cls) |
This class is a convenience abstract class for the glow pass pipelines.
It provides the following static methods:
- _CreatePipelineNode: Creates a new scripted node with a PipelineType string property containing the class type
This value is used to check if the pipeline should be created when a node is added to the scene.
- IsPipelineNode: Checks if a node is a scripted node and it contains the right PipelineType string property
- TryCreatePipeline: Creates new pipeline instances for views matching 3D views and PipelineType nodes.
Definition at line 138 of file ModelGlowDM.py.
|
protected |
Creates a new scripted node with a PipelineType string property containing the class type. This value is used to check if the pipeline should be created when a node is added to the scene. In Python, inheritance of vtkMRMLDisplayNode is not possible to create new display node types. To bypass this limitation and create display data that will be used in the pipelines, we use vtkMRMLScriptedModuleNode instead. vtkMRMLScriptedModuleNode can contain any pairs of string keys and string values. We use this mechanism to store the type of pipeline we would like to create for the given node. The actual choice of attribute is arbitrary in this example and the creation logic can be adapted in actual application code. Warning: Pipeline creation in the views is triggered by adding the node to the scene. vtkMRMLScriptedModuleNode properties should be initialized prior to adding the nodes to the scene.
Definition at line 149 of file ModelGlowDM.py.
|
protected |
Convenience method to get the name of the current class. This method will return the actual class name for inheriting classes.
Definition at line 194 of file ModelGlowDM.py.
| ModelGlowDM._Pipeline.IsPipelineNode | ( | cls, | |
| node ) |
Returns True if the input vktMRMLNode is a scripted node and has the pipeline type attribute matching the current pipeline class.
Definition at line 172 of file ModelGlowDM.py.
| vtkMRMLLayerDMScriptedPipeline | None ModelGlowDM._Pipeline.TryCreatePipeline | ( | cls, | |
| vtkMRMLAbstractViewNode | viewNode, | ||
| vtkMRMLNode | node ) |
Since we are creating pipelines for 3D views only, we check here if the view node is a ThreedView node and if the node matches the current pipeline type (i.e. was created using the _CreatePipelineNode method).
Definition at line 180 of file ModelGlowDM.py.