Slicer Read Transform Content

Hello,

I am now writing a Slicer scripted module and I need to read only a certain element from a specified transform node. For example, I have transform node named “Transform1” and I just need to read the value of element of 3rd column from each row. How can this be done using python coding?

Thanks!

Sorry, there was a typo, I just want to read the values of 4th column from each transform. I have 8 (4x4) transform

You can access the matrix and call GetElement like in this example:

https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Get_a_notification_if_a_transform_is_modified