Skip to content


Aditi Iyer edited this page Feb 6, 2023 · 19 revisions
Clone this wiki locally


Radiomics involves extracting scalar features from an image within the region of interest (anaotmical structure). This typically involves accumulating contributions from all the voxels within the region of interest; for example the mean of intensities from all the voxels. Radiomic features can be computed from the original or texture (pre-processed) images. Radiomic & texture features are defined in accordance with the IBSI guidelines.


Use cases

Extracting radiomics for a single image and ROI:

The following demonstrates extraction of radiomic features beginning with CERR's planC format. The parameters used for feature calculation are passed via a JSON format settings file.

% Settings file in JSON format
paramFileName = fullfile(getCERRPath,'ModelImplementationLibrary',...

% planC object to load from file
planCFile = fullfile(getCERRPath,'..','Unit_Testing','data_for_cerr_tests',...

% Structure name to extract radiomics
strName = 'Target 1';

% Path/name of CSV file to write extracted features
csvFile = 'test_radiomics_features.csv';

% Load planC
planC = loadPlanC(planCFile,tempdir);
planC = updatePlanFields(planC);
planC = quality_assure_planC(planCFile, planC);

% Obtain settings
paramS = getRadiomicsParamTemplate(paramFileName);

% Find matching structure index in planC
indexS = planC{end};
strC = {planC{indexS.structures}.structureName};
structNum = getMatchingIndex(strName,strC,'exact');
scanNum = getStructureAssociatedScan(structNum,planC);

% Call feature calculator
featS = calcGlobalRadiomicsFeatures(scanNum, structNum, paramS, planC);

% Write to CSV

Extracting radiomics for a patient cohort:

This example demonstrates the use of batchExtractRadiomics wrapper function to batch extract radiomics for a patient cohort. The anatomical structure for which features are extracted must be consistently named across the entire cohort and defined in the extraction settings file. If structure is not consistent named, structurte index can be specified via strFileMapC as shown below.

% Directory containing CERR files
dirName = fullfile(getCERRPath,'..','Unit_Testing','data_for_cerr_tests',...
% Settings file containing radiomics settings 
paramFileName = fullfile(getCERRPath,'ModelImplementationLibrary',...

% File path/name to write the extracted features
csvFile = 'test_batch_radiomics_features.csv';

% Specify structure index per planC file if structure name is not consistent across the patient cohort.
strFileMapC(1,1:2) = {'head_neck_ex1_20may03.mat.bz2',11};
strFileMapC(2,1:2) = {'lung_ex1_20may03',3};
strFileMapC(3,1:2) = {'prostex_9may03',4};

% Call batch feature calculator
featureS = batchExtractRadiomics(dirName,paramFileName,strFileMapC); 
% Note: `strFileMapC` is not required if the structure is consistently named and passed instead via JSON

% Write batch to CSV
numIds = length(featureS);
idC = cell(numIds,1);
for iFile = 1:numIds
    [~,idC{iFile}] = fileparts(featureS(iFile).fileName);

Obtaining scan intensities for the patient cohort:

It is often useful to extract image intensities within the ROI to set the optimal number of discretization levels for feature calculation. This example demonstrates obtaining the scan values from each and every voxel within the region of interest for the cohort of patients.

Benchmarking radiomics calculation

CERR's radiomics implementation is benchmarked with IBSI, ITK and Pyradiomics.

Citing CERR radiomics:

  • Apte AP, Iyer A, Crispin-Ortuzar M, Pandya R, V.van Dijk L, Spezi E, Thor M, Um H, Veeraraghavan H, Oh JH, Shukla-Dave A, Deasy JO (2018). Technical Note: Extension of CERR for computational radiomics: a comprehensive MATLAB platform for reproducible radiomics research, Med. Phys., 45 (8), pp. 3713–3720, August 2018. PMID: 29896896
  • Iyer, A., E. LoCastro, H. Veeraraghavan, J. Deasy, and A. Apte (2022). IBSI-Compatible Convolutional Image Texture Filters in CERR, Med. Phys. 49 (6), pp. E686.