Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a1ce70c

Browse files
committedMar 19, 2020
fix: seems like LTA affines are defined inversed
In other words, the ``src volume`` is the moving image and the ``dest volume`` is the reference image. However, the matrix written in the file seems to map coordinates from ``src`` to ``dest`` (i.e., it is the right one to move the data from ``dest`` to ``src``.
1 parent 0c87b28 commit a1ce70c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎nitransforms/io/lta.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def set_type(self, new_type):
162162
def to_ras(self, moving=None, reference=None):
163163
"""Return a nitransforms internal RAS+ matrix."""
164164
self.set_type(1)
165-
return self.structarr['m_L']
165+
return np.linalg.inv(self.structarr['m_L'])
166166

167167
def to_string(self):
168168
"""Convert this transform to text."""

0 commit comments

Comments
 (0)
Please sign in to comment.