# How to set Closed Surface representation as default segmentation for RTSTRUCT?

**URL:** <https://discourse.slicer.org/t/how-to-set-closed-surface-representation-as-default-segmentation-for-rtstruct/38301>\
**Category:** Support\
**Tags:** segmentation, slicerrt\
**Created:** [September 9, 2024, 8:32pm UTC](https://discourse.slicer.org/t/how-to-set-closed-surface-representation-as-default-segmentation-for-rtstruct/38301 "2024-09-09T20:32:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![achiravu](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@achiravu](https://discourse.slicer.org/u/achiravu)\
**Post date:** [September 9, 2024, 8:32pm UTC](https://discourse.slicer.org/t/how-to-set-closed-surface-representation-as-default-segmentation-for-rtstruct/38301/1 "2024-09-09T20:32:03Z")

</div>

I am using the SlicerRT extension to view RTSTRUCT contours in 3D Slicer, and I’m finding the Closed Surface representation to be more useful than Planar Contour. How do I set Closed Surface as the default representation when importing contours into Slicer?

Also, what are useful Python scripts for changing the default slice fill and 3D view opacities in the segmentations module?

Thanks!

---

<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 10, 2024, 3:38am UTC](https://discourse.slicer.org/t/how-to-set-closed-surface-representation-as-default-segmentation-for-rtstruct/38301/2 "2024-09-10T03:38:53Z")

</div>

> [@achiravu](#):
>
> I’m finding the Closed Surface representation to be more useful than Planar Contour. How do I set Closed Surface as the default representation when importing contours into Slicer?

Closed surface representation is indeed useful for visualization, therefore it is automatically computed. You can change the source representation to closed surface by clicking on “Make source” button in Segmentations module, but it would just unnecessarily change the loaded data.

> [@achiravu](#):
>
> Also, what are useful Python scripts for changing the default slice fill and 3D view opacities in the segmentations module?

In theory, something like this should work:

```python
defaultSegmentationDisplayNode = slicer.vtkMRMLSegmentationDisplayNode()
defaultSegmentationDisplayNode.SetOpacity2DFill(0.1)
slicer.mrmlScene.AddDefaultNode(defaultSegmentationDisplayNode)

```

Unfortunately, SlicerRT’s DICOM importer does not use information in the default display node (it instantiates the display node directly instead of creating via the scene). Please submit a bug report to [GitHub - SlicerRt/SlicerRT: Open-source toolkit for radiation therapy research, an extension of 3D Slicer. Features include DICOM-RT import/export, dose volume histogram, dose accumulation, external beam planning (TPS), structure comparison and morphology, isodose line/surface generation, etc.](https://github.com/SlicerRt/SlicerRT)

Until it is fixed, you can add an observer to the scene so that you get notification when a new node is added and if a segmentation display node gets created then you can adjust its properties.
