You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some freesurfer tools (e.g. robust register) output RAS to RAS transforms in .lta format, which is not supported by this extension.
This snippet of Slicer code loads the file and the result appears to be correct, but I don't know how much variability there is in the format or if it's even documented. I don't know if the other lines in the file have any particular meaning.
ltaPath = "/data/affine.lta"
lta = open(ltaPath).read().split("\n")
mat = vtk.vtkMatrix4x4()
for row in range(4):
print(row, lta[8+row])
elems = lta[8+row].split(" ")
for col in range(4):
mat.SetElement(row, col, float(elems[col]))
transform = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLLinearTransformNode")
transform.SetMatrixTransformToParent(mat)
Some freesurfer tools (e.g. robust register) output RAS to RAS transforms in
.lta
format, which is not supported by this extension.This snippet of Slicer code loads the file and the result appears to be correct, but I don't know how much variability there is in the format or if it's even documented. I don't know if the other lines in the file have any particular meaning.
Here's an example
.lta
file:The text was updated successfully, but these errors were encountered: