Radiomics features¶
pydcm.radiomics computes IBSI radiomic features over an ROI — 7 feature
classes (firstorder, glcm, glrlm, glszm, gldm, ngtdm, shape), with
standard radiomics feature names and validated against published baselines
(104 features).
From a DICOM image + mask¶
from pydcm.radiomics import radiomics
feats = radiomics("ct.dcm", mask="mask.dcm") # pixels → HU, spacing from geometry
feats["original_firstorder_Mean"]
feats["original_shape_VoxelVolume"]
feats["original_glcm_Contrast"]
Pixels are decoded to real-world values (HU) and the spacing is read from the image geometry (PixelSpacing / SliceThickness), so the feature values are in physical units without any manual setup.
From arrays¶
Binning and preprocessing knobs¶
The same surface as the dcmradiomics CLI:
feats = radiomics(
"ct.dcm", mask="mask.dcm",
bins=32, # fixed bin count …
bin_width=25.0, # … or a fixed bin width (mutually exclusive)
value_range=(-1024.0, 3071.0),
resample=1.0, # isotropic resample (mm) before extraction
normalize=False,
wavelet=False, log_sigma=None, # optional image-filter families
)
Extractor object API¶
For code that expects the familiar extractor object, that API is available too: