@@ -180,7 +180,7 @@ def test_LT_conversions(data_path, fname):
180
180
"oblique" ,
181
181
],
182
182
)
183
- @pytest .mark .parametrize ("sw" , ["afni" , "fsl" , "fs" , "itk" ])
183
+ @pytest .mark .parametrize ("sw" , ["afni" , "fsl" , "fs" , "itk" , "afni-array" ])
184
184
def test_Linear_common (tmpdir , data_path , sw , image_orientation , get_testdata ):
185
185
tmpdir .chdir ()
186
186
@@ -206,6 +206,9 @@ def test_Linear_common(tmpdir, data_path, sw, image_orientation, get_testdata):
206
206
207
207
fname = f"affine-{ image_orientation } .{ sw } { ext } "
208
208
209
+ if sw == "afni-array" :
210
+ fname .replace (image_orientation , "RAS" )
211
+
209
212
# Test the transform loaders are implemented
210
213
xfm = factory .from_filename (data_path / fname )
211
214
@@ -222,6 +225,9 @@ def test_Linear_common(tmpdir, data_path, sw, image_orientation, get_testdata):
222
225
223
226
# Test from_ras
224
227
RAS = from_matvec (euler2mat (x = 0.9 , y = 0.001 , z = 0.001 ), [4.0 , 2.0 , - 1.0 ])
228
+ if sw == "afni-array" :
229
+ RAS = [RAS , RAS ]
230
+
225
231
xfm = factory .from_ras (RAS , reference = reference , moving = moving )
226
232
assert np .allclose (xfm .to_ras (reference = reference , moving = moving ), RAS )
227
233
0 commit comments