cleanX.cli.main module¶
- class cleanX.cli.main.Config(source=None)¶
Bases:
objectStore for various settings necessary to run the functions from
cleanXfrom command-line.Recognized configuration variables:
PREFERRED_DICOM_PARSERcan be either"pydicom"or"SimpleITK". Controls which DICOM parser to use. Only makes sense if both modules are available. The default is"pydicom".GLOB_IS_RECURSIVEcan beTrueorFalse. controls howglob()patterns are interpreted when they use**command. The default isFalse.JOURNAL_HOMEis a path to the directory where journals for journaling pipeline are stored. This defaults to~/cleanx/journal/if not specified.
- defaults = {'GLOB_IS_RECURSIVE': True, 'JOURNAL_HOME': '/home/runner/cleanx/journal/', 'PREFERRED_DICOM_PARSER': 'pydicom'}¶
- __init__(source=None)¶
Initializes configuration with
source. Source should be a JSON file with a dictionary, where keys will be interpreted as configuration variables and values as those variables values.- Parameters:
source (Suitable for
open()) – Path to the configuration file.
- parse()¶
Parse configuration file.
- merge(defaults, extras)¶
Merge default configuration with overrides from the configuration file.