API#

The miblab python package provides an API to miblab functionality that is relevant across applications such as retrieving data or models, generating pdf reports, or deploying pipelines.

This page provides an API reference guide for the package.

Version history

For a version history see the releases page.

Reporting

To access these functions, miblab must be installed with the report option:

pip install miblab[report]

All reporting functionality is wrapped up in a single class:

Report(folder[, filename, title, subtitle, ...])

Generate pdf reports in miblab style.

Data

To access these functions, miblab must be installed with the data option:

pip install miblab[data]

APIs for upload and download to Zenodo and OSF:

zenodo_fetch(dataset, folder[, doi, ...])

Download a dataset from Zenodo.

osf_fetch(dataset, folder[, project, token, ...])

Download a dataset from OSF (Open Science Framework).

osf_upload(folder, dataset[, project, ...])

Upload a file to OSF (Open Science Framework) using osfclient.

Deep-learning API

To access these functions, miblab must be installed with the dlseg option:

pip install miblab[dlseg]

Interfaces for deploying deep learning models.

totseg(vol[, cutoff])

Run totalsegmentator on one or more volumes.

kidney_pc_dixon(input_array[, model, ...])

Segment individual kidneys on post-contrast Dixon images.

kidney_dixon_fat_water(input_array[, ...])

Calculate fat/water maps on post-contrast Dixon images.