Laws' textures - cerr/CERR GitHub Wiki

Laws textures are computed by convolutions with small (3x3 or 5x5) integer coefficient masks. Laws Energy maps are computed using a moving-window absolute average operation on Laws texture maps [ 1 ].

Available filters

Law's convolution kernels are generated from the following set of 1-D convolution kernels of lengths 3 and 5, as defined in [ 2 ].

1. Level (average gray level)
L3 = [ 1, 2, 1]
L5 = [ 1, 4, 6, 4, 1]

2. Edge (extract edge features)
E3 = [-1, 0, 1]
E5 = [-1, -2, 0, 2, 1]

3. Spot (extract spots)
S3 = [-1, 2, -1]
S5 = [-1, 0, 2, 0, -1]

4. Wave (extract wave features)
W5 = [-1, 2, 0, -2, 1]

5. Ripple (extract ripples)
R5 = [ 1, -4, 6, -4, 1]

CERR also supports Laws Energy maps, computed as the local mean of absolute intensities in a Laws texture map.

Implementation

  • 2-D & 3-D convolution kernels are computed by combining these 1-D convolution kernels using outer products.

  • CERR provides the 2-D and 3-D kernels generated using all possible combinations of these 1-D masks. Kernels are normalized if the normFlag input is set to 'Yes' (required for IBSI compliance).

Filter parameters

  • Laws' convolution
    Direction.: 1- 2D 2- 3D 3- All
    Type : 1- 3, 2- 5, 3- All
    Normalize: 'Yes', 'No'

  • Laws energy
    Direction: 1- 2D 2- 3D 3- All
    Type: 1- 3, 2- 5, 3- All
    Normalize: 'Yes', 'No'
    EnergyKernelSize: 3x1 vector specifying mean filter dimensions (set last element to 0 for 2D)
    EnergyPadMethod: Padding method for mean filter
    EnergyPadSize: 3x1 vector specifying padding dimensions for mean filter (set last element to 0 for 2D)

Usage

Filters can be applied by manually creating a dictionary of parameters or passing them via JSON-format configuration files.

  • Dictionaries are created using the syntax:
paramS.<parameter_name>.val = <value>;

where parameter_name is one of the supported filter parameters listed above and value, one of the associated arguments.

  • Sample filter configuration

The following settings can be used to (1) apply the L5E5 Laws Energy filter with normalization after cropping around the specified structure and padding by 2 voxel widths and (2) calculate first-order statistics from the filtered image.

{

"structures": ["ROI"],

"imageType": {
  		 "LawsEnergy": {
                "Direction": "2d",
                "Type": "L5E5",
		"Normalize": "yes",
                "EnergyKernelSize": [15,15],
                "EnergyPadMethod": "mirror",
                "EnergyPadSize" : [7,7,0]
	    },

"settings": {		   
                
                   "padding": {
                                "cropToMaskBounds": "yes"
                                "method": "mirror",  
                                "size": [2,2,0],
			       },

                   "firstOrder" :{ 
				     "offsetForEnergy": 0,
                                     "binNumEntropy":0
                                 }

            }
}

Configurations are parsed and converted to parameter dictionaries using

paramFile = 'Path/to/config_file.json'
paramS = getRadiomicsParamTemplate(paramFile);

Generating filtered images

global planC
strNum = 1;
scanNum = [];  % leave empty when passing structNum to automatically identify associated scan index
planC = generateTextureMapFromPlanC(planC,scanNum,strNum,paramS)

Extracting radiomic features

global planC
scanNum  = 1;
strNum = 2; 
featureS = calcGlobalRadiomicsFeatures(scanNum, structNum, paramS, planC);

References

[1] Rodojevic, G. L. M. Texture segmentation: Co-occurrence matrix and Laws’ texture masks methods. Energy, 1, 1. [2] IBSI-2 [https://www.overleaf.com/project/5da9e0b82f399f0001ad3970]

⚠️ **GitHub.com Fallback** ⚠️