@@ -79,42 +79,7 @@ You can test it with any command but a safe way is to use the `--help` command.
79
79
80
80
```sh
81
81
(dcm2bids) sam:~$ dcm2bids --help
82
- usage: dcm2bids [-h] -d DICOM_DIR [DICOM_DIR ...] -p PARTICIPANT [-s SESSION] -c
83
- CONFIG [-o OUTPUT_DIR][--auto_extract_entities] [--bids_validate]
84
- [--force_dcm2bids] [--skip_dcm2niix] [--clobber]
85
- [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-a]
86
-
87
- Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure
88
- dcm2bids 2.1.7
89
-
90
- options:
91
- -h, --help show this help message and exit
92
- -d DICOM_DIR [DICOM_DIR ...], --dicom_dir DICOM_DIR [DICOM_DIR ...]
93
- DICOM directory(ies)
94
- -p PARTICIPANT, --participant PARTICIPANT
95
- Participant ID
96
- -s SESSION, --session SESSION
97
- Session ID
98
- -c CONFIG, --config CONFIG
99
- JSON configuration file (see example/config.json)
100
- -o OUTPUT_DIR, --output_dir OUTPUT_DIR
101
- Output BIDS directory, Default: current directory
102
- (/home/sam)
103
- --auto_extract_entities
104
- If set, it will automatically try to extract entityinformation [task, dir, echo] based on the suffix and datatype. [False]
105
- --bids_validate If set, once your conversion is done it will check if your output folder is BIDS valid. [False]
106
- bids-validator needs to be installed check: https://github.com/bids-standard/bids-validator#quickstart
107
- --force_dcm2bids Overwrite previous temporary dcm2bids output if it exists.
108
- --skip_dcm2niix Skip dcm2niix conversion. Option -d should contains NIFTI and json files.
109
- --clobber Overwrite output if it exists.
110
- -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
111
- Set logging level
112
- -a, --anonymizer This option no longer exists from the script in this
113
- release. See:https://github.com/unfmontreal/Dcm2Bids/blob/m
114
- aster/README.md#defaceTpl
115
-
116
- Documentation at https://github.com/unfmontreal/Dcm2Bids
117
-
82
+ --8<-- "docs_helper/help.txt"
118
83
```
119
84
120
85
??? bug "What you can do if you did not get this output"
@@ -189,25 +154,12 @@ option.
189
154
190
155
=== "Output"
191
156
192
- ```sh hl_lines="9-10 "
157
+ ```sh hl_lines="11-12 "
193
158
(dcm2bids) sam:~/dcm2bids-tutorial$ dcm2bids_scaffold --help
194
- usage: dcm2bids_scaffold [-h] [-o OUTPUT_DIR]
195
-
196
- Create basic BIDS files and directories
197
-
198
- Based on the material provided by
199
- https://github.com/bids-standard/bids-starter-kit
200
-
201
- options:
202
- -h, --help show this help message and exit
203
- -o OUTPUT_DIR, --output_dir OUTPUT_DIR
204
- Output BIDS directory, Default: current directory
205
-
206
- Documentation at https://github.com/unfmontreal/Dcm2Bids
207
-
159
+ --8<-- "docs_helper/help_scaffold.txt"
208
160
```
209
161
210
- As you can see at lines 9-10 , ` dcm2bids_scaffold ` has an ` --output_dir ` (or ` -o `
162
+ As you can see at lines 11-12 , ` dcm2bids_scaffold ` has an ` --output_dir ` (or ` -o `
211
163
for short) option with a default option, which means you can either specify
212
164
where you want the scaffolding to happen to be or it will create the scaffold in
213
165
the current directory as a default.
@@ -487,27 +439,9 @@ As usual the first command will be to request the help info.
487
439
488
440
=== "Output"
489
441
490
- ```sh hl_lines="6 8 "
442
+ ```sh hl_lines="11 13 15 "
491
443
(dcm2bids) sam:~/dcm2bids-tutorial/bids_project$ dcm2bids_helper --help
492
- usage: dcm2bids_helper [-h] -d DICOM_DIR [DICOM_DIR ...] [-o OUTPUT_DIR]
493
-
494
- options:
495
- -h, --help show this help message and exit
496
- -d DICOM_DIR [DICOM_DIR ...], --dicom_dir DICOM_DIR [DICOM_DIR ...]
497
- DICOM files directory
498
- -o OUTPUT_DIR, --output_dir OUTPUT_DIR
499
- Output BIDS directory, Default: current directory
500
- -n [NEST], --nest [NEST]
501
- Nest a directory in <output_dir>. Useful if many helper runs are needed
502
- to make a config file due to slight variations in MRI acquisitions.
503
- Defaults to DICOM_DIR if no name is provided.
504
- (Default: [False])
505
- --force, --force_dcm2bids
506
- Force command to overwrite existing output files.
507
- -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
508
- Set logging level to the console. [INFO]
509
-
510
- Documentation at https://github.com/unfmontreal/Dcm2Bids
444
+ --8<-- "docs_helper/helper.txt"
511
445
```
512
446
513
447
To run the commands, you have to specify the ` -d ` option, namely the input
@@ -1068,39 +1002,8 @@ command.
1068
1002
=== "Output"
1069
1003
1070
1004
```sh hl_lines="2-3"
1071
- (dcm2bids) sam:~/dcm2bids-tutorial/bids_project$ dcm2bids --help
1072
- usage: dcm2bids [-h] -d DICOM_DIR [DICOM_DIR ...] -p PARTICIPANT [-s SESSION] -c CONFIG [-o OUTPUT_DIR]
1073
- [--auto_extract_entities] [--bids_validate] [--force_dcm2bids] [--skip_dcm2niix] [--clobber]
1074
- [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-a]
1075
-
1076
- Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure
1077
- dcm2bids 2.1.7
1078
-
1079
- options:
1080
- -h, --help show this help message and exit
1081
- -d DICOM_DIR [DICOM_DIR ...], --dicom_dir DICOM_DIR [DICOM_DIR ...]
1082
- DICOM directory(ies)
1083
- -p PARTICIPANT, --participant PARTICIPANT
1084
- Participant ID
1085
- -s SESSION, --session SESSION
1086
- Session ID
1087
- -c CONFIG, --config CONFIG
1088
- JSON configuration file (see example/config.json)
1089
- -o OUTPUT_DIR, --output_dir OUTPUT_DIR
1090
- Output BIDS directory, Default: current directory (/home/sam/dcm2bids-tutorial/bids_project)
1091
- --auto_extract_entities
1092
- If set, it will automatically try to extract entityinformation [task, dir, echo] based on the suffix and datatype. [False]
1093
- --bids_validate If set, once your conversion is done it will check if your output folder is BIDS valid. [False]
1094
- bids-validator needs to be installed check: https://github.com/bids-standard/bids-validator#quickstart
1095
- --force_dcm2bids Overwrite previous temporary dcm2bids output if it exists.
1096
- --skip_dcm2niix Skip dcm2niix conversion. Option -d should contains NIFTI and json files.
1097
- --clobber Overwrite output if it exists.
1098
- -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}, --log_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
1099
- Set logging level
1100
- -a, --anonymizer This option no longer exists from the script in this release. See:https://github.com/unfmontreal/Dcm2Bids/blob/master/README.md#defaceTpl
1101
-
1102
- Documentation at https://github.com/unfmontreal/Dcm2Bids
1103
-
1005
+ (dcm2bids) sam:~$ dcm2bids --help
1006
+ --8<-- "docs_helper/help.txt"
1104
1007
```
1105
1008
1106
1009
As you can see, to run the ` dcm2bids ` command, you have to specify at least 3
0 commit comments