medcore
Medical imaging utilities for DICOM / NIfTI workflows based on SimpleITK.
Features
- IO
- DICOM / NIfTI reading (
ImageReader)
- DICOM / NIfTI reading (
- Image utils
- intensity array conversion / normalization
- resampling / transform helpers
- NIfTI write and label merge utilities
- Detection
- coronal angle estimation
- umbilicus detection helpers
- Segmentation
- torso and abdomen segmentation classes
- Feature extraction
- label area/volume summary
- patch extraction around landmark points
Installation
From source
git clone https://github.com/yhchoi-data/medcore.git
cd medcore
pip install .
From source (developer mode)
git clone https://github.com/yhchoi-data/medcore.git
cd medcore
pip install -e ".[dev]"
From pypi [to be updated]
pip install medcore
Optional: DICOM to NIfTI conversion with dcm2niix
medcore.io.convert_dicom_to_nifti uses the external dcm2niix executable.
Install it separately when you need dcm2niix-based DICOM to NIfTI conversion:
conda install -c conda-forge dcm2niix
After installation, make sure the executable is available in your shell or notebook kernel:
dcm2niix -h
Quick start
from medcore.io import ImageReader, convert_dicom_to_nifti
from medcore.utils import (
sitk_get_array,
sitk_write_nii,
sitk_read_labelfiles,
)
from medcore.detect import UmbilicusPredictor, UmbilicusDetector
from medcore.segment import TorsoSegmenter, AbdomenSegmenter
from medcore.feature import compute_label_volumes, extract_patches_from_image
Package usage
# IO
from medcore.io import ImageReader
# Utility functions
from medcore.utils import sitk_resampler, figure_overlay_label_on_slices
# Detection / segmentation
from medcore.detect import UmbilicusPredictor
from medcore.segment import TorsoSegmenter
# Feature extraction
from medcore.feature import compute_label_areas, compute_label_volumes
Documentation
Detailed examples are in USAGE.md.
Developer workflow
pre-commit run --all-files
On the first run, some hooks may show Failed because they automatically fix files such as trailing whitespace or formatting. That is normal. Run pre-commit run --all-files once more and it should pass after the auto-fixes are applied.
Metadata
Release files for medcore 1.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| medcore-1.6.0.tar.gz | 68.5 kB | Without provenance | Details for medcore-1.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| medcore-1.6.0-py3-none-any.whl | Python 3 | none | any | Details for medcore-1.6.0-py3-none-any.whl |
Total release size: 133.7 kB
Release files / medcore-1.6.0.tar.gz
| Download URL | medcore-1.6.0.tar.gz |
|---|---|
| Size | 68.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd43d53460632bde24efd513cb614f54e89622927006b3484dd187c5d97af072
|
|
BLAKE2b-256 checksum How to use checksums |
f1ec452a2a5e46830d843cafcb8ac9a4ca1524153ff5b37092e638b73368a996
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / medcore-1.6.0-py3-none-any.whl
| Download URL | medcore-1.6.0-py3-none-any.whl |
|---|---|
| Size | 65.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a2d3ac99311dd7fbc0b481bf5248c63dc2d6e5b4072322ba5f1024b2c9882b8a
|
|
BLAKE2b-256 checksum How to use checksums |
cb2f3d5e95532624b0be1c30c8b03d01ffd4951a727ea340c28524fcac71c4a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for medcore 1.6.0
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.