-
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
- SimpleITK
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. In addition to the filter settings described at the above links, the following parameters are supported for rotation invariance
rotS = paramS.RotationInvariance.val
rotS
is a dictionary with fields:
rotS.Dim : '2d' or '3d'
rotS.AggregationMethod : 'max', 'avg', or 'std'
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);
JSON configurations are described in Global-radiomics-feature-calculation-parameters.
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);