From 821ec41bd9ffe2e49e51927b234f9ab438e49c99 Mon Sep 17 00:00:00 2001 From: "arnaud.bore" Date: Thu, 27 Jul 2023 17:41:35 -0400 Subject: [PATCH 1/3] fix doc, dockers and add skip_dcm2niix --- containers/Dockerfile | 2 +- dcm2bids/cli/dcm2bids.py | 5 +++++ dcm2bids/dcm2bids_gen.py | 3 +++ dcm2bids/dcm2niix_gen.py | 26 ++++++++++++++++++++------ dcm2bids/utils/utils.py | 1 + docs/how-to/create-config-file.md | 2 +- 6 files changed, 31 insertions(+), 8 deletions(-) diff --git a/containers/Dockerfile b/containers/Dockerfile index 3dfa7b32..c23b365f 100644 --- a/containers/Dockerfile +++ b/containers/Dockerfile @@ -12,7 +12,7 @@ RUN apt-get -y install wget build-essential cmake git pigz \ RUN pip3 install dcm2bids # Install dcm2niix from github -ENV DCM2NIIX_VERSION="v1.0.20201102" +ENV DCM2NIIX_VERSION="v1.0.20230411" WORKDIR /usr/local/src RUN git clone https://github.com/rordenlab/dcm2niix.git diff --git a/dcm2bids/cli/dcm2bids.py b/dcm2bids/cli/dcm2bids.py index 49da35cb..c7bc9373 100644 --- a/dcm2bids/cli/dcm2bids.py +++ b/dcm2bids/cli/dcm2bids.py @@ -64,6 +64,11 @@ def _build_arg_parser(): help="Overwrite previous temporary dcm2niix " "output if it exists.") + p.add_argument("--skip_dcm2niix", + action="store_true", + help="Skip dcm2niix conversion. " + "Option -d should contains NIFTI and json files.") + p.add_argument("--clobber", action="store_true", help="Overwrite output if it exists.") diff --git a/dcm2bids/dcm2bids_gen.py b/dcm2bids/dcm2bids_gen.py index ec5d85aa..a484466a 100644 --- a/dcm2bids/dcm2bids_gen.py +++ b/dcm2bids/dcm2bids_gen.py @@ -42,6 +42,7 @@ def __init__( session=DEFAULT.session, clobber=DEFAULT.clobber, force_dcm2niix=DEFAULT.force_dcm2niix, + skip_dcm2niix=DEFAULT.skip_dcm2niix, log_level=DEFAULT.logLevel, **_ ): @@ -54,6 +55,7 @@ def __init__( self.bids_validate = bids_validate self.auto_extract_entities = auto_extract_entities self.force_dcm2niix = force_dcm2niix + self.skip_dcm2niix = skip_dcm2niix self.logLevel = log_level self.logger = logging.getLogger(__name__) @@ -77,6 +79,7 @@ def run(self): self.dicom_dirs, self.bids_dir, self.participant, + self.skip_dcm2niix, self.config.get("dcm2niixOptions", DEFAULT.dcm2niixOptions), ) diff --git a/dcm2bids/dcm2niix_gen.py b/dcm2bids/dcm2niix_gen.py index 970bc84d..26d065c9 100644 --- a/dcm2bids/dcm2niix_gen.py +++ b/dcm2bids/dcm2niix_gen.py @@ -18,6 +18,7 @@ class Dcm2niixGen(object): dicom_dirs (list): A list of folder with dicoms to convert bids_dir (str): A path to the root BIDS directory participant: Optional Participant object + skip_dcm2niix: Optional if input only NIFTI and JSON files options (str): Optional arguments for dcm2niix Properties: @@ -29,6 +30,7 @@ def __init__( dicom_dirs, bids_dir, participant=None, + skip_dcm2niix=DEFAULT.skip_dcm2niix, options=DEFAULT.dcm2niixOptions, helper=False ): @@ -37,6 +39,7 @@ def __init__( self.dicom_dirs = dicom_dirs self.bids_dir = bids_dir self.participant = participant + self.skip_dcm2niix = skip_dcm2niix self.options = options self.helper = helper @@ -96,15 +99,26 @@ def run(self, force=False, helper=False): def execute(self): """ Execute dcm2niix for each directory in dicom_dirs """ - for dicomDir in self.dicom_dirs: - cmd = ['dcm2niix', *shlex.split(self.options), - '-o', self.output_dir, dicomDir] + if not self.skip_dcm2niix: + for dicomDir in self.dicom_dirs: + cmd = ['dcm2niix', *shlex.split(self.options), + '-o', self.output_dir, dicomDir] + output = run_shell_command(cmd) + + try: + output = output.decode() + except Exception: + pass + + self.logger.debug(f"\n{output}") + self.logger.info("Check log file for dcm2niix output\n") + else: + cmd = ['cp', '-r', dicomDir, self.output_dir] output = run_shell_command(cmd) try: output = output.decode() except Exception: pass - - self.logger.debug(f"\n{output}") - self.logger.info("Check log file for dcm2niix output\n") + + self.logger.info("Not running dcm2niix\n") \ No newline at end of file diff --git a/dcm2bids/utils/utils.py b/dcm2bids/utils/utils.py index 346b5c67..bef87965 100644 --- a/dcm2bids/utils/utils.py +++ b/dcm2bids/utils/utils.py @@ -41,6 +41,7 @@ class DEFAULT(object): # dcm2niix.py dcm2niixOptions = "-b y -ba y -z y -f '%3s_%f_%p_%t'" + skip_dcm2niix = False # sidecar.py auto_extractors = {'SeriesDescription': ["task-(?P[a-zA-Z0-9]+)"], diff --git a/docs/how-to/create-config-file.md b/docs/how-to/create-config-file.md index aec9900e..1681eb71 100644 --- a/docs/how-to/create-config-file.md +++ b/docs/how-to/create-config-file.md @@ -17,7 +17,7 @@ } }, { - "id": "task-rest", + "id": "task_rest", "datatype": "func", "suffix": "bold", "custom_entities": "task-rest", From 4912381c5db71cc76cff98c76ae9304d25f05658 Mon Sep 17 00:00:00 2001 From: "arnaud.bore" Date: Fri, 28 Jul 2023 07:07:50 -0400 Subject: [PATCH 2/3] fix bug + add documentation --- dcm2bids/dcm2niix_gen.py | 15 ++++++--------- docs/get-started/install.md | 7 ++++--- docs/how-to/use-advanced-commands.md | 12 +++++++++--- docs/tutorial/first-steps.md | 15 ++++++++------- 4 files changed, 27 insertions(+), 22 deletions(-) diff --git a/dcm2bids/dcm2niix_gen.py b/dcm2bids/dcm2niix_gen.py index 26d065c9..097da433 100644 --- a/dcm2bids/dcm2niix_gen.py +++ b/dcm2bids/dcm2niix_gen.py @@ -113,12 +113,9 @@ def execute(self): self.logger.debug(f"\n{output}") self.logger.info("Check log file for dcm2niix output\n") else: - cmd = ['cp', '-r', dicomDir, self.output_dir] - output = run_shell_command(cmd) - - try: - output = output.decode() - except Exception: - pass - - self.logger.info("Not running dcm2niix\n") \ No newline at end of file + for dicomDir in self.dicom_dirs: + shutil.copytree(dicomDir, self.output_dir, dirs_exist_ok=True) + cmd = ['cp', '-r', dicomDir, self.output_dir] + self.logger.info("Running: %s", " ".join(str(item) for item in cmd)) + + self.logger.info("Not running dcm2niix\n") diff --git a/docs/get-started/install.md b/docs/get-started/install.md index 7ffdd509..f73b09f9 100644 --- a/docs/get-started/install.md +++ b/docs/get-started/install.md @@ -344,8 +344,8 @@ dcm2bids command such as `dcm2bids --help`: ```bash hl_lines="1" (dcm2bids) sam:~/dcm2bids-proj$ dcm2bids --help usage: dcm2bids [-h] -d DICOM_DIR [DICOM_DIR ...] -p PARTICIPANT [-s SESSION] -c - CONFIG [-o OUTPUT_DIR] [--forceDcm2niix] [--clobber] - [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-a] + CONFIG [-o OUTPUT_DIR] [--force_dcm2niix] [--skip_dcm2niix] + [--clobber] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-a] Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure dcm2bids 2.1.7 @@ -363,7 +363,8 @@ options: -o OUTPUT_DIR, --output_dir OUTPUT_DIR Output BIDS directory, Default: current directory (/home/sam/dcm2bids-proj) - --forceDcm2niix Overwrite previous temporary dcm2niix output if it exists + --force_dcm2niix Overwrite previous temporary dcm2niix output if it exists + --skip_dcm2niix Skip dcm2niix conversion. Option -d should contains NIFTI and json files. --clobber Overwrite output if it exists -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL} Set logging level diff --git a/docs/how-to/use-advanced-commands.md b/docs/how-to/use-advanced-commands.md index 879759f4..96d4070e 100644 --- a/docs/how-to/use-advanced-commands.md +++ b/docs/how-to/use-advanced-commands.md @@ -216,7 +216,7 @@ command. ```sh hl_lines="2-3" (dcm2bids) sam:~/dcm2bids-tutorial/bids_project$ dcm2bids --help usage: dcm2bids [-h] -d DICOM_DIR [DICOM_DIR ...] -p PARTICIPANT [-s SESSION] -c CONFIG [-o OUTPUT_DIR] - [--auto_extract_entities] [--bids_validate] [--forceDcm2niix] [--clobber] + [--auto_extract_entities] [--bids_validate] [--force_dcm2niix] [--skip_dcm2niix] [--clobber] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-a] Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure @@ -238,8 +238,9 @@ command. depending on the suffix and datatype. [False] --bids_validate If set, once your conversion is done it will check if your output folder is BIDS valid. [False] bids-validator needs to be installed check: https://github.com/bids-standard/bids-validator#quickstart - --force_dcm2niix Overwrite previous temporary dcm2niix output if it exists - --clobber Overwrite output if it exists + --force_dcm2niix Overwrite previous temporary dcm2niix output if it exists. + --skip_dcm2niix Skip dcm2niix conversion. Option -d should contains NIFTI and json files. + --clobber Overwrite output if it exists. -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL} Set logging level @@ -318,3 +319,8 @@ By default, dcm2bids will not validate your final BIDS structure. If needed, you can install [bids-validator](https://github.com/bids-standard/bids-validator#quickstart) and activate this option. + +### `--skip_dcm2niix` + +If you don't have access to original dicom files you can still use dcm2bids to reorganise your data into a BIDS structure. +Using the option --skip_dcm2niix you will skip the conversion step. \ No newline at end of file diff --git a/docs/tutorial/first-steps.md b/docs/tutorial/first-steps.md index 826bf4b0..56162304 100644 --- a/docs/tutorial/first-steps.md +++ b/docs/tutorial/first-steps.md @@ -81,7 +81,7 @@ You can test it with any command but a safe way is to use the `--help` command. (dcm2bids) sam:~$ dcm2bids --help usage: dcm2bids [-h] -d DICOM_DIR [DICOM_DIR ...] -p PARTICIPANT [-s SESSION] -c CONFIG [-o OUTPUT_DIR][--auto_extract_entities] [--bids_validate] - [--forceDcm2niix] [--clobber] + [--force_dcm2niix] [--skip_dcm2niix] [--clobber] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-a] Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure @@ -104,8 +104,9 @@ You can test it with any command but a safe way is to use the `--help` command. If set, it will automatically try to extract entityinformation [task, dir, echo] based on the suffix and datatype. [False] --bids_validate If set, once your conversion is done it will check if your output folder is BIDS valid. [False] bids-validator needs to be installed check: https://github.com/bids-standard/bids-validator#quickstart - --forceDcm2niix Overwrite previous temporary dcm2niix output if it exists - --clobber Overwrite output if it exists + --force_dcm2niix Overwrite previous temporary dcm2niix output if it exists. + --skip_dcm2niix Skip dcm2niix conversion. Option -d should contains NIFTI and json files. + --clobber Overwrite output if it exists. -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL} Set logging level -a, --anonymizer This option no longer exists from the script in this @@ -1069,7 +1070,7 @@ command. ```sh hl_lines="2-3" (dcm2bids) sam:~/dcm2bids-tutorial/bids_project$ dcm2bids --help usage: dcm2bids [-h] -d DICOM_DIR [DICOM_DIR ...] -p PARTICIPANT [-s SESSION] -c CONFIG [-o OUTPUT_DIR] - [--auto_extract_entities] [--bids_validate] [--forceDcm2niix] [--clobber] + [--auto_extract_entities] [--bids_validate] [--force_dcm2niix] [--skip_dcm2niix] [--clobber] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-a] Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure @@ -1091,9 +1092,9 @@ command. If set, it will automatically try to extract entityinformation [task, dir, echo] based on the suffix and datatype. [False] --bids_validate If set, once your conversion is done it will check if your output folder is BIDS valid. [False] bids-validator needs to be installed check: https://github.com/bids-standard/bids-validator#quickstart - - --forceDcm2niix Overwrite previous temporary dcm2niix output if it exists - --clobber Overwrite output if it exists + --force_dcm2niix Overwrite previous temporary dcm2niix output if it exists. + --skip_dcm2niix Skip dcm2niix conversion. Option -d should contains NIFTI and json files. + --clobber Overwrite output if it exists. -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL} Set logging level -a, --anonymizer This option no longer exists from the script in this release. See:https://github.com/unfmontreal/Dcm2Bids/blob/master/README.md#defaceTpl From 7517099f048cbc47beedffdf27cc61d89fd67020 Mon Sep 17 00:00:00 2001 From: "arnaud.bore" Date: Wed, 2 Aug 2023 09:39:49 -0400 Subject: [PATCH 3/3] rm force_dcm2niix to force_dcm2bids --- dcm2bids/cli/dcm2bids.py | 6 +++--- dcm2bids/cli/dcm2bids_helper.py | 2 +- dcm2bids/dcm2bids_gen.py | 10 +++++----- dcm2bids/dcm2niix_gen.py | 10 +++++----- dcm2bids/utils/utils.py | 2 +- docs/get-started/install.md | 4 ++-- docs/how-to/use-advanced-commands.md | 4 ++-- docs/tutorial/first-steps.md | 10 +++++----- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/dcm2bids/cli/dcm2bids.py b/dcm2bids/cli/dcm2bids.py index c7bc9373..4dd854b1 100644 --- a/dcm2bids/cli/dcm2bids.py +++ b/dcm2bids/cli/dcm2bids.py @@ -59,10 +59,10 @@ def _build_arg_parser(): "\nbids-validator needs to be installed check: " f"{DEFAULT.link_bids_validator}") - p.add_argument("--force_dcm2niix", + p.add_argument("--force_dcm2bids", action="store_true", - help="Overwrite previous temporary dcm2niix " - "output if it exists.") + help="Overwrite previous temporary dcm2bids " + "output if it exists.") p.add_argument("--skip_dcm2niix", action="store_true", diff --git a/dcm2bids/cli/dcm2bids_helper.py b/dcm2bids/cli/dcm2bids_helper.py index 5bc99034..87922b88 100644 --- a/dcm2bids/cli/dcm2bids_helper.py +++ b/dcm2bids/cli/dcm2bids_helper.py @@ -41,7 +41,7 @@ def _build_arg_parser(): "Defaults to DICOM_DIR if no name is provided.\n" "(Default: [%(default)s])") - p.add_argument('--force', '--force_dcm2niix', + p.add_argument('--force', '--force_dcm2bids', dest='overwrite', action='store_true', help='Force command to overwrite existing output files.') diff --git a/dcm2bids/dcm2bids_gen.py b/dcm2bids/dcm2bids_gen.py index a484466a..84b08a72 100644 --- a/dcm2bids/dcm2bids_gen.py +++ b/dcm2bids/dcm2bids_gen.py @@ -26,8 +26,8 @@ class Dcm2BidsGen(object): output_dir (path): Path to the BIDS base folder session (str): Optional label of a session clobber (boolean): Overwrite file if already in BIDS folder - force_dcm2niix (boolean): Forces a cleaning of a previous execution of - dcm2niix + force_dcm2bids (boolean): Forces a cleaning of a previous execution of + dcm2bids log_level (str): logging level """ @@ -41,7 +41,7 @@ def __init__( auto_extract_entities=False, session=DEFAULT.session, clobber=DEFAULT.clobber, - force_dcm2niix=DEFAULT.force_dcm2niix, + force_dcm2bids=DEFAULT.force_dcm2bids, skip_dcm2niix=DEFAULT.skip_dcm2niix, log_level=DEFAULT.logLevel, **_ @@ -54,7 +54,7 @@ def __init__( self.clobber = clobber self.bids_validate = bids_validate self.auto_extract_entities = auto_extract_entities - self.force_dcm2niix = force_dcm2niix + self.force_dcm2bids = force_dcm2bids self.skip_dcm2niix = skip_dcm2niix self.logLevel = log_level self.logger = logging.getLogger(__name__) @@ -83,7 +83,7 @@ def run(self): self.config.get("dcm2niixOptions", DEFAULT.dcm2niixOptions), ) - dcm2niix.run(self.force_dcm2niix) + dcm2niix.run(self.force_dcm2bids) sidecars = [] for filename in dcm2niix.sidecarFiles: diff --git a/dcm2bids/dcm2niix_gen.py b/dcm2bids/dcm2niix_gen.py index 097da433..0384a688 100644 --- a/dcm2bids/dcm2niix_gen.py +++ b/dcm2bids/dcm2niix_gen.py @@ -55,7 +55,7 @@ def output_dir(self): tmpDir = self.bids_dir return tmpDir - def run(self, force=False, helper=False): + def run(self, force=False): """ Run dcm2niix if necessary Args: @@ -71,10 +71,10 @@ def run(self, force=False, helper=False): oldOutput = False if oldOutput and force: - self.logger.warning("Previous dcm2niix directory output found:") + self.logger.warning("Previous dcm2bids temporary directory output found:") self.logger.warning(self.output_dir) self.logger.warning("'force' argument is set to True") - self.logger.warning("Cleaning the previous directory and running dcm2niix") + self.logger.warning("Cleaning the previous directory and running dcm2bids") shutil.rmtree(self.output_dir, ignore_errors=True) @@ -84,9 +84,9 @@ def run(self, force=False, helper=False): self.execute() elif oldOutput: - self.logger.warning("Previous dcm2niix directory output found:") + self.logger.warning("Previous dcm2bids temporary directory output found:") self.logger.warning(self.output_dir) - self.logger.warning("Use --force_dcm2niix to rerun dcm2niix\n") + self.logger.warning("Use --force_dcm2bids to rerun dcm2bids\n") else: if not os.path.exists(self.output_dir): diff --git a/dcm2bids/utils/utils.py b/dcm2bids/utils/utils.py index bef87965..8322d62a 100644 --- a/dcm2bids/utils/utils.py +++ b/dcm2bids/utils/utils.py @@ -26,7 +26,7 @@ class DEFAULT(object): bids_validate = False auto_extract_entities = False clobber = False - force_dcm2niix = False + force_dcm2bids = False post_op = [] logLevel = "WARNING" diff --git a/docs/get-started/install.md b/docs/get-started/install.md index f73b09f9..7524d02e 100644 --- a/docs/get-started/install.md +++ b/docs/get-started/install.md @@ -344,7 +344,7 @@ dcm2bids command such as `dcm2bids --help`: ```bash hl_lines="1" (dcm2bids) sam:~/dcm2bids-proj$ dcm2bids --help usage: dcm2bids [-h] -d DICOM_DIR [DICOM_DIR ...] -p PARTICIPANT [-s SESSION] -c - CONFIG [-o OUTPUT_DIR] [--force_dcm2niix] [--skip_dcm2niix] + CONFIG [-o OUTPUT_DIR] [--force_dcm2bids] [--skip_dcm2niix] [--clobber] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-a] Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure @@ -363,7 +363,7 @@ options: -o OUTPUT_DIR, --output_dir OUTPUT_DIR Output BIDS directory, Default: current directory (/home/sam/dcm2bids-proj) - --force_dcm2niix Overwrite previous temporary dcm2niix output if it exists + --force_dcm2bids Overwrite previous temporary dcm2bids output if it exists --skip_dcm2niix Skip dcm2niix conversion. Option -d should contains NIFTI and json files. --clobber Overwrite output if it exists -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL} diff --git a/docs/how-to/use-advanced-commands.md b/docs/how-to/use-advanced-commands.md index 96d4070e..e7543325 100644 --- a/docs/how-to/use-advanced-commands.md +++ b/docs/how-to/use-advanced-commands.md @@ -216,7 +216,7 @@ command. ```sh hl_lines="2-3" (dcm2bids) sam:~/dcm2bids-tutorial/bids_project$ dcm2bids --help usage: dcm2bids [-h] -d DICOM_DIR [DICOM_DIR ...] -p PARTICIPANT [-s SESSION] -c CONFIG [-o OUTPUT_DIR] - [--auto_extract_entities] [--bids_validate] [--force_dcm2niix] [--skip_dcm2niix] [--clobber] + [--auto_extract_entities] [--bids_validate] [--force_dcm2bids] [--skip_dcm2niix] [--clobber] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-a] Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure @@ -238,7 +238,7 @@ command. depending on the suffix and datatype. [False] --bids_validate If set, once your conversion is done it will check if your output folder is BIDS valid. [False] bids-validator needs to be installed check: https://github.com/bids-standard/bids-validator#quickstart - --force_dcm2niix Overwrite previous temporary dcm2niix output if it exists. + --force_dcm2bids Overwrite previous temporary dcm2bids output if it exists. --skip_dcm2niix Skip dcm2niix conversion. Option -d should contains NIFTI and json files. --clobber Overwrite output if it exists. -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL} diff --git a/docs/tutorial/first-steps.md b/docs/tutorial/first-steps.md index 56162304..dece693e 100644 --- a/docs/tutorial/first-steps.md +++ b/docs/tutorial/first-steps.md @@ -81,7 +81,7 @@ You can test it with any command but a safe way is to use the `--help` command. (dcm2bids) sam:~$ dcm2bids --help usage: dcm2bids [-h] -d DICOM_DIR [DICOM_DIR ...] -p PARTICIPANT [-s SESSION] -c CONFIG [-o OUTPUT_DIR][--auto_extract_entities] [--bids_validate] - [--force_dcm2niix] [--skip_dcm2niix] [--clobber] + [--force_dcm2bids] [--skip_dcm2niix] [--clobber] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-a] Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure @@ -104,7 +104,7 @@ You can test it with any command but a safe way is to use the `--help` command. If set, it will automatically try to extract entityinformation [task, dir, echo] based on the suffix and datatype. [False] --bids_validate If set, once your conversion is done it will check if your output folder is BIDS valid. [False] bids-validator needs to be installed check: https://github.com/bids-standard/bids-validator#quickstart - --force_dcm2niix Overwrite previous temporary dcm2niix output if it exists. + --force_dcm2bids Overwrite previous temporary dcm2bids output if it exists. --skip_dcm2niix Skip dcm2niix conversion. Option -d should contains NIFTI and json files. --clobber Overwrite output if it exists. -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL} @@ -502,7 +502,7 @@ As usual the first command will be to request the help info. to make a config file due to slight variations in MRI acquisitions. Defaults to DICOM_DIR if no name is provided. (Default: [False]) - --force, --force_dcm2niix + --force, --force_dcm2bids Force command to overwrite existing output files. -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL} Set logging level to the console. [INFO] @@ -1070,7 +1070,7 @@ command. ```sh hl_lines="2-3" (dcm2bids) sam:~/dcm2bids-tutorial/bids_project$ dcm2bids --help usage: dcm2bids [-h] -d DICOM_DIR [DICOM_DIR ...] -p PARTICIPANT [-s SESSION] -c CONFIG [-o OUTPUT_DIR] - [--auto_extract_entities] [--bids_validate] [--force_dcm2niix] [--skip_dcm2niix] [--clobber] + [--auto_extract_entities] [--bids_validate] [--force_dcm2bids] [--skip_dcm2niix] [--clobber] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-a] Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure @@ -1092,7 +1092,7 @@ command. If set, it will automatically try to extract entityinformation [task, dir, echo] based on the suffix and datatype. [False] --bids_validate If set, once your conversion is done it will check if your output folder is BIDS valid. [False] bids-validator needs to be installed check: https://github.com/bids-standard/bids-validator#quickstart - --force_dcm2niix Overwrite previous temporary dcm2niix output if it exists. + --force_dcm2bids Overwrite previous temporary dcm2bids output if it exists. --skip_dcm2niix Skip dcm2niix conversion. Option -d should contains NIFTI and json files. --clobber Overwrite output if it exists. -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}