# Creating a custom 3D Slicer

**URL:** <https://discourse.slicer.org/t/creating-a-custom-3d-slicer/21245>\
**Category:** Development\
**Tags:** build\
**Created:** [December 28, 2021, 7:19am UTC](https://discourse.slicer.org/t/creating-a-custom-3d-slicer/21245 "2021-12-28T07:19:12Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [May 4, 2022, 9:38am UTC](https://discourse.slicer.org/t/creating-a-custom-3d-slicer/21245/21 "2022-05-04T09:38:09Z")

</div>

You build the custom app template exactly as you build Slicer, see [Build Instructions — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/index.html)

---

<div class="post-metadata">

**Author:** ![zhiyuan](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zhiyuan](https://discourse.slicer.org/u/zhiyuan)\
**Post date:** [May 4, 2022, 10:06am UTC](https://discourse.slicer.org/t/creating-a-custom-3d-slicer/21245/22 "2022-05-04T10:06:24Z")

</div>

So is the ultimate goal the same as the link you sent me? I don’t know how to do this first step,[this](https://www.kitware.com/slicercat-creating-custom-applications-based-on-3d-slicer/)

---

<div class="post-metadata">

**Author:** ![Karthik](https://avatars.discourse-cdn.com/v4/letter/k/9fc348/32.png) [@Karthik](https://discourse.slicer.org/u/Karthik)\
**Post date:** [May 9, 2022, 4:33am UTC](https://discourse.slicer.org/t/creating-a-custom-3d-slicer/21245/23 "2022-05-09T04:33:07Z")

</div>

First, make sure you have all the pre-requisites installed. Follow these instructions [GNU/Linux systems — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/linux.html#pre-requisites)

Then, follow the steps in [https://www.kitware.com/slicercat-creating-custom-applications-based-on-3d-slicer/#step1](https://www.kitware.com/slicercat-creating-custom-applications-based-on-3d-slicer/#step1) to create your own custom application based on 3D Slicer

---

<div class="post-metadata">

**Author:** ![Karthik](https://avatars.discourse-cdn.com/v4/letter/k/9fc348/32.png) [@Karthik](https://discourse.slicer.org/u/Karthik)\
**Post date:** [May 9, 2022, 4:40am UTC](https://discourse.slicer.org/t/creating-a-custom-3d-slicer/21245/24 "2022-05-09T04:40:26Z")

</div>

The first step is pretty simple. Just follow the instructions given in step 1. The commands will first clone the latest SlicerCustomAppTemplate from GitHub repo and allow you to customise basic information such as application name, organization name, etc.

Then, you need to set your preferences for the application build such as what version of 3D Slicer you wish to build. All these modifications can be made in the top level CMakeLists.txt in the SlicerCustomAppTemplate. (Note: By default it points to the latest commit in the 3D Slicer github repo. If you want to build a previous version of Slicer such as 4.11, then you must not only make this change in the top level CMakeLists.txt, but you also might need to checkout to a previous commit of SlicerCustomAppTemplate itself. )

---

<div class="post-metadata">

**Author:** ![Karthik](https://avatars.discourse-cdn.com/v4/letter/k/9fc348/32.png) [@Karthik](https://discourse.slicer.org/u/Karthik)\
**Post date:** [May 9, 2022, 6:19am UTC](https://discourse.slicer.org/t/creating-a-custom-3d-slicer/21245/25 "2022-05-09T06:19:36Z")

</div>

When I create the custom 3D Slicer, the top of the application window shows 0000-00-00. Normally, when I download 3D Slicer from the website, it shows the date on which Slicer was built. How can I get this to work in the custom app template? I want the date on which custom Slicer was built to be visibile instead of 0000-00-00

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [May 12, 2022, 2:51am UTC](https://discourse.slicer.org/t/creating-a-custom-3d-slicer/21245/26 "2022-05-12T02:51:15Z")

</div>

Do you store your source files in a git repository? The date is probably not the build date but the date of the last modification, which is determined from the version history. Maybe git is not found or maybe you use an unusual date format on your computer and that’s why the date cannot be determined.

---

<div class="post-metadata">

**Author:** ![Karthik](https://avatars.discourse-cdn.com/v4/letter/k/9fc348/32.png) [@Karthik](https://discourse.slicer.org/u/Karthik)\
**Post date:** [May 12, 2022, 4:53am UTC](https://discourse.slicer.org/t/creating-a-custom-3d-slicer/21245/27 "2022-05-12T04:53:24Z")

</div>

> [@lassoan](#):
>
> Do you store your source files in a git repository?

Which source files do you mean? I clone the custom app template from github every time I want to build. Currently, I just clone the custom app template and start the build process. Should I add a commit to this to make sure the date is updated?

By date of last modification, are you refering to modifying the custom app template or something else?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 29, 2022, 2:20am UTC](https://discourse.slicer.org/t/creating-a-custom-3d-slicer/21245/28 "2022-06-29T02:20:32Z")

</div>

Normally the date is retrieved from the git repository. If you get `0000-00-00` it means that either git cannot determine a date or the returned date cannot be parsed. You can get more information by printing out CMake variable values by adding `MESSAGE()` commands in `CMakeLists.txt` and `*.cmake` files.

[Previous page](https://discourse.slicer.org/t/creating-a-custom-3d-slicer/21245.md?page=1)
