# Odd ID for vtkMRMLLayoutNode

**URL:** <https://discourse.slicer.org/t/odd-id-for-vtkmrmllayoutnode/9649>\
**Category:** Development\
**Created:** [December 29, 2019, 11:23pm UTC](https://discourse.slicer.org/t/odd-id-for-vtkmrmllayoutnode/9649 "2019-12-29T23:23:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [December 29, 2019, 11:23pm UTC](https://discourse.slicer.org/t/odd-id-for-vtkmrmllayoutnode/9649/1 "2019-12-29T23:23:25Z")

</div>

I noticed that the layout node has an odd ID with a duplicate naming scheme (“vtkMRMLLayoutNodevtkMRMLLayoutNode”) as seen below. It appears to have had this ID since at least 2012 as an old testing file references it, but I was trying to look into where in the code it gets set as I’m assuming it was intended to have an ID of simply “vtkMRMLLayoutNode”. Does anyone have any insight of what might be causing it to be set to this odd ID?  
 ![layout-node-id](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/9/89ebb92f74229aa564f9816f9fb3981c54373df7.png)

I searched for “vtkMRMLLayoutNodevtkMRMLLayoutNode” in the code base, but only found it being referenced in a few MRML testing files.  
[Modules/Loadable/Annotations/Testing/Data/Input/ruler.mrml](https://github.com/Slicer/Slicer/blob/4c0b0b15276aedc0e12d77e2227536426979d773/Modules/Loadable/Annotations/Testing/Data/Input/ruler.mrml)  
[Modules/Loadable/Markups/Testing/Data/Input/AnnotationTest/AnnotationFiducialsTest.mrml](https://github.com/Slicer/Slicer/blob/4c0b0b15276aedc0e12d77e2227536426979d773/Modules/Loadable/Markups/Testing/Data/Input/AnnotationTest/AnnotationFiducialsTest.mrml)  
[Modules/Loadable/VolumeRendering/Testing/Data/Input/volRender.mrml](https://github.com/Slicer/Slicer/blob/4c0b0b15276aedc0e12d77e2227536426979d773/Modules/Loadable/VolumeRendering/Testing/Data/Input/volRender.mrml)

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [January 2, 2020, 5:10pm UTC](https://discourse.slicer.org/t/odd-id-for-vtkmrmllayoutnode/9649/2 "2020-01-02T17:10:14Z")

</div>

Hi @jamesobutler - Since it’s a singleton, there is only one in the scene so the ID can be any unique string. The SingletonTag and basename are used by default and the original author used the class name as the SingletonTag, so that explains the odd pattern. It’s not exactly pretty, but it shouldn’t cause any problems.

> <https://github.com/Slicer/Slicer/blob/master/Libs/MRML/Core/vtkMRMLScene.cxx#L2262>

---

<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:** [January 2, 2020, 5:55pm UTC](https://discourse.slicer.org/t/odd-id-for-vtkmrmllayoutnode/9649/3 "2020-01-02T17:55:46Z")

</div>

Changing the code to `this->SetSingletonTag("Default")` would result in node ID `vtkMRMLLayoutNodeDefault` which would be much nicer but then for backward compatibility we would need to introduce a mechanism in scene loading that would replace the singleton tag on-the-fly. Singleton tag initialization on scene loading is already somewhat complicated and changing the ID would not have any direct benefits for users or developers, so I’m not sure if this is worth the trouble. Most likely we’ll need to make changes in the layout node when we add multi-monitor support to layouts. It would be a good opportunity to change the singleton tag then.
