# bidsphysio
Converts physio data (CMRR, AcqKnowledge, Siemens PMU) to BIDS physiological recording
[![Docker image](https://img.shields.io/badge/docker-cbinyu/bidsphysio:latest-brightgreen.svg?logo=docker&style=flat)](https://hub.docker.com/r/cbinyu/bidsphysio/tags/)
[![TravisCI](https://travis-ci.com/cbinyu/bidsphysio.svg?branch=master)](https://travis-ci.com/cbinyu/bidsphysio)
[![CodeCoverage](https://codecov.io/gh/cbinyu/bidsphysio/branch/master/graph/badge.svg)](https://codecov.io/gh/cbinyu/bidsphysio)
[![DOI](https://zenodo.org/badge/239006399.svg)](https://zenodo.org/badge/latestdoi/239006399)
## Usage
```
physio2bidsphysio --infile <physiofiles> --bidsprefix <Prefix> [--verbose]
```
Example:
```
physio2bidsphysio --infile 07+epi_MB4_2mm_Physio+00001.dcm \
--bidsprefix BIDSfolder/sub-01/func/sub-01_task-REST_run-1
```
## Arguments
* `<physiofiles>` space-separated files with the physiological
recordings (formats:
* `<.dcm>`: DICOM file with physiological recording from a CMRR
Multi-Band sequence (only a single one for this file type).
* `<.acq>`: AcqKnowledge file (BioPac).
* `<.puls>` or `<.resp>`: Siemens PMU file (VB15A, VBX, VE11C).
* `<Prefix>` is the prefix that will be used for the BIDS physiology files. If all physiological recordings have the same sampling rate and starting time, the script will save the files: `<Prefix>_physio.json` and `<Prefix>_physio.tsv.gz`. If the physiological signals have different sampling rates and/or starting times, the script will save the files: `<Prefix>_recording-<label>_physio.json` and `<Prefix>_recording-<label>_physio.tsv.gz`, with the corresponding labels (e.g., `cardiac`, `respiratory`, etc.).
* `--verbose` will print out some warning messages.
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/bidsphysio && \
curl -sSL https://github.com/cbinyu/bidsphysio/archive/master.tar.gz \
| tar -vxz -C /tmp/bidsphysio --strip-components=1 && \
cd /tmp/bidsphysio && \
pip install . && \
cd / && \
rm -rf /tmp/bidsphysio
```
## Docker usage
```
docker run [docker options] cbinyu/bidsphysio \
--infile <physiofiles> \
--bidsprefix <Prefix>
```
Note that the `<physiofiles>` and the `<Prefix>` should use the corresponding paths inside the Docker container.
Example:
```
docker run --rm \
--user $(id -u):$(id -g) \
--name test_bidsphysio \
--volume /tmp:/tmp \
cbinyu/bidsphysio \
--infile /tmp/07+epi_MB4_2mm_Physio+00001.dcm \
--bidsprefix /tmp/test
```
## Alternative use:
The tool will also install the binaries: `dcm2bidsphysio`, `acq2bidsphysio` and `pmu2bidsphysio`, to extract a specific file type.
```
dcm2bidsphysio --infile <DCMfile> --bidsprefix <Prefix>
acq2bidsphysio --infile <acqfiles> --bidsprefix <Prefix>
pmu2bidsphysio --infile <pmufiles> --bidsprefix <Prefix>
```
## How to use in your own Python program
After installing the module using `pip` (see [above](https://github.com/cbinyu/bidsphysio#installation "Installation") ), you can use it in your own Python program this way:
```
from bidsphysio import dcm2bidsphysio
dcm2bidsphysio.dcm2bids( dicom_file, prefix )
```
or:
```
from bidsphysio import acq2bidsphysio
acq2bidsphysio.acq2bids( [acq_files], prefix )
```
or:
```
from bidsphysio import pmu2bidsphysio
pmu2bidsphysio.pmu2bids( [pmu_files], prefix )
```
PyPI 官网下载 | bidsphysio-4.0rc1.tar.gz
版权申诉
19 浏览量
2022-01-26
16:13:04
上传
评论
收藏 10KB GZ 举报
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
最新资源
- From Nand to Tetris (I) on Coursera
- VHDL是VHSIC Hardware Description Language的缩写,全称是Very High Speed I
- Redis是一种流行的开源内存数据库,它提供了各种各样的命令和功能来处理数据 以下是一些常见的Redis命令以及它们的用法:
- 基于java+springboot高校党建基本数据管理系统的设计与实现
- 网络安全是指保护计算机网络和网络基础设施的实践和技术 随着信息技术的发展,网络安全变得越来越重要,因为许多关键信息和个人数据都存
- 基于CYCLONE FPGA设计的出租车计价器Quartus工程VERILOG源码+课设报告文档.zip
- 课程设计:稳压电源电路.zip
- 基于C++的线段树和树状数组(免费提供全部源码)
- 使用 Redis 存储用户和他们的帖子.zip
- AI绘画实操(基础版)-推荐资料
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈