A Voxel-Spacing-Aware Extension of PyRadiomics for Anisotropic Texture Analysis
Organizations: Department of Radiology, Complejo Asistencial Universitario de León, León, Spain · Department of Radiology, Hospital Universitario Rey Juan Carlos, Móstoles, Madrid, Spain · Health Research Institute of the Jiménez Díaz Foundation, IIS-FJD, Madrid, Spain · Department of Physical Therapy, Occupational Therapy, Rehabilitation and Physical Medicine, Rey Juan Carlos University, Madrid, Spain · Department of Morphology and Cell Biology, Grupo SINPOS, Universidad de Oviedo, Oviedo, Spain · Universidad de Oviedo, Oviedo, Spain · Advanced Computing and e-Science Group, IFCA-CSIC, Santander, Spain · Facultad de Ciencias de la Salud, Universidad Autónoma de Chile, Providencia-Santiago, Chile
Abstract
Radiomic texture features are commonly extracted from anisotropic CT and MRI acquisitions, where identical voxel offsets may represent different physical distances. We implemented and validated a voxel-spacing-aware extension of PyRadiomics that incorporates spacing information without generating interpolated gray levels. The framework operates across the Python frontend, C wrapper, and computational backend. GLCM uses anisotropy-relative feature-level angular aggregation, NGTDM uses anisotropy-relative weighted neighborhood averaging, and GLRLM, GLDM, and GLSZM are computed on a finite-volume zero-order-hold representation derived from the native anisotropic grid. Synthetic 3D phantoms were used for software validation. The modified implementation reproduced standard PyRadiomics exactly when spacing-aware mode was disabled and remained equivalent under isotropic spacing across 75 texture features. Under anisotropic spacing, the method selectively modified texture families and was numerically distinct from nearest-neighbor, linear, and B-spline resampling. Computational profiling showed moderate runtime and memory increases, while sensitivity analyses quantified finite-volume rounding effects and confirmed that spacing-aware differences persisted across binWidth settings. The framework provides a backward-compatible technical basis for future evaluation of spacing-aware radiomics in heterogeneous medical imaging datasets.
Figures & tables
| Feature family | Modification level | Use of spacing | Interpretation |
|---|---|---|---|
| GLCM | Feature-level angular aggregation | Anisotropy-relative weights | Directional GLCMs are preserved and weighted after feature computation. |
| GLRLM | Finite-volume matrix construction | Zero-order-hold isotropic subcells | Run lengths remain integer counts on the expanded physical lattice. |
| NGTDM | Descriptor computation | Anisotropy-relative weighted neighborhood mean | Neighborhood averaging becomes spacing-aware. |
| GLDM | Finite-volume matrix construction | Zero-order-hold isotropic subcells | Dependence size remains integer-valued on the expanded physical lattice. |
| GLSZM | Finite-volume matrix construction | Zero-order-hold isotropic subcells | Standard connected-zone rules are applied while zone size counts isotropic subcells. |
| Shape | No new modification | Already supported | PyRadiomics already uses voxel spacing. |
| Validation component | Evaluated data | Main metric | Result |
|---|---|---|---|
| Upstream regression suite | 3568 tests | Passed tests | 3568/3568 |
| Default compatibility | 75 features | Mean/max absolute difference | 0 / 0 |
| Isotropic equivalence | 75 features | Mean/max absolute difference | 0 / 0 |
| Anisotropic activation | 75 features | Median relative difference | 10.1–49.1% |
| Rounding sensitivity | Seven spacing ratios | Representation error | to |
| Computational profiling | Three volume sizes; –7 | Maximum runtime / memory | 1.74 s / 90.55 MB |