nifti-mrs-plus wraps a list of NIfTI-MRS
objects into a single batch-aware tensor, keeping the header, dimension tags, and provenance
intact. It materializes in whatever backend your pipeline needs (NumPy, PyTorch, JAX,
TensorFlow, or Keras) with no code changes.
Install
pip install nifti-mrs-plus # core (numpy + nifti-mrs)
pip install "nifti-mrs-plus[torch]" # + PyTorch
pip install "nifti-mrs-plus[viz]" # + plotting (matplotlib + fsl-mrs)
pip install "nifti-mrs-plus[all]" # everything
Extras: torch · jax · tensorflow · keras · viz · hdf5 · all · dev
Quick start
from nifti_mrs_plus import NIfTI_MRS_Plus, Backend
batch = NIfTI_MRS_Plus(nifti_list)
batch.shape # (8, 1, 1, 1, 2048)
batch.numpy() # np.ndarray, cached
batch.get_data(Backend.PYTORCH) # torch.Tensor (if torch installed)
batch[0] # NIFTI_MRS (single subject)
batch[0:4] # NIfTI_MRS_Plus (sub-batch)
Backends
| Extra | Backend | Returns |
|---|---|---|
| (none) | NIFTI_LIST |
list[NIFTI_MRS] |
| (none) | NUMPY |
numpy.ndarray |
torch |
PYTORCH |
torch.Tensor |
jax |
JAX |
jax.Array |
tensorflow |
TENSORFLOW |
tf.Tensor |
keras |
KERAS |
KerasTensor |
Built with ❤️ for the MRS community
Metadata
Release files for nifti-mrs-plus 0.2.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 | |
|---|---|---|---|
| nifti_mrs_plus-0.2.1.tar.gz | 48.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nifti_mrs_plus-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 89.2 kB
Release files / nifti_mrs_plus-0.2.1.tar.gz
| Download URL | nifti_mrs_plus-0.2.1.tar.gz |
|---|---|
| Size | 48.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3650c7b27083783583d0d4a8a20fdb67ab25972f435e9b7ac8f5d316be595df4
|
|
BLAKE2b-256 checksum How to use checksums |
32220b96ebadcef9023b947878d2877a0d5ca5b6c40c93495975ae2df06da8f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.16
|
Release files / nifti_mrs_plus-0.2.1-py3-none-any.whl
| Download URL | nifti_mrs_plus-0.2.1-py3-none-any.whl |
|---|---|
| Size | 40.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
376fa7a7c9bcbb87d8a7579d71aaf38de51deea391635339c5143fbca5c68c99
|
|
BLAKE2b-256 checksum How to use checksums |
af6d7f20e76d646aa334ea9600ed7be01b06dc3a2964bd17f56d21ad674c856c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.16
|