Skip to content

Latest commit

 

History

History
78 lines (50 loc) · 2.68 KB

README.rst

File metadata and controls

78 lines (50 loc) · 2.68 KB

Quickstart

mrQA suite of tools

Simple schematic of the library:

docs/schematic_mrQA.png

mrQA uses MRDataset to efficiently parse various neuroimaging dataset formats, which is available here.

Command line usage

A protocol compliance report can be generated directly from the command line interface.

For a DICOM dataset:

mr_proto_compl --data_root /path/to/dataset --style dicom

For a BIDS dataset:

mr_proto_compl --data_root /path/to/dataset --style bids

Programmatic / API usage

To use mrQA in a project:

import  mrQA

The most important methods for checking protocol compliance is check_compliance. It calls all the required functions.

  • To infer the most frequent values for each acquisition parameter
  • Aggregate the non-compliance information to generate an HTML report

First of all, you have to import the relevant modules and classes:

from MRdataset import import_dataset
from mrQA import check_compliance

Given a dataset of MR images, (e.g. DICOM images), we create MRdataset.base.Project object. This can be achieved simply by MRdataset.import_dataset method, which requires a valid folder path. For details on MRdataset, please see its documentation.

data_root = '/home/user/datasets/ABCD'
output_dir = '/home/user/MR_reports/'
dataset = import_dataset(data_root=data_root,
                         style='dicom',
                         name='ABCD')

check_compliance(dataset=dataset, output_dir=output_dir)

And that's it! Please note some important points:

  • It will generate a corresponding HTML file in the output_dir which contains the complete report.
  • style denotes the specific format of neuroimaging dataset. For example, use dicom for DICOM datasets and bids for BIDS datasets
  • name is an identifier which can be used to reload the the cached files later.If no name is specified, it uses a random identifier.