Skip to content

Commit

Permalink
fix: seems like LTA affines are defined inversed
Browse files Browse the repository at this point in the history
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``.
  • Loading branch information
oesteban committed Mar 19, 2020
1 parent 0c87b28 commit a1ce70c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nitransforms/io/lta.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def set_type(self, new_type):
def to_ras(self, moving=None, reference=None):
"""Return a nitransforms internal RAS+ matrix."""
self.set_type(1)
return self.structarr['m_L']
return np.linalg.inv(self.structarr['m_L'])

def to_string(self):
"""Convert this transform to text."""
Expand Down

0 comments on commit a1ce70c

Please sign in to comment.