Custom visualization behavior on clicking "eye" icon

Hi Community,

My use case involves loading and visualizing tracked ultrasound sequences. I have been using the volume reslice driver to set up visualization, and have implemented a function which successfully sets up this visualization. So far I have been controlling it by using a node combo box and the “nodeActivated” signal.

An even better solution would be to customize the behavior of clicking the “eye” icon in the subject hierarchy view widget in my module:

Any idea how to approach this? Is a signal or event emmitted somewhere when this eye icon is clicked?


I don’t know if there’s a signal/event or how this would be customized if possible, but in case it can help here is the code that gets executed when you left-click the eye.

The behavior of the eye icon is designed to be customizable. All you need to do is to create a subject hierarchy plugin, make that plugin return higher value in canOwnSubjectHierarchyItem method and specify any behavior you need in the visibilityIcon method. See a complete example here.

1 Like