Skip to main content

MedVol

License Apache Software License 2.0 PyPI Python Version

A wrapper for loading medical 3D image volumes such as NIFTI or NRRD images.

Installation

You can install medvol via pip:

pip install medvol

Example

from medvol import MedVol

# Load NIFTI image
image = MedVol("path/to/image.nifti")

# Print some metadata
print("Spacing: ", image.spacing)
print("Affine: ", image.affine)
print("Header: ", image.header)

# Access and modify the image array
arr = image.array
arr[0, 0, 0] = 1

# Create a new image with the new array, a new spacing, but copy all remaining metadata
new_image = MedVol(arr, spacing=[2, 2, 2], copy=image)

# Save the new image as NRRD
new_image.save("path/to/new_image.nrrd")

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the Apache Software License 2.0 license, "medvol" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

Metadata

Release files for medvol 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for medvol 0.0.5
File Size Uploaded Provenance Actions
medvol-0.0.5.tar.gz 8.1 kB Without provenance Details for medvol-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for medvol 0.0.5
File Interpreter ABI Platform Actions
MedVol-0.0.5-py3-none-any.whl Python 3 none any Details for MedVol-0.0.5-py3-none-any.whl

Total release size: 15.8 kB

Release files / medvol-0.0.5.tar.gz

Download URL medvol-0.0.5.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
dd8e8850dbbf7d9bbad773fe0c3c565ddf43e38a4488e3864d7f5844ea2b54ea
BLAKE2b-256 checksum
How to use checksums
3359d6834aa8232478ef18ef8a9b165669d7e0e4b70a6e4dde29bcea88a2b5c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / MedVol-0.0.5-py3-none-any.whl

Download URL MedVol-0.0.5-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f1156e59243a769a701dd7a129c3202c9b72d62ff236a45928763961d952a46
BLAKE2b-256 checksum
How to use checksums
f681bf44e94854e88a65bf455bb1ad2aa542bee7c550b1e8a74534961fd64a77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Security for medvol 0.0.5

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page