Skip to main content

Medical Data

UnitTest Build Package PyPI pre-commit.ci status

This repository contains utilities for handling data in medical image analysis that are not specific to certain tasks.

So far it consists of 2 major parts: An abstract Dataset API built on top of torch.utils.data.Dataset and torchio.data.Subject as well as general transforms for this kind of data.

To use the dataset classes, you basically only need to implement the parse_subjects method to return a list of samples and everything else will work automatically. You will automatically get image statistics such as median spacing or median shape. For label statistics, you either need to subclass the AbstractDiscreteLabelDataset or implement the get_single_label_stats and aggregate_label_stats methods.

All transforms work on torchio.data.Subjects and can be passed to the datasets as optional parameters. You can also pass "default" as a parameter to use the default transforms.

Pull requests for other common utilities are highly welcomed.

Installation

This project can be installed either from PyPI or by cloning the repository from GitHub.

For an install of published packages, use the command

    pip install medical-data

To install from the (cloned) repository, use the command

    pip install PATH/TO/medical-data

You can also add -e to the command to make an editable install in case you want to modify the code.

You can also install the package directly from GitHub by running

    pip install git+https://github.com/justusschock/medical-data.git

Release files for medical-data 0.2.0

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

Source distribution (sdist)

Source distribution for medical-data 0.2.0
File Size Uploaded
medical_data-0.2.0.tar.gz 31.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for medical-data 0.2.0
File Interpreter ABI Platform
medical_data-0.2.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 65.8 kB

Release files / medical_data-0.2.0.tar.gz

Download URL medical_data-0.2.0.tar.gz
Size 31.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0ffc92d090f7c3644d444b3f8d9711d9e745dd8b70c7fd67443367513427c18b
BLAKE2b-256 checksum
How to use checksums
cd4bd9b1ee130198fa04b1ae470d753df49f4304cc79388e0a4fe4b681ae3e33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / medical_data-0.2.0-py2.py3-none-any.whl

Download URL medical_data-0.2.0-py2.py3-none-any.whl
Size 34.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0cde391e9dadea9422a79f68a33d7c2a509068a3b778dbf5a6747bb3991202e7
BLAKE2b-256 checksum
How to use checksums
edc54d7b0def62c0d91a0e49d2870c89dae53cde78e33b1fcf21a6387a177755
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

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