# GetID() and GetName() methods giving different nodes

**URL:** <https://discourse.slicer.org/t/getid-and-getname-methods-giving-different-nodes/12769>\
**Category:** Development\
**Created:** [July 29, 2020, 2:03pm UTC](https://discourse.slicer.org/t/getid-and-getname-methods-giving-different-nodes/12769 "2020-07-29T14:03:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dloopz](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/dloopz/32/7646_2.png) [@dloopz](https://discourse.slicer.org/u/dloopz)\
**Post date:** [July 29, 2020, 2:03pm UTC](https://discourse.slicer.org/t/getid-and-getname-methods-giving-different-nodes/12769/1 "2020-07-29T14:03:12Z")

</div>

Operating system: Ubuntu Debian 18.04 (KDE neon 5.19)  
Slicer version: 4.11.0-2020-06-05  
Expected behavior: Getting unic node by its ID  
Actual behavior: Getting other node ID by GetID() method

Hi!

I’m devoloping a segmentation module using some of the Sequences Module logic to create or manipulate sequences. When I try to get first and last DataNodes from a sequence, i’m getting a wrong node ID by GetID() method. I think that next image is better to explain my problem:

 ![Screenshot_20200729_104722](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/9/b9c15ec4beacbc6718e873e0f471bbabaa64a5f3.png)

The SequenceNode is the one selected (named ‘1proxy\_Backg\_cardIAc’) and has 2 ScalarVolumeNodes as DataNodes (‘patient045\_frame01’ and ‘patient045\_frame13’). When i try to get first node of sequence by its ID, I get ‘v4\_cSAX\_time\_1’. Anny suggestion?

Here you can see that sequence is actually formed by ‘patient045\_frame01’ and ‘patient045\_frame13’ nodes:

![Screenshot_20200729_110248](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/b/2baeaff86ca697e54179e7d4b6335f9b1bf3193f.png)

Thanks!  
Lucca

---

<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:** [July 29, 2020, 2:21pm UTC](https://discourse.slicer.org/t/getid-and-getname-methods-giving-different-nodes/12769/2 "2020-07-29T14:21:20Z")

</div>

The data nodes in a sequence are not stored in the main Slicer MRML scene, but in a private scene inside the sequence. They become accessible in the main Slicer scene via the proxy node for the selected item. You can either set the item and use the proxy node, or get the internal sequence MRML scene using [this function](https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Core/vtkMRMLSequenceNode.h#L145).
