The Neighboring Gray Tone Difference Matrix (NGTDM) is a texture analysis matrix that quantifies the average absolute difference between a voxel's intensity and the mean intensity of its surrounding neighbors. Unlike co-occurrence matrices, NGTDM captures the visual property of coarseness by measuring how much each voxel deviates from its local neighborhood average, making it sensitive to the rate of intensity change in a region of interest.
Glossary
Neighboring Gray Tone Difference Matrix (NGTDM)

What is Neighboring Gray Tone Difference Matrix (NGTDM)?
A second-order texture matrix quantifying the average absolute difference between a voxel's intensity and the mean intensity of its surrounding neighbors within a defined distance.
From the NGTDM, five primary features are derived: Coarseness, Contrast, Busyness, Complexity, and Strength. Coarseness reflects the spatial rate of intensity change, with higher values indicating smoother textures. Busyness measures rapid intensity fluctuations, while Complexity indicates the presence of many distinct visual patterns. These features are standardized under the Image Biomarker Standardisation Initiative (IBSI) guidelines to ensure reproducibility across different imaging platforms and clinical studies.
Core NGTDM Features
The Neighboring Gray Tone Difference Matrix (NGTDM) quantifies the absolute intensity difference between a central voxel and the average of its neighbors, capturing coarseness, contrast, and busyness without directional dependence.
Coarseness
Quantifies the spatial rate of intensity change. Coarseness is the inverse of the summed NGTDM probabilities; a high value indicates a spatially uniform, coarse texture with minimal intensity variation between neighbors. Low coarseness signals a fine, rapidly changing texture. This metric is fundamental for distinguishing homogeneous tissue from heterogeneous tumor microenvironments.
Contrast
Measures the dynamic range of intensity differences between neighboring voxels. High contrast indicates sharp, distinct boundaries between tissue types or the presence of calcifications. The calculation weights the squared difference between gray levels by their occurrence probability, making it sensitive to high-magnitude intensity transitions that often correlate with aggressive pathology.
Busyness
Captures the spatial frequency of intensity changes. Busyness is computed as the sum of NGTDM probabilities multiplied by their respective gray-level differences, normalized by the total number of contributing voxels. A high busyness value reflects rapid, frequent pixel-to-pixel fluctuations, characteristic of highly heterogeneous or necrotic tissue regions.
Complexity
Evaluates the information content and structural intricacy of the texture. Complexity sums the weighted absolute differences between gray-level pairs, where weights are the normalized NGTDM probabilities. High complexity indicates non-uniform, intricate patterns with many distinct intensity transitions, often observed in invasive tumor margins with infiltrative growth patterns.
Strength
Represents the overall emphasis of high-intensity primitives within the texture. Strength is calculated by summing the product of probability-weighted squared gray-level differences, normalized by the sum of all probabilities. A high strength value indicates that bright, well-defined structures dominate the region, useful for identifying enhancing lesions in contrast-enhanced imaging.
Frequently Asked Questions
Clear, technical answers to the most common questions about the Neighboring Gray Tone Difference Matrix and its role in quantifying image texture.
The Neighboring Gray Tone Difference Matrix (NGTDM) is a texture analysis matrix that quantifies the average absolute difference between the intensity of a central voxel and the mean intensity of its surrounding neighbors within a defined distance. Unlike co-occurrence matrices that analyze pixel pairs, the NGTDM captures the local rate of intensity change, making it highly sensitive to the coarseness of the overall texture. The algorithm iterates through every voxel in a discretized Region of Interest (ROI). For each voxel with gray-level i, it calculates the sum of absolute differences between i and the average intensity of all neighboring voxels within a Chebyshev distance d. This sum is recorded in the matrix entry s(i), while n(i) tracks the count of voxels possessing that gray-level. The result is a one-dimensional matrix where high values indicate a coarse, uneven texture with sharp intensity transitions, and low values suggest a fine, uniform texture. This mechanism directly reflects the human visual perception of roughness and granularity in medical images.
NGTDM vs. Other Texture Matrices
A feature-level comparison of the Neighboring Gray Tone Difference Matrix against other core radiomic texture matrices defined by the Image Biomarker Standardisation Initiative (IBSI).
| Feature | NGTDM | GLCM | GLRLM | GLSZM |
|---|---|---|---|---|
Spatial Relationship Quantified | Difference between voxel intensity and neighborhood mean | Joint probability of pixel pairs at a defined offset | Length of consecutive collinear pixels with same intensity | Size of connected homogeneous regions with same intensity |
Rotational Invariance | ||||
Dimensionality | 2D (single slice) or 3D (volumetric) | 2D (4 directions) or 3D (13 directions) | 2D (4 directions) or 3D (13 directions) | 2D (8-connectivity) or 3D (26-connectivity) |
Primary Texture Descriptor | Coarseness | Contrast and correlation | Roughness and directionality | Homogeneity and granularity |
Sensitivity to Noise | Low (averaging in neighborhood) | High (exact pair counts) | Moderate | Low (zone merging) |
Computational Complexity | O(N × k), where k is neighborhood size | O(N × G²), where G is gray levels | O(N × G × L), where L is max run length | O(N × G × Z), where Z is max zone size |
Number of IBSI Features | 5 | 24 | 16 | 16 |
Key Clinical Application | Quantifying overall tissue coarseness in tumor heterogeneity | Detecting directional fibrotic patterns | Characterizing structural anisotropy | Measuring tumor sub-region homogeneity |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Explore the foundational texture matrices and statistical methods that complement NGTDM analysis for comprehensive radiomic feature extraction.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us