We have two scripted module templates now: scripted and scripteddesigner. The “scripted” template has several limitations: GUI widgets are created from code, parameter node is not used (user choices are not saved in the scene), logic is not created in the widget (so it is not accessible from other modules).
What do you think about replacing “scripted” template by the new “scripteddesigner” template?
I think it is a good idea to retire the old scripted module template. I don’t see any advantages for using that. Besides, it tends to confuse people at bootcamps, so I imagine that it would confuse any non-expert Slicer developer as well. Better to not have any obsolete options exposed.
Now under Extension Wizards there are all 4 options of scripted, scriptededitoreffect, scriptedsegmenteditoreffect, and scripteddesigner. If scripteddesigner is recommended, is there a tutorial link for this? Thank you.
The “scripteddesigner” template has been replaced by just the “scripted” template. There are currently the following module template options when using the Extension Wizard:
There’s a tutorial on youtube that doesn’t seem to be using the same template, and doesn’t have three lines of code above. Is the code above required, or is it a place holder that I can replace by writing something similar to what’s shown in the video?
Coding up user interface in python was the old recommendation, but using a UI file which you can manipulate using the Qt Designer is the easier and the current recommendation. The above code that you wrote is the current recommendation so you should continue with that.
I’m very new to this (this is my second week of using 3D Slicer) so I apologize if these questions sound dumb. I googled Qt Designer and it appears to be a separate program. Do I install this, create a widget app, and then specify the file path where 'UI/DisplayData.ui' currently is in the first line of the code I pasted above? Do I then need to add a folder named “UI” inside the directory for the module?