Skip to main content

IBSI-compliant radiomic feature extraction package

Project description

Pictologics

Pictologics logo

CI Docs PyPI Python Downloads License codecov Ruff Mypy

Pictologics is a high-performance, IBSI-compliant Python library for radiomic feature extraction from medical images (NIfTI, DICOM).

Documentation (User Guide, API, Benchmarks): https://martonkolossvary.github.io/pictologics/

Why Pictologics?

  • 🚀 High Performance: Uses numba for Just In Time (JIT) compilation, achieving significant speedups over other libraries (speedups between 15-300x compared to pyradiomics, see Benchmarks page for details).
  • ✅ IBSI Compliant: Implements standard algorithms verified against the IBSI digital and CT phantoms, and clinical datasets:
  • 🔧 Versatile: Provides utilities for DICOM parsing and common scientific image processing tasks. Natively supports common image formats (NIfTI, DICOM, DICOM-SEG, DICOM-SR).
  • ✨ User-Friendly: Pure Python implementation with a simple installation process and user-friendly pipeline module supporting easy feature extraction and analysis, ensuring a smooth experience from setup to analysis.
  • 🛠️ Actively Maintained: Continuously maintained and developed with the intention to provide robust latent radiomic features that can reliably describe morphological characteristics of diseases on radiological images.

Installation

Pictologics requires Python 3.12+.

pip install pictologics

Or install from source:

git clone https://github.com/martonkolossvary/pictologics.git
cd pictologics
pip install .

Quick Start

from pictologics import RadiomicsPipeline, format_results, save_results

# 1. Initialize the pipeline
pipeline = RadiomicsPipeline()

# 2. Run the "all_standard" configurations
results = pipeline.run(
    image="path/to/image.nii.gz",
    mask="path/to/mask.nii.gz",
    subject_id="Subject_001",
    config_names=["all_standard"]
)

# 3. Inject subject ID or other metadata directly into the row
row = format_results(
    results, 
    fmt="wide", 
    meta={"subject_id": "Subject_001", "group": "control"}
)

# 4. Save to CSV
save_results([row], "results.csv")

Performance Benchmarks

Benchmark Configuration

Comparisons between Pictologics and PyRadiomics (single-thread parity).

[!TIP] Detailed performance tables and extra feature (IVH, local intensity, GLDZM, etc.) measurements available in the Benchmarks Documentation.

Test Data Generation:

  • Texture: 3D correlated noise generated using Gaussian smoothing.
  • Mask: Blob-like structures generated via thresholded smooth noise with random holes.
  • Voxel Distribution: Mean=486.04, Std=90.24, Min=0.00, Max=1000.00.

HARDWARE USED FOR CALCULATIONS

  • Hardware: Apple M4 Pro, 14 cores, 48 GB
  • OS: macOS 26.2 (arm64)
  • Python: 3.12.10
  • Core deps: pictologics 0.3.3, numpy 2.2.6, scipy 1.17.0, numba 0.62.1, pandas 2.3.3, matplotlib 3.10.7
  • PyRadiomics stack (parity runs): pyradiomics 3.1.1.dev111+g8ed579383, SimpleITK 2.5.3
  • BLAS/LAPACK: Apple Accelerate (from numpy.show_config())

Note: the benchmark script explicitly calls warmup_jit() before timing to avoid including Numba compilation overhead in the measured runtimes. Timing and memory measurement are separated — tracemalloc is NOT active during timing to avoid biasing the comparison (its per-allocation hooks penalise pure-Python code more than JIT/C code). All calculations are repeated 5 times and the mean runtime is reported; peak memory is measured once separately.

Intensity

Execution Time (Log-Log) Speedup
Intensity time Intensity speedup

Morphology

Execution Time (Log-Log) Speedup
Morphology time Morphology speedup

Texture

Execution Time (Log-Log) Speedup
Texture time Texture speedup

Filters

Execution Time (Log-Log) Speedup
Filters time Filters speedup

Quality & Compliance

IBSI Compliance: IBSI 1 Features | IBSI 2 Phase 1 Filters | Phase 2 Features | Phase 3 Reproducibility

Code Health

  • Test Coverage: 100.00%
  • Mypy Errors: 0
  • Ruff Issues: 0

See Quality Report for full details.

Citation

Citation information will be added/updated.

License

Apache-2.0

Project details


Download files

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

Source Distribution

pictologics-0.3.3.tar.gz (129.5 kB view details)

Uploaded Source

Built Distribution

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

pictologics-0.3.3-py3-none-any.whl (146.2 kB view details)

Uploaded Python 3

File details

Details for the file pictologics-0.3.3.tar.gz.

File metadata

  • Download URL: pictologics-0.3.3.tar.gz
  • Upload date:
  • Size: 129.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pictologics-0.3.3.tar.gz
Algorithm Hash digest
SHA256 2924dcfb061356961dc8be36feaf386c1e355e0ded0266d7a08e86428b8a6079
MD5 7b40ff9d0681376a21028c3c5b6d6bfc
BLAKE2b-256 418fd0c61a87332f8c42d18471c4a0c988285707d999e6a6a7551631d1f5b2e4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pictologics-0.3.3.tar.gz:

Publisher: publish-pypi.yml on martonkolossvary/pictologics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pictologics-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: pictologics-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 146.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pictologics-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 474e29e47b8df47526a8f77dff665f6ae5b549c99e1ec11ee668f5b116260662
MD5 2b454b38f13cab7633c9134b142e1cc3
BLAKE2b-256 7eb261c6a42552fc9abf63d30be0e33588c9179ef82b9776f7466fa25cd922b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pictologics-0.3.3-py3-none-any.whl:

Publisher: publish-pypi.yml on martonkolossvary/pictologics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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