File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -469,7 +469,7 @@ def _parse_files(self, filenames):
469
469
470
470
for filename in filenames :
471
471
# search for relevant files, and sort accordingly
472
- for fl in search_files (filename , outtypes ):
472
+ for fl in search_files (filename , outtypes , self . inputs . crop ):
473
473
if (
474
474
fl .endswith (".nii" )
475
475
or fl .endswith (".gz" )
@@ -502,7 +502,13 @@ def _list_outputs(self):
502
502
503
503
504
504
# https://stackoverflow.com/a/4829130
505
- def search_files (prefix , outtypes ):
506
- return it .chain .from_iterable (
505
+ def search_files (prefix , outtypes , search_crop ):
506
+ found = it .chain .from_iterable (
507
507
iglob (glob .escape (prefix + outtype )) for outtype in outtypes
508
508
)
509
+ if search_crop :
510
+ found = it .chain (
511
+ it .chain .from_iterable (iglob (glob .escape (prefix ) + "_Crop_*" + outtype ) for outtype in outtypes ),
512
+ found
513
+ )
514
+ return found
You can’t perform that action at this time.
0 commit comments