# Add a new module to custom app template

**URL:** <https://discourse.slicer.org/t/add-a-new-module-to-custom-app-template/29327>\
**Category:** Development\
**Created:** [May 7, 2023, 12:29pm UTC](https://discourse.slicer.org/t/add-a-new-module-to-custom-app-template/29327 "2023-05-07T12:29:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anjalimukundan](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Anjalimukundan](https://discourse.slicer.org/u/Anjalimukundan)\
**Post date:** [May 7, 2023, 12:29pm UTC](https://discourse.slicer.org/t/add-a-new-module-to-custom-app-template/29327/1 "2023-05-07T12:29:35Z")

</div>

Hello everyone ,  
I have downloaded source code for slicer custom app template and have build it. Now, how can I add my own module into the application.

---

<div class="post-metadata">

**Author:** ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)\
**Post date:** [May 8, 2023, 2:39pm UTC](https://discourse.slicer.org/t/add-a-new-module-to-custom-app-template/29327/2 "2023-05-08T14:39:46Z")

</div>

If you already have the code/framework for the new module, you can skip the next paragraph.

If you do not have the code for the module already, you can create the framework for a module using the [Extension Wizard](https://slicer.readthedocs.io/en/latest/user_guide/modules/extensionwizard.html) within 3D Slicer (it usually isn’t enabled in custom app builds, so you will want to use a downloaded 3D Slicer). You create a temporary extension, and then a module of the desired type within it.

Once you have generated the module, you copy the folder of _just_ the module into the custom app source (see example location below) and add it to the CMakeLists of the custom app (see below).

Location of folder in Repo:

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

Example of where to add in the CMake: [SlicerCAT/CMakeLists.txt at e651f197f56e3378ce094378dd29631c08b25a33 · KitwareMedical/SlicerCAT · GitHub](https://github.com/KitwareMedical/SlicerCAT/blob/e651f197f56e3378ce094378dd29631c08b25a33/CMakeLists.txt#L129)

---

<div class="post-metadata">

**Author:** ![Anjalimukundan](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Anjalimukundan](https://discourse.slicer.org/u/Anjalimukundan)\
**Post date:** [May 14, 2023, 12:25pm UTC](https://discourse.slicer.org/t/add-a-new-module-to-custom-app-template/29327/3 "2023-05-14T12:25:37Z")

</div>

Thanks a lot , I was able to add a module successfully.

---

<div class="post-metadata">

**Author:** ![software](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/software/32/79627_2.png) [@software](https://discourse.slicer.org/u/software)\
**Post date:** [March 8, 2025, 9:03pm UTC](https://discourse.slicer.org/t/add-a-new-module-to-custom-app-template/29327/4 "2025-03-08T21:03:07Z")

</div>

Could you tell me? I am facing a similar issue. I have created the same custom 3D Slicer template by following SlicerCAT and then built it using CMake.

Now, I want to add modules. Where should I add them, and how? After adding them, how do I build the project to see the changes?

Also, how do I open the project folder to make changes—in VS Code or Visual Studio?
