-
Notifications
You must be signed in to change notification settings - Fork 101
Texture calculation
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:
- Haralick texture
- Laws' texture
- Patch-wise first-order statistics
- Mean filter
- Wavelet filter
- Sobel filter
- Gabor filter
- Laplacian of Gaussian filter
- CoLlAGe
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.
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);
Supported settings (paramS
) for the available filters are described below:
Required
- paramS.NumLevels.val : No. gray levels
- paramS.PatchSize.val : Patch size [numRows, numCols, numSlices]
- paramS.Directionality.val : 1- 3D, 2 - 2D
- paramS.Type.val : Entropy','Energy','Sum Avg','Homogeneity','Contrast','Correlation','Cluster Shade','Cluster Promincence', 'Haralick Correlation' or 'All'
Optional parameters for image quantization:
- paramS.minIntensity.val
- paramS.maxIntensity.val
- paramS.binWidth.val
Supported wavelet types include Daybechies, Haar, Coiflets, FejerKorovkin, Symlets, Discrete meyer, Biorthogonal, and Reverse biorthogonal.
Required
- paramS.Wavelets.val : 'db','haar','coif','fk','sym','dmey','bior','rbio'
- paramS.Index.val : See wfilters.m for supported subtypes
- paramS.Direction.val : ''HHH','LHH','HLH','HHL','LLH','LHL','HLL','LLL', 'All'
- paramS.Normalize.val : 'Yes','No'
Optional
- paramS.Level.val : Decomposition levels (1,2,3,...). Default:1
- paramS.Index.val : See wfilters.m for supported subtypes
None
- paramS.Sigma_mm.val : Gaussian smoothing width in physical units (mm)
- paramS.Sigma_mm.val : Gaussian smoothing width in physical units (mm)
- paramS.Cutoff_mm.val : Filter radius in physical units (mm)
Required
- paramS.Sigma_mm.val : Gaussian smoothing width in mm
- paramS.SpatialAspectRatio.val : Elongation of Gaussian mask
- paramS.Orientation.val : Orientation in degrees (may be a vector)
- paramS.Wavlength_mm.val : Wavelength of sinusoid
Optional
- paramS.Radius_mm.val : Filter radius (default:
- paramS.OrientationAggregation.val : "average", "max", or "std". Used to aggregate responses over a range of input orientations.
- paramS.ImagePlane.val : "Axial" (default), "Sagittal" or "Coronal". Specify list of planes to approximate 3D computation.
- paramS.PlaneAggregation.val : "average", "max", or "std". Used to aggregate responses over input image planes.
- paramS.KernelSize.val : Patch size [numRows, numCols, numSlices]
- paramS.Direction.val : 1- 2D 2- 3D 3- All
- paramS.Type.val : 1- 3, 2- 5, 3- All
- paramS.Normalize.val : 'Yes', 'No'
- paramS.Direction.val : 1- 2D 2- 3D 3- All
- paramS.Type.val : 1- 3, 2- 5, 3- All
- paramS.Normalize.val : 'Yes', 'No'
- paramS.EnergyKernelSize.val : 3x1 vector specifying mean filter dimensions (set last element to 0 for 2D)
- paramS.EnergyPadMethod.val : Padding method for mean filter
- paramS.EnergyPadSize.val : 3x1 vector specifying padding dimensions for mean filter (set last element to 0 for 2D)
- paramS.Dimension.val : 1- 2D 2- 3D
- paramS.Dominant_Dir_Radius.val : Patch size [numRows, numCols, numSlices]
- paramS.Cooccur_Radius.val : Patch size [numRows, numCols, numSlices]
- paramS.Number_Gray_Levels.val : No. gray levels
Select SimpleITK filters can be applied via CERR. The path to your SimpleITK installation must be specified in CERROptions.json (sitkLibPath
).
See sitkWrapper.m for supported filters.
- paramS.sitkFilterName.val : SITK filter name
- paramS.(parName).val : Required parameters ('parName') for SITK filter
CERR also supports rotation-invariant filtering by pooling filter responses obtained from rotated versions of the input image. This includes 4 right-angle rotations in 2D or 24 right-angle rotations in 3D.
** Usage**
rotS = paramS.RotationInvariance.val
rotS
is a dictionary with fields:
rotS.Dim : '2d' or '3d'
rotS.AggregationMethod : 'max', 'avg', or 'std'
global planC
indexS = planC{end};
scanNum = 1;
structNum = 5;
% Wavelets
fType = 'Wavelets'
paramS.Wavelets.val = 'coif';
paramS.Index.val = 1;
paramS.Direction.val = 'HLH';
label = 'textureMap1';
planC = createTextureMaps(scanNum,structNum,fType,paramS,label,planC);
%Haralick
fType = 'HaralickCooccurance';
paramS.NumLevels.val = 64;
paramS.PatchSize.val = [2 2 0]; %2D
paramS.Directionality.val = 2;
paramS.Type.val = 'All';
label = 'textureMap2';
planC = createTextureMaps(scanNum,structNum,fType,paramS,label,planC);
%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;
label = 'textureMap3';
planC = createTextureMaps(scanNum,structNum,fType,paramS,label,planC);