is PointClickedEvent still supported in slicer 4.11.0?

Operating system: windows10
Slicer version: slicer 4.11.0
Expected behavior: trigger an event when the markup is clicked (used here https://www.slicer.org/wiki/Documentation/4.10/ScriptRepository#Show_a_context_menu_when_a_markup_point_is_clicked_in_a_slice_or_3D_view)
Actual behavior: type object ‘vtkSlicerMarkupsModuleMRMLPython.vtkMRMLMarkupsNode’ has no attribute ‘PointClickedEvent’

Recent Slicer-4.11 releases have built-in right-click menu. You can customize the menu by creating a subject hierarchy plugin and overriding viewContextMenuActions and showViewContextMenuActionsForItem methods.

@cpinter do you have a working example in Python?

Yes, but it’s in a private repository. Should I “sanitize” it and upload it as example somewhere?

Yes, it would be great if you could upload it to the script repository (replace this example).

Done, let me know if it’s fine.

1 Like

Awesome, thanks a lot! @TiphaineJh let us know if you need more help with setting up a custom menu for your markups.