@@ -405,29 +405,32 @@ def test_fnirt(setup_flirt):
405
405
fnirt .run ()
406
406
fnirt .inputs .in_file = infile
407
407
fnirt .inputs .ref_file = reffile
408
- infile_basename = fsl .FNIRT .intensitymap_file_basename (infile )
409
- infile_txt = '%s.txt' % infile_basename
408
+ intmap_basename = '%s_intmap' % fsl .FNIRT .intensitymap_file_basename (infile )
409
+ intmap_image = fsl_name (fnirt , intmap_basename )
410
+ intmap_txt = '%s.txt' % intmap_basename
410
411
# doing this to create the file to pass tests for file existence
411
- with open (infile_txt , 'w' ):
412
+ with open (intmap_image , 'w' ):
413
+ pass
414
+ with open (intmap_txt , 'w' ):
412
415
pass
413
416
414
417
# test files
415
418
opt_map = [
416
419
('affine_file' , '--aff=%s' % infile , infile ),
417
420
('inwarp_file' , '--inwarp=%s' % infile , infile ),
418
- ('in_intensitymap_file' , '--intin=%s' % infile_basename , [infile ]),
421
+ ('in_intensitymap_file' , '--intin=%s' % intmap_basename , [intmap_image ]),
419
422
('in_intensitymap_file' ,
420
- '--intin=%s' % infile_basename ,
421
- [infile , infile_txt ]),
423
+ '--intin=%s' % intmap_basename ,
424
+ [intmap_image , intmap_txt ]),
422
425
('config_file' , '--config=%s' % infile , infile ),
423
426
('refmask_file' , '--refmask=%s' % infile , infile ),
424
427
('inmask_file' , '--inmask=%s' % infile , infile ),
425
428
('field_file' , '--fout=%s' % infile , infile ),
426
429
('jacobian_file' , '--jout=%s' % infile , infile ),
427
430
('modulatedref_file' , '--refout=%s' % infile , infile ),
428
431
('out_intensitymap_file' ,
429
- '--intout=%s_intmap ' % infile_basename , True ),
430
- ('out_intensitymap_file' , '--intout=%s' % infile_basename , infile ),
432
+ '--intout=%s ' % intmap_basename , True ),
433
+ ('out_intensitymap_file' , '--intout=%s' % intmap_basename , intmap_image ),
431
434
('fieldcoeff_file' , '--cout=%s' % infile , infile ),
432
435
('log_file' , '--logout=%s' % infile , infile )]
433
436
@@ -474,6 +477,9 @@ def test_fnirt(setup_flirt):
474
477
475
478
assert fnirt .cmdline == cmd
476
479
480
+ if name == 'out_intensitymap_file' :
481
+ assert fnirt ._list_outputs ()['out_intensitymap_file' ] == [
482
+ intmap_image , intmap_txt ]
477
483
478
484
@pytest .mark .skipif (no_fsl (), reason = "fsl is not installed" )
479
485
def test_applywarp (setup_flirt ):
0 commit comments