File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ def set_type(self, target):
247
247
248
248
# VOX2VOX -> RAS2RAS
249
249
if current == 0 and target == 1 :
250
- M = np . linalg . inv ( src . as_affine ()) .dot (xform ['m_L' ]) .dot (dst . as_affine ())
250
+ M = dst . as_affine ().dot (xform ['m_L' ].dot (np . linalg . inv ( src . as_affine ()) ))
251
251
else :
252
252
raise NotImplementedError (
253
253
"Converting {0} to {1} is not yet available" .format (
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ def test_LT_conversions(data_path):
72
72
# convert vox2vox LTA to ras2ras
73
73
v2v .set_type ('LINEAR_RAS_TO_RAS' )
74
74
assert v2v ['type' ] == 1
75
- assert np .all (r2r_m == v2v_m )
75
+ assert np .allclose (r2r_m , v2v_m )
76
76
77
77
78
78
def test_ITKLinearTransformArray (tmpdir , data_path ):
You can’t perform that action at this time.
0 commit comments