# Could not find nodes in the scene by name or id 'R'

**URL:** <https://discourse.slicer.org/t/could-not-find-nodes-in-the-scene-by-name-or-id-r/35225>\
**Category:** Development\
**Created:** [April 2, 2024, 12:02pm UTC](https://discourse.slicer.org/t/could-not-find-nodes-in-the-scene-by-name-or-id-r/35225 "2024-04-02T12:02:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LucaB](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lucab/32/69858_2.png) [@LucaB](https://discourse.slicer.org/u/LucaB)\
**Post date:** [April 2, 2024, 12:02pm UTC](https://discourse.slicer.org/t/could-not-find-nodes-in-the-scene-by-name-or-id-r/35225/1 "2024-04-02T12:02:46Z")

</div>

Operarting system: Macos Sonoma 14.1  
Slicer version: 5.6.1  
Expected behaviour Bounding box.

Hello,

I am trying to extract the bounding box from slicer. I am running in the python terminal all steps as previously mentioned in other topics. Namely

```python
import numpy as np
bounds = np.zeros(6)
getNode("R").GetBounds(bounds)

```

where i receive the error.

```auto
raise MRMLNodeNotFoundException("could not find nodes in the scene by name or id '%s'" % (pattern if (isinstance(pattern, str)) else ""))

slicer.util.MRMLNodeNotFoundException: could not find nodes in the scene by name or id 'R'

```

(as seen in the Screenshot)

I can not figure out what I am doing wrong. How can i prevent this error?

 ![Screenshot 2024-04-02 at 13.03.54](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/7/471db6cf609724bf57473ff40e22a393aa210b73.jpeg)

Best regards,

Luca

---

<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:** [April 2, 2024, 12:05pm UTC](https://discourse.slicer.org/t/could-not-find-nodes-in-the-scene-by-name-or-id-r/35225/2 "2024-04-02T12:05:10Z")

</div>

As you can see in your screenshot, the name of the node is “Volume rendering ROI”, not “R”.

If you wan to get the list of ROI markups in the scene, you can call:

```auto
roiNodes = getNodesByClass("vtkMRMLMarkupsROINode")

```

---

<div class="post-metadata">

**Author:** ![LucaB](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lucab/32/69858_2.png) [@LucaB](https://discourse.slicer.org/u/LucaB)\
**Post date:** [April 2, 2024, 12:07pm UTC](https://discourse.slicer.org/t/could-not-find-nodes-in-the-scene-by-name-or-id-r/35225/3 "2024-04-02T12:07:13Z")

</div>

Thank you. A silly oversight by me
