# Load a segmentation into the 3D viewer from a module

**URL:** <https://discourse.slicer.org/t/load-a-segmentation-into-the-3d-viewer-from-a-module/27512>\
**Category:** Development\
**Tags:** segmentation, python, 3d-model\
**Created:** [January 28, 2023, 3:51am UTC](https://discourse.slicer.org/t/load-a-segmentation-into-the-3d-viewer-from-a-module/27512 "2023-01-28T03:51:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alistair\_McCutcheon](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/alistair_mccutcheon/32/13980_2.png) [@Alistair\_McCutcheon](https://discourse.slicer.org/u/Alistair_McCutcheon)\
**Post date:** [January 28, 2023, 3:51am UTC](https://discourse.slicer.org/t/load-a-segmentation-into-the-3d-viewer-from-a-module/27512/1 "2023-01-28T03:51:18Z")

</div>

How would I go about loading a segmentation into the 3D viewer from a python module? Similarly, how would I go about doing it for a volume?

Is there any way to load both at once into the 3d viewer but make the volume partially transparent?

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [January 28, 2023, 1:31pm UTC](https://discourse.slicer.org/t/load-a-segmentation-into-the-3d-viewer-from-a-module/27512/2 "2023-01-28T13:31:13Z")

</div>

> [@Alistair\_McCutcheon](#):
>
> How would I go about loading a segmentation into the 3D viewer from a python module? Similarly, how would I go about doing it for a volume?

Please consult the script repository:

[Load a segmentation](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#load-a-3d-image-or-model-file-as-segmentation)  
[Show segmentation in 3D](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#show-a-segmentation-in-3d)  
[Show a volume rendering automatically when volume is loaded](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#show-volume-rendering-automatically-when-a-volume-is-loaded)  
[Transparency](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#show-volume-rendering-making-soft-tissues-transparent)
