Laplacian of Gaussian filter - cerr/CERR GitHub Wiki

The Laplacian computes the second spatial derivative of an image, useful for highlighting edges. To reduce the noise-sensitivity in approximating a second derivative measurement, smoothing is first performed using a Gaussian filter. These two operations are combined in the Laplacian of Gaussian (LoG) filter.

Standard LoG (IBSI-compliant)

gσ[k] = − 1/σ2 (1/√2πσ)D (D − ||k||22) e−||k||2/2σ2

σ - Standard deviation of the Gaussian controls the scale of the operator
D - Dimensionality (2-2D, 3-3D)
k - [k1, k2, k3] image directions
||k|| - Filter radius

Filter parameters

  • Sigma_mm: Gaussian smoothing width in physical units (mm)
  • Cutoff_mm: Filter radius in physical units (mm)
  • VoxelSize_mm : Voxel dimensions [dx, dy, dz] of input image (mm) (*Note: Not required if using JSON settings file)

Recursive LoG (ITK compliant)

CERR provides a recursive implementation of the LoG filter for improved speed and compatibility with the ITK implementation.

Filter parameters

  • Sigma_mm : Gaussian smoothing width in physical units (mm)

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 standard LoG filter with σ=1.5mm and cutoff=6mm, after cropping around the specified structure and padding by 6 voxel widths and (2) calculate first-order statistics from the filtered image.

{

"structures": ["ROI"],

"imageType": {
  		  "LoG_IBSI": {
                                 "Sigma_mm": [1.5,1.5],
                                 "CutOff_mm": [6,6]
			      }
	    },

"settings": {		   
                
                   "padding": {
                                "cropToMaskBounds": "yes",
                                "method": "mirror",  
                                "size": [6,6,0]
			       },
    
                   "firstOrder": { 
				            "offsetForEnergy": 0,
                                            "binNumEntropy": 64
                                 }

    }
}

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. Improving Deriche-style recursive Gaussian filters
  2. ITK
  3. IBSI
⚠️ **GitHub.com Fallback** ⚠️