Skip to main content

MRdataset

Project description

Quickstart

https://img.shields.io/pypi/v/MRdataset.svg

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

MRdataset-0.1.3.tar.gz (1.0 MB view hashes)

Uploaded Source

Built Distribution

MRdataset-0.1.3-py2.py3-none-any.whl (27.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page