Couldn't Register customized DisplayableManager to extension module

Hi, I tried to customize a slice DisplayableManager and register it to vtkMRMLSliceViewDisplayableManagerFactory. But after successfully compiling our extension, When starting the 3D slicer, it will report “/Slicer/Slicer-SuperBuild-Debug/VTK/Common/Core/vtkDebugLeaks.cxx, line 272, Deleting unknown object: vtkMRMLLiverResectionsDisplayableManager”
And the following error is “/Slicer/Libs/MRML/DisplayableManager/vtkMRMLDisplayableManagerFactory.cxx, line 136, vtkMRMLSliceViewDisplayableManagerFactory (0x555584f96130): RegisterDisplayableManager - vtkMRMLLiverResectionsDisplayableManager is not a displayable manager. Failed to register”

For creating customized DisplayableManager I referenced slicer markups’ MRMLDM

Could you share your thoughts on possible reasons lead this error? Thank you so much.

If you want to create custom markups then you don’t need to implement a custom displayable manager. See complete example in ExtraMarkups extension.

Also check out the Liver extension’s advanced liver resection planning and visualization tools already exist in Slicer. Maybe it is a better starting point.

Did you initiate and register your displayable manager in a module source file?

1 Like

Hi, Thank you for your input! Actually, I am one of the Slicer-Liver extension developers, I would like to add a new feature for visualizing the cutting lines between the resection surface and 3D Slicer slice views. I thought it might be easier to do it within DisplayableManager.

Thank you so much for pointing this out, I did ignore the initiating process! Now everything works fine!

1 Like