Applying transform node to volume node hierarchy

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
I would like to apply the transform node to my volume node:
image

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
Thank you very much!

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.