mrid
mrid is a library for preprocessing of 3D images, particularly medical images.
It provide interfaces for many medical image processing tools such as SimpleElastix, HD-BET, SynthStrip, CTSeg. Note that those libraries are not bundled, installation instructions are included in all examples below.
Installation
Either run
pip install mrid-python
or
pip install git+https://github.com/inikishev/mrid
Registering images with SimpleITK-SimpleElastix
SimpleElastix is a robust tool for image registration which works really well out-of-the-box. It works on both Windows and Linux.
See this notebook for how to install and use it.
Skullstripping MRI scans with HD-BET
HD-BET is a model that performs skullstripping of pre- and post-constrast T1, T2 and FALIR MRIs. It works on both Windows and Linux.
See this notebook for how to install and use it
Skullstripping with SynthStrip
SynthStrip is a skull-stripping tool that works with many different image types and modalities, including MRI, DWI, CT, PET, etc.
See this notebook for how to install and use it
Skullstripping and segmentation of CT images with CTseg
CTseg can skull-strip CT images and perform their segmentation, it also registers them to a common space (see its README). Note that it can be very slow for 512x512 series (can take few hours), but you can downsample to 256x256. If you only need to quickly skullstrip CT scans without warping them you can use SynthStrip.
TODO!!!
Example workflow - preprocessing MRIs to BraTS format
Many BraTS datasets are provided as skullstripped images in SRI24 space. See this notebook for how to process raw scans to this format.
(T1n image looks weird because that's just how it is in the zenodo dataset)
References
The MRIs for all images above are from https://zenodo.org/records/7213153.
Colin Vanden Bulcke. (2022). Open-Access DICOM MRI session (1.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.7213153
Release files for mrid-python 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mrid_python-0.1.5.tar.gz | 36.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mrid_python-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 80.3 kB
Release files / mrid_python-0.1.5.tar.gz
| Download URL | mrid_python-0.1.5.tar.gz |
|---|---|
| Size | 36.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
433bebafb8ca508eb8ed3bce87ebeb2cf37d09b73307ac0c9d4116cd9b745ca1
|
|
BLAKE2b-256 checksum How to use checksums |
cb2cf3ba3f5f9c1d7d64d0b3d5436b1abd01944e44544f86f38dca4789a6837c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 21, 2025.
Transparency logRelease files / mrid_python-0.1.5-py3-none-any.whl
| Download URL | mrid_python-0.1.5-py3-none-any.whl |
|---|---|
| Size | 44.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0757f34c8b54424243a96da53fc36e0d324c8fc9d15972aee97e499eb2574264
|
|
BLAKE2b-256 checksum How to use checksums |
4ef2801f6d796229ef80c290020a14448fe6d437e7c206d18ae2b3290d706d5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 21, 2025.
Transparency log