Transformation graph for quick calculation of concatenated transforms

Hi! I am new for 3D Slicer, and when I to used your method to calculate the transform matrix, I found that
a = getNode().GetParentTransformNode,
a is NONE, same as b. This resulted in transformAToB equaled to Identity Matrix.

But if I directly use
a,b = getNode(),
transformAToB = slicer.vtkMRMLTransformNode()
slicer.vtkMRMLTransformNode.GetTransformBetweenNodes(a, b, transformAToB)

I was told method requires a vtkMRMLTransformNode, a vtkMRMLScalarVolumeNode was provided.

I am wondering if anyone could help me find out why this problem comes out.

Appreciate your help!
Thank you.
Cheers,
xxzhou