Pictologics
Pictologics is a Python library for radiomic feature extraction from medical images. It follows IBSI 1 (the features) and IBSI 2 (the filters), and it checks its results against the IBSI reference values.
Documentation (user guide, tutorials, API, benchmarks): https://martonkolossvary.github.io/pictologics/
Why Pictologics?
- 🚀 Fast: Numba compiles the computations for your computer, and they run on its fast cores. The Benchmarks page gives the time of each part.
- ✅ IBSI compliant: checked against the IBSI phantoms and data sets:
- IBSI 1 (features): 675 feature values pass; 21 more have a reference value without a tolerance (report).
- IBSI 2 Phase 1 (filters): 28 of 28 compared tests pass (report).
- IBSI 2 Phase 2 (filtered features): 9 of 9 tests pass (report).
- IBSI 2 Phase 3 (reproducibility): 153 scans, compared with 9 teams (report).
- 🔧 Versatile: reads NIfTI, NRRD, MetaImage and DICOM images, DICOM SEG, DICOM RTSTRUCT and 3D Slicer segmentations, and DICOM SR reports.
- ✨ Easy to use: pip installs it. One pipeline runs the preprocessing and the features, for one image or for a whole study.
- 🛡️ Predictable results: each configuration gives all its feature columns, also when a step fails (the values are then
NaN). A study table never has missing columns. - 🛠️ Maintained: Pictologics is developed to give robust radiomic features that describe the morphology of diseases on radiological images.
What Is New in 1.0.0
Pictologics 1.0.0 is the first stable release. The code, the tests and the developer scripts are cleaned of old comments and dead code; the API does not change.
- Pipeline: a large float64 image is cut to the ROI region at the start of each configuration that reads only that region: on a 512×512×200 CT, a lesion run with outlier filtering, resegmentation and FBN takes 0.14 of the time, and
run_roiswith 20 ROIs 0.04. Agrow_maskstep withnearest_roiinrun_roisreads only the box of the grown mask (0.12 s instead of 2.3 s for 20 ROIs).run_batchwrites each case record in one JSON pass. - Morphology: the surface area and the volume come from the corner cases of the marching cubes, without the mesh (0.53 to 0.71 of the time on cubes, the volume exact to rounding); the hull candidates take fewer sorts; the MVEE keeps the Mahalanobis value of each hull point (0.60 of the morphology time for a CT lesion).
- Textures: the NGTDM features come from one compiled kernel (1.7 µs instead of 19 µs a call); the GLCM sums the upper triangle; the zone fill checks only the later neighbours of a seed; the NGLDM counts in one vectorized loop; the threaded distance map and grey-level volume write every voxel in the threads.
- Intensity: the first-order family takes the mean, the minimum, the maximum and the energy from one pass (0.53 of the time for 20 million values); the IVH counts whole values with no copy (0.42 to 0.63 of the time); Moran's I and Geary's C keep only the folded quarter of the kernel spectrum.
- Filters: the Laws and wavelet rotation-invariant averages add in compiled kernels in threads (0.63 to 0.84 of the time); the FFT filters with a non-periodic boundary cut the padded border after each axis (0.83 to 0.89 of the memory or time).
- Files:
save_imagewrites int16 and uint16 images in 0.1 of the time; a.seg.nrrdlayer loads in 0.69 of the time;load_and_merge_imagesmerges stored-type masks with no relabelled copy (0.30 of the time); a single-file PET in SUV scales in place;load_segcopies only the slices of each segment. - Preprocessing:
discretise_imagewith a bool mask finds the ROI range in one pass (0.29 of the time);keep_largest_componentcounts its components in threads (0.72 of the time, 0.46 of the memory). - Fixes: a one-voxel image gives the texture features of a one-voxel ROI; a SEG with dimension index values from 0 loads its first frame into the first slice; information correlation 2 of a GLCM with independent grey levels is 0, not NaN; the IVH volume fractions keep a given range end (IBSI 4.3); the threaded level count handles infinite and huge values as the one-thread count does; the warm-up runs on two threads when one thread is set after numba started.
- Changes: the
resegmentandfilter_outlierssteps change the intensity mask only by default, as IBSI re-segmentation does (giveapply_to: bothfor the old behaviour; thelvandcoronarytemplates do). The IBSI compliance is the same. See the Changelog.
Installation
Pictologics needs Python 3.12, 3.13 or 3.14.
pip install pictologics
From the source code:
git clone https://github.com/martonkolossvary/pictologics.git
cd pictologics
pip install .
Quick Start
from pictologics import RadiomicsPipeline, format_results, save_results
# 1. A pipeline with the six standard configurations
pipeline = RadiomicsPipeline()
# 2. Run the configurations on an image and its mask
results = pipeline.run(
image="path/to/ct.nii.gz",
mask="path/to/mask.nii.gz",
subject_id="Subject_001",
config_names=["all_standard"], # the FBS configurations start at -1000 HU, for CT
)
# 3. One table row, with your own columns first
row = format_results(results, fmt="wide", meta={"subject_id": "Subject_001", "group": "control"})
# 4. Save the row to a CSV file
save_results([row], "results.csv")
For MR or PET images, use the FBN configurations (config_names=["standard_fbn_32"]) or your own. See the Quick Start and the Cookbook.
Performance Benchmarks
| Task | Size | Time (median) |
|---|---|---|
| run(): one standard configuration (standard_fbn_32) | CT of 512 × 512 × 200 | 8.6 ms |
| run(): the 6 standard configurations | CT of 512 × 512 × 200 | 29.0 ms |
| Texture (all 6 families) | 2,311,384 ROI voxels | 17.2 ms |
| Morphology | 2,311,384 ROI voxels | 2.3 ms |
| LoG (sigma 2 mm) | 256³ voxels | 38.8 ms |
| Gabor (axial, rotation invariant) | 256³ voxels | 53.5 ms |
The median of 5 runs on one computer, after a warm-up run. See the benchmark page for all results, plots and the computer.
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
If you use Pictologics in your research, please cite it (GitHub shows the same citation from CITATION.cff):
Kolossváry M. Pictologics: IBSI-compliant radiomic feature extraction (version 1.0.0). 2026. https://github.com/martonkolossvary/pictologics
License
Apache-2.0
Metadata
Release files for pictologics 1.0.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 |
|---|---|---|---|---|
| pictologics-1.0.0.tar.gz | 376.6 kB | With provenance | Details for pictologics-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pictologics-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for pictologics-1.0.0-py3-none-any.whl |
Total release size: 778.5 kB
Release files / pictologics-1.0.0.tar.gz
| Download URL | pictologics-1.0.0.tar.gz |
|---|---|
| Size | 376.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e4e9523258fe2679b7145ed253146d042970f4270f3e81336529e79ccc88c41
|
|
BLAKE2b-256 checksum How to use checksums |
aba64c3e42482e941906e694b2bd8a59727694fc55d87278ff9d90e74a03f7fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logRelease files / pictologics-1.0.0-py3-none-any.whl
| Download URL | pictologics-1.0.0-py3-none-any.whl |
|---|---|
| Size | 401.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68f1e48b7a56941b71d2e52336dfd72374503b4f8dd6a68979a2842e13ec1cfc
|
|
BLAKE2b-256 checksum How to use checksums |
6a7b87d7ee6e9672353839c4bcac208175bfe99e6d04cbb726e62a75002ff061
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logSecurity for pictologics 1.0.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pictologics-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.
Transparency logA 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.