Adding Widgets to Layout

Hi there,

I am a fairly new to the game in terms of Slicer module development so would like some help. Right now, I am trying to add a LR slider widget onto the main window. Ideally, I would want this slider to interact with the reformat widget (i.e. allow me to move the individual slice at different angles). Are there any steps that I can go about into implementing this?

Thanks a lot!

Usually we would suggest putting functionality like that into a custom scripted module with it’s own interface panel as described here:

https://www.slicer.org/wiki/Documentation/4.8/Training#Developing_and_contributing_extensions_for_3D_Slicer

If you really need your widget in the main layout it’s of course possible to child widgets to any of the layouts but it would be more likely to break in the future.

1 Like

Here is a module that does this, except that it rotates slice using a slider instead of translating it. It is a scripted module so it should be easy to modify it do what you need:

1 Like