-
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 = createTextureMaps(scanNum,structNum,ftype,paramS,label,planC);
ftype
is the class of texture to be computed. Supported classes include HaralickCooccurance
, Wavelets
, Sobel
, LoG
(ITK-compliant), LoG_IBSI
(IBSI-compliant), Gabor
, Mean
, FirstOrderStatistics
, LawsConvolution
, LawsEnergy
, and CoLlage
. Selected SimpleITK filters can be invoked by specifying SimpleITK
as the filter type.
paramS
is a dictionary of parameters specific to each texture class:
1. Haralick co-occurrence
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
2. Wavelets 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
3. Sobel
None
4. LoG (ITK-compatible, recursive filter implementation)
- paramS.Sigma_mm.val : Gaussian smoothing width in physical units (mm)
5. LoG_IBSI (IBSI2-compatible implementation)
- paramS.Sigma_mm.val : Gaussian smoothing width in physical units (mm)
- paramS.Cutoff_mm.val : Filter radius in physical units (mm)
6. Gabor (IBSI2 compliant)
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.
7. Mean
- paramS.KernelSize.val : Patch size [numRows, numCols, numSlices]
8. Laws' convolution filters
- paramS.Direction.val : 1- 2D 2- 3D 3- All
- paramS.Type.val : 1- 3, 2- 5, 3- All
- paramS.Normalize.val : 'Yes', 'No'
9. Laws energy
- 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)
10. CoLlage
- 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
11. SimpleITK
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);