I am working on an 3dslicer extension.
The aim of this extension is to automatically analyse dosimetric films for quality control in a radiotherapy center.
The code in python is ok and the extension works well.
To finish the extension i would just need two things to add in the Widget’s class:
- add an output directory button where the result of the analyse would be put
- add a drop-down list where the user could choose the radiotherapy machine used for the quality control.
and of course put these two informations in two variables.
I tried to find in internet the code for these buttons but I didn’t find something easy for a beginner like me.
Anyone could help me for this ?
All the best,
I am using Slicer 4.10.2
You can use
ctk.ctkPathLineEdit() for directory selection and a regular
qt.QComboBox() for choosing a name from a list. I would recommend to complete this Slicer programming tutorial: https://www.slicer.org/wiki/Documentation/Nightly/Training#PerkLab.27s_Slicer_bootcamp_training_materials
Thank you very much for your help, that is what I needed. I will look at the tutorial more deeply.
Any information regarding how to use qt designer. where can i find information for developing slicer modules. I currently don’t know how to make combo box for uploading files. I know how to use the design for qmrml modules but I don’t understand how to use the simple modules like uploading file or using a text box to get a number input etc. could you please help.
Qt designer manual is available here.
In addition to standard Qt widgets, you can use CTK widgets (see gallery, with links to API documentation) and special widgets added in Slicer core and modules (see Slicer API documentation).