Medimages4tests
Generates dummy medical images, with junk image data but realistic headers, to test imaging handling pipelines
Installation
Medimage4tests is available on PyPI so to install, simply use pip
$ pip3 install medimages4tests
or include in your package’s test_requires.
Usage
Create a pytest fixture consisting of a dummy image with field-map metadata in DICOM format
# Import medimages4tests generator functions
from medimages4tests.dummy.dicom.mri.fmap.ge.discovery_mr888.dv26_0_r05_2008a import get_image
# Return generated images in pytest fixtures (or alternative test framework)
@pytest.fixture()
def ge_dicom_fmap():
return get_image()
Create a dummy NIfTI image
import numpy
# Import `get_image` function
from medimages4tests.dummy.nifti import get_image
# Create dummy nifti image of 10x10x10 containing all ones
@pytest.fixture()
def ones_nifti():
return get_image(
data=numpy.ones((10, 10, 10))
)
Access real T1-weighted from OpenNeuro.org
from medimages4tests.mri.neuro.t1w import get_image
@pytest.fixture()
def t1w_nifti():
return get_image(sample="ds004130-ON01016")
Acknowledgements
The authors acknowledge the facilities and scientific and technical assistance of the National Imaging Facility, a National Collaborative Research Infrastructure Strategy (NCRIS) capability.
Metadata
Release files for medimages4tests 0.5.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| medimages4tests-0.5.10-py3-none-any.whl | Python 3 | none | any | Details for medimages4tests-0.5.10-py3-none-any.whl |
Release files / medimages4tests-0.5.10-py3-none-any.whl
| Download URL | medimages4tests-0.5.10-py3-none-any.whl |
|---|---|
| Size | 946.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0fe1883f9bfea5330e04a0fdffac184f434ee0ba982f691fca57adab51da1672
|
|
BLAKE2b-256 checksum How to use checksums |
5ddf89876b459a34c6c0a6b0938cbfb85b173d1482a15bda76daf0a2eba2f0b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for medimages4tests 0.5.10
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.