Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

aramis-lab/pydra-dcm2bids

Repository files navigation

pydra-dcm2bids

PyPI - Version PyPI - Python Version PyPI - Downloads


Pydra tasks for dcm2bids.

Pydra is a dataflow engine which provides a set of lightweight abstractions for DAG construction, manipulation, and distributed execution.

dcm2bids is a tool which facilitates conversion from DICOM datasets to NIfTI files organized as BIDS.

Installation

pip install pydra-dcm2bids

A separate installation of dcm2bids and dcm2niix is required to use this package. Please review the following instructions.

dcm2bids can be installed alongside pydra-dcm2bids with:

pip install 'pydra-dcm2bids[all]'

Usage

from pydra.tasks import dcm2bids

task = dcm2bids.Dcm2Bids(
    dicom_dir="/path/to/dicom/dir",
    output_dir="/path/to/bids/dir",
    config_file="/path/to/config/file.json",
    participant_id="sub-01",
)

result = task()

You may check the following example of a configuration file.

Development

This project is managed with Hatch:

pipx install hatch

To run the test suite:

hatch run test:no-cov

To fix linting issues:

hatch run lint:fix

To check the documentation:

hatch run docs:serve --open-browser

License

pydra-dcm2bids is distributed under the terms of the Apache License, Version 2.0.