# Is it possible to create a standalone application with 3D slicer and run it without 3D Slicer launching?

**URL:** <https://discourse.slicer.org/t/is-it-possible-to-create-a-standalone-application-with-3d-slicer-and-run-it-without-3d-slicer-launching/5056>\
**Category:** Development\
**Created:** [December 12, 2018, 2:51pm UTC](https://discourse.slicer.org/t/is-it-possible-to-create-a-standalone-application-with-3d-slicer-and-run-it-without-3d-slicer-launching/5056 "2018-12-12T14:51:56Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![wpgao](https://avatars.discourse-cdn.com/v4/letter/w/8e8cbc/32.png) [@wpgao](https://discourse.slicer.org/u/wpgao)\
**Post date:** [December 12, 2018, 2:51pm UTC](https://discourse.slicer.org/t/is-it-possible-to-create-a-standalone-application-with-3d-slicer-and-run-it-without-3d-slicer-launching/5056/1 "2018-12-12T14:51:56Z")

</div>

Operating system: win 10  
Slicer version: 4.8  
Expected behavior:  
Actual behavior:

Hi Guys,

Is it possible to create a standalone application with 3D slicer and run it without 3D Slicer launching? I mean the application can works in other computers without 3D Slicer.  
Thanks a lot!

---

<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:** [December 12, 2018, 3:00pm UTC](https://discourse.slicer.org/t/is-it-possible-to-create-a-standalone-application-with-3d-slicer-and-run-it-without-3d-slicer-launching/5056/2 "2018-12-12T15:00:34Z")

</div>

These standalone applications based on Slicer are called Slicelets. Here’s a wiki page about how to create them:  
[https://www.slicer.org/wiki/Documentation/Nightly/Developers/Slicelets](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Slicelets)  
This page is a bit outdated so could use an update, but you can start with that.

The main new piece are the custom applications:

> **[GitHub - KitwareMedical/SlicerCustomAppTemplate: Template to be used as a...](https://github.com/KitwareMedical/SlicerCustomAppTemplate)**
>
> Template to be used as a starting point for creating a custom 3D Slicer application - GitHub - KitwareMedical/SlicerCustomAppTemplate: Template to be used as a starting point for creating a custom ...

---

<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:** [December 12, 2018, 8:38pm UTC](https://discourse.slicer.org/t/is-it-possible-to-create-a-standalone-application-with-3d-slicer-and-run-it-without-3d-slicer-launching/5056/3 "2018-12-12T20:38:40Z")

</div>

You can also run Slicer Python scripts in a web browser, without installing anything on the user’s computer, using _Binder_. See more information on [SlicerJupyter extension documentation](https://github.com/Slicer/SlicerJupyter/).

---

<div class="post-metadata">

**Author:** ![wpgao](https://avatars.discourse-cdn.com/v4/letter/w/8e8cbc/32.png) [@wpgao](https://discourse.slicer.org/u/wpgao)\
**Post date:** [December 13, 2018, 2:28am UTC](https://discourse.slicer.org/t/is-it-possible-to-create-a-standalone-application-with-3d-slicer-and-run-it-without-3d-slicer-launching/5056/4 "2018-12-13T02:28:48Z")

</div>

@cpinter,

Slicerlets is an option. However, it just prevents showing the main application UI interface and still depends on 3D Slicer? Is that right? If so, a customized Slicerlets can not run on a computer without 3D Slicer. Is that right?

Alternatively, SlicerCustomAppTemplate seems to be more flexible, however, I can get too much information about how to use it! Does it can package the prerequisite modules of 3D slicer into the new application?

@lassoan,  
These two options are dependent on the internet. If the internet is not available, it will not work!

Many thanks for your important information!

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [December 13, 2018, 2:48am UTC](https://discourse.slicer.org/t/is-it-possible-to-create-a-standalone-application-with-3d-slicer-and-run-it-without-3d-slicer-launching/5056/5 "2018-12-13T02:48:13Z")

</div>

> [@wpgao](#):
>
> Does it can package the prerequisite modules of 3D slicer into the new application?

Yes, it takes care of packaging your custom module along with all dependencies (VTK, Qt, Slicer libraries, etc …)

---

<div class="post-metadata">

**Author:** ![wpgao](https://avatars.discourse-cdn.com/v4/letter/w/8e8cbc/32.png) [@wpgao](https://discourse.slicer.org/u/wpgao)\
**Post date:** [December 13, 2018, 4:13am UTC](https://discourse.slicer.org/t/is-it-possible-to-create-a-standalone-application-with-3d-slicer-and-run-it-without-3d-slicer-launching/5056/6 "2018-12-13T04:13:09Z")

</div>

Great! Does it work now? or is under development?  
There is another module called “CustomSlicerGenerator” （[http://www.slicer.org/slicerWiki/index.php/Documentation/Labs/CustomSlicerGenerator）](http://www.slicer.org/slicerWiki/index.php/Documentation/Labs/CustomSlicerGenerator%EF%BC%89)?  
I had tried it in windows but failed! It seems that it just supports linux and mac!

Thanks!

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [December 13, 2018, 4:50am UTC](https://discourse.slicer.org/t/is-it-possible-to-create-a-standalone-application-with-3d-slicer-and-run-it-without-3d-slicer-launching/5056/7 "2018-12-13T04:50:50Z")

</div>

### SlicerCustomAppTemplate

> [@wpgao](#):
>
> Does it work now?

Yes, we use it to create custom application. To illustrate, here are few examples I can disclose:

- [MuriPlan from Xstrahl – A 3D Slicer based radiotherapy treatment planning system](https://blog.kitware.com/kitware-customer-highlight-muriplan-from-xstrahl-a-3d-slicer-based-radiotherapy-treatment-planning-system/)
- [Kitware customer highlight: Radiopharmaceutical Imaging and Dosimetry, LLC (RAPID)](https://blog.kitware.com/kitware-customer-highlight-radiopharmaceutical-imaging-and-dosimetry-llc-rapid/)
- [Kitware customer highlight: SonoVol](https://blog.kitware.com/kitware-customer-highlight-sonovol/)
- [Xoran Technologies and Kitware Collaborate on Image-guided Platform for Deep Brain Stimulation Surgery](https://blog.kitware.com/xoran-technologies-and-kitware-collaborate-on-image-guided-platform-for-deep-brain-stimulation-surgery/)

> [@wpgao](#):
>
> Is under development?

Since Slicer and associated libraries are consistently improved and we use the template regularly, you can consider it is actively maintained.

---

<div class="post-metadata">

**Author:** ![wpgao](https://avatars.discourse-cdn.com/v4/letter/w/8e8cbc/32.png) [@wpgao](https://discourse.slicer.org/u/wpgao)\
**Post date:** [December 13, 2018, 5:26am UTC](https://discourse.slicer.org/t/is-it-possible-to-create-a-standalone-application-with-3d-slicer-and-run-it-without-3d-slicer-launching/5056/8 "2018-12-13T05:26:51Z")

</div>

> [@jcfr](#):
>
> > Does it work now?
> 
> Yes, we use it to create custom application. To illustrate, here are few examples I can disclose:
> 
> - [MuriPlan from Xstrahl – A 3D Slicer based radiotherapy treatment planning system](https://blog.kitware.com/kitware-customer-highlight-muriplan-from-xstrahl-a-3d-slicer-based-radiotherapy-treatment-planning-system/)
> - [Kitware customer highlight: Radiopharmaceutical Imaging and Dosimetry, LLC (RAPID)](https://blog.kitware.com/kitware-customer-highlight-radiopharmaceutical-imaging-and-dosimetry-llc-rapid/)
> - [Kitware customer highlight: SonoVol](https://blog.kitware.com/kitware-customer-highlight-sonovol/)
> - [Xoran Technologies and Kitware Collaborate on Image-guided Platform for Deep Brain Stimulation Surgery](https://blog.kitware.com/xoran-technologies-and-kitware-collaborate-on-image-guided-platform-for-deep-brain-stimulation-surgery/)
> 
> ![](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/f/df84136137514ef83e32e2c81e07ab038b960196.png) wpgao:

Excellent works! I agree with you that Slicer and associated libraries are consistently improved, which require frequent maintenance!

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [December 13, 2018, 5:30am UTC](https://discourse.slicer.org/t/is-it-possible-to-create-a-standalone-application-with-3d-slicer-and-run-it-without-3d-slicer-launching/5056/9 "2018-12-13T05:30:03Z")

</div>

> [@wpgao](#):
>
> which require frequent maintenance!

To clarify, if the Slicer version associated with a custom application must be updated, this is usually a one line change that consist in updating the Git SHA in the top-level CMakeLists.txt of the custom application.

---

<div class="post-metadata">

**Author:** ![wpgao](https://avatars.discourse-cdn.com/v4/letter/w/8e8cbc/32.png) [@wpgao](https://discourse.slicer.org/u/wpgao)\
**Post date:** [December 13, 2018, 5:33am UTC](https://discourse.slicer.org/t/is-it-possible-to-create-a-standalone-application-with-3d-slicer-and-run-it-without-3d-slicer-launching/5056/10 "2018-12-13T05:33:19Z")

</div>

Is there any userguide of SlicerCustomAppTemplate which can be referred to?

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [December 13, 2018, 5:49am UTC](https://discourse.slicer.org/t/is-it-possible-to-create-a-standalone-application-with-3d-slicer-and-run-it-without-3d-slicer-launching/5056/11 "2018-12-13T05:49:41Z")

</div>

After following, the [Getting Started](https://github.com/KitwareMedical/SlicerCustomAppTemplate#getting-started) instructions, you will have a custom application source tree ready.

Then to compile your custom application, follow the regular instructions to [Build Slicer Application](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions)

Finally, reading the comment of the top-level `CMakeLists.txt` of the custom application should provide enough details to get started.

---

<div class="post-metadata">

**Author:** ![wpgao](https://avatars.discourse-cdn.com/v4/letter/w/8e8cbc/32.png) [@wpgao](https://discourse.slicer.org/u/wpgao)\
**Post date:** [December 13, 2018, 5:55am UTC](https://discourse.slicer.org/t/is-it-possible-to-create-a-standalone-application-with-3d-slicer-and-run-it-without-3d-slicer-launching/5056/12 "2018-12-13T05:55:43Z")

</div>

Great! I really appreciate your help! Thank you very much!

---

<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:** [September 2, 2021, 3:22pm UTC](https://discourse.slicer.org/t/is-it-possible-to-create-a-standalone-application-with-3d-slicer-and-run-it-without-3d-slicer-launching/5056/13 "2021-09-02T15:22:56Z")

</div>

A post was split to a new topic: [Create Slicer with customized user interface](https://discourse.slicer.org/t/create-slicer-with-customized-user-interface/19485)
