Hi
Thank you for all the previous inputs; this seems to be working.
One more question- When I register two models the mean distance appear in decimals , say 0.65 but when I check the translations on the transforms module for the linear transforms they are in the range of 34 mm, 44 mm eat on xy and z. How could this happen. Could someone please let me know. In reality the distance between the centre of the models would only change 1-2 mm.
Thanks for the additional information, it was useful.
As you say, the distance between the center of the models is 1-2mm. However, the translation component that you see in Transforms module is the translation at the origin (RAS=(0,0,0) position). To get translation at the center of the model, get the center of the model and transform that point coordinate using the transform.
You can retrieve the VTK transform from the transform node and then use its TransformPoint method to transform a point coordinate. Search for TransformPoint in script repository for examples.