Skip to content

Texture calculation

Aditi Iyer edited this page Feb 3, 2023 · 45 revisions

Introduction

Patch-wise texture features are derived from the local neighborhoods around each voxel in an image. The resulting "filtered" image can be used for radiomics feature extraction, image segmentation etc. CERR supports the following categories of textures:

Rotational invariance

CERR also supports rotation-invariant filtering by pooling filter responses computed on rotated versions of the input image. This includes 4 right-angle rotations in 2D or 24 right-angle rotations in 3D. In addition to the filter-specific settings linked to above, the following is used for rotation invariant implementation:

rotS = paramS.RotationInvariance.val

Where rotS is a dictionary with fields:
rotS.Dim : '2d' or '3d'
rotS.AggregationMethod : 'max', 'avg', or 'std'

Or for JSON-format input

"imageType": {  
               "<filter_name>": {
                                  "<parameter_name": "value",
                                        
                                   "RotationInvariance": {
				       			      "Dim": "<dim>",
				       			      "AggregationMethod": "<method>"
				                          }
                                   
                                }
             }

Computing texture maps

Graphical interface

The texture browser GUI operates on scans and segmentations available in the CERR archive. It be accessed from Scan --> Texture Browser.

Graphical user interface to select supported pre-processing filters/textures and define associated parameters. Eg.: 3-D wavelets filter.

Sample code

planC = generateTextureMapFromPlanC(planC,scanNum,strNum,configFilePath)

where strNum maybe the index of a structure in planC or a binary mask (3D). In the latter case, the associated scan index should be passed through scanNum. If the structure index is provided, scanNum should be left empty ([]). configFilePath is the path to the JSON file specifying filter types & associated parameters.

The JSON settings file is parsed to produce a parameter dictionary paramS:

paramS = getRadiomicsParamTemplate(configFilePath);

JSON configurations are described in Global-radiomics-feature-calculation-parameters.

Examples

global planC
indexS = planC{end};
scanNum = 1;
structNum = 5;

% Wavelets
fType = 'Wavelets'
paramS.Wavelets.val = 'coif';
paramS.Index.val = 1;
paramS.Direction.val = 'HLH';
planC = generateTextureMapFromPlanC(planC,scanNum,strNum,paramS);

%Haralick
fType = 'HaralickCooccurance';
paramS.NumLevels.val = 64;
paramS.PatchSize.val = [2 2 0];   %2D
paramS.Directionality.val = 2;    
paramS.Type.val = 'All';
planC = generateTextureMapFromPlanC(planC,scanNum,strNum,paramS);

%First-order statistics
fType = 'FirstOrderStatistics';
[xUnifV, yUnifV, zUnifV] = getUniformScanXYZVals(planC{indexS.scan}(scanNum));
pixelSpacingXi = abs(xUnifV(2)-xUnifV(1));
pixelSpacingYi = abs(yUnifV(2)-yUnifV(1));
pixelSpacingZi = abs(zUnifV(2)-zUnifV(1));
voxelVol = pixelSpacingXi*pixelSpacingYi*pixelSpacingZi;
paramS.PatchSize.val = [2,2,2];
paramS.VoxelVolume.val = voxelVol; 
planC = generateTextureMapFromPlanC(planC,scanNum,strNum,paramS);

Citation

  • 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.
  • 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
Clone this wiki locally