Skip to content

Haralick texture features

Aditi Iyer edited this page Feb 8, 2023 · 45 revisions

These features contain information about image textural characteristics like homogeneity, gray-tone linear dependencies, contrast, number and nature of boundaries present, and the complexity of the image [ 1 ].

Index

Available features

The following Haralick textures are available in CERR, as defined in [ 1 ] and [ 2 ]:

1. Energy

2. Entropy

3. Correlation

4. Inverse difference moment

5. Inertia

6. Sum average

7. Cluster shade

8. Cluster prominence

9. Haralick's correlation

where and are the mean and standard deviation of the row (or column, due to symmetry) sums.

Notation

: (i,j)th entry in a normalized Gray-Level Co-Occurrence Matrix (GLCM). The GLCM records the distribution of co-occurring intensities at a specified offset between pixels.

: Number of distinct gray levels in the quantizedimage.

.

.

Notes on implementation

  • CERR uses array indexing to speed up texture calculation, resulting in computation times that are competitive with the ITK library. This implementation also works with multiple CPUs, and the computation time can be further reduced by using multiple processor threads.

  • Texture computation depends on several parameters: (1) directionality, (2) image quantization, (3) patch-size defining the neighborhood, (4) handling of edge voxels within the region of interest, (5) averaging co-occurrence matrix vs. texture features across different directions etc. CERR provides a graphical user interface to input these parameters, and visualize their impact on the resulting texture maps.

  • CERR uses Texture Volume Histograms to reduce the Haralick texture maps into scalar features. This lets users make use of the entire distribution of texture values within the region of interest, rather than using just the mean and the standard deviations.

Filter parameters

  • Required
    NumLevels: No. gray levels
    PatchSize: Patch size [numRows, numCols, numSlices]
    Directionality: 1- 3D, 2 - 2D
    Type: 'Entropy','Energy','Sum Avg','Homogeneity','Contrast','Correlation','Cluster Shade','Cluster Promincence', 'Haralick Correlation' or 'All'

  • Optional parameters for image quantization
    minIntensity
    maxIntensity
    binWidth

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) obtain a Haralick texture map after cropping around the specified structure and (2) calculate first-order statistics from the filtered image.
{

"structures": ["ROI"],

"imageType": {
  		   "HaralickCooccurance": {
			    	    "NumLevels": 64,
				    "PatchSize":[5,5,5],
				    "Directionality": "1",
                                    "Type": "Entropy",      
                                    "minIntensity": -1000,
                                    "maxIntensity": 400,  
                                    "binWidth": 20  
			        }
	    },

"settings": {		   

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


                   "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. Haralick, Robert M., and Karthikeyan Shanmugam. "Textural features for image classification." IEEE Transactions on systems, man, and cybernetics 6 (1973).

  2. T.S. Yoo, M. J. Ackerman, W. E. Lorensen, W. Schroeder, V. Chalana, S. Aylward, D. Metaxas, R. Whitaker. Engineering and Algorithm Design for an Image Processing API: A Technical Report on ITK - The Insight Toolkit. In Proc. of Medicine Meets Virtual Reality, J. Westwood, ed., IOS Press Amsterdam pp 586-592 (2002).

Clone this wiki locally