A Voxel-Spacing-Aware Extension of PyRadiomics for Anisotropic Texture Analysis
Authors: David Corral Fontecha, Juan Miranda Bautista, Pablo Menendez Fernández-Miranda, Andrea Trapote Fernandez, Lara Lloret Iglesias, Jose A. Vega
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
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
Figure 1: Voxel-spacing-aware texture extraction strategy. GLCM and NGTDM operate on the native computational lattice using anisotropy-relative weighting, whereas GLRLM, GLDM and GLSZM are computed on a finite-volume zero-order-hold representation. In the latter families, each anisotropic voxel is represented by repeated isotropic subcells that inherit the discretized gray level of the parent voxel. This operation introduces no interpolated gray levels but changes the computational lattice on which run, dependence and zone relationships are evaluated.
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.
Table 1: Summary of spacing-aware implementation strategy by radiomic feature family.
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
−20.0% to +14.3%
Computational profiling
Three volume sizes; R=1 –7
Maximum runtime / memory
1.74 s / 90.55 MB
Table 2: Summary of synthetic software validation, finite-volume rounding, computational profiling, resampling comparisons, and discretization sensitivity.
Objective: Radiomic texture features are usually computed in voxel-index neighborhoods, implicitly assuming isotropic spatial relationships. In anisotropic images, this can confound voxel geometry with interpolation-induced signal changes. We developed a voxel-spacing-aware radiomic framework that incorporates physical geometry into texture computation without resampling. Approach: We modified PyRadiomics to account for voxel spacing while preserving the native image signal. Four configurations were compared: native non-resampled extraction (NR), isotropic resampling (RS), voxel-spacing-aware extraction (VS), and fake-isotropic preprocessing (FK), in which spacing metadata were overwritten without altering the image array. Experiments included 685 LIDC-IDRI pulmonary nodules and 209 I-SPY2 breast MRI cases, with 196 radiomic descriptors. Robustness was assessed using ICC, within-subject variability, Friedman testing, feature selection, machine learning, a multilayer perceptron, and external validation. Main results: VS showed near-native agreement with NR: median ICC(A,1) was 0.9976 in CT and 0.9984 in MRI. RS produced lower agreement and larger deviations, while FK showed intermediate behavior, confirming that spacing metadata alone can affect radiomic features. Gradient-derived and neighborhood-sensitive descriptors were most affected by preprocessing. VS preserved predictive performance comparable to NR in external CT validation, whereas MRI showed greater variability across preprocessing strategies and classifiers. Significance: Voxel-spacing-aware extraction separates geometric modeling from interpolation-induced signal modification while preserving the native image signal, offering a coherent alternative to isotropic resampling for radiomic analysis of anisotropic CT and MRI.
David Corral Fontecha, Juan Miranda Bautista, Pablo Menendez Fernández-Miranda +3
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 +5
Volumetric medical image segmentation is essential for both preoperative diagnosis and intraoperative guidance. While recent years have witnessed rapid progress in segmentation architectures, comparatively little attention is paid to the physical voxel spacing of anatomical data. Indeed, volumetric image resampling is a ubiquitous preprocessing step before segmentation, yet its interaction with downstream segmentation has not been systematically exploited. In this work, we study the correlation between image resampling and segmentation, and propose Consispace, a semantic-aware resampling framework that achieves consistent voxel spacing in the axial direction while preserving anatomical and semantic consistency. Consispace introduces an ODE-based anatomical constraint to model inter-slice dynamics with a continuous interpolator, enabling faithful reconstruction under complex anatomical transitions beyond discrete interpolation. To further couple resampling with segmentation objectives, we leverage dense features from a pretrained vision model to build intra-slice semantic correlation maps and inject class-wise semantic consistency via feature reweighting during resampling. Both intra-slice and inter-slice constraints are integrated into an implicit neural network, supporting arbitrary-scale resampling. Extensive experiments on multiple datasets demonstrate that Consispace achieves superior reconstruction quality and perceptual fidelity, produces smoother inter-slice anatomy, and improves downstream segmentation performance when used as a preprocessing step.
Xin You, Runze Yang, Minghui Zhang +6
the Institute of Medical Robotics, Shanghai Jiao Tong University, 200240 Shanghai, China · CAMPAR, Technical University of Munich, 80333 Munich, Germany · the Department of Ultrasound, Shanghai Chest Hospital, 200052 Shanghai, China
Radiomics and imaging foundation models promise non-invasive biomarkers of tumour biology, yet predictive signatures may reflect tumour volume or acquisition artifacts rather than meaningful image structure. We introduce READII-2-ROQC, an open-source framework that uses volume-preserving negative controls to assess whether radiomic and deep imaging features capture independent spatial signals. READII-2-ROQC generates voxel-perturbed images across tumour, background and whole-image regions using configurable randomization strategies, then compares feature behaviour and model performance between original and control images. Applied to three public cancer imaging cohorts, the framework processed 3,552 tumour volumes and extracted PyRadiomics and foundation-model features from original images and nine matched controls. Reproducing published survival and HPV-status signatures, we show that multiple models retain performance after spatial structure is destroyed, revealing volume-driven or contextual confounding, whereas others show perturbation-sensitive signal. READII-2-ROQC provides a scalable quality-control strategy for developing interpretable, biologically grounded imaging biomarkers and reproducible radiomics workflows.
Katy L. Scott, Sejin Kim, Joshua Siraj +6
Princess Margaret Cancer Centre University Health Network Toronto, ON · Radiation Medicine Program Princess Margaret Cancer Centre Toronto, ON