# Applying transform node to volume node hierarchy

**URL:** <https://discourse.slicer.org/t/applying-transform-node-to-volume-node-hierarchy/30296>\
**Category:** Development\
**Tags:** python\
**Created:** [June 29, 2023, 10:32am UTC](https://discourse.slicer.org/t/applying-transform-node-to-volume-node-hierarchy/30296 "2023-06-29T10:32:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bongo\_kat](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/bongo_kat/32/66479_2.png) [@bongo\_kat](https://discourse.slicer.org/u/bongo_kat)\
**Post date:** [June 29, 2023, 10:32am UTC](https://discourse.slicer.org/t/applying-transform-node-to-volume-node-hierarchy/30296/1 "2023-06-29T10:32:45Z")

</div>

Hello,

I’m trying to change the transform hierarchy of my scene.  
When I load my MHA file as a Sequence Meta File it gives me a volume node and a transform node:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/7/e7bfc370a7e4d98b750ffd9db5fb4fda5f1f0ad4.png)  
I would like to apply the transform node to my volume node:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/0/6028c7387e533d217c8077506b19cd8cbe215731.png)

Here is my code, could someone please tell me what’s wrong with it or what’s missing ? I can load the file but adding the transform to the volume is not working.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/3/536d7a875f71446c65a5693cc4022069ae5ff8cc.png)  
Thank you very much!

---

<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:** [June 30, 2023, 12:26pm UTC](https://discourse.slicer.org/t/applying-transform-node-to-volume-node-hierarchy/30296/2 "2023-06-30T12:26:40Z")

</div>

`GetNthDataNode` gives you a reference to the data node in the internal scene. Instead, you need to get the proxy transform node and volume node by calling `GetProxyNode`.
