Skip to main content

Generates dummy medical image data with realistic headers to be used in image handling tests

Project description

https://github.com/australian-imaging-service/medimages4tests/actions/workflows/test.yml/badge.svg https://codecov.io/gh/australian-imaging-service/medimages4tests/branch/main/graph/badge.svg?token=UIS0OGPST7

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))
    )

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

medimages4tests-0.3-py3-none-any.whl (743.1 kB view details)

Uploaded Python 3

File details

Details for the file medimages4tests-0.3-py3-none-any.whl.

File metadata

  • Download URL: medimages4tests-0.3-py3-none-any.whl
  • Upload date:
  • Size: 743.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for medimages4tests-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 37d76519d912e5aa25ca7a1e5bbefc762bdc6b93fecd72d2791d5bcece420713
MD5 3b7ab428c179d037a2bf9f5b179a4e92
BLAKE2b-256 aed08f50aba305b615aca2e5731c4b88f31a3dcffab281e2a749f1fd0736a3cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page