# Run Slicer in your web browser - as a Jupyter notebook or as a full application

**URL:** <https://discourse.slicer.org/t/run-slicer-in-your-web-browser-as-a-jupyter-notebook-or-as-a-full-application/11569>\
**Category:** Announcements\
**Tags:** feature, jupyter, web\
**Created:** [May 16, 2020, 1:51am UTC](https://discourse.slicer.org/t/run-slicer-in-your-web-browser-as-a-jupyter-notebook-or-as-a-full-application/11569 "2020-05-16T01:51:52Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![mau\_igna\_06](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mau_igna_06/32/9056_2.png) [@mau\_igna\_06](https://discourse.slicer.org/u/mau_igna_06)\
**Post date:** [December 9, 2021, 10:20am UTC](https://discourse.slicer.org/t/run-slicer-in-your-web-browser-as-a-jupyter-notebook-or-as-a-full-application/11569/11 "2021-12-09T10:20:24Z")

</div>

> Is there a way to make use of a part of slicer’s function in a program? I’m trying to use my own method of segmentation and I want to use slicer’s 3d model generation/volume creation from a segmented arrays of image, to then export it as an stl file. Is there a way I could achieve this?

Maybe you can create a python script for Slicer to execute on the console like this:  
`Slicer.exe --python-script "/full/path/to/myscript.py" --no-splash --no-main-window`

Inside the script you need to read your segment data (e.g. from a numpy array, maybe like [this](https://discourse.slicer.org/t/increased-loading-time-for-multiple-segments-from-numpy-array/11026)), then you need to create a closed surface representation of the segment ([like this](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#create-a-segmentation-from-a-labelmap-volume-and-display-in-3d)), you need change the storage of 3D models to stl ([like this](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#change-default-output-file-type-for-new-nodes)), then you need to export segments as models (like [this](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#export-model-nodes-from-segmentation-node)), then you can save your model as .stl maybe like this:  
`slicer.util.saveNode(modelNode, filepath)`

I haven’t tested this workflow, but I think it should work

---

_[View the full topic](https://discourse.slicer.org/t/run-slicer-in-your-web-browser-as-a-jupyter-notebook-or-as-a-full-application/11569)._
