Inferensys

Glossary

Neighborhood Gray-Tone Difference Matrix (NGTDM)

A texture matrix that quantifies the difference between a pixel's gray value and the average gray value of its surrounding neighbors to measure local intensity variation.
Developer working on RAG retrieval system, document chunks visible on screen, technical workspace with code editor.
TEXTURE ANALYSIS

What is Neighborhood Gray-Tone Difference Matrix (NGTDM)?

A second-order texture matrix that quantifies the local intensity variation by measuring the difference between a voxel's gray-level and the average gray-level of its neighbors within a defined distance.

The Neighborhood Gray-Tone Difference Matrix (NGTDM) is a texture analysis method that quantifies the spatial coarseness of an image by calculating the sum of absolute differences between the gray-level of a central voxel and the mean gray-level of its surrounding neighbors within a Chebyshev distance. Unlike matrices that focus on specific directional relationships, the NGTDM captures the aggregate local intensity variation in a rotationally invariant manner, making it a robust descriptor of tissue heterogeneity in radiomics.

From the NGTDM, five primary features are derived: coarseness, contrast, busyness, complexity, and strength. Coarseness reflects the granularity of the texture, with higher values indicating larger, more uniform regions. Busyness measures the rate of spatial intensity changes, while complexity indicates the information content. These features are highly sensitive to the intensity discretization and neighborhood distance parameters, requiring strict adherence to Image Biomarker Standardisation Initiative (IBSI) guidelines for reproducible extraction.

Texture Metrics

Key NGTDM-Derived Features

The Neighborhood Gray-Tone Difference Matrix (NGTDM) quantifies the difference between a voxel's intensity and the average intensity of its neighbors within a defined distance. The following five core features are derived directly from the NGTDM to characterize intralesional heterogeneity.

01

Coarseness

A measure of the spatial rate of intensity change. Coarseness quantifies the granularity of the texture by summing the product of each gray-level probability and its corresponding NGTDM entry.

  • High Coarseness: Indicates a uniform, slowly changing texture with large, homogeneous regions. Spatial variations are low.
  • Low Coarseness: Indicates a fine, rapidly changing texture with high spatial frequency and small, distinct primitives.
  • Clinical Relevance: In oncology, higher coarseness often correlates with more homogeneous tumor tissue, while lower values suggest greater microstructural heterogeneity.
02

Contrast

Quantifies the intensity difference between neighboring regions and the dynamic range of the gray levels. Contrast is high when the image has sharp intensity transitions and a wide range of gray values.

  • Calculation: It weights the squared difference between gray-level pairs by their average probability, emphasizing large intensity excursions.
  • High Contrast: Suggests a heterogeneous texture with distinct, sharply delineated boundaries between tissue compartments.
  • Low Contrast: Suggests a blurred, smooth texture with minimal intensity variation between adjacent regions.
  • Example: A CT scan with a necrotic core adjacent to a highly vascularized rim will exhibit high contrast.
03

Busyness

Measures the spatial frequency of intensity changes. Busyness is high when intensity changes rapidly from one pixel to its neighborhood, indicating a 'busy' texture.

  • Mechanism: It computes the sum of the product of gray-level probabilities and their NGTDM values, normalized by the absolute differences between gray levels.
  • High Busyness: Indicates a fine, chaotic texture with rapid, high-frequency intensity fluctuations.
  • Low Busyness: Indicates a coarse, slowly varying texture.
  • Distinction from Coarseness: While coarseness measures the magnitude of the difference, busyness emphasizes the rate of change between adjacent intensity levels.
04

Complexity

A measure of the information content and the number of primitive components in the texture. Complexity is high when there are many distinct gray-level patches and rapid spatial changes.

  • Calculation: It sums the absolute differences between the probabilities of gray-level pairs, weighted by the sum of their NGTDM values.
  • High Complexity: Indicates a non-uniform, intricate texture with many different intensity primitives and irregular borders.
  • Low Complexity: Indicates a simple, regular texture with few distinct gray-level components.
  • Clinical Context: High complexity in a tumor ROI often indicates a disorganized, aggressive growth pattern with mixed cellularity and necrosis.
05

Strength

A measure of the overall emphasis on coarse, high-contrast primitives relative to fine, low-contrast ones. Strength is high when the image contains well-defined, easily distinguishable coarse structures.

  • Mechanism: It is computed as the ratio of the sum of the product of probabilities and squared gray-level differences to the sum of the NGTDM values.
  • High Strength: Indicates that the texture is dominated by bold, coarse, and visually prominent structures.
  • Low Strength: Indicates that fine, low-contrast textures dominate the image.
  • Interpretation: Strength helps differentiate between images where coarse features are visually dominant versus those where they are present but not the primary textural signal.
NGTDM EXPLAINED

Frequently Asked Questions

Clear, technical answers to the most common questions about the Neighborhood Gray-Tone Difference Matrix and its role in quantifying image texture.

The Neighborhood Gray-Tone Difference Matrix (NGTDM) is a second-order statistical texture matrix that quantifies the difference between a pixel's gray-level value and the average gray-level value of its surrounding neighbors within a defined distance. Unlike the Gray-Level Co-occurrence Matrix (GLCM), which analyzes pixel pairs, the NGTDM captures the spatial relationship between a central voxel and its local neighborhood. The algorithm works by: (1) defining a neighborhood size (typically a Chebyshev distance of 1, creating a 3x3 kernel in 2D or 3x3x3 in 3D), (2) calculating the average gray tone of all neighbors for each pixel, (3) computing the absolute difference between the center pixel's value and this neighborhood average, and (4) summing these differences for each discrete gray level to populate the matrix. This approach excels at capturing coarseness, contrast, and busyness—textural properties that directly correlate with human visual perception of roughness and granularity in medical images.

TEXTURE MATRIX COMPARISON

NGTDM vs. Other Texture Matrices

Comparison of the Neighborhood Gray-Tone Difference Matrix against other core radiomic texture matrices across key methodological and computational properties.

FeatureNGTDMGLCMGLRLMGLSZM

Statistical Order

Second-order

Second-order

Higher-order

Higher-order

Primary Quantification

Gray-tone difference from neighborhood mean

Pixel pair co-occurrence probability

Consecutive pixel run length

Connected region size

Directional Dependence

Rotationally Invariant

Captures Coarseness

Captures Contrast

Computational Complexity

O(n × m)

O(n² × d)

O(n × m × d)

O(n × m)

Typical Feature Count

5 features

22-24 features

16 features

16 features

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.