@@ -354,14 +354,14 @@ class ApplyTOPUP(FSLCommand):
354
354
355
355
>>> from nipype.interfaces.fsl import ApplyTOPUP
356
356
>>> applytopup = ApplyTOPUP()
357
- >>> applytopup.inputs.in_files = ["epi .nii", "epi_rev .nii"]
357
+ >>> applytopup.inputs.in_files = ["ds003_sub-01_mc .nii.gz ", "ds003_sub-01_mc .nii.gz "]
358
358
>>> applytopup.inputs.encoding_file = "topup_encoding.txt"
359
359
>>> applytopup.inputs.in_topup_fieldcoef = "topup_fieldcoef.nii.gz"
360
360
>>> applytopup.inputs.in_topup_movpar = "topup_movpar.txt"
361
361
>>> applytopup.inputs.output_type = "NIFTI_GZ"
362
362
>>> applytopup.cmdline # doctest: +ELLIPSIS +IGNORE_UNICODE
363
- 'applytopup --datain=topup_encoding.txt --imain=epi .nii,epi_rev .nii \
364
- --inindex=1,2 --topup=topup --out=epi_corrected .nii.gz'
363
+ 'applytopup --datain=topup_encoding.txt --imain=ds003_sub-01_mc .nii.gz,ds003_sub-01_mc .nii.gz \
364
+ --inindex=1,2 --topup=topup --out=ds003_sub-01_mc_corrected .nii.gz'
365
365
>>> res = applytopup.run() # doctest: +SKIP
366
366
367
367
"""
@@ -374,7 +374,7 @@ def _parse_inputs(self, skip=None):
374
374
skip = []
375
375
376
376
for filename in self .inputs .in_files :
377
- ndims = nib .load (filename ).get_data (). ndim
377
+ ndims = nib .load (filename ).header [ 'dim' ][ 0 ]
378
378
if ndims != 4 :
379
379
raise ValueError ('Input in_files for ApplyTopUp must be 4-D. {} is {}-D.'
380
380
.format (filename , ndims ))
0 commit comments