niftynet.utilities.filename_matching module¶
Matching file names by configuration options.
-
class
KeywordsMatching
(list_paths=(), list_contain=(), list_not_contain=(), regex_remove=())[source]¶ Bases:
object
This class is responsible for the search of the appropriate files to use as input based on the constraints given in the config file.
-
classmethod
from_dict
(input_dict, default_folder=None)[source]¶ In the config file, constraints for a given search can be of three types:
path_to_search
,filename_contains
andfilename_not_contains
. Each associated value is a string. Multiple constraints are delimited by a,
. This function creates the corresponding matching object with the list of constraints for each of these subtypes.Parameters: - default_folder – relative paths are first tested against the current folder, and then against this default folder.
- input_dict – set of searching parameters.
Returns:
-
classmethod