Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert doc to 2.1.9 #228

Merged
merged 1 commit into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions docs/get-started/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ name: dcm2bids
channels:
- conda-forge
dependencies:
- python>=3.8
- python>=3.7
- dcm2niix
- dcm2bids
```
Expand Down Expand Up @@ -277,7 +277,7 @@ usage: dcm2bids [-h] -d DICOM_DIR [DICOM_DIR ...] -p PARTICIPANT [-s SESSION] -c
[-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-a]

Reorganising NIfTI files from dcm2niix into the Brain Imaging Data Structure
dcm2bids 3.0.0
dcm2bids 2.1.7

options:
-h, --help show this help message and exit
Expand All @@ -292,14 +292,13 @@ options:
-o OUTPUT_DIR, --output_dir OUTPUT_DIR
Output BIDS directory, Default: current directory
(/home/sam/dcm2bids-proj)
--auto_extract_entities If set, it will automatically try to extract entity information [task, dir, echo]
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
--forceDcm2niix Overwrite previous temporary dcm2niix output if it exists
--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/m
aster/README.md#defaceTpl

Documentation at https://github.com/unfmontreal/Dcm2Bids
```
Expand Down Expand Up @@ -342,7 +341,7 @@ containers:
channels:
- conda-forge
dependencies:
- python>=3.8
- python>=3.7
- dcm2niix
- dcm2bids

Expand Down
79 changes: 28 additions & 51 deletions docs/how-to/create-config-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,52 @@
{
"descriptions": [
{
"datatype": "anat",
"suffix": "T2w",
"dataType": "anat",
"modalityLabel": "T2w",
"criteria": {
"SeriesDescription": "*T2*",
"EchoTime": 0.1
},
"sidecar_changes": {
"sidecarChanges": {
"ProtocolName": "T2"
}
},
{
"id": "task-rest",
"datatype": "func",
"suffix": "bold",
"custom_entities": "task-rest",
"dataType": "func",
"modalityLabel": "bold",
"customLabels": "task-rest",
"criteria": {
"ProtocolName": "func_task-*",
"ImageType": ["ORIG*", "PRIMARY", "M", "MB", "ND", "MOSAIC"]
}
},
{
"datatype": "fmap",
"suffix": "fmap",
"intendedFor": "task_rest",
"dataType": "fmap",
"modalityLabel": "fmap",
"intendedFor": 1,
"criteria": {
"ProtocolName": "*field_mapping*"
}
},
{
"id": "id_task_learning",
"datatype": "func",
"suffix": "bold",
"custom_entities": "task-learning",
"dataType": "func",
"modalityLabel": "bold",
"customLabels": "task-learning",
"criteria": {
"SeriesDescription": "bold_task-learning"
},
"sidecar_changes": {
"sidecarChanges": {
"TaskName": "learning"
}
},
{
"datatype": "fmap",
"suffix": "epi",
"dataType": "fmap",
"modalityLabel": "epi",
"criteria": {
"SeriesDescription": "fmap_task-learning"
},
"IntendedFor": "id_task_learning",
"sidecar_changes": {
"IntendedFor": 2,
"sidecarChanges": {
"TaskName": "learning"
}
}
Expand Down Expand Up @@ -100,7 +98,7 @@ subject to change depending on the dcm2niix version in use.
You can enter several criteria. **All criteria must match** for a description to
be linked to a sidecar.

## datatype
## dataType

It is a mandatory field. Here is a definition from `bids v1.2.0` :

Expand All @@ -110,12 +108,12 @@ It is a mandatory field. Here is a definition from `bids v1.2.0` :
> field maps), anat (structural imaging such as T1, T2, etc.), meg
> (magnetoencephalography), beh (behavioral).

## suffix
## modalityLabel

It is a mandatory field. It describes the modality of the acquisition like
`T1w`, `T2w` or `dwi`, `bold`.

## custom_entities
## customLabels

It is an optional field. For some acquisitions, you need to add information in
the file name. For resting state fMRI, it is usually `task-rest`.
Expand All @@ -126,40 +124,19 @@ specifications][bids-spec].
For a longer example of a Dcm2Bids config json, see
[here](https://github.com/unfmontreal/Dcm2Bids/blob/master/example/config.json).

Note that the different bids labels must come in a very specific order to be bids valid filenames.
If the custom_entities fields that are entered that are in the wrong order,
then dcm2bids will reorder them for you.

For example if you entered:

```json
"custom_entities": "run-01_task-rest"
```

when running dcm2bids, you will get the following warning:

```bash
WARNING:dcm2bids.structure:✅ Filename was reordered according to BIDS entity table order:
from: sub-ID01_run-01_task-rest_bold
to: sub-ID01_task-rest_run-01_bold
```

custom_entities could also be combined with extractors.
See [custom_entities combined with extractors](./use-advanced-commands.md#custom_entities-combined-with-extractors)


## sidecar_changes
## sidecarChanges

Optional field to change or add information in a sidecar.

## id and intendedFor
## intendedFor

Optional field to add an `IntendedFor` entry in the sidecar of a fieldmap.
You will need to set an id to the corresponding description and put the same id in the `IntendedFor` field.
Optional field to add an `IntendedFor` entry in the sidecar of a fieldmap. Just
put the index or a list of indices of the description(s) that's intended for.

Fo example, **`task_rest`** means it is intended for `task-rest_bold`
and **`id_task_learning`** is intended for `task-learning` which will be
renamed to only `learning` because of the `"sidecar_changes": { "TaskName": "learning" }` field.
Python index begins at `0` so in the example, **`1`** means it is intended for
`task-rest_bold` and **`2`** is intended for `task-learning` which will be
renamed to only `learning` because of the
`"sidecarChanges": { "TaskName": "learning" }` field.

## Multiple config files

Expand Down
Loading