File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
nipype/interfaces/fsl/tests Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -220,12 +220,28 @@ def test_flirt(setup_flirt):
220
220
flirter = fsl .FLIRT ()
221
221
# infile not specified
222
222
with pytest .raises (ValueError ):
223
- flirter .run ()
223
+ flirter .cmdline
224
224
flirter .inputs .in_file = infile
225
225
# reference not specified
226
226
with pytest .raises (ValueError ):
227
- flirter .run ()
227
+ flirter .cmdline
228
228
flirter .inputs .reference = reffile
229
+
230
+ # test apply_xfm option
231
+ axfm = flirter
232
+ axfm .inputs .apply_xfm = True
233
+ # in_matrix_file or uses_qform must be defined
234
+ with pytest .raises (RuntimeError ): axfm .cmdline
235
+ axfm2 = axfm
236
+ # test uses_qform
237
+ axfm .inputs .uses_qform = True
238
+ assert axfm .cmdline == ('flirt -in %s -ref %s -applyxfm -usesqform' % (
239
+ infile , reffile ))
240
+ # test in_matrix_file
241
+ axfm2 .inputs .in_matrix_file = reffile
242
+ assert axfm2 .cmdline == ('flirt -in %s -ref %s -applyxfm -init %s' % (
243
+ infile , reffile , reffile ))
244
+
229
245
# Generate outfile and outmatrix
230
246
pth , fname , ext = split_filename (infile )
231
247
outfile = fsl_name (flirter , '%s_flirt' % fname )
You can’t perform that action at this time.
0 commit comments