Skip to content

Commit

Permalink
Installation instructions
Browse files Browse the repository at this point in the history
The README.md file now includes installation instructions
  • Loading branch information
pvelasco committed Feb 14, 2020
1 parent 752dd7f commit e5ff14a
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,34 @@ Converts physio data from a CMRR DICOM file to BIDS physiological recording

## Usage
```
python dcm2bidsphysio.py --infile <DCMfile> \
--bidsprefix <Prefix>
dcm2bidsphysio --infile <DCMfile> --bidsprefix <Prefix>
```

Example:
```
python dcm2bidsphysio.py --infile 07+epi_MB4_2mm_Physio+00001.dcm \
--bidsprefix BIDSfolder/sub-01/func/sub-01_task-REST_run-1
dcm2bidsphysio --infile 07+epi_MB4_2mm_Physio+00001.dcm \
--bidsprefix BIDSfolder/sub-01/func/sub-01_task-REST_run-1
```

## Arguments
* `<DCMfile>` is the DICOM file that contains the physiological recordings.
* `<Prefix>` is the prefix that will be used for the BIDS physiology files. The script will save the files: `<Prefix>_recording-<label>_physio.json` and `<Prefix>_recording-<label>_physio.tsv.gz`, with labels `cardiac` and `respiratory` (if present in the `DCMfile`).

Note: If desired, you can use the corresponding `_bold.nii.gz` BIDS file as `--bidsprefix`. The script will strip the `_bold.nii.gz` part from the filename and use what is left as `<Prefix>`. This way, you can assure that the output physiology files match the `_bold.nii.gz` file for which they are intended.

## Installation
You can install the tool by downloading the package and installing it
with `pip`:

```
mkdir /tmp/dcm2bidsphysio && \
curl -sSL https://github.com/cbinyu/dcm2bidsphysio/archive/master.tar.gz \
| tar -vxz -C /tmp/dcm2bidsphysio --strip-components=1 && \
cd /tmp/dcm2bidsphysio && \
pip install . && \
cd / && \
rm -rf /tmp/dcm2bidsphysio
```

## Docker usage
```
Expand All @@ -34,9 +52,3 @@ docker run --rm \
```


## Arguments
* `<DCMfile>` is the DICOM file that contains the physiological recordings.
* `<Prefix>` is the prefix that will be used for the BIDS physiology files. The script will save the files: `<Prefix>_recording-<label>_physio.json` and `<Prefix>_recording-<label>_physio.tsv.gz`, with labels `cardiac` and `respiratory` (if present in the `DCMfile`).

Note: If desired, you can use the corresponding `_bold.nii.gz` BIDS file as `--bidsprefix`. The script will strip the `_bold.nii.gz` part from the filename and use what is left as `<Prefix>`. This way, you can assure that the output physiology files match the `_bold.nii.gz` file for which they are intended.

0 comments on commit e5ff14a

Please sign in to comment.