MRdataset
Project description
Quickstart
MRdataset
a unified interface to various neuroimaging datasets such as DICOM, BIDS and any other generic format etc
Documentation: https://open-minds-lab.github.io/MRdataset/
Command line usage
MRdataset can be used on the command line interface. For a DICOM dataset:
mrds --data_root /path/to/dataset --style dicom
For a BIDS dataset:
mrds --data_root /path/to/dataset --style bids
API/programmatic usage
To use MRdataset in a project:
import MRdataset
The most important method is import_dataset. It creates an appropriate object depending as per style argument.
First of all, you have to import the relevant module:
from MRdataset import import_dataset
Given a valid folder path to a dataset of MR images (e.g. DICOM images), it creates a MRdataset.base.Project object.:
data_root = '/home/user/datasets/ABCD' dataset = import_dataset(data_root=data_root, style='dicom', name='ABCD')
By default, the import_dataset expects a DICOM dataset. However, this can be changed using style argument. For example, use style='bids' for importing a BIDS dataset.
The library is highly extensible, and a developer can extend it to their own neuroimaging formats. For example, to create an interface with a new format, say NID (NeuroImaging Dataset), inherit MRdataset.base.Project in a file NID_dataset.py:
from MRdataset import Project class NIDDataset(Project): def __init__(): pass def walk(): pass
Implement, these two functions. You can directly use style='nid'. Thats it! No more changes required.
History
0.1.0 (2022-05-05)
First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for MRdataset-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a44a08c6e486b63537a056e4fdb29a38e3116288054fe44ffc37447fbe94c93d |
|
MD5 | 8c95b16e71983907b73bbe50675574a8 |
|
BLAKE2b-256 | 84dcc46655166a15f8113ae064f183a8678220205a49e0dd26f870f2a9858828 |