# \#api

**URL:** https://discourse.slicer.org/tag/api/321.md

[Latest](https://discourse.slicer.org/latest.md) · [Categories](https://discourse.slicer.org/categories.md) · [Tags](https://discourse.slicer.org/tags.md)

---

## [Programmatically controlling extensions via separate scripted extension](https://discourse.slicer.org/t/programmatically-controlling-extensions-via-separate-scripted-extension/44154)

<div class="topic-metadata">

**Author:** [@ruffsl](https://discourse.slicer.org/u/ruffsl)\
**Replies:** 3\
**Last updated:** [August 21, 2025, 9:00pm UTC](https://discourse.slicer.org/t/programmatically-controlling-extensions-via-separate-scripted-extension/44154 "2025-08-21T21:00:10Z")

</div>

Is it possible to programmatically control the state of other 3D Slicer extensions via my own scripted extension using the python API? Such as trigger UI events or update their internal state? E.g: when restoring Slicer…

---

## [Retrieving SegmentationStatistics from Large Datasets Using 3D Slicer API](https://discourse.slicer.org/t/retrieving-segmentationstatistics-from-large-datasets-using-3d-slicer-api/37924)

<div class="topic-metadata">

**Author:** [@JoshOnichino](https://discourse.slicer.org/u/JoshOnichino)\
**Replies:** 2\
**Last updated:** [August 17, 2024, 3:23pm UTC](https://discourse.slicer.org/t/retrieving-segmentationstatistics-from-large-datasets-using-3d-slicer-api/37924 "2024-08-17T15:23:10Z")

</div>

Hello! I a healthcare researcher working on medical image segmentation. I am hoping to automate the retrieval of SegmentationStatistics tables using 3D Slicer’s Python API. However, when I was developing my program, I ra…

---

## [Is there an API for RPC?](https://discourse.slicer.org/t/is-there-an-api-for-rpc/21734)

<div class="topic-metadata">

**Author:** [@swirlsky](https://discourse.slicer.org/u/swirlsky)\
**Replies:** 4\
**Last updated:** [February 2, 2022, 1:29pm UTC](https://discourse.slicer.org/t/is-there-an-api-for-rpc/21734 "2022-02-02T13:29:59Z")

</div>

I’m wondering if there’s a way to instruct slicer from a remote application to load e.g. a DICOM Study or do other operations. Like OsiriX has one: http://www.osirix-viewer.com/HIS-Integration.pdf

---

## [How to access Slicers Python API via an external program while slicer is running?](https://discourse.slicer.org/t/how-to-access-slicers-python-api-via-an-external-program-while-slicer-is-running/16351)

<div class="topic-metadata">

**Author:** [@fuadamaschin](https://discourse.slicer.org/u/fuadamaschin)\
**Replies:** 3\
**Last updated:** [April 27, 2021, 4:15pm UTC](https://discourse.slicer.org/t/how-to-access-slicers-python-api-via-an-external-program-while-slicer-is-running/16351 "2021-04-27T16:15:59Z")

</div>

As far as I’ve understood this there are 2 main ways to access Slicers Python API: Using the built-in python console Starting slicer with the --python-script or --python-code flag But I want to have an external progra…

---

## [Python API documentation?](https://discourse.slicer.org/t/python-api-documentation/12298)

<div class="topic-metadata">

**Author:** [@joachim](https://discourse.slicer.org/u/joachim)\
**Replies:** 3\
**Last updated:** [June 30, 2020, 4:15pm UTC](https://discourse.slicer.org/t/python-api-documentation/12298 "2020-06-30T16:15:17Z")

</div>

Is there an API documentation for the Python interface of Slicer? I haven’t found it. What I’ve found is the C++ documentation, and I use this when I try to do Python. I guess the Python interface is generated from C++ …
