# GUI Design in Slicer 5.x

**URL:** <https://discourse.slicer.org/t/gui-design-in-slicer-5-x/27380>\
**Category:** Support\
**Tags:** gui\
**Created:** [January 20, 2023, 2:51pm UTC](https://discourse.slicer.org/t/gui-design-in-slicer-5-x/27380 "2023-01-20T14:51:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MSK](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@MSK](https://discourse.slicer.org/u/MSK)\
**Post date:** [January 20, 2023, 2:51pm UTC](https://discourse.slicer.org/t/gui-design-in-slicer-5-x/27380/1 "2023-01-20T14:51:29Z")

</div>

Despite not being very familiar to Slicer I am given the task of designing a custom GUI to ease the use of Slicer by physicians. I want this GUI to be run in Slicer 5.x. I read about Slicelets and my task is the exact definition of them. However, I am having trouble understanding the simple example provided by following link:

> **[SlicerSimpleWorkflows/QuickSegment at master · lassoan/SlicerSimpleWorkflows](https://github.com/lassoan/SlicerSimpleWorkflows/tree/master/QuickSegment)**
>
> master/QuickSegment

Furthermore, I am not sure if it will work on Slicer 5.x. I am searching the new documentation however there is not an up-to-date page describing GUI design. I humbly ask for a guide that you think might be helpful for my relatively simple task.  
Thanks a lot in advance.

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [January 22, 2023, 12:14am UTC](https://discourse.slicer.org/t/gui-design-in-slicer-5-x/27380/2 "2023-01-22T00:14:41Z")

</div>

> [@MSK](#):
>
> [https://github.com/lassoan/SlicerSimpleWorkflows/tree/master/QuickSegment](https://github.com/lassoan/SlicerSimpleWorkflows/tree/master/QuickSegment)

This is an important topic.

You can enable “Developer mode” in Slicer Settings:

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/9/39cba2ae7a594fd64392793a9569a771253cc44c.png)

then use the QT designer to make a prototype of a GUI.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/b/eba45c4d0f1e16d205ff07061f1ec5931324c1e7.png)

You may also want to check out [this interesting thread dealing with Slicer QR](https://discourse.slicer.org/t/slicerqr-development/15954).

---

<div class="post-metadata">

**Author:** ![MSK](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@MSK](https://discourse.slicer.org/u/MSK)\
**Post date:** [June 11, 2023, 12:35pm UTC](https://discourse.slicer.org/t/gui-design-in-slicer-5-x/27380/3 "2023-06-11T12:35:01Z")

</div>

Thank you so much, QT designer indeed seems like the solution for the GUI design.

---

<div class="post-metadata">

**Author:** ![MSK](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@MSK](https://discourse.slicer.org/u/MSK)\
**Post date:** [June 11, 2023, 12:45pm UTC](https://discourse.slicer.org/t/gui-design-in-slicer-5-x/27380/4 "2023-06-11T12:45:46Z")

</div>

I would like to elaborate on my question further and share my findings. I ended up finding multiple options for my task, and the one I decided on is to write a python scripted module. In this module I customize my GUI, and add only the necessary widgets and functionalities. That will simplify the interface for the use of physicians. In my opinion, this amazing video series cannot be ignored when it comes to design of a python scripted module for the beginners:

https://www.youtube.com/embed/f_gsm0GJ4_8?feature=oembed&wmode=opaque&list=PLTuWbByD80TORd1R-J7j7nVQ9fot3C2fK

After following the tutorial, I have another question:

To design python scripted modules, is there a repository or a similar source that is providing basic scripts for the python? For instance, I want to have the option of loading DICOM files from a folder. I would like to have a basic GUI design along with its code provided only for this task. I know there are sources in following link but usually there are a lot of functions, all intertwined with each other, consuming a lot of time to understand:

> **[Slicer/Modules/Scripted at main · Slicer/Slicer](https://github.com/Slicer/Slicer/tree/main/Modules/Scripted)**
>
> main/Modules/Scripted

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [June 11, 2023, 2:11pm UTC](https://discourse.slicer.org/t/gui-design-in-slicer-5-x/27380/5 "2023-06-11T14:11:15Z")

</div>

The [3D Slicer script repository](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html) is what you should utilize for that.
