# Segmentation visibility by code

**URL:** <https://discourse.slicer.org/t/segmentation-visibility-by-code/13826>\
**Category:** Support\
**Tags:** segmentation, python\
**Created:** [October 2, 2020, 7:58pm UTC](https://discourse.slicer.org/t/segmentation-visibility-by-code/13826 "2020-10-02T19:58:22Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![aldoSanchez](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@aldoSanchez](https://discourse.slicer.org/u/aldoSanchez)\
**Post date:** [October 3, 2020, 10:58pm UTC](https://discourse.slicer.org/t/segmentation-visibility-by-code/13826/3 "2020-10-03T22:58:19Z")

</div>

hi  
this works to hide all segmentation:

```auto
disp=slicer.util.getNode('Segmentation')
disp.SetDisplayVisibility(False)

```

but I can’t make it show only Left-Cerebral-Cortex .  
try this:

```auto
slicer.vtkMRMLSegmentationDisplayNode('Segmentation').SetAllSegmentsVisibility(False)

```

but I have the following error:

```auto
ValueError: could not extract hexadecimal address from argument string

```

---

_[View the full topic](https://discourse.slicer.org/t/segmentation-visibility-by-code/13826)._
