@@ -180,7 +180,7 @@ def test_LT_conversions(data_path, fname):
180180 "oblique" ,
181181 ],
182182)
183- @pytest .mark .parametrize ("sw" , ["afni" , "fsl" , "fs" , "itk" ])
183+ @pytest .mark .parametrize ("sw" , ["afni" , "fsl" , "fs" , "itk" , "afni-array" ])
184184def test_Linear_common (tmpdir , data_path , sw , image_orientation , get_testdata ):
185185 tmpdir .chdir ()
186186
@@ -206,6 +206,9 @@ def test_Linear_common(tmpdir, data_path, sw, image_orientation, get_testdata):
206206
207207 fname = f"affine-{ image_orientation } .{ sw } { ext } "
208208
209+ if sw == "afni-array" :
210+ fname .replace (image_orientation , "RAS" )
211+
209212 # Test the transform loaders are implemented
210213 xfm = factory .from_filename (data_path / fname )
211214
@@ -222,6 +225,9 @@ def test_Linear_common(tmpdir, data_path, sw, image_orientation, get_testdata):
222225
223226 # Test from_ras
224227 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+
225231 xfm = factory .from_ras (RAS , reference = reference , moving = moving )
226232 assert np .allclose (xfm .to_ras (reference = reference , moving = moving ), RAS )
227233
0 commit comments