I’m currently trying to create a custom visualization based on surface models where I need my own mappers (for custom shaders). It looks to me that this route would require a custom implementation of MRMLModelNode, MRMLModelDisplayNode and MRMLModelDisplayableManager.
Due to the way MRMLModelDisplayableManager filters nodes, it is not possible to simply inherit from MRMLModelDisplayNode, as any derived class will be processed by MRMLModelDisplayableManager.
It would be great if we can find some time to discuss this. Maybe we can adjust the filtering of DMs so inherited classes can be handled by custom DMs?
This is part of a broader effort to streamline rendering by removing legacy LightBox support.
Extending MRMLDisplayNodes and MRMLDisplayableManagers
Use case discussed: Creating a custom 3D View in the side panel to show custom model visualizations using custom mappers (similar to the Resectogram idea from PW38 SlicerLiver project).
Key technical considerations:
Custom mappers require custom MRMLDisplayableManagers, which must be implemented in C++.
While extending vtkMRMLModelDisplayNode is tempting for surface models, inherited managers (like vtkMRMLModelDisplayableManager) will process all subclasses, which may not be desirable.
One solution is to derive from vtkMRMLDisplayNode directly for full control.
Interaction customization (e.g., changing 3D view controls) can be done via scripting: Example from documentation.