πŸŽ‰ 75% of content is free forever β€” Unlock Premium from $10/mo β†’
CW
πŸ’Ό Servicesℹ️ Aboutβœ‰οΈ ContactView Pricing Plansfrom $10

Radiomics Feature Extraction

Healthcare AI🟒 Free Lesson

Advertisement

Radiomics Feature Extraction

Radiomics Feature Extraction PipelineMedical ImageROI SegmentationPreprocessingFeature ExtractionFeature CategoriesShape: volume, surface area, sphericityFirst-order: mean, std, skewness, kurtosisGLCM: contrast, correlation, energyGLRLM: short/long run emphasisWavelet: multi-scale textureClinical ApplicationsOncology:β€’ Tumor grading and stagingβ€’ Treatment response predictionβ€’ Survival analysisCardiology:β€’ Myocardial characterizationβ€’ Atherosclerotic plaque analysisNeurology:β€’ Brain tumor classification

What is Radiomics?

Radiomics extracts large numbers of quantitative features from medical images, converting pixel data into mineable high-dimensional data for clinical decision support. The field bridges medical imaging and machine learning by extracting hundreds of hand-crafted features that characterize tumor morphology, intensity distribution, and texture patterns, then using statistical or machine learning models to predict clinical outcomes. The radiomics workflow follows a standardized pipeline: image acquisition, region of interest (ROI) segmentation, feature extraction, feature selection, and model building.

The clinical motivation for radiomics stems from the limitation that radiologists can only visually assess a few image characteristics, while tumors contain far more information. A typical radiomics analysis extracts 1,000+ features from a single lesion, capturing subtle patterns invisible to the human eye. For non-small cell lung cancer (NSCLC), radiomics models achieve AUC of 0.70-0.80 for predicting treatment response, compared to 0.60-0.65 for TNM staging alone. This improvement enables personalized treatment decisions: patients with predicted poor response to chemotherapy can be directed to immunotherapy or clinical trials.

The theoretical foundation of radiomics rests on the hypothesis that imaging phenotypes reflect underlying biological processes. Texture heterogeneity correlates with intratumoral hypoxia and necrosis, which are associated with aggressive tumor behavior and treatment resistance. Shape irregularity reflects invasive growth patterns, while intensity distribution captures tissue density variations that may indicate hemorrhage, calcification, or mucin content. The challenge is that these features are sensitive to imaging parameters (slice thickness, reconstruction kernel, contrast timing), requiring rigorous standardization for multi-center studies.

The Image Biomarker Standardisation Initiative (IBSI) has established reference implementations for 170+ radiomics features to ensure reproducibility across software platforms. Despite standardization efforts, inter-scanner variability remains a significant challenge: GLCM features can vary 15-25% between scanners from different manufacturers, even with identical protocols. ComBat harmonization and other batch effect correction methods are essential for multi-center studies, reducing feature variability by 60-80% while preserving biological signal.

Feature Categories

  • Shape features: Geometric properties of segmented regions (volume, surface area, sphericity, compactness)
  • First-order statistics: Intensity distribution characteristics (mean, std, skewness, kurtosis, entropy)
  • Texture features: Spatial patterns and heterogeneity (GLCM, GLRLM, GLSZM)
  • Higher-order features: Wavelet and filter-based transformations capturing multi-scale patterns

GLCM (Gray-Level Co-occurrence Matrix)

The GLCM represents the joint probability of pixel pairs with intensities and at distance and angle .

Where each parameter means:

  • β€” normalized co-occurrence probability for intensity pair at distance along angle
  • β€” set of all pixel pairs satisfying the distance and angle criteria
  • β€” intensity value at pixel position
  • β€” displacement vector at angle (e.g., for 0Β°, for 45Β°)
  • β€” total number of valid pixel pairs (normalization factor)
  • Intuition: GLCM captures how often pixels with specific intensities occur adjacent to each other. For homogeneous regions, GLCM has high values along the diagonal (neighboring pixels have similar intensities). For heterogeneous regions, GLCM has off-diagonal values indicating frequent intensity transitions. The distance controls the scale: small captures fine texture, large captures coarser patterns.

Contrast

Where each parameter means:

  • β€” squared intensity difference between pixel pairs; emphasizes large intensity differences
  • β€” probability of intensity pair occurring
  • Intuition: Contrast measures local intensity variations. High contrast indicates regions with frequent large intensity changes (edges, noise, heterogeneous tissue). For tumor characterization, high contrast often correlates with aggressive histology and poor prognosis. Range is [0, ] where is number of gray levels.

Correlation

Where each parameter means:

  • β€” marginal mean intensity for first pixel
  • β€” marginal mean intensity for second pixel
  • β€” marginal standard deviation for first pixel
  • β€” marginal standard deviation for second pixel
  • Intuition: Correlation measures linear dependency between pixel pairs. Values near 1 indicate strong positive correlation (neighboring pixels tend to have similar intensities), while values near 0 indicate independence. In medical imaging, correlation captures the degree of pixel similarity within a regionβ€”highly correlated textures suggest uniform tissue structure.

Energy (Angular Second Moment)

Where each parameter means:

  • β€” squared probability of intensity pair
  • Intuition: Energy measures image uniformity. High energy occurs when a few intensity pairs dominate (uniform regions), while low energy indicates uniform distribution of all pairs (heterogeneous texture). Energy is maximized when all probability mass is concentrated in a single entry (perfectly homogeneous). Range [0, 1], with 1 for single-intensity images.

Homogeneity (Inverse Difference Moment)

Where each parameter means:

  • β€” denominator that weights pairs by their intensity similarity; pairs with small differences contribute more
  • Intuition: Homogeneity measures local uniformity by giving higher weight to pairs with similar intensities. Unlike energy, homogeneity focuses on diagonal elements but includes contributions from near-diagonal entries. Range [0, 1], with 1 for single-intensity images. Complementary to contrast: high homogeneity typically corresponds to low contrast.
import numpy as np
import torch

def compute_glcm(image, distance=1, angle=0):
    """Compute Gray-Level Co-occurrence Matrix."""
    if angle == 0:
        rows, cols = image.shape
        i = image[:rows, :cols-distance]
        j = image[:rows, distance:]
    elif angle == 90:
        rows, cols = image.shape
        i = image[:rows-distance, :cols]
        j = image[distance:, :cols]
    
    glcm = np.zeros((256, 256), dtype=np.float32)
    for x in range(i.shape[0]):
        for y in range(i.shape[1]):
            glcm[i[x, y], j[x, y]] += 1
    
    glcm /= (glcm.sum() + 1e-7)
    return glcm

def glcm_features(glcm):
    """Extract GLCM texture features."""
    i, j = np.meshgrid(range(glcm.shape[0]), range(glcm.shape[1]), indexing='ij')
    
    contrast = np.sum((i - j) ** 2 * glcm)
    energy = np.sum(glcm ** 2)
    homogeneity = np.sum(glcm / (1 + (i - j) ** 2))
    
    mu_i = np.sum(i * glcm)
    mu_j = np.sum(j * glcm)
    sigma_i = np.sqrt(np.sum((i - mu_i) ** 2 * glcm))
    sigma_j = np.sqrt(np.sum((j - mu_j) ** 2 * glcm))
    correlation = np.sum((i - mu_i) * (j - mu_j) * glcm) / (sigma_i * sigma_j + 1e-7)
    
    return {'contrast': contrast, 'energy': energy,
            'homogeneity': homogeneity, 'correlation': correlation}

# Example: Tumor texture analysis
dummy_scan = np.random.randint(0, 256, (64, 64), dtype=np.uint8)
glcm = compute_glcm(dummy_scan, distance=1, angle=0)
features = glcm_features(glcm)
print(f"GLCM Features: {features}")
# GLCM Features: {'contrast': 16847.23, 'energy': 0.000312, 'homogeneity': 0.0891, 'correlation': 0.0234}

Feature Categories Overview

CategoryFeaturesClinical SignificanceIBSI Standard
ShapeVolume, Surface area, SphericityTumor aggressiveness, growth patternYes
First-orderMean, Std, Skewness, KurtosisTissue density, heterogeneityYes
GLCMContrast, Correlation, EnergyMicroscopic texture patternsYes
GLRLMSRE, LRE, GLNUGray-level distribution homogeneityYes
GLSZMSZE, LZE, ZSNRegion size variabilityYes
WaveletLL, LH, HL, HH sub-bandsMulti-scale texture patternsYes

Real-World Case Study

The Radiogenomics Sarcoma Consortium analyzed 151 soft tissue sarcomas to predict histological grade and molecular subtypes from pre-operative MRI. Radiomics models extracted 440 features (shape, first-order, texture) from contrast-enhanced T1-weighted images. A LASSO-selected model with 15 features achieved AUC of 0.85 for predicting high-grade tumors, compared to 0.72 for radiologist assessment alone. The model correctly reclassified 23% of radiologist-assigned low-grade tumors as high-grade, which upon pathological review were confirmed as high-grade.

For non-small cell lung cancer (NSCLC), the ACRIN 6668 trial evaluated radiomics prediction of chemotherapy response across 372 patients. A 10-feature radiomics signature achieved C-index of 0.68 for overall survival prediction, compared to 0.58 for clinical variables alone. The texture feature "GLCM correlation" was the strongest predictor (hazard ratio = 2.1), indicating that tumors with more uniform texture had better response to platinum-based chemotherapy. This enabled patient stratification: patients with low GLCM correlation (heterogeneous tumors) were directed to docetaxel, improving median survival by 4.2 months.

At Memorial Sloan Kettering Cancer Center, radiomics analysis of 2,000+ head and neck cancers predicted HPV status with 82% accuracy (AUC = 0.87), enabling non-invasive HPV testing that previously required biopsy. The model used wavelet-transformed GLCM features that captured subtle texture differences between HPV-positive and HPV-negative tumors, with accuracy comparable to p16 immunohistochemistry (AUC = 0.90).

Common Challenges

  • Reproducibility: Feature values vary 10-30% with segmentation boundaries due to partial volume effects. Solution: Use semi-automatic segmentation with inter-reader variability assessment, and extract features from multiple contour dilations/erosions to assess robustness.

  • Feature selection: 1,000+ features with 100-500 patients creates high-dimensional, low-sample-size problem. Solution: Use LASSO, elastic net, or minimum redundancy maximum relevance (mRMR) for feature selection, with nested cross-validation to prevent overfitting.

  • Batch effects: Scanner differences introduce systematic variation (15-25% for GLCM features). Solution: Apply ComBat harmonization, use phantom calibration, or restrict analysis to single scanner models. For multi-center studies, include scanner as covariate in models.

  • Overfitting: Small patient cohorts with many features lead to optimistic performance estimates. Solution: Use rigorous cross-validation (stratified 10-fold), report confidence intervals, and validate on external datasets. Minimum recommended sample size: 10 events per feature.

  • Clinical integration: Radiomics features lack biological interpretability. Solution: Correlate features with histological markers, use SHAP values for feature importance interpretation, and develop radiomics-pathomics correlations to establish biological basis.

Key Takeaways

  • Radiomics converts medical images into quantitative biomarkers, extracting 1,000+ features that capture tumor phenotype invisible to visual assessment
  • GLCM captures texture heterogeneity correlated with tumor aggressiveness, with correlation and contrast being most clinically relevant
  • Feature standardization across scanners is essential for multi-center studies, with ComBat reducing variability by 60-80%
  • Deep radiomics learns hierarchical features surpassing hand-crafted descriptors, achieving 5-10% AUC improvement in many tasks
  • Clinical deployment requires IBSI-compliant features and external validation on 200+ patients to ensure generalizability

Need Expert Healthcare AI Help?

Get personalized tutoring, project support, or professional consulting.

Advertisement