# Running a loadable module as a slicelet

**URL:** https://discourse.slicer.org/t/running-a-loadable-module-as-a-slicelet/158
**Category:** Development
**Created:** [April 21, 2017, 2:29am UTC](https://discourse.slicer.org/t/running-a-loadable-module-as-a-slicelet/158 "2017-04-21T02:29:18Z")
**Posts on this page:** 7
**Page:** 1

<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: [April 21, 2017, 2:29am UTC](https://discourse.slicer.org/t/running-a-loadable-module-as-a-slicelet/158/1 "2017-04-21T02:29:18Z")

</div>

(question posted by Samira on slicer-devel) I am looking into slicelet now and I want to run my loadable extension as a slicelet. What do I need to add to the extension code? And is there any guide on how to do that?

---

<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: [April 21, 2017, 2:30am UTC](https://discourse.slicer.org/t/running-a-loadable-module-as-a-slicelet/158/2 "2017-04-21T02:30:15Z")

</div>

This page should get you started:  
[https://www.slicer.org/wiki/Documentation/Nightly/Developers/Slicelets](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Slicelets)

Let us know if you have any specific questions or problems.

---

<div class="post-metadata">

### Author: ![timeanddoctor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/timeanddoctor/32/5839_2.png) [@timeanddoctor](https://discourse.slicer.org/u/timeanddoctor)
#### Post date: [February 4, 2020, 2:24am UTC](https://discourse.slicer.org/t/running-a-loadable-module-as-a-slicelet/158/3 "2020-02-04T02:24:49Z")

</div>

I used the 4.10 version. If I custom the slicer which way would be the best now?

---

<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: [February 4, 2020, 4:10am UTC](https://discourse.slicer.org/t/running-a-loadable-module-as-a-slicelet/158/4 "2020-02-04T04:10:09Z")

</div>

I would recommend to use latest master version. There are a few unresolved issues due to a recent ITK upgrade, but they should be fixed within a few weeks (SimpleITK does not work on Mac and there are some DICOM loading issues when you use Add data dialog instead of DICOM module). If you are impacted by these then you might want to use a master version from a few weeks ago.

---

<div class="post-metadata">

### Author: ![timeanddoctor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/timeanddoctor/32/5839_2.png) [@timeanddoctor](https://discourse.slicer.org/u/timeanddoctor)
#### Post date: [February 4, 2020, 4:13am UTC](https://discourse.slicer.org/t/running-a-loadable-module-as-a-slicelet/158/5 "2020-02-04T04:13:03Z")

</div>

I used ‘Slicer.exe --python-code “slicer.util.selectModule(‘QuickSegment’)”’ and get error:

```auto
Traceback (most recent call last):

  File "C:/Users/Desktop/QuickSegment/QuickSegment.py", line 65, in setup
    self.showSingleModule(True)
  File "C:/Users/Desktop/QuickSegment/QuickSegment.py", line 137, in showSingleModule
    slicer.util.setToolbarsVisible(not singleModule, keepToolbars)
AttributeError: module 'slicer.util' has no attribute 'setToolbarsVisible'

```

---

<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: [February 4, 2020, 4:22am UTC](https://discourse.slicer.org/t/running-a-loadable-module-as-a-slicelet/158/6 "2020-02-04T04:22:36Z")

</div>

> [@timeanddoctor](#):
>
> AttributeError: module ‘slicer.util’ has no attribute ‘setToolbarsVisible’

You need to use a recent master version of Slicer.

---

<div class="post-metadata">

### Author: ![timeanddoctor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/timeanddoctor/32/5839_2.png) [@timeanddoctor](https://discourse.slicer.org/u/timeanddoctor)
#### Post date: [February 4, 2020, 4:23am UTC](https://discourse.slicer.org/t/running-a-loadable-module-as-a-slicelet/158/7 "2020-02-04T04:23:50Z")

</div>

Ok， Thanks.  
I will update my slicer.
