Hello guys, I am new to Slicer and I am currently developing an extension. As part of this extension, I need to be able to switch between mouse interaction modes (e.g., ruler, fiducial, angle), from my Python script. Is there an easy way to this from the API?
I have looked into the MRML interaction node, but it appears that the mouse modes are limited to: place, view transform, and select; these are not specific enough for my use case. Also, it appears that the MRML fiducial node can place markers from the script, but it doesn’t change the mouse mode itself.
Please forgive me if I am simply missing something obvious
Create new markups node of current/default type: Ctrl+Shift+A
Toggle Place Mode persistence: Ctrl+Shift+T
Place point in active markup node: Ctrl+Shift+Space
You can change the interaction mode through Python by creating a new node with of the type you want (or make an existing node active) and using the place point callback to initiate placement in that node. For example: