Slicer qt-loadable-modules as libraries to support other modules

Hello,

for Slicer-Liver, we are thinking about the modularity of the extension. We have a set of components already developed in C++, but would like to have a qt-scripted-module, featuring a single UI, be an entry point for our researchers to interact with and fast-prototype new ideas. We are currently thinking about two designs and would like to hear your opinion about their feasibility and your recommendation.

Single hybrid module

A single qt-scripted-module containing also C++ qtwidgets, logic, nodes, markups, etc., in the same module.

A set of qt-loadable-modules providing the core components + a qt-scripted-module providing the module UI and connecting the components

A set of qt-loadable-modules providing the core components (nodes, markups, qt-widgets, logics, etc.) and a qt-scripted-module that will feature a unified interface and connect the components. The qt-loadable-modules would be used as libraries for the qt-scripted-module, so they will be hidden and won’t have any module interface.

I thank you in advance for your feedback.

I’d say either of those could work fine. I might favor keeping all the C++ code in loadable modules and have only python code in a scriptable module, which I guess is your second option. I suppose it also depends on how many files you will end up with and whether a single module for all of it would get cluttered. Keeping them separate might encourage modularity and reusability.

2 Likes

Thanks @pieper. This is useful for us to decide.