gMRI2FEM
gmri2fem is a Python package and command-line interface for processing
contrast-enhanced human brain MRI, estimating tracer concentrations, and
mapping image data to finite-element meshes for mathematical modelling of
brain tracer transport. The package was developed for MRI processing in the
GRIP project.
Installation
Choose the installation route based on the features you need.
Python-only functionality
For concentration calculations and other Python functionality that does not need the native meshing stack or FSL:
python -m pip install gmri2fem
This installs the Python package and CLI, but not legacy FEniCS, SVMTK, FSL, Greedy, or FreeSurfer. Python-only releases target Python 3.11 and 3.12.
Native meshing and FSL features
Conda recipes for gmri2fem and its optional FSL companion are being prepared for publication. Until a validated release is available, this installation route is not yet available from the configured channels.
Once published, use Pixi/Conda for features requiring legacy FEniCS
(dolfin, not FEniCSx/dolfinx) and SVMTK. Install gmri2fem-fsl as well
when you need FSL commands; it will install a compatible gmri2fem version.
Greedy must be installed separately. FreeSurfer/FastSurfer setup and licenses
are also managed separately.
Managed native environments currently target Linux x86-64. A package version range does not guarantee numerical equivalence across different native stacks.
Gonzo pipeline
Gonzo is a separate downstream MRI processing pipeline with its own environment and external-tool setup. See the Gonzo repository and its documentation for installation and pipeline instructions; do not use this package's Python-only pip installation as a substitute for the Gonzo environment.
Usage
The CLI has nested subcommands. Start by listing available commands:
gmri2fem --help
Example output:
Usage: gmri2fem [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
brainmeshing
dcm2nii-ll
dcm2nii-mixed
dti
i2m
mri
seg
To explore MRI commands and their options:
gmri2fem mri --help
gmri2fem mri looklocker-t1map --help
For example, gmri2fem mri looklocker-t1map --help describes the input,
timestamps, and output options for that command.
Contributors and release maintainers
Use Pixi 0.83.0 for development and release tasks:
pixi install --locked
pixi run --locked test
For release tooling and a local artifact rehearsal:
pixi install --locked -e release
pixi run --locked -e release release-check
pixi run --locked -e release python -m pytest -q tests/test_release.py
pixi run --locked -e release release-build
pixi run --locked -e release python scripts/release.py conda --sdist dist/gmri2fem-0.3.1.tar.gz
Use a clean artifact directory for each rehearsal. Release commands do not
publish artifacts; Conda packages are assembled into a local channel under
dist/. Wheel and Conda builds use the same staged source distribution.
Publishing is handled by the release workflow:
pull requests, pushes to main, and default manual runs build and test only.
Publication requires a published GitHub release or explicit manual opt-in, a
matching tag, and successful artifact tests. The workflow uploads the tested
artifacts through the pypi and anaconda environments. Configure PyPI
trusted publishing and environment approval, and set ANACONDA_TOKEN for
Anaconda publication. For an FSL companion-only update, use an fsl-vVERSION
tag and enable companion_only; this publishes the companion without
publishing Python artifacts. If an upload partially fails, retry only missing
artifacts after checking their checksums; do not overwrite a published version.
The legacy environment.yml has been retired. Use Pixi for this library and
Gonzo's own environment for the full pipeline. uv.lock is a historical
Python-only snapshot, not the supported native environment or release
toolchain.
Metadata
Release files for gmri2fem 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gmri2fem-0.3.1.tar.gz | 64.6 kB | With provenance | Details for gmri2fem-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gmri2fem-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for gmri2fem-0.3.1-py3-none-any.whl |
Total release size: 141.1 kB
Release files / gmri2fem-0.3.1.tar.gz
| Download URL | gmri2fem-0.3.1.tar.gz |
|---|---|
| Size | 64.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6201a2dc6b535e2c29bacd6df01c6f5ea67175e6541760ac863aeecc6f37b0d
|
|
BLAKE2b-256 checksum How to use checksums |
fdb2fe691efdd178983359f3d60acf2995889a09b17d04016b0e5df726b71b44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 23, 2026.
Transparency logRelease files / gmri2fem-0.3.1-py3-none-any.whl
| Download URL | gmri2fem-0.3.1-py3-none-any.whl |
|---|---|
| Size | 76.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b950072be3319cba4b0a935d1dbf22b00122c118803c56d0b89ca2dccd7edf4a
|
|
BLAKE2b-256 checksum How to use checksums |
3c4e2347ec008761ea59272b4eb68fbb1a9ae31b3e7d7c62476790c863c6aab9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 23, 2026.
Transparency logSecurity for gmri2fem 0.3.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for gmri2fem-0.3.1.tar.gz
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 Nov 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.