# Visible segment in 3D may have a None representation name

**URL:** <https://discourse.slicer.org/t/visible-segment-in-3d-may-have-a-none-representation-name/44475>\
**Category:** Development\
**Created:** [September 14, 2025, 8:31pm UTC](https://discourse.slicer.org/t/visible-segment-in-3d-may-have-a-none-representation-name/44475 "2025-09-14T20:31:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [September 14, 2025, 8:31pm UTC](https://discourse.slicer.org/t/visible-segment-in-3d-may-have-a-none-representation-name/44475/1 "2025-09-14T20:31:00Z")

</div>

Please consider these steps:

- add a volume in a new scene
- in the segment editor, paint anything in a slice view
- in the python console
  - `seg = getNode("Segmentation")`
  - `seg.GetDisplayNode().GetPreferredDisplayRepresentationName3D() == None # True`
  - `seg.CreateClosedSurfaceRepresentation()`
    - the segment becomes visible in 3D
    - the Show 3D button gets enabled, but
    - `seg.GetDisplayNode().GetPreferredDisplayRepresentationName3D() == None # still True`

  - Uncheck/check the 3D button
    - `seg.GetDisplayNode().GetPreferredDisplayRepresentationName3D() == None # False`

The same is observed with `CreateBinaryLabelMapRepresentation()`, except that the segment does not become visible in 3D (which is logical).

One would expect that `GetPreferredDisplayRepresentationName3D()` would not be `None` if there is a 3D display.

What are your views about that ?

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [September 15, 2025, 2:21pm UTC](https://discourse.slicer.org/t/visible-segment-in-3d-may-have-a-none-representation-name/44475/2 "2025-09-15T14:21:18Z")

</div>

As far as I can tell (probably I implemented this but more than 5 years ago), this member is to override the default representation that is shown in a certain type of view. I think `None` is an acceptable value, and it means that the default representation is shown.

Does this cause any issue for you?

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [September 15, 2025, 2:39pm UTC](https://discourse.slicer.org/t/visible-segment-in-3d-may-have-a-none-representation-name/44475/3 "2025-09-15T14:39:34Z")

</div>

> [@cpinter](#):
>
> Does this cause any issue for you?

Well, I discovered this unexpected state after observing a minor issue that can be easily fixed. There is no need to touch the core of Segmentation, I just wanted to collect a few point of views.

Thank you for yours.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [September 16, 2025, 10:51am UTC](https://discourse.slicer.org/t/visible-segment-in-3d-may-have-a-none-representation-name/44475/4 "2025-09-16T10:51:43Z")

</div>

> [@chir.set](#):
>
> I discovered this unexpected state

What I don’t agree with is that this would be an unexpected state. A `None` value in an option indicating that the default is used does not seem unexpected to me at all.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [September 16, 2025, 1:38pm UTC](https://discourse.slicer.org/t/visible-segment-in-3d-may-have-a-none-representation-name/44475/5 "2025-09-16T13:38:02Z")

</div>

> [@cpinter](#):
>
> A `None` value in an option indicating that the default is used

Good tho know it’s a guideline in Slicer, thank you for the hint.
