# Select visibility of specific vtkMRMLScalarVolumeNode

**URL:** https://discourse.slicer.org/t/select-visibility-of-specific-vtkmrmlscalarvolumenode/28264
**Category:** Support
**Tags:** segmentation, dicom, python
**Created:** [March 9, 2023, 8:29pm UTC](https://discourse.slicer.org/t/select-visibility-of-specific-vtkmrmlscalarvolumenode/28264 "2023-03-09T20:29:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![shimashah](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/shimashah/32/13240_2.png) [@shimashah](https://discourse.slicer.org/u/shimashah)
#### Post date: [March 9, 2023, 8:29pm UTC](https://discourse.slicer.org/t/select-visibility-of-specific-vtkmrmlscalarvolumenode/28264/1 "2023-03-09T20:29:41Z")

</div>

Operating system: MacOS 12.6  
Slicer version:5.0.3

When I load DICOM to the Subject hierarchy scene, there are multiple vtkMRMLScalarVolumeNodes and all are invisible. I need to select one specific one of them here, and then in the Master volume select the same volume. (The name of the volume changes every time I load the DICOM to the scene with the same code). I see previous posts referring to **qSlicerSubjectHierarchyVolumesPlugin.cxx**. Is there any python code that works in Python interactor?

---

<div class="post-metadata">

### Author: ![ebrahim](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ebrahim/32/13403_2.png) [@ebrahim](https://discourse.slicer.org/u/ebrahim)
#### Post date: [March 12, 2023, 8:49am UTC](https://discourse.slicer.org/t/select-visibility-of-specific-vtkmrmlscalarvolumenode/28264/2 "2023-03-12T08:49:23Z")

</div>

For changing the visibility of a vtkMRMLScalarVolumeNode called `volume_node` from python:

```py
shNode = slicer.mrmlScene.GetSubjectHierarchyNode()
itemID = shNode.GetItemByDataNode(volume_node)
slicer.qSlicerSubjectHierarchyVolumesPlugin().setDisplayVisibility(itemID, 0) # 0 or 1 for visibility

```
