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):
469469
470470 for filename in filenames :
471471 # 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 ):
473473 if (
474474 fl .endswith (".nii" )
475475 or fl .endswith (".gz" )
@@ -502,7 +502,13 @@ def _list_outputs(self):
502502
503503
504504# 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 (
507507 iglob (glob .escape (prefix + outtype )) for outtype in outtypes
508508 )
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