Skip to content

ENH: Simplified vtkSlicerApplicationLogic

This work is done as part of refactoring to prepare introduction of a new node (vtkMRMLTableNode).

Problem: vtkSlicerApplicationLogic had node-specific logic for creating storage and display nodes. This made it necessary to modify vtkSlicerApplicationLogic whenever a new node type is added. CreateDefaultStorageNode and CreateDefaultDisplayNodes methods are introduced some time ago to encapsulate all node-specific storage and display node creation. These methods were partly used by vtkSlicerApplicationLogic, but not for all cases; also, CreateDefaultStorageNode and CreateDefaultDisplayNodes methods were not implemented for all nodes.

Solution: Moved node-specific storage and display node creation code to CreateDefaultStorageNode and CreateDefaultDisplayNodes methods of the corresponding nodes. Replaced node-specific logic from vtkSlicerApplicationLogic by CreateDefaultStorageNode and CreateDefaultDisplayNodes method calls.

Merge request reports

Loading